/* ============================================================
   ТурГид web — общая дизайн-система
   токены, layout, компоненты
   ============================================================ */

:root {
    --paper: #F4F1EC;
    --white: #FFFFFF;
    --g100: #EDEAE4;
    --g200: #D8D4CC;
    --g300: #B5B0A6;
    --g400: #8C877D;
    --g500: #6B665D;
    --g600: #4A463F;
    --g700: #2E2B26;
    --sand: #BCE3E8;
    --accent: #BCE3E8;
    --accent-d: #95C8EB;
    --accent-text: #0F3540;

    --r: 18px;
    --rl: 24px;
    --rf: 100px;

    --bg:    #131211;
    --bg2:   #1e1c1a;
    --card:  #1e1e1e;
    --card2: #2a2a2a;
    --text:  #ffffff;
    --text2: rgba(255,255,255,.6);
    --text3: rgba(255,255,255,.35);
    --text4: rgba(255,255,255,.18);
    --border: rgba(255,255,255,.06);
    --border2: rgba(255,255,255,.10);
    --input: rgba(255,255,255,.06);
    --input2: rgba(255,255,255,.10);
}

[data-theme="light"] {
    /* Многоуровневая бумажная палитра с явным контрастом между слоями */
    --bg:    #F4EFE5;        /* основной фон — заметный warm-paper */
    --bg2:   #E6DFCD;        /* секции (CTA) — заметно темнее */
    --card:  #FFFFFF;        /* плашки/карточки/шапка/футер — чистый белый */
    --card2: #F1EBDD;        /* hover карточек, второстепенные плашки */
    --text:  #2A2722;
    --text2: rgba(46, 43, 38, .62);
    --text3: rgba(46, 43, 38, .42);
    --text4: rgba(46, 43, 38, .20);
    --border:  rgba(46, 43, 38, .08);
    --border2: rgba(46, 43, 38, .14);
    --input:   rgba(46, 43, 38, .055);
    --input2:  rgba(46, 43, 38, .10);
    --accent:      #1F8AA0;
    --accent-d:    #166579;
    --accent-text: #FFFFFF;
}

/* Topbar и footer в светлой теме — белые с лёгкой тенью для отделения от paper-фона */
[data-theme="light"] .topbar,
[data-theme="light"] .footer {
    background: #FFFFFF;
    box-shadow: 0 4px 18px rgba(46, 43, 38, .06);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}
.container--wide { max-width: 1400px; }

main { min-height: 60vh; }

section {
    padding: 56px 0;
}
section + section { padding-top: 0; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.page-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.05;
    color: var(--text);
}

.sec {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--text);
    margin-bottom: 18px;
}
.sec__desc {
    font-size: 14px;
    color: var(--text2);
    margin: -10px 0 22px;
    max-width: 560px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
}

/* ============================================================
   TOPBAR
   ============================================================ */

.topbar {
    position: sticky;
    top: 12px;
    z-index: 50;
    margin: 12px auto 0;
    max-width: 1240px;
    width: calc(100% - 24px);
    height: 60px;
    padding: 0 12px 0 22px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    background: var(--card2);
    border-radius: 18px;
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
}
.topbar__brand { justify-self: start; }
.topbar__nav { justify-self: center; }
.topbar__right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar__brand {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.topbar__brand-mark {
    width: 26px; height: 26px;
    flex-shrink: 0;
    fill: var(--accent);
    stroke: var(--accent);
    stroke-width: 1.6;
    stroke-linejoin: round;
    transform: translateY(-1px);
}
.topbar__nav {
    display: flex;
    gap: 4px;
}
.topbar__link {
    padding: 8px 14px;
    border-radius: var(--rf);
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
    transition: background .15s ease, color .15s ease;
}
.topbar__link:hover { color: var(--text); background: var(--input); }
.topbar__link.active { color: var(--text); background: var(--input); }

.topbar__cta {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 16px;
    border-radius: var(--rf);
    background: var(--accent);
    color: var(--accent-text);
    font-size: 13px;
    font-weight: 700;
    transition: filter .15s ease, transform .15s ease;
}
.topbar__cta:hover { filter: brightness(1.05); }
.topbar__cta:active { transform: scale(.97); }

.topbar__burger {
    display: none;
    width: 36px; height: 36px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    background: var(--input);
}
.topbar__burger svg { width: 18px; height: 18px; stroke: var(--text); fill: none; stroke-width: 2; stroke-linecap: round; }

/* ============================================================
   THEME TOGGLE PILL (как в приложении)
   ============================================================ */

.theme-pill {
    position: relative;
    display: inline-flex;
    height: 38px;
    padding: 3px;
    border-radius: var(--rf);
    background: var(--input);
    flex-shrink: 0;
}
.theme-pill__slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--card);
    transition: transform .4s cubic-bezier(.4,0,.2,1);
    z-index: 0;
    pointer-events: none;
}
[data-theme="light"] .theme-pill__slider {
    background: var(--accent);
    transform: translateX(32px);
}
.theme-pill__opt {
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    color: var(--text3);
    transition: color .3s ease;
    border-radius: 50%;
}
.theme-pill__opt.active { color: var(--text); }
[data-theme="light"] .theme-pill__opt.active { color: var(--accent-text); }
.theme-pill__opt svg {
    width: 14px; height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* View Transition — circle reveal при смене темы.
   Отключаем дефолтный crossfade, оставляем старую тему как есть,
   а новую — растим clip-path кругом из точки клика (анимация задаётся в JS). */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--rf);
    font-size: 14px;
    font-weight: 700;
    transition: filter .15s ease, transform .15s ease, background .15s ease;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: var(--accent-text); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--ghost { background: var(--input); color: var(--text); }
