/* 1. БАЗОВАЯ СЕТКА И ЦВЕТОВАЯ СХЕМА */
body { 
    background-color: #FFFFFF !important; 
    color: #1A1A1A !important; 
    font-family: 'Montserrat', sans-serif; 
    overflow-x: hidden; 
    margin: 0; 
}

.logo-font { font-family: 'Unbounded', sans-serif; }
h1, h2, h3 { font-family: 'Cormorant Garamond', serif; }

/* 2. ГЛАВНЫЙ ЭКРАН */
.hero-bg { 
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), 
                      url('hero.jpg') !important; 
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    width: 100%;
    min-height: 80vh;
}

/* 3. КАРТОЧКИ ТУРОВ */
.tour-card { 
    background: #FFFFFF; 
    border: 1px solid #EEEEEE;
    border-radius: 24px; 
    color: #1A1A1A; 
    overflow: hidden; 
    transition: 0.4s; 
    cursor: pointer; 
    
    display: flex; 
    flex-direction: column; 
    height: 100%; 
}
/* Контейнер для текста, который заполнит пустое место */
.tour-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Растягивает блок, прижимая футер к низу */
}

/* Нижняя часть с ценой и кнопкой */
.tour-card-footer {
    margin-top: auto; /* Выталкивает содержимое в самый низ */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
}
.tour-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.05); 
    border-color: #B8860B;
}
.tour-image-container { width: 100%; aspect-ratio: 4/3; overflow: hidden; }
.tour-image-container img { width: 100%; height: 100%; object-fit: cover; }

