body {
  font-family: Inter, Arial;
  margin: 0;
  background: #F7F9FB;
  color: #1A1A1A;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.header {
  background: white;
  border-bottom: 1px solid #eee;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  gap: 15px; /* Добавляем промежуток между лого и меню */
}

.logo {
  flex-shrink: 0; /* Логотип не сжимается */
}

.logo img {
  height: 45px;
  max-width: 100%;
}

nav {
  display: flex;
  align-items: center;
  gap: 20px; /* Вместо margin-left */
  flex-shrink: 1; /* Меню может сжиматься */
  flex-wrap: nowrap; /* Запрещаем перенос */
}

nav a {
  text-decoration: none;
  color: #333;
  white-space: nowrap; /* Запрещаем перенос текста в ссылках */
  font-size: 16px;
}

nav a:hover {
  color: #2EC4B6;
}

/* ГЕРОЙ - ОСНОВНЫЕ СТИЛИ */
.hero {
  background-image: url('/assets/hero.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
      rgba(0, 0, 0, 0.4) 0%,
      rgba(0, 0, 0, 0.1) 50%,
      transparent 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  padding: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-title {
  font-family: Strelka;
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.hero h1 {
  font-size: 48px;
}

.subtitle {
  color: #f5f9ff;
  font-size: 20px;
}

.hero-buttons {
  margin-top: 30px;
}

.btn {
  padding: 14px 24px;
  border-radius: 8px;
  text-decoration: none;
  margin: 10px;
  display: inline-block;
}

.primary {
  background: #2EC4B6;
  color: white;
}

.secondary {
  background: #C850C0;
  color: white;
}

.section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: auto;
}

.section h2 {
  text-align: left;
  margin-bottom: 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition: 0.2s;
}

.card:hover {
  transform: translateY(-5px);
  border: 1px solid #2EC4B6;
}

.card h3 a {
  text-decoration: none;
  color: #2EC4B6;
  transition: 0.2s;
}

.card h3 a:hover {
  color: #1da99d;
}

.footer {
  margin-top: 100px;
  background: #111;
  color: white;
  text-align: center;
  padding: 40px;
  width: 100%;
}

.vk-link {
  color: #ffffff;
  text-decoration: none;
  opacity: 1;
}

.vk-link:hover {
  opacity: 0.9;
}

.article-content {
  max-width: 800px;
  margin: auto;
  line-height: 1.6;
  font-size: 18px;
}

.article-content img {
  max-width: 100%;
  border-radius: 8px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 10px;
  width: 320px;
  text-align: center;
}

.modal-content input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
}

.modal-content button {
  width: 100%;
  padding: 12px;
  background: #2EC4B6;
  border: none;
  color: white;
  border-radius: 6px;
}

.close {
  position: absolute;
  right: 25px;
  top: 20px;
  font-size: 24px;
  cursor: pointer;
}

@font-face {
  font-family: 'Strelka';
  src: url('/assets/fonts/Strelka_Ultra.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media only screen and (max-width: 768px) {
  .hero {
    background-image: url('/assets/hero-mobile.jpeg');
    background-attachment: scroll;
    min-height: 80vh;
    width: 100%;
    background-size: cover;
    background-position: center;
  }

  .container {
    width: 92%;
    padding: 0 10px;
  }

  .header {
    width: 100%;
    padding: 0 10px;
  }

  .header-inner {
    gap: 10px; /* Уменьшаем промежуток */
    padding: 12px 0;
  }

  .logo img {
    height: 35px; /* Уменьшаем логотип на мобильных */
  }

  nav {
    gap: 12px; /* Уменьшаем промежуток между ссылками */
  }

  nav a {
    font-size: 14px; /* Уменьшаем размер шрифта */
  }

  .footer {
    width: 100%;
    padding: 30px 20px;
    margin-top: 50px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero h1 {
    font-size: 28px;
  }

  .subtitle {
    font-size: 16px;
  }

  .section {
    padding: 50px 15px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .modal-content {
    width: 90%;
    max-width: 320px;
    padding: 25px;
  }

  .btn {
    padding: 12px 20px;
    margin: 5px;
    font-size: 14px;
  }

    /* ---- Карточки-ссылки на мобильных ---- */

  /* Отключаем hover-эффект подъёма: на тач-устройствах он "залипает"
     после тапа и карточка остаётся приподнятой */
  .card:hover {
    transform: none;
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  }

  /* Зато даём отклик на нажатие пальцем */
  .card-link:active .card {
    transform: scale(0.98);
    border-color: #2EC4B6;
    transition: transform 0.1s ease, border-color 0.1s ease;
  }

  /* Чуть компактнее внутри карточки, чтобы на узком экране
     влезало больше контента */
  .card {
    padding: 20px;
    border-radius: 10px;
  }

  .card h3 {
    font-size: 1.15rem;
    margin: 0 0 8px;
  }

  .card p {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
  }

  /* На всякий случай: фокус для клавиатуры/скринридера на мобильных
     тоже должен быть заметен */
  .card-link:focus-visible .card {
    outline: 2px solid #2EC4B6;
    outline-offset: 2px;
  }
}

/* Для очень маленьких экранов (до 480px) */
@media only screen and (max-width: 480px) {
  .header-inner {
    gap: 8px;
  }

  .logo img {
    height: 30px;
  }

  nav {
    gap: 8px;
  }

  nav a {
    font-size: 12px;
  }
/* Стиль карточки */
   .card {
    padding: 16px;
  }

  .card h3 {
    font-size: 1.05rem;
  }

  .card p {
    font-size: 0.9rem;
  }

  /* Дополнительные стили для маршрутов */
.difficulty-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  background: #e9ecef;
  color: #495057;
}

.route-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 10px 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
}

.route-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
}

.route-stat .icon {
  font-size: 1.1rem;
}

.route-stat .value {
  font-weight: 600;
  color: #212529;
}

.route-map-container {
  height: 200px;
  background: #f8f9fa;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 15px;
}

.route-map-container .route-map {
  width: 100%;
  height: 100%;
}

.routes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.no-routes {
  text-align: center;
  padding: 60px 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.no-routes p {
  font-size: 1.2rem;
  color: #6c757d;
  margin-bottom: 20px;
}
}
/* Обёртка-ссылка вокруг карточки */
.card-link {
  display: block;            /* чтобы ссылка занимала всю ширину ячейки грида */
  text-decoration: none;     /* убираем подчёркивание */
  color: inherit;            /* наследуем цвет текста (h3, p внутри) */
  outline: none;             /* убираем рамку фокуса по умолчанию */
}

/* Убираем синий цвет посещённых/обычных ссылок у заголовков внутри */
.card-link h3 {
  color: #1A1A1A;
  transition: color 0.2s;
}

/* Подсветка заголовка при наведении — в тон остального сайта */
.card-link:hover .card h3 {
  color: #2EC4B6;
}

/* Аккуратный фокус для клавиатуры (доступность) */
.card-link:focus-visible .card {
  outline: 2px solid #2EC4B6;
  outline-offset: 4px;
}

/* На всякий случай — если .card внутри ссылки теряет свои размеры */
.card-link > .card {
  height: 100%;
  box-sizing: border-box;
}