.btn--ghost:hover { background: var(--input2); }
.btn--lg { height: 54px; padding: 0 28px; font-size: 15px; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    transition: color .15s ease, gap .15s ease;
}
.link-arrow:hover { color: var(--text); gap: 10px; }
.link-arrow svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   CHIPS
   ============================================================ */

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.chip {
    height: 36px;
    padding: 0 16px;
    border-radius: var(--rf);
    background: var(--input);
    color: var(--text2);
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: background .15s ease, color .15s ease;
}
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); font-weight: 600; }

/* ============================================================
   SEARCH INPUT
   ============================================================ */

.search-wrap {
    position: relative;
    width: 100%;
    max-width: 360px;
}
.search-wrap svg {
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    stroke: var(--text3);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    pointer-events: none;
}
.search {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 42px;
    border-radius: var(--rf);
    background: var(--input);
    color: var(--text);
    font-size: 14px;
    border: none;
    outline: none;
    transition: background .15s ease;
}
.search::placeholder { color: var(--text3); }
.search:focus { background: var(--input2); }

/* ============================================================
   HERO (landing)
   ============================================================ */

.hero {
    padding: 72px 0 48px;
    position: relative;
    overflow: hidden;
}
/* Hero-карта в формате карточки внутри hero (не fixed). */
.page-map {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--bg);
}
.page-map .leaflet-container { background: var(--bg); }
[data-theme="dark"] .page-map .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.85) saturate(.5);
}
/* На верхней hero-карте контролы и легенду прячем — она исключительно фон */
.hero--map .leaflet-control-zoom { display: none; }
.hero--map .page-map-legend { display: none; }
/* Кнопки +/- (на нижней карте) — стилизованные, ближе к центру по вертикали */
.page-map .leaflet-control-container .leaflet-top.leaflet-left {
    top: 50%;
    left: 24px;
    transform: translateY(-50%);
}
.page-map .leaflet-control-zoom {
    border: 0 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .15) !important;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(244, 241, 236, .92);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.page-map .leaflet-control-zoom a {
    background: transparent !important;
    color: var(--g700) !important;
    border: 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    width: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
    transition: background .15s;
}
.page-map .leaflet-control-zoom a:hover { background: rgba(0, 0, 0, .06) !important; }
.page-map .leaflet-control-zoom-in { border-bottom: 1px solid rgba(0, 0, 0, .08) !important; }
[data-theme="dark"] .page-map .leaflet-control-zoom {
    background: rgba(28, 28, 30, .85);
}
[data-theme="dark"] .page-map .leaflet-control-zoom a { color: rgba(255, 255, 255, .85) !important; }
[data-theme="dark"] .page-map .leaflet-control-zoom a:hover { background: rgba(255, 255, 255, .08) !important; }
[data-theme="dark"] .page-map .leaflet-control-zoom-in { border-bottom-color: rgba(255, 255, 255, .08) !important; }

