/* ==========================================================================
   1. ПЕРЕМЕННЫЕ
   ========================================================================== */
:root {
    --primary-color: #88794b;
    --secondary-color: #23527c;
    --accent-blue: #00adef;
    --text-dark: #333;
    --text-gray: #555;
    --border-color: #eee;
    --white: #fff;
    --bg-light: #f9f9f9;
}

body.loading { overflow: hidden !important; }

/* ==========================================================================
   2. ОБЩИЕ СТИЛИ КАРТИНОК
   ========================================================================== */
.oneday-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
    /* Добавим фоновый цвет на случай, если картинка долго грузится */
    background-color: #f0f0f0; 
}
/* ==========================================================================
   3. КАТАЛОГ И ФИЛЬТРАЦИЯ (ОПТИМИЗИРОВАНО)
   ========================================================================== */
.odt-main-layout { display: flex; gap: 30px; margin-top: 30px; }
.odt-sidebar { flex: 0 0 280px; background: var(--bg-light); padding: 20px; border-radius: 8px; height: fit-content; position: sticky; top: 20px; }
.odt-content { flex: 1; }
.odt-card {
    display: flex !important; /* Принудительно ставим flex для ряда */
    flex-direction: row;      /* Картинка слева, текст справа */
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    min-height: 250px;
    margin-bottom: 20px;
}
/* Скрываем карточку, если JS добавил инлайновый display: none */
.odt-card[style*="display: none"] {
    display: none !important;
}
.odt-card .oneday-img {
    flex: 0 0 300px; /* Картинка не сжимается, ширина 300 */
    width: 300px;
    height: auto;
}
.odt-card-content {
    flex: 1; /* Текст забирает всё остальное место */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px;
}
.odt-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.odt-card-title { margin: 0; font-size: 1.4rem; color: var(--text-dark); }
.odt-card-price { min-width:220px; text-align: right; font-weight: 700; color: var(--primary-color); }
.num-value { font-size: 1.4rem; }
.odt-card-footer { display: flex; gap: 10px; margin-top: 15px; }
.odt-btn {
    padding: 10px 22px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: 0.3s;
    cursor: pointer;
    font-size: 14px;
}
.odt-btn-outline { border: 2px solid var(--primary-color); color: var(--primary-color); background: transparent; }
.odt-btn-outline:hover { background: var(--primary-color); color: var(--white); }
.odt-btn-primary { background: var(--secondary-color); color: var(--white); border: none; }

/* ==========================================================================
   4. ФИЛЬТРЫ И ВАЛЮТА
   ========================================================================== */
