/* ========================================
   1. Шрифты и Базовые Стили (Reset)
   ======================================== */
@font-face {
    font-family: 'FindsAns Pro';
    src: url('../fonts/FindsAns Pro/FindsAnsPro-Regular.ttf') format('truetype');
    font-weight: 400;
}
body {    
    color: #FFFFFF;
    font-family: 'FindsAns Pro', sans-serif;
    font-weight: 500;
    margin: 0;

    background-color: #15263A;
    background-image: url('../images/GasMaskIcon1.png');
    background-size: 300px;
    background-repeat: repeat;
    background-attachment: fixed;
}

html {
    scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }


/* ========================================
   2. Хедер (Header)
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to right, #152332 0%, #142D49 25%, #152332 50%, #142D49 75%, #152332 100%);
    box-shadow: 0px 8px 10px rgba(0, 0, 0, 0.25);
}

.header__inner {
    position: relative;
    margin: 0 auto;
    padding: 0 40px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
}

.logo img { display: block; height: 100%; }

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav--mobile {
    display: none;
}

.nav__link {
    color: #FFFFFF;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 20px;
    line-height: 1;
    white-space: nowrap;
    transition: text-shadow 0.2s ease-in-out, color 0.2s ease-in-out;
}

.nav__link:hover {
    text-shadow: 3px -3px 10px rgba(127, 233, 218, 0.75), -3px 3px 10px rgba(127, 233, 218, 0.75);
}

/* --- Блок с кнопками справа --- */
.header__actions {
    position: absolute; /* Вырываем из потока */
    right: 40px;
    top: 50%;
    transform: translateY(-50%);

    display: flex;
    align-items: center;
    gap: 20px; /* Отступ между ключом и бургером */
}

.key-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 0; /* Убирает лишние отступы у кнопки */
}

.key-button img {
    height: 40px;
}

.burger {    
    display: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    height: 40px;
}

.burger img { display: block; height: 100%; }


/* ========================================
   4. Главный экран (Hero Section)
   ======================================== */
.hero {
    position: relative; 
    height: 800px;
    overflow: hidden; 
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to top, #1E2838, rgba(0, 0, 0, 0));
    z-index: 5;
    pointer-events: none;
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: blur(4px);
    transform: scale(1.05);
}

.hero__background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    opacity: 0.6;
}

.hero__background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__character {
    position: absolute;
    bottom: -100px;
    left: 27%;
    transform: translateX(-50%);    
    width: auto;
    z-index: 2; 
}

.hero__character img {
    height: 763px;
    width: auto;
    filter: drop-shadow(2px -2px 5px rgba(255, 255, 255, 0.3));
}


/* ========================================
   5. Контент на Главном экране
   ======================================== */
.hero__socials {
    position: absolute;
    top: 110px;
    right: 40px;
    z-index: 3;
    width: 40px;

    display: flex;
    flex-direction: column; /* Разворачиваем иконки в колонку */
    gap: 18px;
}
.hero__socials img {
    height: auto;
    width: 100%;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.hero__socials a:hover img { 
    opacity: 1;
    transform: scale(1.1);
}

.hero__cta {
    position: absolute;
    bottom: 100px;
    right: 40px;
    z-index: 3;

    text-align: right;
}

.cta__text {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    max-width: 400px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
}
.cta__text--accent {
    color: #7FDFDA;
}


/* ========================================
   X. Общие компоненты (UI Kit)
   ======================================== */
.btn {
    display: inline-block;    
    border: 4px solid rgba(255, 255, 255);
    color: #FFFFFF;
    padding: 20px 91px;
    border-radius: 12px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: 0.2s ease;
    cursor: pointer;
    text-align: center;
    font-family: 'FindsAns Pro', sans-serif;
}
.btn:hover {
    background-color: rgba(127, 233, 218, 0.15);
    box-shadow: 3px -3px 10px rgba(127, 233, 218, 0.50), -3px 3px 10px rgba(127, 233, 218, 0.50);
}
/* --- Модификатор для кнопок-табов в гайдах --- */
.btn--tab {
    width: 100%;
    font-size: 24px;
    font-weight:500;
    padding: 15px;
    text-transform: lowercase;
    background-color: rgba(0, 0, 0, 0.25);
}

/* Стиль для активного таба */
.guides__navigation .btn--tab.active {
    background-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;    
    box-shadow: 3px -3px 10px rgba(127, 233, 218, 0.50), -3px 3px 10px rgba(127, 233, 218, 0.50);
}


/* ========================================
   6. Секция Карт (Maps Section)
   ======================================== */

.maps {
    position: relative;
    padding: 100px 0;
}

.maps__container {
    max-width: 1240px; 
    margin: 0 auto;
    padding: 0 40px;
    position: relative; /* Чтобы контент был поверх градиента */
    z-index: 2;
}

.maps::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, #1E2838, rgba(0, 0, 0, 0));
    z-index: 5;
    pointer-events: none;
}

