/* === БАЗОВЫЕ СТИЛИ === */
body {
  font-family: Arial, sans-serif;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 1rem;
  box-sizing: border-box;
  color: black;
}

/* === ОБЩИЕ КОНТЕЙНЕРЫ === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  background: #59aaff;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  color: black;
  border-radius: 15px;
}

/* === ХЕДЕР И НАВИГАЦИЯ === */
header {
  width: 100%;
  background: #4a90e2;
  padding: 1rem 0;
  margin-bottom: 2rem;
  margin: 5px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-radius: 10px;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.site-logo {
  height: 120px;
  width: auto;
  border-radius: 15px;
  margin: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.site-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* === НАВИГАЦИОННОЕ МЕНЮ === */
.dropdown-menu ul {
  list-style: none;
  margin: 5px;
  padding: 0;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.dropdown-menu li {
  position: relative;
}

.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: #fff;
  background-color: black;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background-color: #357ab8;
}

/* === ПОДМЕНЮ === */
.submenu {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  min-width: 160px;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  border-radius: 4px;
  overflow: hidden;
}

.menu-item:hover .submenu {
  display: block !important;
}

.submenu li a {
  padding: 10px;
  color: #333;
  background-color: #ffffff;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
}

.submenu li a:hover {
  background-color: #f0f0f0;
}

/* === ОСНОВНОЙ КОНТЕНТ === */
main {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* === СЕКЦИИ ВХОДА / ВЫХОДА === */
#login-section,
#logout-section {
  width: 100%;
  max-width: 350px;
  margin: 1rem auto;
  padding: 1.5rem;
  background: #4a90e2;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  box-sizing: border-box;
  transition: opacity 0.3s ease, visibility 0.3s ease, height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
  position: relative;
}

#login-section.hidden,
#logout-section.hidden {
  opacity: 0;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
  padding: 0;
  box-shadow: none;
}

/* === СЕКЦИЯ НОВОСТЕЙ === */
#featured-news {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  box-sizing: border-box;
}

/* === КАРТА === */
#map-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 800px;
  height: 400px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#map {
  width: 100%;
  height: 100%;
}

/* === ФОРМЫ === */
form {
  width: 100%;
  max-width: 320px;
  margin: 20px auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 0.5rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
}

/* === ХЭШТЕГИ === */
#hashtags-section {
  margin: 2rem auto;
  padding: 1.5rem;
  background: #4a90e2;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 800px;
  text-align: center;
}

.hashtags-container,
.post-hashtags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1rem 0;
}

