/* Низ страницы на iOS. Область у адресной строки и жестовой полосы
           красится фоном страницы, а он раньше был светлым — отсюда белая полоса
           под тёмным подвалом. Теперь тёмный фон у html и body, а светлый —
           у самого блока с турами, который его перекрывает. */
        html { background: #1f1f1f; }
        body { background: #1f1f1f; }
        body { font-family: 'Unbounded', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-weight: 400; }
        main.lp-tours { background: var(--bg, #f5f5f5); }

        /* ===== HEADER ===== */
        .lp-header {
            background: var(--primary);
            padding: 0.4rem max(1rem, calc((100% - 1200px) / 2));
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 50;
            overflow: hidden;
        }
        .lp-header .logo { display: flex; align-items: center; text-decoration: none; outline: none; -webkit-tap-highlight-color: transparent; }
        .lp-header .logo:hover, .lp-header .logo:focus { text-decoration: none; outline: none; }
        .lp-header .logo img { height: 62px; display: block; pointer-events: none; -webkit-user-drag: none; user-select: none; }
        .lp-contacts { display: flex; align-items: center; gap: 0.7rem; }
        .lp-contact-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px; height: 38px;
            border-radius: 50%;
            background: var(--primary);
            border: 1.5px solid rgba(255,255,255,0.7);
            transition: transform 0.15s, background 0.15s, border-color 0.15s;
            text-decoration: none;
        }
        .lp-contact-icon:hover { transform: scale(1.08); background: var(--white); border-color: var(--white); }
        .lp-contact-icon svg { width: 20px; height: 20px; }
        .lp-contact-icon svg path { fill: #fff !important; transition: fill 0.15s; }
        .lp-contact-icon:hover svg path { fill: var(--primary) !important; }
        .lp-phone {
            font-weight: 700;
            color: var(--white);
            text-decoration: none;
            font-size: 0.95rem;
            white-space: nowrap;
        }
        .lp-phone:hover { color: #ffe8a3; }
        .lp-login {
            margin-left: 0.5rem;
            padding: 0.45rem 0.9rem;
            background: transparent;
            border: 1.5px solid rgba(255,255,255,0.7);
            color: var(--white);
            border-radius: 6px;
            text-decoration: none;
            font-weight: 600;
            font-size: 0.85rem;
            transition: all 0.15s;
            white-space: nowrap;
            /* Надпись и её невидимые копии лежат в одной ячейке: ширину кнопки
               задаёт самая длинная из них, поэтому смена языка её не двигает. */
            display: inline-grid;
            justify-items: center;
        }
        .lp-login > span { grid-area: 1 / 1; }
        .lp-login-ghost { visibility: hidden; }
        .lp-login:hover { background: var(--white); color: var(--primary); border-color: var(--white); }

        /* ===== HERO ===== */
        .lp-hero {
            position: relative;
            background: linear-gradient(180deg, var(--primary) 0%, #e84510 60%, var(--primary-dark) 100%);
            color: var(--white);
            padding: 4rem 1rem 3.5rem;
            margin-top: -1px;
            text-align: center;
            overflow: hidden;
        }
        .lp-hero::before {
            content: '';
            position: absolute;
            inset: 0;
            background-image: radial-gradient(ellipse at 50% 70%, rgba(255,200,150,0.12) 0%, transparent 55%);
            pointer-events: none;
        }
        .lp-hero-inner { position: relative; max-width: 800px; margin: 0 auto; }
        .lp-hero h1 {
            font-family: 'Unbounded', 'Montserrat', sans-serif;
            font-size: 3.2rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            margin-bottom: 0.3rem;
            line-height: 1.05;
            text-shadow: 0 2px 16px rgba(0,0,0,0.22);
        }
        .lp-hero-sub {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 1rem;
            opacity: 0.95;
            letter-spacing: 0.02em;
        }
        .lp-hero p {
            font-size: 1.05rem;
            opacity: 0.95;
            margin-bottom: 2rem;
            font-weight: 400;
            line-height: 1.55;
        }
        .lp-hero p strong { color: #ffe8a3; font-weight: 700; }
        .lp-hero-ctas {
            display: flex;
            gap: 0.7rem;
            justify-content: center;
            flex-wrap: wrap;
            margin-bottom: 2.5rem;
        }
        .lp-cta {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.85rem 1.6rem;
            border-radius: 50px;
            text-decoration: none;
            font-weight: 700;
            font-size: 1rem;
            transition: transform 0.15s, box-shadow 0.15s;
            box-shadow: 0 4px 14px rgba(0,0,0,0.18);
        }
        .lp-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
        .lp-cta-wa { background: #25D366; color: #fff; }
        .lp-cta-tg { background: #229ED9; color: #fff; }
        .lp-cta svg { width: 22px; height: 22px; flex-shrink: 0; }
        .lp-cta svg path:not([stroke]) { fill: #fff !important; }
        .lp-cta svg path[stroke] { stroke: #fff !important; }

        .lp-stats {
            display: flex;
            justify-content: center;
            gap: 2.5rem;
            flex-wrap: wrap;
            padding-top: 1.5rem;
            border-top: 1px solid rgba(255,255,255,0.2);
        }
        .lp-stat { text-align: center; min-width: 120px; }
        .lp-stat-num {
            font-family: 'Unbounded', 'Montserrat', sans-serif;
            font-size: 1.8rem;
            font-weight: 700;
            line-height: 1;
            color: #ffe8a3;
            letter-spacing: -0.01em;
        }
        .lp-stat-label {
            font-size: 0.75rem;
            font-weight: 400;
            opacity: 0.85;
            margin-top: 0.35rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* ===== CATEGORY TABS ===== */
        .lp-tabs-wrap { background: var(--white); padding: 1.5rem 1rem 0.5rem; position: sticky; top: 58px; z-index: 40; box-shadow: 0 1px 0 rgba(0,0,0,0.05); }
        .category-tabs {
            display: flex;
            gap: 0.5rem;
            justify-content: center;
            max-width: 1200px;
            margin: 0 auto;
            flex-wrap: wrap;
        }
        .category-tab {
            padding: 0.55rem 1.2rem;
            border: 2px solid var(--border);
            background: var(--white);
            color: var(--text);
            border-radius: 50px;
            cursor: pointer;
            font-size: 0.82rem;
            font-weight: 500;
            font-family: inherit;
            transition: all 0.15s;
            user-select: none;
            letter-spacing: -0.01em;
        }
        .category-tab:hover { border-color: var(--primary); color: var(--primary); }
        .category-tab.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

        /* ===== TOURS GRID ===== */
        /* Фон секции должен идти во всю ширину окна, а содержимое — оставаться
           в пределах 1200 px. Раньше ограничение стояло на самом блоке, поэтому
           на широком экране по краям проглядывало тёмное тело страницы —
           те самые серые полосы слева и справа. Приём тот же, что у шапки
           и у полосы с вкладками: ширину держит боковой отступ. */
        .lp-tours {
            padding: 1.5rem max(1rem, calc((100% - 1200px) / 2)) 3rem;
        }
        .lp-section-title {
            font-family: 'Unbounded', 'Montserrat', sans-serif;
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 1.2rem;
            color: var(--text);
            letter-spacing: -0.01em;
        }
        /* Каркас списка туров. Использует те же классы, что настоящая карточка,
           поэтому занимает ровно её место и после загрузки ничего не сдвигается. */
        .lp-skeleton { pointer-events: none; }
        .lp-skeleton .sk-img { width: 100%; height: 100%; background: var(--img-placeholder); }
        .lp-skeleton .sk-bar { display: block; width: 100%; border-radius: 4px;
                               background: #eee; color: transparent; }
        .lp-skeleton .sk-bar.short { width: 55%; }
        /* Спутники цены нужны каркасу только ради высоты строки — текст прячем */
        .lp-skeleton .tour-card-price-from,
        .lp-skeleton .tour-card-price-cur { color: transparent; }
        /* Ширину полоски задаём отдельно: общее правило .sk-bar растянуло бы её
           на всю строку и вытеснило соседей */
        .lp-skeleton .tour-card-price-value.sk-bar { width: 45%; }
        .lp-skeleton .tour-card-toggle { background: #eee; color: transparent; }
        @media (prefers-reduced-motion: no-preference) {
            .lp-skeleton .sk-img, .lp-skeleton .sk-bar, .lp-skeleton .tour-card-toggle {
                animation: lpSkPulse 1.2s ease-in-out infinite;
            }
            @keyframes lpSkPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
        }

        .tours-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.5rem;
        }
        .tour-card {
            background: var(--white);
            border-radius: 14px;
            overflow: hidden;
            box-shadow: 0 2px 12px rgba(0,0,0,0.06);
            display: flex;
            flex-direction: column;
            position: relative;
        }
        .tour-card-img-wrap {
            position: relative;
            aspect-ratio: 16 / 10;
            background: var(--img-placeholder);
            overflow: hidden;
        }
        .tour-card-img {
            width: 100%; height: 100%;
            object-fit: cover;
            display: block;
            /* Пока фото не загружено, на его месте — размытое превью в 16 px,
               пришедшее вместе со списком. Серый остаётся запасным вариантом. */
            background-color: var(--img-placeholder);
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            /* Здесь раньше стоял transform: translateZ(0) — он уводил каждую
               из 62 карточек в отдельный слой композитора, и при быстрой
               прокрутке Android показывал нерастрированные (белые) тайлы.
               Слой оставлен только галерее внутри открытой карточки, где
               картинок единицы и он действительно помогает. */
        }
        /* Hover lift/zoom only on devices with a real pointer (avoids sticky-hover flicker on touch) */
        @media (hover: hover) {
            .tour-card { transition: transform 0.2s, box-shadow 0.2s; }
            .tour-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,0,0,0.12); }
            .tour-card-img { transition: transform 0.4s ease; }
            .tour-card:hover .tour-card-img { transform: scale(1.05); }
        }
        .tour-badge {
            position: absolute;
            top: 10px; left: 10px;
            background: linear-gradient(135deg, #ff9d2e, #ff5b1f);
            color: #fff;
            font-family: 'Unbounded', 'Montserrat', sans-serif;
            font-size: 0.7rem;
            font-weight: 700;
            padding: 0.3rem 0.75rem;
            border-radius: 30px;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }
.tour-card-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
        .tour-card-title {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 0.45rem;
            color: var(--text);
            line-height: 1.3;
            min-height: 2.6em;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            letter-spacing: -0.01em;
        }
        .tour-card-desc {
            font-size: 0.82rem;
            font-weight: 400;
            color: var(--text-light);
            line-height: 1.5;
            min-height: 3em;          /* две строки: карточки ровные, каркас совпадает */
            margin-bottom: 0.9rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .tour-card-price {
            display: flex;
            align-items: baseline;
            gap: 0.4rem;
            margin-bottom: 0.9rem;
        }
        .tour-card-price-from { font-size: 0.8rem; color: var(--text-light); }
        .tour-card-price-value { font-family: 'Unbounded', 'Montserrat', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--primary); line-height: 1; letter-spacing: -0.02em; }
        .tour-card-price-cur { font-size: 0.9rem; color: var(--primary); font-weight: 700; }
        .tour-card-toggle {
            margin-top: auto;
            background: var(--primary);
            border: none;
            color: var(--white);
            padding: 0.65rem;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 700;
            font-family: inherit;
            transition: background 0.15s;
        }
        .tour-card-toggle:hover { background: var(--primary-dark); }

        /* ===== DETAILS MODAL ===== */
        .tour-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            display: none;
            align-items: flex-start;
            justify-content: center;
            z-index: 200;
            padding: 2rem 1rem;
            overflow-y: auto;
            /* тач-скролл оверлея должен оставаться живым после смены высоты
               контента (переключение вкладок) — иначе на мобильных iOS/Android
               прокрутка «залипает» до следующего касания */
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
            animation: fadeIn 0.2s ease-out;
        }
        .tour-modal-overlay.active { display: flex; }
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .tour-modal {
            background: var(--white);
            border-radius: 14px;
            box-shadow: 0 12px 40px rgba(0,0,0,0.25);
            padding: 1.5rem 1.7rem 1.8rem;
            max-width: 720px;
            width: 100%;
            margin: auto;
            position: relative;
            animation: zoomIn 0.25s ease-out;
        }
        @keyframes zoomIn {
            from { opacity: 0; transform: scale(0.94); }
            to { opacity: 1; transform: scale(1); }
        }
        /* === Tour photo gallery === */
        .tour-gallery { margin: 0 0 1.2rem; }
        .tour-gallery-main {
            position: relative;
            width: 100%;
            aspect-ratio: 16 / 10;
            max-height: 420px;
            background: #1a1a1a;
            border-radius: 12px;
            overflow: hidden;
            user-select: none;
            -webkit-user-select: none;
            cursor: zoom-in;
        }
        .tour-gallery-track {
            display: flex;
            width: 100%;
            height: 100%;
            transition: transform 0.32s cubic-bezier(.4,1.2,.6,1);
            will-change: transform;
        }
        .tour-gallery-track img {
            flex: 0 0 100%;
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            pointer-events: none;
            -webkit-user-drag: none;
            transform: translateZ(0);
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }
        .tour-gallery-arrow {
            position: absolute;
            top: 50%; transform: translateY(-50%);
            background: rgba(255,255,255,0.92);
            color: #222;
            border: none;
            width: 42px; height: 42px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1.6rem;
            line-height: 1;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.15s;
            z-index: 2;
            box-shadow: 0 2px 10px rgba(0,0,0,0.25);
        }
        .tour-gallery-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
        .tour-gallery-arrow:disabled { opacity: 0.35; cursor: default; pointer-events: none; }
        .tour-gallery-arrow.prev { left: 12px; }
        .tour-gallery-arrow.next { right: 12px; }
        .tour-gallery-counter {
            position: absolute;
            bottom: 12px; right: 12px;
            background: rgba(0,0,0,0.65);
            color: #fff;
            padding: 0.25rem 0.65rem;
            border-radius: 14px;
            font-size: 0.78rem;
            font-weight: 700;
            z-index: 2;
            backdrop-filter: blur(6px);
        }
        .tour-gallery-thumbs {
            display: flex;
            gap: 0.4rem;
            margin-top: 0.5rem;
            overflow-x: auto;
            scrollbar-width: thin;
            padding-bottom: 4px;
        }
        .tour-gallery-thumbs::-webkit-scrollbar { height: 6px; }
        .tour-gallery-thumbs::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
        .tour-gallery-thumb {
            flex: 0 0 84px;
            height: 60px;
            border-radius: 6px;
            overflow: hidden;
            cursor: pointer;
            position: relative;
            transition: all 0.15s;
            border: 2px solid transparent;
            background: #eee;
            padding: 0;
        }
        .tour-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .tour-gallery-thumb.active { border-color: var(--primary); }
        .tour-gallery-thumb:not(.active) img { opacity: 0.65; transition: opacity 0.15s; }
        .tour-gallery-thumb:not(.active):hover img { opacity: 1; }
        @media (max-width: 768px) {
            .tour-gallery-main { aspect-ratio: 4 / 3; max-height: 280px; border-radius: 10px; }
            .tour-gallery-arrow { width: 36px; height: 36px; font-size: 1.3rem; }
            .tour-gallery-arrow.prev { left: 8px; }
            .tour-gallery-arrow.next { right: 8px; }
            .tour-gallery-thumb { flex: 0 0 60px; height: 44px; }
        }

        /* === Lightbox (full-screen photo) === */
        .lightbox {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.94);
            z-index: 1000;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: zoom-out;
            animation: lightboxFade 0.2s ease-out;
        }
        .lightbox.active { display: flex; }
        @keyframes lightboxFade {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .lightbox-img {
            max-width: 95vw;
            max-height: 92vh;
            object-fit: contain;
            user-select: none;
            -webkit-user-drag: none;
            cursor: default;
        }
        .lightbox-close {
            position: absolute;
            top: 18px; right: 22px;
            background: rgba(255,255,255,0.15);
            border: none;
            color: #fff;
            width: 44px; height: 44px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1.5rem;
            line-height: 1;
            display: flex; align-items: center; justify-content: center;
            transition: background 0.15s;
            z-index: 2;
        }
        .lightbox-close:hover { background: rgba(255,255,255,0.3); }
        .lightbox-arrow {
            position: absolute;
            top: 50%; transform: translateY(-50%);
            background: rgba(255,255,255,0.15);
            border: none;
            color: #fff;
            width: 52px; height: 52px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1.8rem;
            line-height: 1;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.15s;
            z-index: 2;
        }
        .lightbox-arrow:hover:not(:disabled) { background: rgba(255,255,255,0.3); transform: translateY(-50%) scale(1.06); }
        .lightbox-arrow:disabled { opacity: 0.3; cursor: default; }
        .lightbox-arrow.prev { left: 24px; }
        .lightbox-arrow.next { right: 24px; }
        .lightbox-counter {
            position: absolute;
            bottom: 24px; left: 50%; transform: translateX(-50%);
            color: rgba(255,255,255,0.85);
            font-size: 0.9rem;
            font-weight: 600;
            z-index: 2;
        }
        @media (max-width: 768px) {
            .lightbox-close { top: 12px; right: 12px; width: 38px; height: 38px; font-size: 1.3rem; }
            .lightbox-arrow { width: 42px; height: 42px; font-size: 1.4rem; }
            .lightbox-arrow.prev { left: 8px; }
            .lightbox-arrow.next { right: 8px; }
            .lightbox-counter { bottom: 14px; font-size: 0.82rem; }
        }
        .tour-details-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
        .tour-details-head h3 { font-family: 'Unbounded', 'Montserrat', sans-serif; color: var(--primary); font-size: 1.4rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
        .tour-details-close {
            background: #f5f5f5;
            border: none;
            font-size: 1.3rem;
            width: 36px; height: 36px;
            border-radius: 50%;
            color: var(--text-light);
            cursor: pointer;
            line-height: 1;
            flex-shrink: 0;
            transition: all 0.15s;
        }
        .tour-details-close:hover { background: var(--primary); color: var(--white); }

        .detail-prices {
            margin-bottom: 1.2rem;
            border: 1px solid #ffd9c8;
            border-radius: 10px;
            background: #fffaf7;
            overflow: hidden;
        }
        .detail-prices-title {
            font-size: 0.72rem;
            color: var(--primary);
            text-transform: uppercase;
            letter-spacing: 0.6px;
            font-weight: 700;
            padding: 0.5rem 0.9rem;
            background: rgba(220, 48, 2, 0.05);
            border-bottom: 1px solid #ffd9c8;
            display: flex;
            justify-content: space-between;
            align-items: baseline;
        }
        .detail-prices-title-count { font-weight: 400; color: var(--text-light); text-transform: none; letter-spacing: 0; }
        .detail-prices-list { display: flex; flex-direction: column; }
        .detail-price-row {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 0.8rem;
            padding: 0.4rem 0.85rem;
        }
        .detail-prices-list .detail-price-row + .detail-price-row { border-top: 1px dashed #ffe1d2; }
        .detail-price-row .v-name {
            font-weight: 600;
            color: var(--text);
            font-size: 0.84rem;
            line-height: 1.3;
            flex: 1;
            min-width: 0;
        }
        .detail-price-row .v-prices {
            display: flex;
            align-items: baseline;
            gap: 0.45rem;
            flex-shrink: 0;
            white-space: nowrap;
        }
        .detail-price-row .v-amount {
            color: var(--primary);
            font-weight: 700;
            font-size: 0.9rem;
            font-family: 'Unbounded', 'Montserrat', sans-serif;
            letter-spacing: -0.02em;
        }
        .detail-price-row .v-child {
            color: var(--text-light);
            font-size: 0.74rem;
            font-weight: 500;
        }
        /* Вариант как радиокнопка: наведение, выбранное состояние, кружок */
        .detail-price-row.clickable {
            cursor: pointer;
            border-radius: 8px;
            transition: background 0.15s ease;
        }
        .detail-price-row.clickable:hover { background: #fff3ec; }
        .detail-price-row.clickable:focus-visible {
            outline: 2px solid var(--primary);
            outline-offset: -2px;
        }
        .detail-price-row.active { background: #ffe7db; }
        .detail-price-row.active .v-name { color: var(--primary); }
        .detail-price-row .v-radio {
            flex-shrink: 0;
            align-self: center;
            width: 16px;
            height: 16px;
            border: 2px solid #cfcfcf;
            border-radius: 50%;
            position: relative;
            transition: border-color 0.15s ease;
        }
        .detail-price-row.clickable:hover .v-radio { border-color: var(--primary); }
        .detail-price-row.active .v-radio { border-color: var(--primary); }
        .detail-price-row.active .v-radio::after {
            content: '';
            position: absolute;
            inset: 2px;
            border-radius: 50%;
            background: var(--primary);
        }
        /* Название выбранного варианта — заголовком над вкладками */
        .detail-forvariant {
            margin: 0.4rem 0 1rem;
            text-align: center;
            font-size: 1.02rem;
            font-weight: 700;
            color: var(--text);
            line-height: 1.3;
        }
        /* Compact (2-column) mode when there are 5+ variants */
        .detail-prices.compact .detail-prices-list {
            display: grid;
            grid-template-columns: 1fr 1fr;
        }
        .detail-prices.compact .detail-price-row {
            padding: 0.32rem 0.7rem;
            gap: 0.5rem;
            border-bottom: 1px dashed #ffe1d2;
            border-top: none !important;
        }
        .detail-prices.compact .detail-price-row:nth-child(odd) {
            border-right: 1px dashed #ffe1d2;
        }
        .detail-prices.compact .detail-price-row:nth-last-child(-n+2):nth-child(odd),
        .detail-prices.compact .detail-price-row:last-child { border-bottom: none; }
        /* If the total number of rows is odd, last row spans both columns to avoid an empty cell */
        .detail-prices.compact .detail-price-row:last-child:nth-child(odd) {
            grid-column: 1 / -1;
            border-right: none;
            border-bottom: none;
        }
        .detail-prices.compact .detail-price-row .v-name { font-size: 0.79rem; }
        .detail-prices.compact .detail-price-row .v-amount { font-size: 0.82rem; }
        .detail-prices.compact .detail-price-row .v-child { font-size: 0.7rem; }
        @media (max-width: 768px) {
            .detail-prices-title { padding: 0.4rem 0.65rem; font-size: 0.66rem; }
            .detail-price-row { padding: 0.38rem 0.65rem; gap: 0.5rem; }
            .detail-price-row .v-name { font-size: 0.8rem; }
            .detail-price-row .v-amount { font-size: 0.84rem; }
            .detail-price-row .v-child { font-size: 0.7rem; }
            /* On mobile, compact mode falls back to single column */
            .detail-prices.compact .detail-prices-list { grid-template-columns: 1fr; }
            .detail-prices.compact .detail-price-row { border-right: none !important; padding: 0.32rem 0.65rem; }
            .detail-prices.compact .detail-price-row + .detail-price-row { border-top: 1px dashed #ffe1d2; }
            .detail-prices.compact .detail-price-row { border-bottom: none; }
        }

        .detail-tabs { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.8rem; justify-content: center; }
        .detail-tab-btn {
            padding: 0.45rem 0.95rem;
            border: 1px solid var(--border);
            border-radius: 50px;
            cursor: pointer;
            font-size: 0.78rem;
            font-weight: 500;
            background: var(--white);
            color: var(--text);
            font-family: inherit;
            transition: all 0.15s;
            letter-spacing: -0.01em;
        }
        .detail-tab-btn:hover { border-color: var(--primary); color: var(--primary); }
        .detail-tab-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
        .detail-content { display: none; white-space: pre-line; line-height: 1.65; font-size: 0.88rem; font-weight: 400; color: var(--text); }
        .detail-content.active { display: block; }

        .detail-cta-row {
            display: flex;
            gap: 0.6rem;
            flex-wrap: wrap;
            justify-content: center;
            margin-top: 1.2rem;
            padding-top: 1.2rem;
            border-top: 1px solid var(--border);
        }

        /* ===== EMPTY / FOOTER ===== */
        .empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-light); }
        .show-more-btn {
            grid-column: 1 / -1;
            margin: 1.2rem auto 0.5rem;
            padding: 0.95rem 2rem;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: #fff;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 700;
            font-family: inherit;
            letter-spacing: 0.3px;
            box-shadow: 0 4px 18px rgba(220, 48, 2, 0.28);
            transition: transform 0.15s, box-shadow 0.15s;
            min-width: 240px;
        }
        .show-more-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(220, 48, 2, 0.36); }
        .show-more-btn:active { transform: translateY(0); }
        .lp-footer {
            background: #1f1f1f;
            color: #bbb;
            padding: 2.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
            text-align: center;
            font-size: 0.88rem;
        }
        .lp-footer-contacts { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
        .lp-footer-contacts a { color: var(--white); text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; background: rgba(255,255,255,0.06); border-radius: 50px; transition: background 0.15s; }
        .lp-footer-contacts a:hover { background: rgba(255,255,255,0.12); }
        .lp-footer-contacts svg { width: 16px; height: 16px; }
        .lp-footer-legal {
            max-width: 900px;
            margin: 1.2rem auto 1rem;
            padding: 0 1rem;
            font-size: 0.7rem;
            line-height: 1.5;
            color: #777;
            text-align: center;
            white-space: pre-wrap;
            font-weight: 400;
        }
        .lp-footer-legal:empty { display: none; }
        @media (max-width: 768px) {
            .lp-footer-legal { font-size: 0.66rem; }
        }
        .lp-footer-contacts svg path:not([stroke]) { fill: #fff !important; }
        .lp-footer-contacts svg path[stroke] { stroke: #fff !important; }
        .lp-footer-copy { color: #777; font-size: 0.82rem; }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 1024px) {
            .tours-grid { grid-template-columns: repeat(2, 1fr); }
        }
        @media (max-width: 768px) {
            .lp-header { padding: 0.3rem 0.8rem; flex-wrap: nowrap; gap: 0.5rem; }
            .lp-header .logo img { height: 48px; }
            .lp-contacts { gap: 0.4rem; }
            .lp-phone { display: none; }
            .lp-login { padding: 0.4rem 0.75rem; font-size: 0.78rem; margin-left: 0; }
            .lp-contact-icon { width: 34px; height: 34px; }
            .lp-hero { padding: 2.5rem 1rem 2.2rem; }
            .lp-hero h1 { font-size: 2rem; letter-spacing: 0.05em; }
            .lp-hero-sub { font-size: 1rem; margin-bottom: 0.8rem; }
            .lp-hero p { font-size: 0.95rem; margin-bottom: 1.5rem; }
            .lp-hero-ctas { gap: 0.5rem; margin-bottom: 1.8rem; }
            .lp-cta { padding: 0.7rem 1.2rem; font-size: 0.9rem; }
            /* Три колонки должны помещаться в одну строку даже на 320 px:
               95 px на колонку с отступами 1.5rem не влезали и по-русски. */
            .lp-stats { gap: 1rem; padding-top: 1rem; }
            .lp-stat { min-width: 60px; }
            .lp-stat-num { font-size: 1.4rem; }
            .lp-stat-label { font-size: 0.7rem; }
            .lp-tabs-wrap { padding: 1rem 0.5rem 0.3rem; top: 46px; }
            .category-tabs { gap: 0.35rem; }
            .category-tab { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
            .lp-tours { margin: 0 auto; padding: 1rem 0.6rem 2rem; }
            .lp-section-title { font-size: 1.15rem; margin-bottom: 0.8rem; }
            .tours-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
            .tour-card-img-wrap { aspect-ratio: 4 / 3; }
            .tour-badge { font-size: 0.62rem; padding: 0.2rem 0.5rem; top: 6px; left: 6px; }
            .tour-card-body { padding: 0.7rem 0.75rem 0.8rem; }
            /* 2.6em = ровно две строки при line-height 1.3: заголовок в одну и в две
               строки занимает одинаковое место, карточки в ряду не расходятся */
            .tour-card-title { font-size: 0.9rem; min-height: 2.6em; margin-bottom: 0.3rem; }
            .tour-card-desc { font-size: 0.75rem; margin-bottom: 0.5rem; -webkit-line-clamp: 2; }
            .tour-card-price-value { font-size: 1.15rem; }
            .tour-card-price-cur { font-size: 0.78rem; }
            .tour-card-price-from { font-size: 0.72rem; }
            .tour-card-toggle { padding: 0.5rem; font-size: 0.78rem; }
            /* Mobile: modal flows naturally from the top, overlay scrolls.
               Using align-items: flex-start lets .tour-modal grow with its content
               so the white background reaches the full content height. */
            .tour-modal-overlay { padding: 0; align-items: flex-start; }
            .tour-modal { padding: 1.1rem 1rem 1.3rem; border-radius: 0; min-height: 100vh; margin: 0; max-width: none; width: 100%; }
            .tour-details-head h3 { font-size: 1.1rem; }
            .tour-details-close { width: 30px; height: 30px; font-size: 1.1rem; }
            .detail-tab-btn { padding: 0.35rem 0.75rem; font-size: 0.75rem; }
            .detail-content { font-size: 0.85rem; }
        }