.maps__title {
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 60px;
}

/* --- Сетка карт --- */
.maps__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 50px;
}

/* --- Стили для одной карточки --- */
.map-card {
    background-color: #254265;
    border: 3px solid #00000087;
    border-radius: 12px;
    text-decoration: none;
    color: #FFFFFF;
    
    display: flex;
    flex-direction: column;
    padding: 10px; 
    
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* Обертка для картинки, которая создает эффект рамки */
.map-card__image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    
    /* Скругляем углы обертки, чтобы картинка была "вписана" */
    border-radius: 8px; 
}

.map-card__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.map-card__title {
    padding: 10px 10px 5px 10px;
    text-align: center;
    font-size: 22px;
    font-weight: 500;
    background-color: transparent;
    border-top: none;
}


/* ========================================
   7. Секция Гайдов (Guides Section)
   ======================================== */

.guides {
    padding: 30px 0;
    position: relative;
}

.guides__container {
    max-width: 1240px; 
    margin: 0 auto;
    padding: 0 40px;
}

.guides__title {
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 60px;
}

/* --- Основной контейнер с двумя колонками --- */
.guides__content {
    display: flex;
    gap: 40px; /* Отступ между навигацией и контентом */
}

/* --- Левая колонка: Навигация --- */
.guides__navigation {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-shrink: 0; /* Запрещаем колонке сжиматься */
    width: 266px;
}

.guide-tab {
    /* Переопределяем некоторые стили из .btn */
    width: 100%;
    font-size: 18px;
    font-weight: 500;
    padding: 15px; /* Делаем паддинги поменьше */
    border-width: 2px; /* Уменьшаем толщину рамки */
    border-color: #3c4a60; /* Стандартный цвет рамки */
    text-transform: capitalize;
}

/* При наведении оставляем только тень, без заливки */
.guide-tab:hover {
    background: none; /* Убираем заливку, которая есть у .btn:hover */
    border-color: #6c9cff;
    box-shadow: 3px -3px 10px rgba(127, 233, 218, 0.25), -3px 3px 10px rgba(127, 233, 218, 0.25); /* Тень слабее */
}

/* Стиль для активной кнопки */
.guide-tab.active {
    background-color: #FFFFFF;
    color: #15263A;
    border-color: #FFFFFF;
    box-shadow: none; /* Убираем тень у активной кнопки */
}

/* --- Правая колонка: Контент --- */
.guides__text-content {
    flex-grow: 1; /* Занимает все оставшееся место */
    background-color: rgba(0, 0, 0, 0.25);
    border: 4px solid rgba(255, 255, 255);
    border-radius: 12px;
    padding: 30px;
    min-height: 410px; /* Минимальная высота, как у навигации */
    
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Скрываем все панели с контентом по умолчанию */
.guide-pane {
    display: none;
}

/* Показываем только активную панель */
.guide-pane.active {
    display: block;
}

/* Стили для контента внутри панели */
.guide-pane h3 {
    font-size: 28px;
    margin-bottom: 20px;
}

.guide-pane p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.85);
}

.guide-pane img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}


/* ========================================
   #. СТИЛИ ДЛЯ КОНТЕНТА ВНУТРИ ГАЙДОВ
   ======================================== */

/* Заголовки */
.guide-pane__section-title {
    font-size: 24px;
    margin-top: 25px;
    margin-bottom: 20px;
}
.guide-pane__subsection-title {
    font-size: 20px;
    color: #7FDFDA; /* Акцентный цвет */
    margin-bottom: 15px;
    font-weight: 600;
}