/* Легенда маршрутов — прижата к нижнему-правому углу hero-карточки */
.page-map-legend {
    position: absolute;
    right: 18px;
    bottom: 88px;
    z-index: 3;
    background: rgba(244, 241, 236, .92);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
    min-width: 180px;
    max-width: 280px;
    color: var(--g700);
    font-size: 12px;
    transition: opacity .25s ease, transform .25s ease;
}
[data-theme="dark"] .page-map-legend {
    background: rgba(28, 28, 30, .82);
    color: rgba(255, 255, 255, .92);
}
.page-map-legend[hidden] { display: none; }
.page-map-legend__title {
    font-weight: 800;
    font-size: 11px;
    letter-spacing: .5px;
    text-transform: uppercase;
    opacity: .55;
    margin-bottom: 8px;
}
.page-map-legend__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    color: inherit;
    text-decoration: none;
    transition: opacity .15s;
}
.page-map-legend__item:hover { opacity: .7; }
.page-map-legend__bar {
    width: 18px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Тизер-карта между шапкой и hero. По умолчанию небольшая (180px),
   при пуле к самому верху страницы плавно раскрывается до 100vh. */
.map-peek {
    --peek-h: 180px;
    position: relative;
    z-index: 1;
    margin: -72px auto 0;
    max-width: 1320px;
    width: calc(100% - 24px);
    height: var(--peek-h);
    border-radius: 0 0 22px 22px;
    overflow: hidden;
    background: var(--bg2);
    transition: height .35s cubic-bezier(.4, 0, .2, 1);
}
.map-peek.is-open { --peek-h: calc(100vh - 12px); }
.map-peek .page-map {
    inset: 0;
    pointer-events: auto;
}
.map-peek__hint {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 3;
    background: rgba(244, 241, 236, .9);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    color: var(--g700, #2E2B26);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    pointer-events: none;
}
[data-theme="dark"] .map-peek__hint {
    background: rgba(28, 28, 30, .85);
    color: rgba(255, 255, 255, .85);
}
.map-peek.is-open .map-peek__hint { opacity: 0; }

/* Крестик-закрытия: видим ТОЛЬКО когда peek раскрыт. Под шапкой (top:12+60+8=80) */
.map-peek__close {
    position: absolute;
    top: 84px;
    right: 24px;
    z-index: 4;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    background: rgba(28, 28, 30, .85);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    color: rgba(255, 255, 255, .9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(.8);
    transition: opacity .2s ease, transform .2s ease, background .15s;
    -webkit-tap-highlight-color: transparent;
}
.map-peek__close svg { width: 18px; height: 18px; display: block; }
.map-peek.is-open .map-peek__close {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}
[data-theme="light"] .map-peek__close {
    background: rgba(255, 255, 255, .85);
    color: var(--g700);
}
.map-peek__close:hover { background: rgba(28, 28, 30, .95); }
[data-theme="light"] .map-peek__close:hover { background: rgba(255, 255, 255, 1); }

/* Легенда внутри peek — видна ТОЛЬКО когда peek раскрыт, прижата к правому-нижнему */
.map-peek .page-map-legend {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 16px 0 0 0;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
[data-theme="light"] .map-peek .page-map-legend { background: var(--paper); }
.map-peek.is-open .page-map-legend {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 700px) {
    .map-peek {
        width: 100%;
        max-width: none;
        /* нижние углы скруглены даже на мобиле в закрытом состоянии */
        border-radius: 0 0 22px 22px;
    }
    .map-peek.is-open { border-radius: 0; }
}

/* На мобилах убираем синюю подсветку при тапе — глобально */
@media (max-width: 700px) {
    a, button, .btn, [role="button"], .ai-chip, .feature, .rcard, .pcard {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Карта на странице маршрутов /routes/ — над сеткой, с легендой в углу */
.routes-map-sentinel { height: 1px; margin-top: -1px; }
.routes-map-wrap {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 18px 0 28px;
    border-radius: 22px;
    overflow: hidden;
    height: 420px;
    background: var(--bg2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
    /* Только border-radius и margin плавно — height не анимируем, иначе Leaflet «бултыхается» */
    transition: border-radius .2s ease, margin-top .2s ease;
}
.routes-map-wrap.is-stuck {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.routes-map-wrap .map-leaflet { width: 100%; height: 100%; }
.routes-map-wrap .leaflet-container { background: var(--bg2); }
[data-theme="dark"] .routes-map-wrap .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.85) saturate(.5);
}
.routes-map-wrap .page-map-legend {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 16px 0 0 0;
    box-shadow: none;
}
[data-theme="dark"] .routes-map-wrap .page-map-legend {
    background: var(--bg);
}
[data-theme="light"] .routes-map-wrap .page-map-legend {
    background: var(--paper);
}
@media (max-width: 700px) {
    .routes-map-wrap { height: 320px; }
}
.hero--map > * { pointer-events: none; }
.hero--map .hero__visual { pointer-events: none; z-index: 3; }
.hero-map__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(244, 241, 236, .12) 50%,
        rgba(244, 241, 236, .55) 100%);
}
[data-theme="dark"] .hero-map__overlay {
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(19, 18, 17, .15) 55%,
        rgba(19, 18, 17, .65) 100%);
}
.hero--map .hero__container { position: relative; z-index: 2; }
.hero--map .hero__text > *,
.hero--map .hero__cta > *,
.hero--map .feature-row > * { pointer-events: auto; }
@media (min-width: 1200px) { .hero--map { padding-top: 220px; } }
@media (min-width: 1600px) { .hero--map { padding-top: 280px; } }

/* Все остальные секции — солидные (кроме секций со своим card-стилем) */
main > section:not(.hero--map):not(.cta-with-map):not(.cta-section) {
    background: var(--bg);
    position: relative;
    z-index: 1;
}

/* Нижняя карточка с интерактивной картой — ширина как у hero, высота крупная */
.cta-with-map {
    position: relative;
    margin: 24px auto 48px;
    max-width: 1320px;
    width: calc(100% - 24px);
    height: 960px;
    border-radius: 22px;
    overflow: hidden;
    z-index: 1;
}
.cta-with-map .page-map {
    inset: 0;
}
/* Легенда — нижний правый угол bottom-карты */
.cta-with-map .page-map-legend {
    position: absolute;
    right: 18px;
    bottom: 18px;
    top: auto;
    left: auto;
    z-index: 3;
}
.hero__inner {
    position: relative;
    min-height: 600px;
}
.hero__text {
    position: relative;
    z-index: 2;
    max-width: 560px;
}
.hero__title {
    font-size: 72px;
    font-weight: 800;
    letter-spacing: -2.4px;
    line-height: .95;
    margin-bottom: 22px;
    color: var(--text);
}
.hero__sub {
    font-size: 17px;
    line-height: 1.55;
    color: var(--text2);
    max-width: 520px;
    margin-bottom: 32px;
}
.hero__cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.hero__visual {
    position: absolute;
    right: -40px;
    bottom: 0;
    width: 700px;
    max-width: 65%;
    aspect-ratio: 1 / 1;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}
.hero-splash {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Узкие экраны: анимация уходит ниже текста, не накладывается */
@media (max-width: 880px) {
    .hero__inner { min-height: 0; }
    .hero__visual {
        position: relative;
        right: 0;
        width: 100%;
        max-width: none;
        margin-top: 24px;
    }
}
/* На телефоне колонну и стрелку-навигацию прячем + убираем боковые отступы у hero-карты */
@media (max-width: 700px) {
    .hero--map .hero__visual { display: none !important; }
    .hero--map {
        width: 100%;
        max-width: none;
        border-radius: 0;
        /* больше воздуха сверху, чтобы заголовок не упирался в шапку */
        padding-top: 180px;
        padding-bottom: 48px;
    }
    .cta-with-map {
        width: 100%;
        max-width: none;
        border-radius: 0;
        margin-left: 0;
        margin-right: 0;
    }
}
.hero-column {
    color: #8c877d;
    opacity: 1;
}
.hero-column g { opacity: 1; }
[data-theme="light"] .hero-column { color: #6b665d; }

.hero__chips {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.hero__chip {
    padding: 6px 12px;
    border-radius: var(--rf);
    background: var(--input);
    font-size: 12px;
    color: var(--text2);
    font-weight: 500;
}

/* ============================================================
   ROUTE CARDS (rcard) — общий компонент
   ============================================================ */

.rcard {
    display: block;
    border-radius: 18px;
    overflow: hidden;
    background: var(--card);
    position: relative;
    transition: background .15s ease;
}
.rcard:hover { background: var(--card2); }

.rcard__img {
    aspect-ratio: 4 / 3;
    background: var(--bg2);
    position: relative;
    overflow: hidden;
}
.rcard__img img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.rcard__img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.55));
}

.rcard__badge {
    position: absolute;
    top: 12px; left: 12px;
    height: 26px;
    padding: 0 10px;
    border-radius: var(--rf);
    background: var(--accent);
    color: var(--accent-text);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    z-index: 2;
}
.rcard__sub-count {
    position: absolute;
    top: 12px; right: 12px;
    height: 26px;
    padding: 0 10px;
    border-radius: var(--rf);
    background: rgba(0,0,0,.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    z-index: 2;
}

.rcard__body { padding: 16px 18px 18px; }
.rcard__name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.2px;
    margin-bottom: 6px;
    line-height: 1.25;
}
.rcard__desc {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.45;
    margin-bottom: 12px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}
.rcard__meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text3);
    font-weight: 500;
}
.rcard__meta span { display: inline-flex; align-items: center; gap: 4px; }
.rcard__meta svg { width: 12px; height: 12px; }

/* ============================================================
   GRIDS
   ============================================================ */

.grid {
    display: grid;
    gap: 18px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

@media (max-width: 960px) {
    .grid--3, .grid--4, .grid--auto {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .grid--3, .grid--4, .grid--auto {
        grid-template-columns: 1fr;
    }
}
/* На телефоне партнёры маршрута — горизонтальная скроллируемая лента */
@media (max-width: 700px) {
    #routePartners.grid {
        display: flex;
        grid-template-columns: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 -16px;
        padding: 0 16px 8px;
        gap: 12px;
    }
    #routePartners.grid::-webkit-scrollbar { display: none; }
    #routePartners .pcard {
        flex: 0 0 240px;
        scroll-snap-align: start;
    }
}

/* ============================================================
   PARTNER CARDS
   ============================================================ */

.pcard {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    background: var(--card);
    position: relative;
    transition: background .15s ease;
}
.pcard:hover { background: var(--card2); }
.pcard__img {
    aspect-ratio: 5 / 4;
    background: var(--bg2);
    position: relative;
    overflow: hidden;
}
.pcard__img img { width: 100%; height: 100%; object-fit: cover; }
.pcard__discount {
    position: absolute;
    top: 10px; left: 10px;
    height: 28px;
    padding: 0 12px;
    border-radius: var(--rf);
    background: var(--accent);
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
}
.pcard__body { padding: 14px 16px 16px; }
.pcard__name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.25;
}
.pcard__type {
    font-size: 12px;
    color: var(--text3);
}