/* 4. ГАЛЕРЕЯ И ОТЗЫВЫ */
.gallery-item { aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; background: #F5F5F5; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; opacity: 0.8; }
.gallery-item:hover img { transform: scale(1.1); opacity: 1; }

.review-card { 
    background: #FAFAFA; 
    border: 1px solid #EEEEEE; 
    padding: 30px; 
    border-radius: 20px; 
}

/* 6. КНОПКИ И ЭФФЕКТЫ */
.btn-gold { background: #B8860B; color: white; transition: 0.3s; }
.btn-gold:hover { background: #966d09; transform: scale(1.02); }

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

.no-scroll { overflow: hidden; }
/* Плавный эффект при наведении на карточки «Почему мы» */
.reveal {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

/* Улучшенная навигация */
.nav-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    height: 80px;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Красивая базовая настройка шрифта */
body {
    letter-spacing: -0.01em;
}
/* Делаем логотип глубокого графитового цвета вместо чисто черного */
.nav-glass div {
    color: #1a1a1a;
}

/* Эффект для цифр 01, 02, 03 */
.font-extralight {
    font-family: 'Cormorant Garamond', serif;
    line-height: 1;
}

/* Тонкая настройка шрифта для логотипа */
nav div {
    color: #1a1a1a;
    text-rendering: optimizeLegibility;
}

/* Плавное появление навигации при загрузке */
nav {
    animation: fadeInNav 1.5s ease-out;
}

@keyframes fadeInNav {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Эффект для логотипа К А Й Р О С */
nav div:first-child {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 0 0px rgba(0,0,0,0);
}

nav div:first-child:hover {
    letter-spacing: 1em; /* Еще больше воздуха при наведении */
    text-shadow: 0 0 1px rgba(0,0,0,0.1);
    color: #000;
}
/* Укрупнение элементов в правой части навигации */
.nav-glass .flex.items-center.gap-10 a {
    text-rendering: optimizeLegibility;
    display: flex;
    align-items: center;
}

/* Сделаем номер телефона более выразительным */
a[href^="tel:"] {
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

/* Увеличение иконки Телеграм и её позиционирование */
.fa-telegram {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Убедимся, что навигация не перекрывает контент и выглядит чисто */
.nav-glass {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}
/* Мобильная адаптация */
@media (max-width: 768px) {
    /* Чтобы главный экран занимал всё пространство на телефоне */
    .hero-bg {
        min-height: 100vh !important; 
        background-attachment: scroll !important;
    }

    /* Уменьшаем заголовок "Сибирь в моменте", чтобы он не вылезал за края */
    .hero-bg h1 {
        font-size: 3.5rem !important;
        line-height: 1.1;
        padding: 0 10px;
    }

    /* Уменьшаем отступы в секциях для компактности */
    section {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
}

/* Устраняем горизонтальный скролл на мобильных */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
#modal {
    /* display: none; — оставляем управление для JavaScript */
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    
    /* Фон с размытием появится только когда окно откроется */
    background: rgba(0, 0, 0, 0.4) !important; 
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;

    /* Центрирование контента внутри */
    display: none; /* Изначально скрыто */
    align-items: center !important;
    justify-content: center !important;
}

.modal-content {
    /* Защита от "схлопывания" при обновлении страницы */
    min-width: 320px !important; 
    min-height: 250px !important;
    
    background: #FFFFFF !important;
    width: 90% !important;
    max-width: 550px !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    
    /* Сброс всех старых смещений (absolute, top, left) */
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: auto !important;
    
    padding: 50px 40px !important;
    border-radius: 40px !important;
    box-shadow: 0 40px 100px rgba(0,0,0,0.1) !important;
    
    /* Внутреннее выравнивание контента */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}

/* Красивое выравнивание списка дней */
.modal-content ul {
    text-align: left !important;
    margin: 20px auto !important;
    display: inline-block !important;
}
/* 1. Возвращаем модальному окну правильный вид */
#modal {
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px); /* Красивое размытие фона */
}

.modal-content {
    background: white;
    padding: 2.5rem !important;
    border-radius: 2rem !important;
    max-width: 500px !important;
    width: 90% !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* 2. Чиним кнопки Telegram и Закрыть */
.bg-\[\#229ED9\], .bg-black {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    color: white !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    font-size: 10px !important;
    letter-spacing: 0.1em !important;
    min-width: 140px;
    text-decoration: none !important;
}

.bg-\[\#229ED9\] { background-color: #229ED9 !important; }
.bg-black { background-color: #000 !important; }

/* 3. Исправляем верстку внутри окна */
.modal-content .flex {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    align-items: center !important;
}

@media (min-width: 640px) {
    .modal-content .flex {
        flex-direction: row !important;
        justify-content: space-between !important;
    }
}
/* Исправление внешнего вида модального окна */
#modal {
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px); /* Размытие заднего плана */
    display: none; /* Управляется через JS */
}

.modal-content {
    background: white;
    padding: 40px !important;
    border-radius: 32px !important;
    max-width: 500px !important;
    width: 90% !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
}

/* Фикс для кнопок внутри окна (Telegram и Закрыть) */
.modal-content .flex {
    display: flex !important;
    flex-wrap: wrap;
    gap: 12px !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 24px;
}

.bg-\[\#229ED9\], .bg-black {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 14px 28px !important;
    border-radius: 12px !important;
    color: white !important;
    font-weight: bold !important;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
    min-width: 150px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.bg-\[\#229ED9\] { background-color: #229ED9 !important; }
.bg-black { background-color: #000 !important; }

.bg-\[\#229ED9\]:hover, .bg-black:hover {
    transform: scale(1.05);
}

/* Правильный перенос строк в описании тура */
.whitespace-pre-line {
    white-space: pre-line !important;
    text-align: left;
    margin: 20px 0;
    line-height: 1.6;
    color: #4b5563;
}
/* 1. Возвращаем модальному окну объем и отступы */
.modal-content {
    background: white;
    padding: 2.5rem !important;
    border-radius: 2rem !important;
    max-width: 500px !important;
    width: 90% !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: auto;
}

/* 2. Чиним кнопки (делаем их крупными и цветными) */
.bg-\[\#229ED9\], .bg-black {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    color: white !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    font-size: 10px !important;
    letter-spacing: 0.1em !important;
    min-width: 140px;
}

/* Принудительно задаем цвета, если классы Tailwind не сработали */
.bg-\[\#229ED9\] { background-color: #229ED9 !important; }
.bg-black { background-color: #000 !important; }

/* 3. Исправляем расположение элементов в окне */
.modal-content .flex {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    align-items: center !important;
}

@media (min-width: 640px) {
    .modal-content .flex {
        flex-direction: row !important;
        justify-content: space-between !important;
    }
}

/* 4. Возвращаем переносы строк в описании тура */
.whitespace-pre-line {
    white-space: pre-line !important;
    text-align: left;
    margin: 20px 0;
    line-height: 1.6;
    color: #4b5563;
}
/* --- ФИКС МОДАЛЬНОГО ОКНА: ЦЕНА И КНОПКИ --- */

/* 1. Контейнер: заставляем цену и кнопки встать в одну линию */
#modal-body .flex.items-center.justify-between {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 15px !important;
    width: 100% !important;
    margin-top: 30px !important;
}

/* 2. Группа кнопок: выравниваем их по горизонтали */
#modal-body .flex.gap-2 {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    align-items: center !important;
}

/* 3. Сами кнопки: задаем им одинаковую высоту и центровку */
#modal-body .bg-\[\#229ED9\], 
#modal-body button[onclick="closeModal()"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 42px !important; /* Строгая высота для обеих кнопок */
    padding: 0 20px !important;
    border-radius: 12px !important;
    font-size: 10px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    white-space: nowrap !important; /* Чтобы текст не прыгал на вторую строку */
    margin: 0 !important;
}

/* 4. Цена: чтобы не сжималась */
#modal-body .text-2xl.font-bold {
    font-size: 22px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* 5. Адаптив для мобильных */
@media (max-width: 480px) {
    #modal-body .flex.items-center.justify-between {
        flex-direction: column !important;
        gap: 20px !important;
    }
} 

/* --- ГАЛЕРЕЯ ВНУТРИ ТУРА --- */
.tour-mini-gallery {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    margin-top: 20px !important;
    margin-bottom: 30px !important;
}

@media (max-width: 480px) {
    .tour-mini-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.gallery-img {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    transition: 0.3s !important;
    background: #f3f4f6;
}

.gallery-img:hover {
    transform: scale(1.05) !important;
}
.moments-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
}
.moment-item { aspect-ratio: 1/1; overflow: hidden; border-radius: 15px; }
.moment-img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.moment-item:hover .moment-img { transform: scale(1.1); }
.cursor-zoom-in { cursor: zoom-in !important; }

@media (max-width: 480px) {
    .moments-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    .tour-mini-gallery { grid-template-columns: repeat(2, 1fr) !important; }
}
/* Фикс для лайтбокса */
#photo-lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    display: none; /* Управляется через JS */
}

#lightbox-img {
    max-width: 90vw !important;
    max-height: 90vh !important;
    margin: auto !important;
    display: block !important;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
/* Гарантируем, что лайтбокс всегда на весь экран и по центру */
#photo-lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.95) !important;
    display: none; /* Управляется через JS */
    align-items: center;
    justify-content: center;
}

#lightbox-img {
    max-width: 90vw !important;
    max-height: 85vh !important;
    object-fit: contain !important; /* Не дает картинке искажаться */
    margin: auto;
}
#photo-lightbox {
    display: none !important; /* Прячем по умолчанию */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.95) !important;
    z-index: 9999 !important; /* Поверх всех окон */
    
    /* Эти три строки делают магию центровки */
    align-items: center !important;
    justify-content: center !important;
}

#lightbox-img {
    max-width: 90vw !important;
    max-height: 85vh !important;
    object-fit: contain !important; /* Картинка не растягивается */
    margin: auto !important;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
}
#photo-lightbox {
    cursor: zoom-out !important;
}