/* Отступы между логическими блоками */
.guide-pane__subsection {
    margin-bottom: 30px;
}
.guide-pane__subsection:last-child {
    margin-bottom: 0;
}

/* Лейблы-подсказки (Локации, Что делать и т.д.) */
.guide-pane__label {
    color: rgba(255, 255, 255, 0.7);
}

/* Списки */
.guide-pane__list {
    padding-left: 25px; /* Стандартный отступ для списков */
    margin-top: 10px;
    margin-bottom: 15px;
}
.guide-pane__list li {
    margin-bottom: 8px; /* Отступ между элементами списка */
}

/* Ссылки */
.guide-pane a {
    color: #7FDFDA;
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}
.guide-pane a:hover {
    text-decoration: underline;
}

/* Разделители */
.guide-pane__divider {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 30px 0;
}

/* Таблицы */
.guide-pane__table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 15px;
}
.guide-pane__table th,
.guide-pane__table td {
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.guide-pane__table th {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}
/* Убираем рамку у последней строки для красоты */
.guide-pane__table tbody tr:last-child td {
    border-bottom: none;
}


/* ========================================
   8. Футер (Footer)
   ======================================== */

.footer {
    padding: 40px 0;
    background-color: #121820; /* Чуть темнее основного фона для выделения */
    border-top: 1px solid #3c4a60;
}

.footer__container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__actions {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-shrink: 0;
}

.footer__logout {
    display: none;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer__logout:hover {
    color: #FFFFFF;
}

.is-authorized .footer__logout {
    display: block;
}

.footer__copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-align: left;
}

.footer__attribution {
    margin-top: 5px;
}

.footer__socials {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer__socials img {
    height: 24px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.footer__socials a:hover img {
    opacity: 1;
}


/* ========================================
   9. Секция "В разработке" (WIP)
   ======================================== */

.wip {
    padding: 100px 0;
    text-align: center;
    background-color: rgba(21, 38, 58, 0.25);
    border-top: 2px solid #3c4a60;
    border-bottom: 2px solid #3c4a60;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.wip__container {
    max-width: 800px; /* Делаем контейнер чуть уже для концентрации внимания */
    margin: 0 auto;
    padding: 0 40px;
}

.wip__title {
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.wip__text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}


/* ========================================
   10. Заблокированный контент и Модальное окно
   ======================================== */

/* --- Стили для заблокированных элементов --- */
/* --- Общие стили для заблокированных карточек --- */
.map-card.locked {
    pointer-events: none;
}

.map-card.locked .map-card__image-wrapper {
    position: relative; /* Чтобы позиционировать оверлей */
}

/* Затемняющий слой для картинки */
.map-card.locked .map-card__image {
    filter: brightness(0.3); /* Затемняем саму картинку */
}

/* Оверлей с замком */
.map-card__lock-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    
    display: flex;
    justify-content: center;
    align-items: center;
}

.locked__icon {
    width: 75px;
    height: 75px;
}

/* --- Специфичные стили для заблокированных ТАБОВ --- */
.btn--tab.locked {
    color: #838383;
    border-color: #838383;
    justify-content: flex-start;
    gap: 15px;
    pointer-events: none;
    align-items: center;
}

/* Стили для иконки замка внутри кнопки-таба */
.btn--tab .locked__icon {
    width: 16px;
    height: 16px;
}

/* --- Стили для модального окна --- */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    visibility: visible;
}
.modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal__overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal__content {
    position: relative;
    z-index: 1;
    background-color: #15263A;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    width: 100%;
    max-width: 500px;

    /* Включаем flexbox для управления содержимым */
    display: flex;
    flex-direction: column;
    gap: 25px; /* Отступ между элементами */
}

/* Стили для заголовка и подзаголовка */
.modal__content h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}
.modal__content p {
    font-size: 16px;
    color: rgba(255, 255, 255);
    margin: -15px 0 0 0; /* Уменьшаем отступ после заголовка */
}

/* Кастомные стили для поля ввода */
.modal__input {
    width: 100%;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.25);
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: #FFFFFF;
    font-family: 'FindsAns Pro', sans-serif;
    font-size: 18px;
    text-align: center;
    outline: none; /* Убираем стандартную обводку при фокусе */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.modal__input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}
.modal__input:focus {
    border-color: #7DFDDA;
    box-shadow: 0 0 10px rgba(127, 223, 218, 0.3);
}