/* ============================================================
   ROUTE DETAIL PAGE
   ============================================================ */

.route-hero {
    position: relative;
    margin: 18px auto 0;
    max-width: 1240px;
    width: calc(100% - 24px);
    height: 420px;
    border-radius: 22px;
    overflow: hidden;
    background: var(--bg2);
}
.route-hero img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.route-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(19,18,17,.15) 0%, rgba(19,18,17,.55) 60%, rgba(19,18,17,.85) 100%);
}
.route-hero__content {
    position: absolute;
    left: 32px; right: 32px; bottom: 28px;
    z-index: 2;
    max-width: 880px;
}
.route-hero__back-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.route-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: var(--rf);
    background: rgba(0,0,0,.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s ease;
}
.route-hero__back:hover { background: rgba(0,0,0,.65); }
.route-hero__back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.route-hero__back--ghost {
    background: rgba(255,255,255,.08);
}
.route-hero__back--ghost:hover { background: rgba(255,255,255,.16); }
.route-hero__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 6px;
}

.route-hero__name {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -1.2px;
    line-height: 1.05;
    color: #fff;
    margin-bottom: 10px;
    max-width: 760px;
}
.route-hero__short {
    font-size: 16px;
    color: rgba(255,255,255,.78);
    max-width: 640px;
    margin-bottom: 18px;
}