.hashtag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #ffffff, #86c1ff);
  color: #000000;
  border-radius: 25px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.hashtag:hover {
  background: linear-gradient(135deg, #357ab8, #4a90e2);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hashtag.active {
  background: linear-gradient(135deg, #5aa0e6, #4a90e2);
  border-color: #357ab8;
}

.hashtag-count {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-left: 0.4rem;
  background: rgba(255,255,255,0.2);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
}

/* === КНОПКИ === */
button, .btn-primary, .btn-create, .read-more-btn, .share-btn {
  padding: 10px 20px;
  background: black;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease;
  text-decoration: none;
  display: inline-block;
  margin: 5px;
}

button:hover, .btn-primary:hover, .btn-create:hover, .read-more-btn:hover, .share-btn:hover {
  background: #357ab8;
}

.btn-secondary, .back-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover, .back-btn:hover {
  background: #545b62;
}

.btn-logout {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.btn-logout:hover {
  background: #c82333;
}

.read-more-btn {
  padding: 0.5rem 1rem;
  margin-right: 0.5rem;
  font-size: 14px;
  border-radius: 5px;
  background: black;
}

.share-btn {
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* === ЭЛЕМЕНТЫ НОВОСТЕЙ И ПОСТОВ === */
.news-item,
.news-card {
  background: white;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 80%;
  max-width: 700px;
  margin: 1rem auto;
}

.news-item:hover,
.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
  font-size: 0.9rem;
  color: #666;
}

.news-info {
  display: flex;
  gap: 1rem;
}

.news-image,
.post-image {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 6px;
  margin: 1rem 0;
}

.news-category {
  background: #4a90e2;
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
}

.read-more {
  display: inline-block;
  margin-top: 15px;
  color: #4a90e2;
  text-decoration: none;
  font-weight: bold;
}

.read-more:hover {
  text-decoration: underline;
}

/* === ХЭШТЕГИ В ПОСТАХ === */
.post-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.post-hashtag {
  display: inline-flex;
  flex-wrap: wrap;
  margin: 5px;
  background: #e4efff;
  color: #000000;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
  border: 1px solid #4a90e2;
}

.post-hashtag:hover {
  background: #4a90e2;
  color: white;
}

/* === ДЕТАЛИ ПОСТА === */
.post-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.post-header {
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.post-title {
  font-size: 2.2rem;
  color: #4a90e2;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: #666;
  font-size: 0.9rem;
}

.post-author {
  font-weight: bold;
  color: #4a90e2;
}

.post-date {
  color: #888;
}

.post-views {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 2rem;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 2rem;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #f0f0f0;
}

.nav-btn {
  background: #f8f9fa;
  color: #333;
  text-decoration: none;
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 45%;
  transition: background 0.3s ease;
}

.nav-btn:hover {
  background: #e9ecef;
}

.nav-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8f9fa;
}

/* === СТИЛИ КОНТЕНТА === */
.news-content,
.post-content {
  line-height: 1.6;
}

.news-content h1, .news-content h2, .news-content h3,
.post-content h1, .post-content h2, .post-content h3 {
  color: #4a90e2;
  margin: 15px 0 10px 0;
}

.news-content blockquote, .post-content blockquote {
  border-left: 4px solid #4a90e2;
  margin: 15px 0;
  padding: 10px 20px;
  background: #f8f9fa;
  font-style: italic;
  color: #555;
}

.news-content pre, .post-content pre {
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 15px;
  margin: 15px 0;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
}

.news-content ul, .news-content ol,
.post-content ul, .post-content ol {
  margin: 15px 0;
  padding-left: 30px;
}

.news-content li, .post-content li {
  margin: 5px 0;
}

.news-content a, .post-content a {
  color: #007bff;
  text-decoration: underline;
}

.news-content a:hover, .post-content a:hover {
  color: #0056b3;
}

/* === ПОЛЬЗОВАТЕЛЬСКИЕ ЭЛЕМЕНТЫ === */
.user-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.welcome-message {
  color: #4a90e2;
  font-weight: bold;
}

/* === КОМАНДА И МИССИЯ === */
.team-section {
  padding: 30px 0;
}

.team-members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.team-member {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-left: 4px solid #4a90e2;
}

.team-member h3 {
  color: #4a90e2;
  margin-bottom: 10px;
  font-size: 1.4em;
}

.team-member p {
  color: #555;
  line-height: 1.6;
  margin: 0;
}

.mission-content {
  line-height: 1.7;
  margin: 20px 0;
}

.mission-languages {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin: 30px 0;
}

.language-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #4a90e2;
}

.language-section h3 {
  color: #4a90e2;
  margin-bottom: 15px;
  font-size: 1.3em;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 8px;
}

.language-section p {
  margin-bottom: 12px;
  text-align: justify;
}

/* === СТАТУСНЫЕ ЭЛЕМЕНТЫ === */
.loading-spinner {
  text-align: center;
  padding: 3rem;
  font-size: 1.1rem;
  color: #666;
}

.error-message {
  text-align: center;
  padding: 3rem;
  color: #dc3545;
  font-size: 1.1rem;
}

/* === ФУТЕР === */
footer {
  width: 100%;
  background: #4a90e2;
  color: white;
  padding: 1rem 0;
  margin-top: 2rem;
  text-align: center;
}

footer .container {
  color: black;
}

/* === АДАПТИВНОСТЬ === */
/* ...оставляем ваши медиазапросы без изменений... */

/* === СТИЛИ ДЛЯ КАРТЫ === */
.leaflet-popup-content {
  font-family: Arial, sans-serif;
  font-size: 14px;
  padding: 10px;
}

.leaflet-popup-content h4 {
  margin: 0 0 5px 0;
  color: #1a3e6e;
}