/* Контейнер для кнопок */
.modal__buttons {
    display: flex;
    justify-content: space-between; /* Расталкиваем кнопки по краям */
    gap: 20px;
    margin-top: 10px; /* Доп. отступ сверху */
}

/* Стили для кнопок в модальном окне */
.btn--modal {
    width: 100%; /* Заставляем кнопки занять все доступное место */
    font-size: 16px;
    font-weight: 700;
    padding: 15px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    background: none;
}

.btn--modal:hover {
    border-color: rgba(255, 255, 255);
}


/* ========================================
   11. СТРУКТУРА СТРАНИЦЫ КАРТЫ
======================================== */

/* Убираем прокрутку и делаем body flex-контейнером */
html, body.map-page {
    height: 100%;
    margin: 0;
}

body.map-page {
    display: flex;    
    overflow: hidden;
    flex-direction: column;
    background-color: #111;
}

/* Хедер и футер занимают свою фиксированную высоту */
body.map-page .header,
body.map-page .footer {
    flex-shrink: 0; /* Запрещаем им сжиматься */
}

/* Main занимает ВСЁ оставшееся пространство */
body.map-page .main {
    flex-grow: 1; /* Разрешаем расти и занимать место */
    min-height: 0; /* Важный фикс для flexbox, чтобы он не вылезал за пределы экрана */
}

/* Контейнер карты растягивается на 100% своего родителя (.main) */
#map-container {
    width: 100%;
    height: 100%;
}


/* ========================================
   12. СТИЛИ ДЛЯ ИНТЕРАКТИВНОЙ КАРТЫ
======================================== */

/* Применяем кастомный шрифт к тексту в SVG */
body.map-page #map-container svg text {
    font-family: 'FindsAns Pro', sans-serif;
}

/* Скрываем все группы маршрутов по умолчанию */
#map-container svg #RoutesGroup > g,
#map-container svg #HintGroup > g {
    visibility: hidden;
}

/* Показываем группу, которой добавили класс is-visible */
#map-container svg #RoutesGroup > g.is-visible {
    visibility: visible;
}

/* Делаем все дочерние элементы внутри группы засад "кликабельными" */
#map-container svg g[id^="ambush_"] * {
    cursor: pointer;
}

/* Стили по умолчанию для графики внутри групп засад */
#map-container svg g[id^="ambush_"] rect,
#map-container svg g[id^="ambush_"] circle,
#map-container svg g[id^="ambush_"] path {
    transition: filter 0.2s ease;
}
 
#map-container svg g[id^="ambush_"].is-active rect,
#map-container svg g[id^="ambush_"].is-active circle,
#map-container svg g[id^="ambush_"].is-active path {
    filter: drop-shadow(0 0 5px #ffffff) drop-shadow(0 0 15px #ffffff);
}

/* --- Стили для Leaflet --- */

.leaflet-container { 
    cursor: grab; 
    background-color: transparent !important;
}
.leaflet-grabbing { cursor: grabbing; }


/* ========================================
   12.1. ИНДИКАТОР ЗАГРУЗКИ КАРТЫ
======================================== */

#map-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10; /* Должен быть поверх карты, но под хедером/модалками */
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    
    background-color: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(5px);
    
    /* Плавное исчезновение */
    transition: opacity 0.5s ease;
}

#map-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader__spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #7DFDDA; /* Наш акцентный цвет */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader__text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
}

/* Анимация вращения */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ========================================
   12.2. ЛЕГЕНДА КАРТЫ
======================================== */

.map-legend {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 900;

    width: 280px;
    padding: 20px;
    
    background-color: rgba(21, 38, 58, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    
    opacity: 1;
    transition: opacity 0.3s ease;
}

.legend__title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.legend__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.legend__item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.legend__icon {
    /* Стили для тега <img> */
    width: 28px;
    height: 28px;
    object-fit: contain; /* Вписывает иконку в рамки, сохраняя пропорции */
    flex-shrink: 0;
}

.legend__text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}


/* ========================================
   13. АДАПТАЦИЯ (MEDIA QUERIES)
   ======================================== */