.stats-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.stat-pill {
    height: 32px;
    padding: 0 14px;
    border-radius: var(--rf);
    background: rgba(0,0,0,.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.stat-pill svg { width: 12px; height: 12px; fill: var(--accent); }

.route-page__body {
    padding-top: 40px;
    padding-bottom: 64px;
}
.route-page__cols {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 40px;
    align-items: flex-start;
}
.route-page__main {
    min-width: 0;
}
.route-page__aside {
    position: sticky;
    top: 84px;
}

.route-desc {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text2);
    margin-bottom: 36px;
}

@media (max-width: 900px) {
    .route-hero { height: 320px; margin: 14px auto 0; width: calc(100% - 24px); border-radius: 18px; }
    .route-hero__content { left: 22px; right: 22px; bottom: 22px; }
    .route-hero__name { font-size: 32px; }
    .route-page__cols { grid-template-columns: 1fr; }
    .route-page__aside { position: static; }
}

/* ============================================================
   POINTS LIST (timeline)
   ============================================================ */

.points-list {
    list-style: none;
    position: relative;
    padding-left: 0;
}
.point {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    position: relative;
}
.point:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 42px;
    bottom: -28px;
    width: 2px;
    background: var(--border2);
}
.point__num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--card2);
    color: var(--text3);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.point__body { flex: 1; min-width: 0; padding-top: 3px; }
.point__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.point__sub {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.5;
}
.point__time {
    font-size: 12px;
    color: var(--text3);
    margin-left: auto;
    flex-shrink: 0;
    padding-top: 5px;
}

/* ============================================================
   SUB ROUTES (внутри страницы сектора)
   ============================================================ */

.subs-list {
    display: grid;
    gap: 12px;
}
.sub-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
    background: var(--card);
    border-radius: 16px;
    transition: background .15s ease;
}
.sub-item:hover { background: var(--card2); }
.sub-item__num {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--input);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sub-item__title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1.25;
}
.sub-item__short {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.4;
}
.sub-item__meta {
    font-size: 12px;
    color: var(--text3);
    font-weight: 500;
    flex-shrink: 0;
}
.sub-item__meta span { display: inline-block; }
.sub-item__meta span + span::before { content: ' / '; opacity: .5; }
.sub-item--highlight { background: var(--card2); }

/* ============================================================
   AMENITIES: точки/жильё/еда/транспорт на маршруте
   ============================================================ */

.amenity-tabs {
    display: flex;
    gap: 28px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 22px;
    overflow-x: auto;
    scrollbar-width: none;
}
.amenity-tabs::-webkit-scrollbar { display: none; }
.amenity-tab {
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text2);
    position: relative;
    white-space: nowrap;
    transition: color .15s ease;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}
.amenity-tab:hover { color: var(--text); }
.amenity-tab.on { color: var(--text); font-weight: 600; }
.amenity-tab.on::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
}
.amenity-tab__count {
    font-size: 12px;
    color: var(--text3);
    font-weight: 500;
}
.amenity-tab.on .amenity-tab__count { color: var(--text2); }

.amenity-stage {
    margin-bottom: 28px;
}
.amenity-stage__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 4px 4px 4px 4px;
    cursor: pointer;
    user-select: none;
    border-radius: 8px;
    transition: background .15s ease;
}
.amenity-stage__head:hover { background: var(--input); }
.amenity-stage__chevron {
    margin-left: 8px;
    width: 16px; height: 16px;
    color: var(--text3);
    transition: transform .25s ease;
}
.amenity-stage__chevron svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.amenity-stage.collapsed .amenity-stage__chevron { transform: rotate(-90deg); }
.amenity-stage.collapsed .amenity-list { display: none; }
.amenity-stage__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.amenity-stage__km {
    font-size: 12px;
    color: var(--text3);
    font-weight: 500;
}
.amenity-stage__count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text3);
}
.amenity-stage__head .amenity-stage__chevron { margin-left: 0; }

