/* Основные переменные */
:root {
  --primary: #0066cc;
  --primary-dark: #004080;
  --primary-light: #4d9eff;
  --background: #f0f8ff;
  --white: #ffffff;
  --text: #2a2a2a;
  --text-light: #555;
  --text-lighter: #777;
  --card-bg: #ffffff;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.15);
  --discord: #5865F2;
  --vatsim: #1a4b8c;
  --transition: all 0.3s ease;
}

/* Базовые стили */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Вспомогательные классы */
.white-text {
  color: var(--white);
}

/* Шапка сайта */
.site-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('src/UNNT_TERMINAL_SUNSET.png') center/cover no-repeat;
  opacity: 0.15;
  z-index: 0;
}

.header-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.logo {
  height: 5rem;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.site-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-subtitle {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.header-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  color: var(--white);
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-link:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  text-decoration: none;
}

.header-link img {
  height: 1.2rem;
  width: auto;
}

/* Навигационное меню */
.main-nav {
  background-color: var(--primary-dark);
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Центрируем все содержимое */
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center; /* Выравниваем элементы по центру вертикально */
}

/* Остальные стили остаются без изменений */
.nav-link {
  color: var(--white);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: var(--transition);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-link:hover, .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

.nav-link.home-link {
  background-color: rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.language-switcher {
  display: flex;
  gap: 0.5rem;
  margin-left: 0.5rem; /* Небольшой отступ от последней ссылки */
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.lang-flag {
  height: 1.25rem;
  width: 1.75rem;
  border-radius: 0.2rem;
  transition: var(--transition);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.lang-btn.active .lang-flag {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
  opacity: 1;
  filter: none;
}

.lang-btn:not(.active) .lang-flag {
  opacity: 0.7;
  filter: grayscale(20%);
}

.lang-btn:hover .lang-flag {
  transform: scale(1.1);
  opacity: 1;
  filter: none;
}

/* Основное содержимое */
.main-content {
  flex: 1;
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 4rem;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
  border-radius: 3px;
}

.section-text {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

/* Сетки */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Карточки */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.info-card {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 1.5rem;
  background-color: var(--primary);
  border-radius: 0.5rem;
}

.card-text {
  margin-bottom: 0;
  color: var(--text-light);
}

.airport-card {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.airport-card .card-content {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Changed from flex-end to flex-start */
  background: linear-gradient(rgba(0, 0, 0, 0.5), transparent); /* Reversed gradient */
  color: var(--white);
  transition: var(--transition);
}

.airport-name {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.airport-description {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 1rem;
  transform: translateY(100%);  /* Изначально спрятан снизу */
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease; /* Плавный переход */
  z-index: 3;
  text-align: center;
  font-size: 0.95rem;
}

.airport-card:hover .airport-description {
  transform: translateY(0);   /* Поднимается до своего положения */
  opacity: 1;                 /* Делаем текст видимым */
}


.airport-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: var(--transition);
}

.airport-card:hover .card-content {
  background: linear-gradient(rgba(0, 0, 0, 0.7), transparent); /* Reversed gradient for hover */
}
/* Ссылки */
a {
  color: var(--primary);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

.email-link {
  color: var(--primary);
  font-weight: 500;
}

.email-link:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* Подвал */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* Кнопка "Наверх" */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99;
  width: 3rem;
  height: 3rem;
  background-color: var(--primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
}
/* Гамбургер-меню (изначально скрыто) */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* На ПК (ширина > 768px) – обычное меню */
.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.language-switcher {
  display: flex;
  gap: 0.5rem;
}

/* На мобильных (ширина ≤ 768px) – гамбургер и скрытое меню */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block; /* Показываем гамбургер */
  }

  .nav-links {
    display: none; /* Скрываем обычные ссылки */
    flex-direction: column;
    width: 100%;
    background-color: var(--primary-dark);
    padding: 0.5rem 0;
  }

  .nav-container.mobile-active .nav-links {
    display: flex; /* Показываем при открытии */
  }

  .language-switcher {
    display: none; /* Скрываем переключатель языка */
  }

  .nav-container.mobile-active .language-switcher {
    display: flex; /* Показываем при открытии */
    width: 100%;
    justify-content: center;
    padding: 0.5rem 0;
  }
}
/* Адаптивность */
@media (max-width: 768px) {
  .site-header h1 {
    font-size: 1.8rem;
  }
  
  .header-subtitle {
    font-size: 1rem;
  }
  
  .logo {
    height: 4rem;
  }
  
  .nav-container {
    flex-direction: column;
  }
  
  .nav-links {
    justify-content: center;
  }
  
  .language-switcher {
    margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {
  .site-header h1 {
    font-size: 1.5rem;
  }
  
  .logo-container {
    gap: 1rem;
  }
  
  .header-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }

  }