/* --- Планшеты и меньше (до 1024px) --- */
@media (max-width: 1024px) {
    
    /* --- ОБЩИЕ КОНТЕЙНЕРЫ --- */
    .maps__container,
    .guides__container,
    .wip__container {
        padding: 0 20px;
    }

    /* --- ХЕДЕР И МОБИЛЬНАЯ НАВИГАЦИЯ --- */
    .header__inner {
        justify-content: space-between; /* Логотип слева, экшены справа */
        padding: 0 20px;
    }
    
    .logo {
        position: static; /* Возвращаем лого в поток */
        transform: none;
    }
    
    .header__actions {
        position: static; /* Возвращаем кнопки в поток */
        transform: none;
    }

    /* Скрываем десктопную навигацию */
    .nav {
        display: none; 
    }
    
    /* Показываем бургер */
    .burger {
        display: block;
    }

    /* Контейнер мобильной навигации */
    .nav--mobile {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        
        position: fixed;
        top: 80px; /* Появляется под хедером */
        left: 0;
        width: 100%;
        height: calc(100vh - 80px); /* На всю высоту экрана минус хедер */
        
        background-color: rgba(21, 38, 58, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        
        /* Начальное состояние - скрыто */
        opacity: 0;
        pointer-events: none;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        z-index: 999;
    }
    
    /* Ссылки в мобильном меню делаем крупнее */
    .nav--mobile .nav__link {
        font-size: 28px;
    }
    
    /* Активное состояние мобильного меню */
    .nav--mobile.nav--open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    /* Класс для body, чтобы запретить прокрутку фона, когда меню открыто */
    .body--nav-open {
        overflow: hidden;
    }

    /* --- СЕТКА КАРТ --- */
    .maps__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}


/* --- Смартфоны (до 767px) --- */
@media (max-width: 767px) {

    /* --- HERO СЕКЦИЯ --- */
    .hero {
        height: auto;
        display: flex;
        flex-direction: column;
        padding-top: 100px; /* Оставляем отступ от хедера */
    }

    /* 
      БЫЛО: .hero__character { display: none; } 
      СТАЛО: Полностью переработано для отображения персонажа.
    */
    .hero__character {
        position: static;   /* Возвращаем в поток документа */
        transform: none;      /* Сбрасываем смещение */
        margin: 0 auto;       /* Горизонтально центрируем */
        padding-top: 20px;    /* Даем немного воздуха сверху */
        order: 1;             /* Явно указываем порядок перед CTA */
    }

    .hero__character img {
        /* Ограничиваем высоту, чтобы он помещался на экране */
        max-height: 500px; 
        width: auto;
        height: auto;
        /* Убираем тень, т.к. на мобильных она может выглядеть грязно */
        filter: drop-shadow(2px -2px 5px rgba(255, 255, 255, 0.15));
    }

    .hero__cta {
        position: static;
        transform: none;
        text-align: center;
        /* Убираем margin-top: auto и используем padding для контроля отступов */
        padding: 30px 20px 40px 20px;
        margin-top: 0;
        order: 2; /* Явно указываем порядок после персонажа */
    }

    .cta__text {
        max-width: none;
        font-size: 18px;
    }
    
    .hero__socials {
        top: 90px;
        right: 20px;
    }

    /* Уменьшаем общие стили для кнопок */
    .btn {
        padding: 15px 30px;
        font-size: 22px;
    }

    /* --- ЗАГОЛОВКИ СЕКЦИЙ --- */
    .maps__title,
    .guides__title,
    .wip__title {
        font-size: 32px;
        margin-bottom: 40px;
    }
    
    /* --- СЕТКА КАРТ --- */
    .maps__grid {
        grid-template-columns: 1fr; /* Одна колонка */
    }

    /* --- ГАЙДЫ --- */
    .guides__content {
        flex-direction: column;
        gap: 20px;
    }
    
    .guides__navigation {
        width: 100%; /* Занимает всю ширину */
    }

    .guides__text-content {
        min-height: auto; /* Убираем минимальную высоту */
    }

    /* --- ФУТЕР --- */
    .footer__container {
        flex-direction: column-reverse; /* Соц. сети оказываются сверху */
        gap: 25px;
        text-align: center;
    }

    .footer__copyright {
        text-align: center;
    }

    /* --- ЛЕГЕНДА КАРТЫ --- */
    .map-legend {
        display: none;
    }
}