.amenity-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.amenity-row {
    display: grid;
    grid-template-columns: 64px 28px 1fr auto auto;
    gap: 14px;
    align-items: center;
    padding: 12px 16px;
    background: var(--card);
    border-radius: 14px;
    transition: background .15s ease;
    text-decoration: none;
    color: inherit;
}
.amenity-row:hover { background: var(--card2); }
.amenity-row__km {
    font-size: 12px;
    font-weight: 600;
    color: var(--text3);
    font-variant-numeric: tabular-nums;
}
.amenity-row__icon {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: var(--input);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text2);
    flex-shrink: 0;
}
.amenity-row__icon svg {
    width: 17px; height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.amenity-row__icon--place { background: rgba(149,200,235,.18); color: #95c8eb; }
.amenity-row__icon--hotel { background: rgba(255,193,116,.18); color: #ffc174; }
.amenity-row__icon--restaurant { background: rgba(120,210,140,.18); color: #82d49a; }
.amenity-row__icon--transport { background: rgba(120,160,250,.18); color: #95b7ff; }

.amenity-row__main { min-width: 0; }
.amenity-row__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.amenity-row__sub {
    font-size: 12px;
    color: var(--text3);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.amenity-row__sub-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.amenity-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--text3);
    font-weight: 500;
}
.amenity-tag--ekp { color: var(--accent); font-weight: 700; }
.amenity-tag--rating svg { width: 10px; height: 10px; fill: currentColor; }

.amenity-row__price {
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    font-variant-numeric: tabular-nums;
    text-align: right;
    flex-shrink: 0;
}
.amenity-row__price-sub {
    font-size: 10px;
    color: var(--text3);
    font-weight: 500;
}

.amenity-row__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text3);
    flex-shrink: 0;
}
.amenity-row__status::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--text4);
}
.amenity-row__status--open { color: #6dd47e; }
.amenity-row__status--open::before { background: #6dd47e; }
.amenity-row__status--closed { color: #d97474; }
.amenity-row__status--closed::before { background: #d97474; }

/* Пульсирующий маркер на мини-карте при hover на amenity-row */
.amenity-map-marker {
    position: relative;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px #fff, 0 1px 4px rgba(0,0,0,.3);
}
.amenity-map-marker::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: rgba(188,227,232,.35);
    animation: amenityPulse 1.4s ease-out infinite;
}
@keyframes amenityPulse {
    0%   { transform: scale(.4); opacity: .9; }
    100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 700px) {
    .amenity-row {
        grid-template-columns: 48px 28px 1fr auto;
        padding: 10px 12px;
        gap: 10px;
    }
    .amenity-row__price { display: none; }
}

/* ============================================================
   MAP
   ============================================================ */

.map-wrap {
    border-radius: 18px;
    overflow: hidden;
    background: var(--bg2);
    position: relative;
}
.map-aside {
    height: 480px;
}

/* Фильтр-панель в правом нижнем углу мини-карты */
.map-filter {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 500;
    background: var(--bg);
    border-top-left-radius: 16px;
    padding: 8px;
    display: flex;
    gap: 4px;
}
.map-filter__btn {
    height: 32px;
    padding: 0 12px;
    border-radius: 10px;
    background: transparent;
    color: var(--text3);
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}
.map-filter__btn:hover { color: var(--text); }
.map-filter__btn.on {
    background: var(--accent);
    color: var(--accent-text);
}
.map-filter__btn svg {
    width: 13px; height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.map-preview {
    height: 460px;
}
.map-leaflet {
    width: 100%; height: 100%;
}

/* Тёмная тема — инверсия светлых tiles в warm-dark */
.map-leaflet .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) sepia(.18); }
/* Светлая тема — карта без фильтров, в нативных мягких цветах CartoCDN */
[data-theme="light"] .map-leaflet .leaflet-tile-pane { filter: none; }

/* Фон контейнера карты — там где тайлы ещё не подгрузились.
   Leaflet добавляет .leaflet-container на тот же div что .map-leaflet,
   поэтому селектор без пробела. Адаптируется к теме через --bg2. */
.map-leaflet,
.map-leaflet.leaflet-container,
.leaflet-container { background: var(--bg2) !important; }
.map-leaflet .leaflet-control-attribution { display: none; }
.map-leaflet .leaflet-control-zoom {
    border: none !important;
    box-shadow: none !important;
}
.map-leaflet .leaflet-control-zoom a {
    background: rgba(42,42,42,.85) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    width: 34px !important; height: 34px !important;
    line-height: 34px !important;
    margin-bottom: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
[data-theme="light"] .map-leaflet .leaflet-control-zoom a {
    background: rgba(255,255,255,.92) !important;
    color: var(--text) !important;
    box-shadow: 0 2px 10px rgba(46,43,38,.12);
}
[data-theme="light"] .map-leaflet .leaflet-control-zoom a:hover {
    background: #fff !important;
}

.marker-place {
    width: 12px; height: 12px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(0,0,0,.3);
}
.marker-partner {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.3);
}
/* Маркеры amenity на карте — менее заметные точки в категориальных цветах */
.marker-amenity {
    width: 14px; height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(0,0,0,.3);
}
.marker-amenity--food { background: #82d49a; }
.marker-amenity--hotel { background: #ffc174; }
.marker-amenity--attraction { background: #d8d4cc; }

.map-leaflet .leaflet-popup-content-wrapper {
    background: rgba(22,22,24,.88) !important;
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    color: #fff !important;
    border-radius: 14px !important;
    padding: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
}
.map-leaflet .leaflet-popup-tip-container { display: none !important; }
.map-leaflet .leaflet-popup-content { margin: 0 !important; width: auto !important; }
.map-leaflet .leaflet-popup-close-button { display: none !important; }

.map-popup { padding: 12px 16px; min-width: 180px; max-width: 260px; }
.map-popup__name { font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }
.map-popup__sub { font-size: 11.5px; color: rgba(255,255,255,.6); line-height: 1.4; }
.map-popup__open {
    margin-top: 10px;
    height: 32px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 700;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-overlay {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(19,18,17,.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--text2);
    z-index: 400;
}

/* ============================================================
   ASIDE (CTA блок справа)
   ============================================================ */

.aside-cta {
    background: var(--card);
    border-radius: 18px;
    padding: 22px;
    margin-top: 16px;
}
.aside-cta__title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}
.aside-cta__sub {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ============================================================
   PARTNERS section heading
   ============================================================ */

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    margin: 64px auto 12px;
    max-width: 1240px;
    width: calc(100% - 24px);
    background: var(--card2);
    border-radius: 22px;
    padding: 36px 32px 24px;
    /* Над fixed-картой */
    position: relative;
    z-index: 2;
}
.footer__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 28px;
}
.footer__brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
}
.footer__brand-mark {
    width: 32px; height: 32px;
    flex-shrink: 0;
    fill: var(--accent);
    stroke: var(--accent);
    stroke-width: 1.6;
    stroke-linejoin: round;
}
.footer__brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.5px;
    line-height: 1;
}
.footer__brand-sub {
    font-size: 13px;
    color: var(--text2);
    margin-top: 4px;
    line-height: 1.4;
}

.dl-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.dl-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 18px;
    border-radius: 12px;
    background: var(--input);
    color: var(--text);
    transition: background .15s ease;
}
.dl-btn:hover { background: var(--input2); }
.dl-btn svg { flex-shrink: 0; fill: var(--text); }
.dl-btn__logo { flex-shrink: 0; border-radius: 6px; width: 22px; height: 22px; }
.dl-btn--square .dl-btn__logo { width: 40px; height: 40px; border-radius: 10px; }
.dl-btn__caption {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.dl-btn__small {
    font-size: 10px;
    color: var(--text2);
    margin-bottom: 2px;
}
.dl-btn__big {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.2px;
}

/* Квадратные кнопки — для CTA-секций (на лендинге, странице маршрута) */
.dl-row--square {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.dl-btn--square {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 140px;
    height: 140px;
    padding: 0;
    border-radius: 18px;
    background: var(--card2);
}
.dl-btn--square:hover { background: var(--input2); }
.dl-btn--square svg { width: 40px; height: 40px; }
.dl-btn--square .dl-btn__small { display: none; }
.dl-btn--square .dl-btn__caption { align-items: center; }
.dl-btn--square .dl-btn__big {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.2px;
}

.footer__bottom {
    padding-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,.04);
}
.footer__nav {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}
.footer__nav a {
    font-size: 13px;
    color: var(--text2);
    transition: color .15s ease;
}
.footer__nav a:hover { color: var(--text); }
.footer__copy {
    font-size: 12px;
    color: var(--text3);
}

@media (max-width: 760px) {
    .footer { margin: 48px 12px 12px; padding: 28px 22px 20px; }
    .footer__row { flex-direction: column; align-items: flex-start; gap: 22px; margin-bottom: 22px; }
    .footer__bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
    .topbar__nav { display: none; }
    .topbar__cta { display: none; }
    .topbar__burger { display: inline-flex; }
    .topbar { display: flex; gap: 10px; padding: 0 12px; }
    .topbar__right { margin-left: auto; }
    .theme-pill { height: 34px; padding: 2px; }
    .theme-pill__slider { width: 30px; height: 30px; top: 2px; left: 2px; }
    [data-theme="light"] .theme-pill__slider { transform: translateX(30px); }
    .theme-pill__opt { width: 30px; height: 30px; }
    .hero { padding: 48px 0 28px; }
    .hero__inner { grid-template-columns: 1fr; gap: 28px; }
    .hero__title { font-size: 52px; letter-spacing: -1.6px; }
    .hero__sub { font-size: 15px; }
    .hero__visual { aspect-ratio: 17 / 12; max-height: 320px; }
    .page-title { font-size: 32px; }
    section { padding: 36px 0; }
    .map-aside { height: 360px; }
}

/* ============================================================
   DOWNLOAD CTA section (на лендинге)
   ============================================================ */

.cta-section {
    margin: 24px auto 48px;
    max-width: 1240px;
    width: calc(100% - 24px);
    padding: 64px 0;
    border-radius: 22px;
    position: relative;
    z-index: 1;
    background:
        radial-gradient(900px 320px at 50% -20%, rgba(188, 227, 232, .12), transparent 65%),
        var(--bg2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
}
[data-theme="light"] .cta-section {
    background:
        radial-gradient(900px 320px at 50% -20%, rgba(31, 138, 160, .08), transparent 65%),
        var(--card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.cta-section__inner {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}
.cta-section__title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -.8px;
    margin-bottom: 14px;
}
.cta-section__sub {
    font-size: 15px;
    color: var(--text2);
    margin-bottom: 28px;
    line-height: 1.55;
}
.cta-section .dl-row { justify-content: center; }

/* ============================================================
   SKELETON
   ============================================================ */

.skel {
    position: relative;
    overflow: hidden;
    background: var(--card);
    border-radius: 14px;
    isolation: isolate;
}
.skel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.045) 50%, transparent);
    animation: shimmer 1.7s ease-in-out infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================================
   EMPTY / OFFLINE
   ============================================================ */

.empty {
    text-align: center;
    padding: 56px 24px;
    color: var(--text3);
    font-size: 14px;
}

/* ============================================================
   LEGAL PAGE
   ============================================================ */

.legal-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: flex-start;
    margin-top: 36px;
}
.legal-nav {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--card);
    border-radius: 16px;
}
.legal-nav__link {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
    transition: background .15s ease, color .15s ease;
}
.legal-nav__link:hover { background: var(--input); color: var(--text); }
.legal-nav__link.active { background: var(--input2); color: var(--text); font-weight: 600; }