.currency-wrapper { position: relative; margin-bottom: 20px; }
.real-select { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.visual-select { display: flex; align-items: center; background: var(--white); padding: 10px; border: 1px solid #ddd; border-radius: 4px; gap: 10px; }
.price-filter-box { background: var(--white); border: 1px solid #e0e0e0; border-radius: 8px; padding: 15px; }
.range-slider-container { position: relative; width: 100%; height: 30px; }
.slider-track { width: 100%; height: 5px; position: absolute; top: 0; bottom: 0; margin: auto; background: #dadae3; border-radius: 5px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; position: absolute; top: 0; bottom: 0; margin: auto; background: transparent; pointer-events: none; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; height: 18px; width: 18px; background-color: var(--accent-blue); border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 1px 3px rgba(0,0,0,0.3); cursor: pointer; pointer-events: auto; z-index: 3; margin-top: -6px; }

/* ==========================================================================
   5. АДАПТИВНОСТЬ
   ========================================================================== */
   /* Группа фильтра (отступ между категорией и слайдером) */
.filter-group {
    margin-bottom: 25px;
}
.currency-select {
    position: relative;
}

/* Заголовок "Category" */
.odt-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
}

/* Красивый выпадающий список */
.odt-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: var(--white);
    color: var(--text-dark);
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    cursor: pointer;
    appearance: none; /* Убираем стандартную стрелку браузера */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.odt-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(0, 173, 239, 0.1);
}
/* Базовый стиль для иконки флага */
.flagstrap-icon {
    display: inline-block;
    width: 20px;
    height: 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 8px;
    border: 1px solid #eee; /* Небольшая рамка, чтобы светлые флаги не сливались */
}

.flagstrap-icon.arm { background-image: url('https://flagcdn.com/w20/am.png'); }
.flagstrap-icon.usd { background-image: url('https://flagcdn.com/w20/us.png'); }
.flagstrap-icon.eur { background-image: url('https://flagcdn.com/w20/eu.png'); }
.flagstrap-icon.rub { background-image: url('https://flagcdn.com/w20/ru.png'); }
.flagstrap-icon.gbp { background-image: url('https://flagcdn.com/w20/gb.png'); }
.flagstrap-icon.inr { background-image: url('https://flagcdn.com/w20/in.png'); }
.flagstrap-icon.cad { background-image: url('https://flagcdn.com/w20/ca.png'); }
.flagstrap-icon.cny { background-image: url('https://flagcdn.com/w20/cn.png'); }
.flagstrap-icon.jpy { background-image: url('https://flagcdn.com/w20/jp.png'); }
.flagstrap-icon.aed { background-image: url('https://flagcdn.com/w20/ae.png'); }
@media (max-width: 900px) {
    .odt-main-layout { flex-direction: column; }
    .odt-sidebar { width: 100%; position: static; }
    .odt-card { flex-direction: column; min-height: auto; }
    .odt-card .oneday-img {
        width: 100%;
        height: 220px;
        flex: 0 0 220px;
    }
    .odt-card-header { flex-direction: column; gap: 10px; }
    .odt-card-price { text-align: left; }
}
.vehicle-type {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9em;
    text-transform: uppercase;
}
/* Контейнер всего маршрута */
.odt-itinerary-wrapper {
    position: relative;
    padding-left: 40px; 
    margin: 30px 0;
    font-family: 'Open Sans', sans-serif;
}

/* Удаляем общий блок линии .odt-timeline-axis, он больше не нужен */
.odt-timeline-axis {
    display: none;
}

.odt-day-label {
    font-weight: 700;
    color: #88794b;
}

.odt-modal-overlay {
    display: none; /* Обязательно */
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.odt-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    width: 70%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border-radius: 8px;
}
@media (max-width: 768px) {
    .odt-modal-content {
        width: 95% !important; /* Окно займет почти всю ширину экрана */
        margin: 10px auto;      /* Уменьшаем отступы сверху/снизу */
        padding: 15px;          /* Немного уменьшаем внутренние поля */
    }
}

.odt-close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 30px;
    cursor: pointer;
}

.odt-itinerary-wrapper {
    margin-top: 30px;
    position: relative;
}

@media (max-width: 600px) {
    .tours-container {
        flex-direction: column;
        align-items: flex-start;
    }
}
.odt-modal-price-display {
    font-size: 22px;
    font-weight: bold;
    color: #88794b;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.tours-container {
    display: flex;
    flex-wrap: wrap; /* Разрешаем перенос блоков */
    gap: 10px; /* Уменьшил gap, чтобы было больше места */
    background: #fdfaf3;
    padding: 15px;
    border-left: 3px solid #88794b;
    margin-bottom: 30px;
    box-sizing: border-box; /* Важно: учитываем padding в ширине */
}

.details-label {
    font-weight: bold;
    color: #88794b;
    min-width: 80px;
}

.tours-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tours-text {
    flex: 1 1 250px; /* Элементы растягиваются, но не меньше 250px */
    box-sizing: border-box;
    overflow: hidden; /* Скрываем лишнее, если текст слишком длинный */
}

/* Гарантируем, что текст внутри li переносится */
.tours-text li {
    margin-bottom: 8px;
    font-size: 16px;
    word-wrap: break-word; /* Перенос длинных слов */
    overflow-wrap: break-word;
}
@media (max-width: 480px) {
    .tours-container {
        padding: 15px;
        gap: 10px;
    }
    .tours-text {
        flex: 1 1 100%; /* На очень узких экранах блоки идут друг под другом */
    }
}
.guideService, .vehicle-type {
    color: #88794b; /* Золотистый цвет вашего бренда */
    font-weight: bold;
    text-transform: capitalize;
}
.hidden { display: none !important; }
#errorMessage {
    color: #d9534f; /* Красный цвет */
    background-color: #f2dede; /* Светло-красный фон */
    border: 1px solid #ebccd1; /* Рамка */
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
    /* Скрываем элемент, когда он пуст, чтобы не было пустой рамки */
    display: none;
}

/* Показываем блок, только если внутри есть текст */
#errorMessage:not(:empty) {
    display: block;
}
.one-day-trip {
    background: linear-gradient(rgba(78, 125, 190, 0.9), rgba(150, 198, 238, 0.8)),
					url('rozetka.webp') center/cover; 
    display: none; /* Скрыть изначально */
    padding: 30px;
    margin: 50px 0 20px;
}

.modal-currency-symbol {
    margin-right: 2px;
}
.price-label-text {
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.modal-price-amount .modal-currency-symbol {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}