.legal-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text2);
    max-width: 740px;
}
.legal-body h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--text);
    margin: 40px 0 14px;
    scroll-margin-top: 84px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 22px 0 8px;
}
.legal-body p { margin-bottom: 14px; }
.legal-body ul {
    margin: 8px 0 16px;
    padding-left: 20px;
}
.legal-body ul li { margin-bottom: 6px; }
.legal-body strong { color: var(--text); font-weight: 600; }

@media (max-width: 900px) {
    .legal-grid { grid-template-columns: 1fr; gap: 24px; }
    .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
    .legal-body h2 { font-size: 22px; }
}

/* ============================================================
   CATALOG (routes list)
   ============================================================ */

.catalog__head {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin: 32px 0 22px;
    flex-wrap: wrap;
}
.catalog__head .catalog__title-block { flex: 1; min-width: 240px; }
.catalog__head .search-wrap { flex: 0 0 560px; max-width: 560px; }
.catalog__count {
    font-size: 13px;
    color: var(--text3);
    margin-top: 6px;
}

/* Объединённая панель фильтров: chips + разделитель + chips */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: var(--input);
    border-radius: 18px;
    margin-bottom: 14px;
}
.filter-bar:last-of-type { margin-bottom: 24px; }
/* Узкий toggle типа маршрута — отдельной полосой над основными фильтрами */
.filter-bar--type {
    background: transparent;
    padding: 0;
    margin-bottom: 14px;
}
.filter-bar--type .filter-bar__label { padding-left: 4px; }
.filter-bar .chips { margin: 0; flex-wrap: wrap; gap: 6px; }
.filter-bar .chip {
    height: 32px;
    padding: 0 14px;
    background: transparent;
    font-size: 12.5px;
}
.filter-bar .chip:hover { background: var(--input2); }
.filter-bar .chip.on { background: var(--text); color: var(--bg); }
.filter-bar__sep {
    width: 1px;
    height: 22px;
    background: var(--border2);
    flex-shrink: 0;
}
.filter-bar__spacer {
    flex: 1;
    min-width: 12px;
}
.filter-bar__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text3);
    flex-shrink: 0;
}

@media (max-width: 760px) {
    .catalog__head .search-wrap { flex: 1 1 100%; max-width: none; }
}

/* ============================================================
   PROMO STRIP under hero
   ============================================================ */

.feature-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 36px;
    text-align: left;
}
.feature {
    background: rgba(30,28,26,.65);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 18px 20px;
}
[data-theme="light"] .feature { background: rgba(255,255,255,.7); }
.feature__title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}
.feature__desc {
    font-size: 12.5px;
    color: var(--text2);
    line-height: 1.5;
}
@media (max-width: 760px) {
    .feature-row { grid-template-columns: 1fr; }
}

/* ============================================================
   PARTNER DETAIL (popup-стиль на карте сектора)
   ============================================================ */
/* Легенда в правом нижнем углу мини-карты на лендинге */
.map-legend {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 500;
    background: var(--bg);
    border-top-left-radius: 18px;
    padding: 14px 18px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 280px;
}
.map-legend__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text3);
    margin-bottom: 4px;
}
.map-legend__item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.2;
}
.map-legend__line {
    width: 18px;
    height: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}
.map-legend__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* misc */
.spacer-lg { height: 32px; }
