:root {
  --bg: #f4f7fe;
  --surface: #ffffff;
  --surface-2: #eef3fd;
  --text: #0d1b33;
  --text-muted: #5c6b86;
  --border: #e6ecf6;
  --primary: #1f5cff;
  --primary-dark: #1447d6;
  --primary-soft: #e7efff;
  --accent: #ff5c39;
  --accent-soft: #fff0ec;
  --warning: #ff8a3d;
  --success: #12b76a;
  --shadow-sm: 0 1px 3px rgba(13, 27, 51, 0.06);
  --shadow: 0 10px 30px rgba(13, 27, 51, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 46, 120, 0.16);
  --radius: 22px;
  --radius-sm: 14px;
  --container: 1180px;
  --font: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
}
/* overflow-x:hidden убран намеренно — он ломает position:sticky у шапки.
   Горизонтальный скролл карты решён через width:100% у .karta-fullbleed. */

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 750;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.2rem;
  font-weight: 700;
}
p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.muted {
  color: var(--text-muted);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
/* Карты (MapLibre/Leaflet) не должны перекрывать плавающую шапку. */
.karta-map, .citymap, .maplibregl-map { z-index: 0; }
.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 66px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo:hover {
  text-decoration: none;
}
.logo-badge {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 18px;
}
.main-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  align-items: center;
}
.main-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}
/* Активный раздел в шапке */
.main-nav a.nav-link.is-active,
.dropdown-toggle.is-active {
  color: var(--primary);
  position: relative;
}
.main-nav a.nav-link.is-active::after,
.dropdown-toggle.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}
.nav-toggle {
  display: none;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 72px;
  background: #0e1729;
  color: #c4cede;
}
.site-footer a {
  color: #c4cede;
}
.site-footer a:hover {
  color: #fff;
}
/* Активный раздел в подвале */
.footer-col.is-active h4 { color: #fff; }
.footer-col.is-active h4::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--primary);
  vertical-align: middle;
}
.site-footer a.is-active { color: #fff; font-weight: 700; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding: 56px 0 40px;
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 0;
  font-size: 0.85rem;
  color: #8794ad;
}
.footer-disclaimer {
  font-size: 0.85rem;
  color: #8794ad;
  max-width: 42ch;
  margin-top: 12px;
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 400px at 20% -10%, #dbe6ff 0%, transparent 60%),
    radial-gradient(900px 350px at 90% 0%, #d8f6f2 0%, transparent 55%),
    var(--bg);
  padding: 56px 0 8px;
}
.hero h1 {
  max-width: 18ch;
}
.hero .lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 56ch;
}

/* ---------- Search tabs ---------- */
.search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  margin-top: 28px;
}
.search-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
}
.search-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.search-tab[aria-selected='true'] {
  background: var(--primary);
  color: #fff;
}
.search-tab:not([aria-selected='true']):hover {
  background: var(--surface-2);
  color: var(--text);
}
.search-panel {
  padding: 14px;
  min-height: 96px;
}
.widget-frame {
  width: 100%;
  border: 0;
  display: block;
}
.widget-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 4px 14px 10px;
}

/* Native search form */
.search-form {
  padding: 8px 14px 6px;
}
.sf-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr 150px 150px 110px auto;
  gap: 10px;
  align-items: end;
}
.sf-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sf-field > span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.sf-field input,
.sf-field select {
  font: inherit;
  font-size: 0.98rem;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  width: 100%;
  height: 48px;
}
.sf-field input:focus,
.sf-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.sf-swap {
  height: 48px;
  width: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--primary);
  font-size: 18px;
  cursor: pointer;
}
.sf-swap:hover {
  border-color: var(--primary);
}
.sf-submit {
  height: 48px;
  justify-content: center;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .sf-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sf-swap {
    display: none;
  }
  .sf-submit {
    grid-column: 1 / -1;
  }
}
@media (max-width: 620px) {
  .sf-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Sections ---------- */
section.block {
  padding: 44px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

/* ---------- Cards grid ---------- */
.grid {
  display: grid;
  gap: 18px;
}
.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* Direction / price card */
.dir-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dir-card .route {
  font-weight: 750;
  font-size: 1.1rem;
  color: var(--text);
}
.dir-card .arrow {
  color: var(--primary);
  margin: 0 6px;
}
.dir-card .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.dir-card .price {
  margin-top: auto;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}
.dir-card .price small {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.hot {
  background: #ffe7dd;
  color: var(--warning);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn:hover {
  text-decoration: none;
}
/* Кнопки внутри текста статьи (последний абзац) — ровно по одной линии. */
.prose p .btn { vertical-align: middle; margin: 4px 8px 4px 0; }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
}
.btn-outline {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
}

/* ---------- Price calendar ---------- */
.calendar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
.cal-day {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  background: var(--surface);
  transition: all 0.15s ease;
}
.cal-day:hover {
  text-decoration: none;
  border-color: var(--primary);
  transform: translateY(-2px);
}
.cal-day .d {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.cal-day .p {
  font-weight: 750;
  font-size: 0.95rem;
  color: var(--text);
}
.cal-day.cheapest {
  border-color: var(--success);
  background: #eafaf0;
}
.cal-day.cheapest .p {
  color: var(--success);
}
.cal-day.is-busy { opacity: .5; }
.cal-day.is-busy .p { color: var(--text-muted); font-weight: 600; }

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}
table.data th,
table.data td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
}
table.data th {
  background: var(--surface-2);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.data tr:last-child td {
  border-bottom: none;
}
table.data td.price {
  font-weight: 750;
  color: var(--primary);
}

/* ---------- Prose (blog / legal) ---------- */
.prose {
  max-width: 760px;
}
.prose h2 {
  margin-top: 1.6em;
}
.prose h3 {
  margin-top: 1.3em;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
  margin: 0 0 1em;
}
.prose li {
  margin-bottom: 0.4em;
}
.prose blockquote {
  margin: 1.2em 0;
  padding: 12px 20px;
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  border-radius: 0 8px 8px 0;
  color: var(--text);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 18px 0 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--text-muted);
}
.breadcrumbs a:hover {
  color: var(--primary);
}

/* ---------- Feature / info tiles ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feature .ico {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  font-size: 22px;
}
.feature h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.chip:hover {
  text-decoration: none;
  border-color: var(--primary);
  color: var(--primary);
}

.page-intro {
  max-width: 70ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.note {
  background: var(--accent-soft);
  border: 1px solid #bfeee9;
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.92rem;
  color: var(--text);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .features {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}
@media (max-width: 620px) {
  .main-nav {
    display: none;
  }
  .main-nav.open {
    display: flex;
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    /* Подменю на мобильном разворачиваются сразу (см. .dropdown-menu ниже),
       поэтому список длиннее экрана — меню должно скроллиться само, а не
       страница под ним (см. body.nav-open ниже — блокирует скролл фона). */
    max-height: calc(100vh - 66px);
    max-height: calc(100dvh - 66px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    flex-direction: column;
    /* Базовый .main-nav — align-items:center (для строки-меню на десктопе),
       на мобильном это центрирует каждый пункт по ширине его текста —
       отсюда «пляшущее» выравнивание между пунктами разной длины. На
       мобильном все пункты — полноширинные строки, прижатые влево. */
    align-items: stretch;
    text-align: left;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
  }
  .main-nav.open a {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  /* «Ещё» (Блог/О проекте/Контакты/Политики) на мобильном не нужен в шапке —
     эти ссылки уже есть в подвале сайта. */
  .main-nav.open .nav-extra {
    display: none;
  }
  /* Пока открыто мобильное меню — страница за ним не скроллится (класс
     ставится/убирается в app.js вместе с .main-nav.open). */
  body.nav-open {
    overflow: hidden;
  }
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
  }
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Форма поиска в стиле kupibilet (.ks)
   ============================================================ */
.ks {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  margin-top: 28px;
  position: relative;
  /* НЕ overflow:hidden — внутри всплывают календарь дат (.ks-cal-pop) и
     список городов-подсказок (.ks-ac-list), оба выше по высоте, чем форма;
     overflow:hidden их обрезал бы. Верхнюю полосу скругляем самим ::before
     (ниже), а не клипом всего контейнера. */
}
/* Тонкая акцентная полоса сверху — делает поиск «фирменным». Скруглена под
   верхние углы формы (совпадает с border-radius .ks) — без overflow:hidden
   на родителе, который иначе обрезал бы всплывающие календарь/подсказки. */
.ks::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: calc(var(--radius) + 4px) calc(var(--radius) + 4px) 0 0;
  background: linear-gradient(90deg, var(--primary), #22a6f2 55%, var(--primary));
}
.ks-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  flex-wrap: wrap;
  background: var(--surface-2);
  border-radius: 14px;
  margin-bottom: 6px;
}
.ks-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 9px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ks-tab[aria-selected='true'] {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
}
.ks-tab:not([aria-selected='true']):hover {
  color: var(--text);
}
.ks-form {
  padding: 8px 6px 4px;
}
.ks-fields {
  display: grid;
  grid-template-columns: 1.4fr auto 1.4fr 150px 150px 190px auto;
  gap: 8px;
  align-items: end;
}
.ks-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.ks-field > span {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ks-field input {
  font: inherit;
  font-size: 0.98rem;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  width: 100%;
  height: 52px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ks-field input:hover { border-color: var(--primary-soft, var(--border)); background: var(--surface); }
.ks-field input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.ks-swap {
  height: 40px;
  width: 40px;
  align-self: end;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  font-size: 18px;
  cursor: pointer;
  transition: transform .2s ease, border-color .15s ease, box-shadow .15s ease;
}
.ks-swap:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,.12); transform: rotate(180deg); }
.ks-submit {
  height: 52px;
  justify-content: center;
  white-space: nowrap;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #1f5cff);
  border: none;
}
.ks-submit:hover { filter: brightness(1.06); }

/* Пассажиры и класс */
.ks-pax { position: relative; }
.ks-pax-btn {
  height: 50px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: inherit;
  font-size: 0.96rem;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.ks-pax-btn:hover { border-color: var(--primary); }
.ks-pax-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  max-width: 88vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 16px;
}
.ks-pax-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}
.ks-pax-name { font-weight: 650; font-size: 0.95rem; display: flex; flex-direction: column; }
.ks-pax-name small { color: var(--text-muted); font-weight: 500; font-size: 0.8rem; }
.ks-stepper { display: flex; align-items: center; gap: 6px; }
.ks-stepper button {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--primary);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.ks-stepper button:hover { border-color: var(--primary); }
.ks-stepper output { min-width: 22px; text-align: center; font-weight: 700; }
.ks-pax-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 6px 0 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.ks-pax-class { display: flex; gap: 18px; margin-bottom: 14px; }
.ks-pax-class label { display: flex; align-items: center; gap: 7px; font-weight: 600; cursor: pointer; }
.ks-pax-done { width: 100%; justify-content: center; }

/* Ссылки-переключатели */
.ks-links { padding: 10px 8px 6px; display: flex; gap: 18px; }
.ks-link {
  background: none;
  border: none;
  color: var(--primary);
  font: inherit;
  font-weight: 650;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0;
}
.ks-link:hover { text-decoration: underline; }

/* Мультигород */
.ks-seg {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 160px auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}
.ks-seg-del {
  height: 50px; width: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
}
.ks-seg-del:hover { border-color: var(--warning); color: var(--warning); }
.ks-multi-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 6px;
}
.ks-multi-actions { display: flex; gap: 10px; align-items: end; }
.ks-multi-actions .ks-pax { width: 200px; }

@media (max-width: 920px) {
  .ks-fields { grid-template-columns: 1fr 1fr; }
  .ks-swap { display: none; }
  .ks-pax, .ks-submit { grid-column: 1 / -1; }
  .ks-pax-panel { left: 0; right: auto; }
  .ks-seg { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .ks-fields { grid-template-columns: 1fr; }
  .ks-seg { grid-template-columns: 1fr; }
  .ks-multi-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .ks-multi-actions .ks-pax { width: 100%; }
}

/* ============================================================
   Блок «Нужна ли виза»
   ============================================================ */
.visa {
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.visa-head h2 { margin-bottom: 6px; }
.visa-head p { color: var(--text-muted); margin: 0 0 20px; }
.visa-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.visa-form input {
  flex: 1 1 320px;
  font: inherit;
  font-size: 1rem;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  height: 50px;
}
.visa-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.visa-form .btn { height: 50px; }
.visa-result { margin-top: 18px; }
.visa-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--text-muted);
  border-radius: 14px;
  padding: 16px 20px;
  flex-wrap: wrap;
}
.visa-card.visa-ok { border-left-color: var(--success); }
.visa-card.visa-warn { border-left-color: var(--warning); }
.visa-card.visa-danger { border-left-color: #e5484d; }
.visa-flag { font-size: 40px; line-height: 1; }
.visa-info { flex: 1 1 auto; min-width: 160px; }
.visa-country { font-weight: 750; font-size: 1.1rem; }
.visa-city { color: var(--text-muted); font-weight: 500; margin-left: 8px; font-size: 0.95rem; }
.visa-status { margin-top: 2px; font-weight: 650; }
.visa-status small { color: var(--text-muted); font-weight: 500; }
.visa-ok .visa-status { color: var(--success); }
.visa-warn .visa-status { color: var(--warning); }
.visa-danger .visa-status { color: #e5484d; }
.visa-card .btn { margin-left: auto; }
.visa-miss { color: var(--text-muted); border-left-color: var(--border); }
@media (max-width: 560px) {
  .visa { padding: 22px; }
  .visa-card .btn { margin-left: 0; width: 100%; justify-content: center; }
}

/* ============================================================
   Карта цен (/karta)
   ============================================================ */
.karta-origin { margin-top: 18px; display: inline-flex; }
.karta-origin label { display: flex; flex-direction: column; gap: 5px; }
.karta-origin span { font-size: 0.74rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.karta-origin select {
  font: inherit; font-size: 1rem; padding: 11px 14px; height: 48px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); min-width: 220px;
}
.karta-filters {
  display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.karta-modes { display: flex; gap: 6px; }
.karta-chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  font: inherit; font-weight: 650; font-size: 0.9rem; padding: 8px 14px; border-radius: 999px; cursor: pointer;
}
.karta-chip.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.karta-check { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 0.92rem; cursor: pointer; }
.karta-more { color: var(--text-muted); font-size: 0.85rem; margin-left: auto; }
.karta-map {
  height: 560px; width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2);
  z-index: 0;
}
/* Метки-ценники */
.karta-pin {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  background: var(--primary); color: #fff;
  font-weight: 700; font-size: 12px; line-height: 1;
  padding: 5px 10px 5px 8px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(20,33,61,0.25);
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.karta-pin-i { font-size: 12px; line-height: 1; }
.karta-pin-jd { background: var(--accent); }
/* «Метки на карте» выкл — прячем название, оставляем компактную иконку. */
.karta-hide-labels .karta-pin-name { display: none; }
.karta-hide-labels .karta-pin { padding: 5px 7px; gap: 0; }
.karta-pop { text-align: center; min-width: 150px; }
.karta-pop-c { color: var(--text-muted); font-size: 0.82rem; }
.karta-pop-p { font-weight: 750; color: var(--primary); margin: 6px 0 10px; }
.karta-pop-btn {
  display: inline-block; background: var(--primary); color: #fff !important;
  padding: 8px 16px; border-radius: 10px; font-weight: 700; text-decoration: none;
}

/* Интерактивная карта маршрутов (построение пути) */
.rmap-panel {
  margin-top: 18px; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.rmap-modes { display: flex; gap: 8px; margin-bottom: 14px; }
.rmap-mode {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 700; font-size: 0.95rem; padding: 9px 18px; border-radius: 999px; cursor: pointer;
}
.rmap-mode.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.rmap-fields { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.rmap-field { position: relative; display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 190px; }
.rmap-field > span { font-size: 0.74rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.rmap-field input {
  font: inherit; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text); width: 100%;
}
.rmap-field input:focus { outline: none; border-color: var(--primary); }
.rmap-reset { align-self: flex-end; }
.rmap-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 16px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.rmap-cta-tx { font-weight: 700; }
.rmap-routeinfo { font-weight: 500; color: var(--text-muted); }
/* Метки городов, иконка транспорта, подписи концов (MapLibre-маркеры) */
.rmap-dot {
  width: 11px; height: 11px; border-radius: 50%; background: #8a94a6;
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); cursor: pointer;
}
.rmap-dot.is-end { width: 17px; height: 17px; }
.rmap-dot.is-dim { width: 7px; height: 7px; background: #c2c8d2; opacity: .55; cursor: default; box-shadow: none; }
.rmap-veh { display: block; font-size: 22px; line-height: 1; transform-origin: 50% 50%; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35)); }
.rmap-veh svg { display: block; overflow: visible; }

/* Самолёт: машет крыльями */
.veh-plane .body, .veh-plane .nose { fill: #14213d; }
.veh-plane .wings {
  fill: #2b3a67; transform-box: fill-box; transform-origin: center;
  animation: veh-wingflap 0.5s ease-in-out infinite alternate;
}
@keyframes veh-wingflap { from { transform: scaleX(1); } to { transform: scaleX(0.72); } }

/* Поезд: крутятся колёса + идёт дым */
.veh-train .body, .veh-train .cab { fill: #0aa06e; }
.veh-train .chimney { fill: #0a7a54; }
.veh-train .win { fill: #e6fff5; }
.veh-train .wheel {
  fill: #0a7a54; stroke: #e6fff5; stroke-width: 1.3;
  transform-box: fill-box; transform-origin: center;
  animation: veh-wheelspin 0.7s linear infinite;
}
@keyframes veh-wheelspin { to { transform: rotate(360deg); } }
.veh-train .smoke circle {
  fill: #c2ccd8; opacity: 0; transform-box: fill-box; transform-origin: center;
  animation: veh-smoke 1.8s ease-out infinite;
}
@keyframes veh-smoke {
  0% { opacity: 0.55; transform: translate(0, 0) scale(0.4); }
  100% { opacity: 0; transform: translate(-9px, -16px) scale(1.35); }
}
@media (prefers-reduced-motion: reduce) {
  .veh-plane .wings, .veh-train .wheel, .veh-train .smoke circle { animation: none; }
}
.rmap-pin {
  display: inline-block; white-space: nowrap;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 12px; line-height: 1;
  padding: 5px 10px; border-radius: 999px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(20,33,61,0.25);
  margin-bottom: 6px;
}
.rmap-fallback {
  display: flex; align-items: center; justify-content: center; height: 100%;
  padding: 24px; text-align: center; color: var(--text-muted); font-size: 0.95rem;
}
@media (max-width: 620px) { .rmap-reset { width: 100%; } }
@media (max-width: 620px) {
  .karta-more { margin-left: 0; width: 100%; }
  .karta-map { height: 440px; }
}

/* Карточки отелей на странице результатов */
.hotel-card { display: flex; flex-direction: column; gap: 6px; min-height: 130px; }
.hotel-stars { color: #f5a623; font-size: 0.95rem; letter-spacing: 1px; min-height: 1.1em; }
.hotel-name { font-weight: 650; font-size: 0.98rem; color: var(--text); }
.hotel-card .price { font-size: 1.15rem; }

/* ============================================================
   Redesign layer (2026) — свежий вид поверх базовых стилей
   ============================================================ */
body { font-size: 16.5px; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-weight: 800; letter-spacing: -0.025em; }

/* Хедер — чище и «стеклянный» */
.site-header {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(230, 236, 246, 0.9);
}
.site-header .container { height: 72px; }
.logo { font-size: 1.25rem; letter-spacing: -0.03em; }

/* Hero — многоцветный мягкий градиент */
.hero {
  background:
    radial-gradient(900px 420px at 12% -20%, #dbe6ff 0%, transparent 62%),
    radial-gradient(720px 380px at 92% -10%, #ffe4da 0%, transparent 60%),
    radial-gradient(600px 300px at 60% 120%, #e2f0ff 0%, transparent 60%),
    var(--bg);
  padding: 68px 0 12px;
}
.hero .lead { font-size: 1.2rem; max-width: 58ch; }

/* Кнопки — «таблетки» с объёмом */
.btn { border-radius: 999px; font-weight: 700; padding: 13px 26px; }
.btn-primary {
  background: linear-gradient(135deg, #2f6bff, #1f5cff);
  box-shadow: 0 8px 20px rgba(31, 92, 255, 0.28);
}
.btn-primary:hover { background: linear-gradient(135deg, #1f5cff, #1447d6); }
.btn-outline { border-radius: 999px; border-width: 1.5px; }

/* Карточки — мягче и с подъёмом */
.card { border-radius: var(--radius); }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dir-card .price { color: var(--primary); }

/* Поисковый бар */
.search-card, .ks { border-radius: 26px; box-shadow: var(--shadow-lg); }
.ks-tab[aria-selected='true'], .search-tab[aria-selected='true'] {
  background: linear-gradient(135deg, #2f6bff, #1f5cff);
  color: #fff;
}
.ks-submit, .sf-submit { box-shadow: 0 8px 20px rgba(31, 92, 255, 0.28); }

/* Бейджи и фичи */
.badge { border-radius: 999px; }
.badge.hot { background: var(--accent-soft); color: var(--accent); }
.feature .ico {
  background: linear-gradient(135deg, var(--primary-soft), #eaf6ff);
  box-shadow: inset 0 0 0 1px rgba(31, 92, 255, 0.08);
}
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

/* Секции — чуть больше воздуха */
section.block { padding: 52px 0; }

/* Календарь и таблицы — мягче */
.cal-day { border-radius: 14px; }
.table-wrap { border-radius: var(--radius); }

/* Визовый блок — ярче */
.visa { border-radius: 26px; background: linear-gradient(135deg, #eaf1ff, #fff1ec); }

/* Логотип-SVG в шапке и футере */
.logo { color: var(--text); }
.logo svg { height: 23px; width: auto; display: block; }
.site-footer .logo { color: #fff; }
@media (max-width: 420px) { .logo svg { height: 20px; } }

/* ============================================================
   Правки (заголовок в строку, крошки в контенте, меню «О сервисе»)
   ============================================================ */
/* H1: переносится при необходимости (длинные заголовки поездов не должны
   вылезать за край), описание шире. Раньше на десктопе стоял white-space:nowrap
   — из-за него длинные h1 (напр. «Расписание поезда 077Ы/216Н/240Ч …»)
   выходили за пределы страницы. */
.hero h1 { max-width: none; font-size: clamp(1.7rem, 3.2vw, 2.5rem); white-space: normal; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
.hero .lead { max-width: 100%; }

/* Хлебные крошки: внутри контента, без серого фона */
.breadcrumbs {
  padding: 0;
  margin: 0 0 14px;
  background: transparent;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }

/* Меню «О сервисе» с выпадающим списком */
.has-dropdown { position: relative; }
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0;
}
.dropdown-toggle:hover { color: var(--primary); }
.dropdown-toggle i { font-style: normal; font-size: 0.7em; transition: transform 0.15s ease; }
.has-dropdown:hover .dropdown-toggle i,
.has-dropdown.open .dropdown-toggle i { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown.open .dropdown-menu { display: flex; }
.dropdown-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
}
.dropdown-menu a:hover { background: var(--surface-2); color: var(--primary); text-decoration: none; }
.dropdown-menu a.is-active { background: var(--surface-2); color: var(--primary); font-weight: 700; }
@media (max-width: 620px) {
  .dropdown-menu { position: static; display: flex; box-shadow: none; border: none; padding: 0; min-width: 0; gap: 0; }
  .has-dropdown .dropdown-toggle { padding: 12px 0; width: 100%; }
  /* Пункты подменю на мобильном — той же строкой/отступом, что и обычные
     ссылки верхнего уровня (.main-nav.open a), без сдвига влево и без вида
     «плашки» (border-radius/фон при ховере — то из десктопного попапа). */
  .dropdown-menu a {
    padding: 12px 0;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
  }
  .dropdown-menu a:hover,
  .dropdown-menu a.is-active {
    background: none;
  }
}

/* Карта на всю ширину экрана */
.karta-fullbleed {
  width: 100%;
  margin-top: 14px;
}
.karta-fullbleed .karta-map {
  height: 70vh;
  min-height: 460px;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

/* Логотип крупнее — в шапке и подвале */
.logo svg { height: 27px; }
.site-header .container { height: 82px; }
.site-footer .logo svg { height: 30px; }
@media (max-width: 620px) { .logo svg { height: 23px; } .site-header .container { height: 72px; } }

/* Фикс выпадающего меню «О сервисе»: убираем зазор (ховер не рвётся) */
.dropdown-menu { top: 100%; padding-top: 12px; }
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px; left: 0; right: 0; height: 14px;
}

/* FAQ (аккордеон) */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 650;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "＋"; color: var(--primary); font-weight: 700; }
.faq-item[open] summary::after { content: "－"; }
.faq-item summary:hover { color: var(--primary); }
.faq-a { padding: 0 20px 18px; color: var(--text-muted); }

/* Отзывы */
.rating-summary { font-size: 1.05rem; margin-bottom: 18px; color: var(--text-muted); }
.rating-num { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.review {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.review-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review .stars { color: #f5a623; letter-spacing: 1px; }
.review p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }
@media (max-width: 900px) { .reviews { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .reviews { grid-template-columns: 1fr; } }

/* Таблица дат */
.date-table td { vertical-align: middle; }
.date-table tr.is-cheapest { background: #eafaf0; }
.date-table tr.is-cheapest .price { color: var(--success); }

/* Поиск по сайту в шапке */
/* Широкое поле поиска между логотипом и меню. */
.site-search { position: relative; flex: 1 1 260px; min-width: 200px; max-width: 640px; margin: 0 20px; }
.ss-input {
  width: 100%; height: 48px;
  border: 1.5px solid var(--border); border-radius: 999px;
  background: var(--surface-2); color: var(--text);
  font: inherit; font-size: .96rem; padding: 0 18px;
  text-overflow: ellipsis;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ss-input::placeholder { color: var(--muted); opacity: 1; }
.ss-input:focus { outline: none; background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ss-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: auto;
  width: max(100%, 560px); max-width: min(92vw, 720px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 60;
  max-height: 66vh; overflow: auto;
}
.ss-item { display: block; padding: 10px 14px; border-radius: 10px; color: var(--text); font-size: 0.92rem; font-weight: 550; }
.ss-item:hover, .ss-item.is-active { background: var(--surface-2); color: var(--primary); text-decoration: none; }
@media (max-width: 820px) { .site-search { display: none; } }

/* Кастомный автокомплит городов */
.ks-ac { position: relative; }
.ks-ac-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 45;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; margin-top: 4px;
  max-height: 300px; overflow: auto;
}
.ks-ac-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: none; background: none;
  font: inherit; font-size: 0.95rem; padding: 10px 12px; border-radius: 9px; cursor: pointer; color: var(--text);
}
.ks-ac-item .ks-ac-pin { opacity: 0.6; font-size: 0.9rem; }
.ks-ac-item:hover, .ks-ac-item.is-active { background: var(--surface-2); color: var(--primary); }
.ks-ac-item:hover .ks-ac-pin, .ks-ac-item.is-active .ks-ac-pin { opacity: 1; }

/* Кастомный календарь на полях Туда/Обратно */
.ks-date { position: relative; }
.ks-date-disp { cursor: pointer; background: var(--surface) !important; }
.ks-cal-pop {
  position: absolute; top: 100%; left: 0; z-index: 60; margin-top: 6px;
  width: 300px; max-width: 92vw; padding: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 24px); overflow-y: auto;
}
.ks-field-date:last-of-type .ks-cal-pop { left: auto; right: 0; }
/* Снизу не влезает (поле у нижнего края экрана) — открываем календарь вверх. */
.ks-cal-pop.ks-cal-pop-up { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 6px; }
.ks-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ks-cal-title { font-weight: 750; font-size: 0.98rem; }
.ks-cal-nav {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  width: 32px; height: 32px; border-radius: 9px; cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.ks-cal-nav:hover { border-color: var(--primary); color: var(--primary); }
.ks-cal-wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.ks-cal-wd span { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.ks-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ks-cal-day {
  border: none; background: none; font: inherit; font-size: 0.9rem; color: var(--text);
  aspect-ratio: 1; border-radius: 9px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.ks-cal-day.is-empty { visibility: hidden; cursor: default; }
.ks-cal-day:hover:not(.is-disabled):not(.is-empty) { background: var(--surface-2); }
.ks-cal-day.is-today { box-shadow: inset 0 0 0 1px var(--border); font-weight: 700; }
.ks-cal-day.is-sel { background: var(--primary); color: #fff; font-weight: 750; }
.ks-cal-day.is-disabled { color: var(--text-muted); opacity: 0.4; cursor: default; }
/* Календарь с ценами: ячейки крупнее, число + цена столбиком */
.ks-cal-pop:has(.with-prices) { width: 360px; }
.with-prices .ks-cal-day { aspect-ratio: auto; flex-direction: column; gap: 1px; padding: 6px 2px; }
.ks-cal-p { font-size: 0.66rem; font-weight: 650; color: var(--text-muted); line-height: 1; }
.ks-cal-p-empty { opacity: 0.4; }
.ks-cal-day.has-price .ks-cal-n { font-size: 0.9rem; }
.ks-cal-day.is-cheap { background: #eafaf0; }
.ks-cal-day.is-cheap .ks-cal-p { color: var(--success); font-weight: 750; }
.ks-cal-day.is-sel .ks-cal-p { color: #fff; }

/* Календарь низких цен — красивее + выбор кликом */
.calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.cal-day {
  border: 1px solid var(--border); border-radius: 14px; padding: 10px 6px;
  background: var(--surface); text-align: center; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; gap: 2px; transition: all 0.15s ease;
}
.cal-day .wd { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.cal-day .d { font-size: 0.82rem; color: var(--text-muted); }
.cal-day .p { font-weight: 750; color: var(--text); font-size: 0.92rem; }
.cal-day:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.cal-day.cheapest { border-color: var(--success); background: #eafaf0; }
.cal-day.cheapest .p { color: var(--success); }
.cal-day.is-selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary) inset; }

/* Календарь низких цен как настоящий календарь: 7 дней в строке, на всю ширину */
.lowcal { width: 100%; }
.lowcal-wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.lowcal-wd span { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.lowcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.lowcal-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  aspect-ratio: 1 / 0.92; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); text-decoration: none; color: var(--text); padding: 4px 2px;
}
.lowcal-day .d { font-size: 0.85rem; font-weight: 650; }
.lowcal-day .p { font-size: 0.66rem; font-weight: 650; color: var(--text-muted); line-height: 1; }
.lowcal-day.is-empty { border: none; background: none; }
.lowcal-day.is-off { color: var(--text-muted); opacity: 0.55; }
.lowcal-day.is-off .d { font-weight: 500; }
.lowcal-day.is-weekend .d { color: #d1495b; }
a.lowcal-day:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.lowcal-day.cheapest { border-color: var(--success); background: #eafaf0; }
.lowcal-day.cheapest .p { color: var(--success); font-weight: 750; }
@media (max-width: 620px) { .lowcal-day .p { font-size: 0.6rem; } }

.ks-submit.pulse { animation: kspulse 0.6s ease 2; }
@keyframes kspulse { 50% { transform: scale(1.06); } }

/* Фото города на странице направления */
.city-photo {
  position: relative; margin: 20px 0 0; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.city-photo img { width: 100%; height: 320px; object-fit: cover; display: block; }
.city-photo figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 40px 22px 16px; color: #fff; font-weight: 800; font-size: 1.5rem;
  background: linear-gradient(transparent, rgba(6,14,30,0.72));
}
@media (max-width: 620px) { .city-photo img { height: 200px; } .city-photo figcaption { font-size: 1.2rem; } }

/* Фото города рядом с текстом (страницы направлений) */
.prose-with-photo { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.prose-with-photo .prose { min-width: 0; }
.city-photo.side { margin: 0; position: sticky; top: 90px; }
.city-photo.side img { height: 260px; }
@media (max-width: 780px) {
  .prose-with-photo { grid-template-columns: 1fr; gap: 18px; }
  .city-photo.side { position: static; }
  .city-photo.side img { height: 220px; }
}

/* Логотип ещё крупнее */
.logo svg { height: 30px; }
.site-header .container { height: 92px; }
.site-footer .logo svg { height: 34px; }
@media (max-width: 620px) { .logo svg { height: 24px; } .site-header .container { height: 74px; } }

/* Подвал: ссылки мельче */
.footer-grid ul { font-size: 0.84rem; gap: 8px; }
.footer-grid h4 { font-size: 0.9rem; }

/* Легенда «зелёный = дешёвый день» */
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); }
.legend .dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.legend .dot.green { background: #eafaf0; border: 1px solid var(--success); }

/* Навигационная панель маршрута */
.rnav { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.rnav-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: 999px; font-weight: 650; font-size: 0.9rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.rnav-item:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.rnav-item.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Вкладки по месяцам */
.mtabs-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.mtab {
  border: none; background: none; font: inherit; font-weight: 700; font-size: 0.9rem;
  padding: 8px 16px; border-radius: 9px; cursor: pointer; color: var(--text-muted);
}
.mtab.is-active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }

/* Таблица цен с колонками по авиакомпаниям */
.airline-matrix th { white-space: nowrap; }
.al-head { display: inline-flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; }
.al-logo { width: 64px; height: 64px; border-radius: 12px; object-fit: contain; flex: none; }
.airline-matrix td.price { font-weight: 650; text-align: right; }
.airline-matrix td.price a { color: var(--text); text-decoration: none; }
.airline-matrix td.price a:hover { color: var(--primary); text-decoration: underline; }
.airline-matrix td.is-cheapest { background: #eafaf0; }
.airline-matrix td.is-cheapest a { color: var(--success); font-weight: 750; }

/* Мини-карта города на странице направления */
.citymap {
  height: 320px; width: 100%; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2); z-index: 0;
}
@media (max-width: 620px) { .citymap { height: 240px; } }
.rm-veh { font-size: 20px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35)); }
.rm-veh-plane { display: block; width: 24px; height: 24px; }
.rm-veh-plane svg { display: block; transform-origin: 50% 50%; }
.linkgrid { gap: 8px; }
.linkgrid .chip { font-size: 0.88rem; }

/* Таблица поездов (Яндекс.Расписания) */
.train-table td { vertical-align: top; }
.train-table .tr-num { font-weight: 700; }
.train-table .tr-st { font-size: 0.8rem; margin-top: 2px; max-width: 190px; }
.train-table .tr-dt { font-size: 0.8rem; }
.train-table .tr-wag { font-size: 0.78rem; margin-top: 2px; max-width: 170px; }
.th-sort { cursor: pointer; white-space: nowrap; }
.th-sort::after { content: ' ↕'; opacity: 0.4; font-size: 0.85em; }
.th-sort.is-asc::after { content: ' ↑'; opacity: 0.9; }
.th-sort.is-desc::after { content: ' ↓'; opacity: 0.9; }
.tr-badge {
  display: inline-block; font-size: 0.74rem; font-weight: 700; line-height: 1;
  padding: 4px 8px; border-radius: 999px; margin: 0 4px 4px 0;
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
}
.tr-badge.tr-sapsan { background: #e11a17; color: #fff; border-color: #c1130f; }
.tr-badge.tr-lastochka { background: #eafaf0; color: #0a7a54; border-color: #b7e6cf; }
.tr-badge.tr-fast { background: #fff4e6; color: #b8620a; border-color: #ffd9a8; }
.tr-badge.tr-double { background: #f0e8ff; color: #6b3fd1; border-color: #d6c6fb; }
.tr-badge.tr-nevsky { background: #eaf2ff; color: #123a8a; border-color: #b9cdfb; }
.tr-badge.tr-through { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.train-table .tr-badges { margin-top: 5px; }
/* Цены по типам вагонов под ценой */
.wg-ic { width: 13px; height: 13px; flex: none; vertical-align: -2px; }
.tr-types { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.tr-type { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 600; color: #0aa06e; background: rgba(10,160,110,.1); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tr-type .wg-ic { width: 12px; height: 12px; vertical-align: 0; }
.tr-wagons { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.tr-wagon { display: flex; justify-content: space-between; gap: 10px; font-size: 0.8rem; font-weight: 500; }
.tr-wagon span { color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; }
.tr-wagon b { color: var(--text); }
/* Список популярных поездов */
.train-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.train-list a {
  display: block; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text); font-weight: 650; text-decoration: none;
}
.train-list a:hover { border-color: var(--primary); color: var(--primary); }
/* Маршрут поезда (остановки) */
.route-stops td { vertical-align: top; }
/* Список рейсов с подробностями */
.flight-list .fl-air { display: inline-flex; align-items: center; gap: 8px; }
.flight-list .fl-logo { width: 30px; height: 30px; border-radius: 6px; object-fit: contain; flex: none; }
.flight-list .fl-route b { color: var(--primary); }

/* Кросс-ссылка авиа⇄поезд */
.cross-transport {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 18px; padding: 16px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
}
.cross-transport .cross-ic { font-size: 1.8rem; line-height: 1; }
.cross-transport .cross-tx { flex: 1; min-width: 220px; font-size: 0.95rem; color: var(--text); }
.cross-transport .btn { white-space: nowrap; }

/* --- #10 Разделение Россия / весь мир --- */
.geo-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
  text-transform: uppercase;
}
.geo-tag .geo-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.geo-ru { background: var(--primary-soft); color: var(--primary-dark); }
.geo-ru .geo-dot { background: var(--primary); }
.geo-world { background: var(--accent-soft); color: #c23f22; }
.geo-world .geo-dot { background: var(--accent); }
.block-world { background: linear-gradient(180deg, #fff9f7 0%, var(--surface) 60%); }

.world-countries {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px;
}
.wc-group {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.wc-head {
  font-weight: 750; font-size: 1.02rem; color: var(--text);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.wc-flag { font-size: 1.25rem; line-height: 1; }
.dir-flag { font-size: 1.05rem; }

/* --- #12 Диаграмма «когда дешевле лететь» (цены по месяцам) --- */
.mprices { display: flex; flex-direction: column; gap: 8px; }
.mprice {
  display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s;
}
.mprice:hover { border-color: var(--primary); transform: translateX(2px); }
.mp-mon { font-weight: 650; font-size: 0.92rem; text-transform: capitalize; }
.mp-bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mp-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.mp-price { font-weight: 750; font-size: 0.98rem; white-space: nowrap; }
.mprice.is-min { border-color: #16a34a; background: #f0fdf4; }
.mprice.is-min .mp-fill { background: #16a34a; }
.mprice.is-min .mp-price { color: #16a34a; }

/* --- Прямой рейс: бейдж в шапке направления --- */
.direct-note { margin: 4px 0 14px; font-size: 0.95rem; color: var(--text-muted); }
.badge-direct { background: #e7f6ec; color: #16794a; font-weight: 700; }

/* Перевозчик под названием поезда/электрички/автобуса */
.tr-carrier { font-size: 0.8rem; margin-top: 3px; }
.tr-carrier-contacts { font-size: 0.78rem; margin-top: 2px; }
.tr-carrier-contacts a { color: var(--primary); }

/* Карточки вокзалов (страница /jd/vokzaly/) */
.vkz-card { display: flex; flex-direction: column; gap: 4px; }
.vkz-ic { font-size: 1.6rem; }
.vkz-name { font-weight: 700; font-size: 1.05rem; color: var(--text); }

/* --- Слайдер отелей --- */
.hslider { position: relative; }
.hslider-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 2px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  touch-action: pan-x; overscroll-behavior-x: contain;
}
/* Полосу прокрутки прячем — свайп/тач работают, скролл-снап остаётся. */
.hslider-track::-webkit-scrollbar { height: 0; width: 0; display: none; }
.blog-slide:hover, .hslide:hover { text-decoration: none; }
.hslide {
  flex: 0 0 220px; scroll-snap-align: start; min-height: 150px;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); text-decoration: none;
  color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.hslide:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.hslide-photo {
  position: relative; height: 120px; background: linear-gradient(135deg, var(--primary-soft), var(--surface));
  background-size: cover; background-position: center;
}
.hslide-body { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px 14px; flex: 1 1 auto; }
.hslide-top { min-height: 1.2em; }
.hslide-stars { position: absolute; left: 10px; top: 10px; color: #f5a623; letter-spacing: 1px; font-size: 0.85rem;
  background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 999px; }
.hslide-rating { position: absolute; right: 10px; top: 10px; font-weight: 700; color: #fff;
  background: #0aa06e; padding: 3px 9px; border-radius: 8px; font-size: .82rem; }
.hslide-name { font-weight: 650; font-size: 0.98rem; line-height: 1.3; }
.hslide-sub { color: var(--muted); font-size: .82rem; line-height: 1.3; }
.hslide-price { margin-top: auto; font-size: 0.95rem; color: var(--text-muted); }
.hslide-price b { color: var(--text); font-size: 1.1rem; }
.hslider-nav {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
  font-size: 1.5rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.hslider-nav:hover { border-color: var(--primary); color: var(--primary); }
.hslider-nav.prev { left: -8px; }
.hslider-nav.next { right: -8px; }
@media (max-width: 640px) { .hslider-nav { display: none; } }

/* --- Фильтр-поиск по списку (вокзалы, аэропорты) --- */
.filter-box { margin-bottom: 18px; }
.filter-input {
  width: 100%; max-width: 520px; padding: 12px 16px; font-size: 1rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
.filter-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
/* Раскрываемые строки расписания с остановками нитки (табло + таблицы рейсов) */
.nitka-row { cursor: pointer; transition: background .12s; }
.nitka-row:hover { background: var(--primary-soft); }
.nitka-toggle {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 8px;
  padding: 2px 9px; border: 1px solid var(--primary); border-radius: 999px;
  color: var(--primary); font-size: .74rem; font-weight: 600; line-height: 1.4;
  white-space: nowrap; vertical-align: middle; transition: background .15s, color .15s;
}
.nitka-row:hover .nitka-toggle { background: var(--primary); color: #fff; }
.nitka-toggle-ic { transition: transform .15s; }
.nitka-row.is-open { background: var(--primary-soft); }
.nitka-row.is-open .nitka-toggle { background: var(--primary); color: #fff; }
.nitka-row.is-open .nitka-toggle-ic { transform: rotate(180deg); }
.nitka-detail > td { padding: 0 !important; background: var(--surface); }
.nitka-detail-inner { padding: 4px 8px 14px; }
.nitka-detail-inner .table-wrap { margin: 0; }
.nitka-detail-inner .route-stops { font-size: .9rem; }
/* «Поезд сейчас в пути» — баннер + подсветка следующей остановки */
.transit-now { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 11px 15px;
  border: 1px solid #0aa06e; background: rgba(10,160,110,.08); border-radius: 12px; font-size: .95rem; }
.transit-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #0aa06e;
  box-shadow: 0 0 0 0 rgba(10,160,110,.6); animation: transitPulse 1.4s infinite; }
@keyframes transitPulse { 70% { box-shadow: 0 0 0 8px rgba(10,160,110,0); } 100% { box-shadow: 0 0 0 0 rgba(10,160,110,0); } }
.route-stops tr.rs-next td { background: rgba(10,160,110,.12); }
.rs-next-tag { display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 700; color: #fff;
  background: #0aa06e; padding: 1px 8px; border-radius: 999px; vertical-align: middle; }
.vkz-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.vkz-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); text-decoration: none;
  font-weight: 600; transition: border-color .15s, transform .15s;
}
.vkz-item:hover { border-color: var(--primary); transform: translateX(2px); }
.vkz-item-ic { opacity: .7; }

/* --- Станции на карте маршрута + список остановок --- */
.routemap-wrap { display: block; }
.rm-stop {
  display: block; width: 13px; height: 13px; border-radius: 50%;
  background: #0aa06e; border: 2.5px solid #fff; box-shadow: 0 0 0 1.5px rgba(10,160,110,.55), 0 1px 3px rgba(0,0,0,.35);
  cursor: pointer;
}
.rm-stop:hover { transform: scale(1.25); }
.rm-stop.is-end { width: 17px; height: 17px; background: #14213d; box-shadow: 0 0 0 1.5px rgba(20,33,61,.5), 0 1px 3px rgba(0,0,0,.35); }
.rm-stop-link { color: var(--accent); text-decoration: underline; cursor: pointer; font-weight: 600; }
.route-stops tr.rm-stop-row:hover .rm-stop-link { text-decoration: none; }
.route-stops tr.is-active td { background: rgba(10,160,110,.14); }
.route-stops tr.is-active .rm-stop-link { color: var(--text); text-decoration: none; }

/* Карта маршрута поезда (над таблицей). */
.trainmap-wrap { margin: 0 0 18px; }
.trainmap { height: 380px; margin-bottom: 8px; }
@media (max-width: 620px) { .trainmap { height: 280px; } }
.trainmap-hint { font-size: .82rem; color: var(--muted); }
.tm-stop {
  display: block; width: 11px; height: 11px; border-radius: 50%;
  background: #0aa06e; border: 2px solid #fff; box-shadow: 0 0 0 1.5px rgba(10,160,110,.5), 0 1px 2px rgba(0,0,0,.35);
  cursor: pointer; transition: transform .12s ease;
}
.tm-stop:hover, .tm-stop.is-hl { transform: scale(1.35); }
.tm-stop.is-end { width: 15px; height: 15px; background: #14213d; box-shadow: 0 0 0 1.5px rgba(20,33,61,.5), 0 1px 3px rgba(0,0,0,.35); }
.tm-stop.is-active {
  width: 18px; height: 18px; background: #e11a17;
  box-shadow: 0 0 0 3px rgba(225,26,23,.35), 0 1px 4px rgba(0,0,0,.4);
  animation: tmPulse 1.8s ease-out infinite;
}
@keyframes tmPulse {
  0% { box-shadow: 0 0 0 0 rgba(225,26,23,.55), 0 1px 4px rgba(0,0,0,.4); }
  70% { box-shadow: 0 0 0 12px rgba(225,26,23,0), 0 1px 4px rgba(0,0,0,.4); }
  100% { box-shadow: 0 0 0 0 rgba(225,26,23,0), 0 1px 4px rgba(0,0,0,.4); }
}
.route-stops tr.route-stop-row { cursor: pointer; }
.route-stops tr.route-stop-row:hover td, .route-stops tr.rs-hover td { background: rgba(10,160,110,.08); }
.route-stops tr.route-stop-row.rs-nocoord { cursor: default; }
.route-stops tr.route-stop-row.rs-nocoord:hover td { background: none; }
.train-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.train-index-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; text-decoration: none; color: inherit;
}
.train-index-item:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.train-index-item .tix-num { font-weight: 700; white-space: nowrap; }
.train-index-item .tix-title { color: var(--muted); font-size: .92rem; }
.train-index-item .tix-badge { margin-left: auto; font-size: .72rem; font-weight: 700; color: #0aa06e; background: rgba(10,160,110,.1); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.price-cta { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.price-cta:hover { text-decoration: underline; }
.price-est { color: var(--text); font-weight: 650; white-space: nowrap; }

/* Автобус: карточка ориентировочной цены/времени в пути. */
.bus-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: baseline; margin-top: 18px; }
.bus-fact { display: inline-flex; flex-direction: column; gap: 2px; }
.bus-fact .bf-lbl { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.bus-fact .bf-val { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.bus-fact .bf-val { color: var(--primary); }
.bus-fact-note { flex-basis: 100%; font-size: .82rem; color: var(--muted); font-weight: 400; }

/* Сетка автобусных направлений (страница автовокзала города). */
.busdir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.busdir-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,.05);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.busdir-card:hover { border-color: var(--primary); box-shadow: 0 8px 22px rgba(0,0,0,.10); transform: translateY(-2px); }
.busdir-route { font-size: 1.02rem; color: var(--text); line-height: 1.35; }
.busdir-route b { font-weight: 700; }
.busdir-ic { margin-right: 6px; }
.busdir-arw { color: var(--primary); font-weight: 700; margin: 0 2px; }
.busdir-meta { font-size: .84rem; color: var(--muted); }
.busdir-foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; gap: 8px; }
.busdir-price { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.busdir-go { font-size: .85rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.busdir-card:hover .busdir-go { text-decoration: underline; }

/* Расписание рейсов аэропорта (вкладки «Из/В»). */
.afl { margin-top: 4px; }
.afl .ap-tabs { margin-bottom: 14px; }
.afl-table td.afl-al { white-space: nowrap; }
.afl-al span { vertical-align: middle; }
.afl-logo { vertical-align: middle; border-radius: 4px; object-fit: contain; background: #fff; }
.afl-table td.price { font-weight: 750; color: var(--primary); white-space: nowrap; }
.prose .article-lead { font-size: 1.15rem; line-height: 1.6; color: var(--text); font-weight: 500; margin-bottom: 20px; }
.prose figure.blog-photo { margin: 22px 0; }
.prose figure.blog-photo img { width: 100%; height: auto; display: block; border-radius: 14px; background: var(--surface-2); aspect-ratio: 16 / 9; object-fit: cover; }
.prose figure.blog-photo .blog-photo-svg { width: 100%; height: auto; display: block; border-radius: 14px; aspect-ratio: 16 / 9; box-shadow: 0 6px 20px rgba(20,33,61,.14); }
.prose figure.blog-photo figcaption { margin-top: 8px; font-size: .88rem; color: var(--text-muted); text-align: center; }
.blog-chart { margin: 24px 0; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.blog-chart figcaption { font-weight: 700; margin-bottom: 10px; font-size: 1.02rem; }
.blog-chart svg { width: 100%; height: auto; display: block; }
.blog-cta {
  display: flex; align-items: center; gap: 16px; margin: 24px 0; padding: 18px 20px;
  border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 12px;
  background: var(--surface);
}
.blog-cta-ic { font-size: 2rem; flex: none; }
.blog-cta-body { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; }
.blog-cta-body b { font-size: 1.05rem; }
.blog-cta-body span { color: var(--muted); font-size: .95rem; }
.blog-cta .btn { flex: none; }
@media (max-width: 620px) { .blog-cta { flex-direction: column; align-items: flex-start; } }
/* Контекстная форма заказа билетов внутри статьи блога */
.blog-cta-form {
  margin: 26px 0; padding: 18px; border: 1px solid var(--border); border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-soft), var(--surface));
}
.blog-cta-form-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.blog-cta-form-head b { font-size: 1.12rem; }
.blog-cta-form-head span { color: var(--text-muted); font-size: .95rem; }
/* Внутри узкой колонки статьи форму делаем компактной и в один столбец,
   чтобы она не вылезала за ширину контента (сетка ks рассчитана на всю ширину). */
.blog-cta-form .ks { box-shadow: none; padding: 0; background: transparent; border: 0; }
.blog-cta-form .ks-fields { grid-template-columns: 1fr; gap: 10px; }
.blog-cta-form .ks-swap { display: none; }
.blog-cta-form .ks-field input,
.blog-cta-form .ks-date { width: 100%; }
.blog-cta-form .ks-actions,
.blog-cta-form .ks-submit { width: 100%; }
.blog-slide {
  flex: 0 0 300px; display: flex; flex-direction: column; gap: 8px; padding: 18px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  text-decoration: none; color: inherit; scroll-snap-align: start;
}
.blog-slide:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.blog-slide-tag { font-size: .72rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.blog-slide-title { font-weight: 700; line-height: 1.3; }
.blog-slide-desc { color: var(--muted); font-size: .9rem; }
.blog-card { display: flex; flex-direction: column; gap: 8px; padding: 0 0 16px; overflow: hidden; }
.blog-card-cover {
  height: 120px; display: flex; align-items: center; justify-content: center; font-size: 2.6rem;
  background: linear-gradient(135deg, var(--primary-soft), var(--surface)); margin: -1px -1px 8px; border-radius: 12px 12px 0 0;
}
.blog-card h3 { margin: 0 16px; }
.blog-card p { margin: 0 16px; }
.blog-card-more { margin: 4px 16px 0; color: var(--accent); font-weight: 600; }
.blog-plan > summary { cursor: pointer; font-size: 1.05rem; }
.blog-cat-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-cat-nav .chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.blog-cat-nav .chip.is-active .muted { color: rgba(255,255,255,.8); }
.blog-topics { margin: 0; padding-left: 22px; columns: 2; column-gap: 40px; }
.blog-topics .blog-topic { margin: 0 0 8px; break-inside: avoid; }
.blog-topic-badge { margin-left: 8px; font-size: .7rem; font-weight: 700; color: #0aa06e; background: rgba(10,160,110,.1); padding: 1px 7px; border-radius: 999px; vertical-align: middle; }
.blog-topic.has-article a { font-weight: 600; }
@media (max-width: 720px) { .blog-topics { columns: 1; } }
.seo-longread { margin-top: 8px; width: 100%; }
/* Лонгрид «Подробно о маршруте» — на всю ширину рабочей области (не 760px). */
.seo-longread .seo-lr-lead.prose,
.seo-longread .seo-lr-body.prose { max-width: none; }
.seo-lr-heading { margin: 0 0 12px; font-size: 1.5rem; }
.seo-lr-lead { color: var(--text); }
.seo-lr-lead p { margin: 0 0 12px; }
.seo-lr-details { margin-top: 4px; }
/* Кнопка «Развернуть/Свернуть описание» — снизу блока */
.seo-lr-btn {
  margin-top: 14px; cursor: pointer; display: inline-flex; align-items: center;
  gap: 8px; padding: 10px 18px; font-weight: 700; font-size: 1rem;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 999px;
  background: transparent; transition: background .15s, color .15s;
}
.seo-lr-btn:hover { background: var(--accent); color: #fff; }
.seo-lr-btn:hover .seo-lr-toggle::before, .seo-lr-btn:hover .seo-lr-toggle::after { background: #fff; }
.seo-lr-btn[aria-expanded="true"] .seo-lr-toggle::after { transform: translate(-50%, -50%) scaleY(0); }
/* Плавное сворачивание/разворачивание описания */
.seo-collapse { max-height: 0; overflow: hidden; transition: max-height .45s cubic-bezier(.4, 0, .2, 1); }
.seo-lr-summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center;
  gap: 8px; padding: 10px 16px; font-weight: 700; font-size: 1rem;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 999px;
  background: transparent; transition: background .15s, color .15s;
}
.seo-lr-summary:hover { background: var(--accent); color: #fff; }
.seo-lr-summary:hover .seo-lr-toggle::before, .seo-lr-summary:hover .seo-lr-toggle::after { background: #fff; }
.seo-lr-summary::-webkit-details-marker { display: none; }
.hslider-track.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.hslider-track.is-dragging a { pointer-events: none; }
.blog-more-wrap { display: flex; justify-content: center; margin-top: 26px; }
/* Пагинация ленты блога */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 36px; }
.pager-nums { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pager-num, .pager-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg, #fff); color: var(--text);
  font-weight: 600; font-size: 15px; text-decoration: none; line-height: 1;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.pager-num:hover, .pager-btn:hover {
  border-color: var(--primary); color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08); transform: translateY(-1px);
}
.pager-num.is-active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2, var(--primary)));
  border-color: transparent; color: #fff; cursor: default;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .28); transform: none;
}
.pager-btn { font-weight: 700; padding: 0 18px; }
.pager-gap { padding: 0 4px; color: var(--muted); user-select: none; align-self: flex-end; }
.pager-info { text-align: center; color: var(--muted); margin-top: 14px; font-size: 14px; }
@media (max-width: 560px) {
  .pager { gap: 8px; }
  .pager-btn { width: 100%; order: 2; }
  .pager-nums { order: 1; width: 100%; justify-content: center; }
  .pager-num { min-width: 40px; height: 40px; }
}
/* Кнопка «Наверх» — вверху слева, белый фон с рамкой, появляется при прокрутке */
.to-top {
  position: fixed; bottom: 22px; left: 16px; z-index: 70;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  color: var(--text); background: #fff; border: 1.5px solid var(--border);
  border-radius: 50%; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.10);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s, border-color .15s, color .15s;
}
.to-top svg { display: block; }
.to-top:not([hidden]) { opacity: 1; transform: translateY(0); }
.to-top:hover { border-color: var(--primary); color: var(--primary); }
@media (prefers-color-scheme: dark) { .to-top { background: #fff; color: #14213d; } }
.seo-lr-toggle { flex: none; width: 16px; height: 16px; position: relative; }
.seo-lr-toggle::before, .seo-lr-toggle::after {
  content: ""; position: absolute; background: var(--accent); border-radius: 2px;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.seo-lr-toggle::before { width: 11px; height: 2px; }
.seo-lr-toggle::after { width: 2px; height: 11px; transition: transform .2s; }
.seo-lr-details[open] .seo-lr-toggle::after { transform: translate(-50%, -50%) scaleY(0); }
.seo-lr-body { padding: 12px 0 0; }
.seo-lr-body h3 { margin: 20px 0 8px; font-size: 1.15rem; }
.seo-lr-body p { margin: 0 0 12px; color: var(--text); }
/* ---------- Отели: карточки, список/таблица, свободные даты ---------- */
section.block.block-tight-top { padding-top: 12px; }
.hotel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.hotel-card {
  display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface); text-decoration: none; color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
.hotel-card:hover, .hotel-card:focus-visible {
  text-decoration: none; border-color: var(--primary); background: #f5f8ff;
  box-shadow: 0 0 0 3px var(--primary-soft), 0 16px 36px rgba(20, 46, 120, .16); transform: translateY(-2px);
}
.hotel-card:hover .hotel-card-name, .hotel-card:focus-visible .hotel-card-name { color: var(--primary); }
.hotel-card:hover .hotel-card-cta { transform: translateX(3px); }
.hotel-card-photo {
  position: relative; height: 160px; flex: none; background: linear-gradient(135deg, var(--primary-soft), var(--surface));
  background-size: cover; background-position: center;
}
.hotel-card-stars { position: absolute; left: 10px; top: 10px; color: #f5a623; font-size: .85rem;
  background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 999px; letter-spacing: 1px; }
.hotel-card-rating { position: absolute; right: 10px; top: 10px; font-weight: 700; color: #fff;
  background: #0aa06e; padding: 3px 9px; border-radius: 8px; font-size: .85rem; }
.hotel-card-photos { position: absolute; right: 10px; bottom: 10px; color: #fff; font-size: .78rem;
  background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 999px; }
.hotel-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-width: 0; }
.hotel-card-name { font-weight: 700; line-height: 1.3; transition: color .2s ease; }
.hotel-card-type { align-self: flex-start; font-size: .72rem; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.hotel-card-loc, .hotel-card-addr { color: var(--text-muted); font-size: .85rem; line-height: 1.3; }
.hotel-card-fac { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.hotel-fac { font-size: .72rem; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.hotel-card-price { margin-top: auto; padding-top: 4px; color: var(--text-muted); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.hotel-card-price b { color: var(--text); font-size: 1.05rem; }
.hotel-card-cta { margin-left: auto; font-size: .82rem; font-weight: 700; color: var(--primary); transition: transform .2s ease; }
.hotel-card-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; opacity: .3; }

/* Свободные даты — зелёным, «нет мест» — приглушённо */
.hotel-card-free { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .78rem; }
.hcf-label { font-weight: 700; color: #0a7d4b; margin-right: 2px; }
.hcf-day { background: #e8f8ef; color: #0a7d4b; border: 1px solid #bfe9d2; padding: 2px 7px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.hcf-more { color: #0a7d4b; font-weight: 700; padding: 2px 4px; }
.hotel-card-free.is-busy { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; padding: 3px 9px; border-radius: 999px; align-self: flex-start; font-weight: 600; }

/* Вид «Список» (по умолчанию): фото слева, данные справа */
.hotel-grid.is-list { grid-template-columns: 1fr; gap: 14px; }
.hotel-grid.is-list .hotel-card { flex-direction: row; min-height: 176px; }
.hotel-grid.is-list .hotel-card-photo { width: 280px; height: auto; min-height: 176px; }
.hotel-grid.is-list .hotel-card-body { padding: 16px 20px; }
.hotel-grid.is-list .hotel-card-name { font-size: 1.08rem; }
@media (max-width: 620px) {
  .hotel-grid.is-list .hotel-card { min-height: 0; }
  .hotel-grid.is-list .hotel-card-photo { width: 118px; min-height: 110px; }
  .hotel-grid.is-list .hotel-card-body { padding: 10px 12px; }
  .hotel-grid.is-list .hotel-card-name { font-size: .98rem; }
  .hotel-grid.is-list .hotel-card-fac { display: none; }
}

/* Переключатель «Список / Таблица» */
.view-toggle { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.view-toggle-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-muted); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer;
  transition: background-color .2s ease, color .2s ease; }
.view-toggle-btn svg { width: 16px; height: 16px; }
.view-toggle-btn:hover { color: var(--primary); }
.view-toggle-btn.is-active { background: var(--primary); color: #fff; }

/* ---------- Карта отелей: метки-ценники ---------- */
.oteli-map-wrap { margin: 0 0 4px; }
.otelimap { height: 460px; border-radius: var(--radius); overflow: hidden; }
@media (max-width: 620px) { .otelimap { height: 340px; } }
.om-pin { position: relative; cursor: pointer; padding-bottom: 7px; }
.om-pin span { display: block; padding: 5px 10px; border-radius: 999px; background: var(--surface); color: var(--text);
  font-weight: 800; font-size: .8rem; white-space: nowrap; line-height: 1.2;
  border: 1.5px solid var(--primary); box-shadow: 0 4px 12px rgba(13, 27, 51, .18);
  transition: background-color .15s ease, color .15s ease, transform .15s ease; }
.om-pin::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 10px; height: 10px; margin-left: -5px;
  background: var(--surface); border-right: 1.5px solid var(--primary); border-bottom: 1.5px solid var(--primary);
  transform: rotate(45deg); transition: background-color .15s ease; }
.om-pin:hover, .om-pin.is-hl, .om-pin.is-active, .om-pin:focus-visible { z-index: 5; outline: none; }
.om-pin:hover span, .om-pin.is-hl span, .om-pin.is-active span, .om-pin:focus-visible span {
  background: var(--primary); color: #fff; transform: scale(1.08); }
.om-pin:hover::after, .om-pin.is-hl::after, .om-pin.is-active::after, .om-pin:focus-visible::after { background: var(--primary); }
.otelimap .maplibregl-popup-content { padding: 0; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-lg); }
.om-pop { display: block; width: 240px; color: inherit; text-decoration: none; }
.om-pop:hover { text-decoration: none; }
.om-pop-img { display: block; height: 120px; background: var(--surface-2) center / cover no-repeat; }
.om-pop-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.om-pop-body > b { font-size: .92rem; line-height: 1.25; }
.om-pop-stars { color: #f5a623; font-size: .8rem; letter-spacing: 1px; }
.om-pop-price { color: var(--text-muted); font-size: .84rem; }
.om-pop-price b { color: var(--text); }
.om-pop-cta { margin-top: 4px; font-weight: 700; font-size: .84rem; color: var(--primary); }
.om-pop:hover .om-pop-cta { text-decoration: underline; }

/* ---------- Страница отеля ---------- */
.hero.offer-hero { padding: 20px 0 36px; }
.offer-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text-muted); margin: 6px 0 0; }
.offer-stars { color: #f5a623; letter-spacing: 1px; }
.offer-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.offer-quick a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .9rem;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease; }
.offer-quick a:hover, .offer-quick a:focus-visible { text-decoration: none; border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.offer-buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.offer-price { font-size: 1rem; }
.offer-price b { font-size: 1.5rem; font-weight: 800; }
.offer-cal { margin-top: 22px; padding: 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); scroll-margin-top: 90px; }
.offer-cal h2 { font-size: 1.25rem; margin: 0 0 4px; }
.offer-cal-sub { font-size: .88rem; margin: 0 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lg { display: inline-flex; align-items: center; gap: 5px; }
.lg::before { content: ""; width: 12px; height: 12px; border-radius: 4px; border: 1px solid; }
.lg-free::before { background: #e8f8ef; border-color: #bfe9d2; }
.lg-min::before { background: #d3f4e2; border-color: var(--success); }
.lg-busy::before { background: var(--surface-2); border-color: var(--border); }
.cal-day.is-free { background: #f1fbf5; border-color: #bfe9d2; }
.cal-day.is-free .p { color: #0a7d4b; }
.cal-day.is-free.cheapest { background: #d3f4e2; border-color: var(--success); box-shadow: 0 0 0 2px rgba(18, 183, 106, .18); }
.cal-day.is-busy { background: var(--surface-2); }
#foto, #opisanie, #nomera, #pohozhie { scroll-margin-top: 80px; }

/* Фото и карта — рядом */
.offer-media { display: grid; gap: 20px; }
.offer-media.is-two { grid-template-columns: 1fr 1fr; }
.offer-media-title { font-size: 1.25rem; margin: 0 0 12px; }
.offer-media .otelimap { height: 380px; }
@media (max-width: 860px) { .offer-media.is-two { grid-template-columns: 1fr; } }

/* Фото-слайдер */
.oslider { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.oslider-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; height: 380px;
  cursor: grab; overscroll-behavior-x: contain; }
.oslider-track::-webkit-scrollbar { display: none; }
.oslider-track.is-drag { cursor: grabbing; scroll-snap-type: none; }
.oslider-slide { flex: 0 0 100%; scroll-snap-align: start; display: block; height: 100%; }
.oslider-slide img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.oslider-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); color: var(--text); display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 14px rgba(13, 27, 51, .2); transition: background-color .2s ease, color .2s ease; }
.oslider-nav svg { width: 20px; height: 20px; }
.oslider-nav:hover { background: var(--primary); color: #fff; }
.oslider-prev { left: 12px; }
.oslider-next { right: 12px; }
.oslider-count { position: absolute; right: 12px; top: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: .8rem;
  font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.oslider-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; flex-wrap: wrap; gap: 0; padding: 0 56px; }
.oslider-dots button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.oslider-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.6);
  box-shadow: 0 0 0 1px rgba(0,0,0,.15); transition: transform .2s ease, background-color .2s ease; }
.oslider-dots button.is-active::before { background: #fff; transform: scale(1.35); }
@media (max-width: 620px) {
  .oslider-track, .offer-media .otelimap { height: 260px; }
  .oslider-nav { display: none; }
}
.hotel-item {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  text-decoration: none; color: inherit;
}
.hotel-item:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.hotel-item-stars { color: #f5a623; font-size: .9rem; letter-spacing: 1px; min-height: 1em; }
.hotel-item-name { font-weight: 600; line-height: 1.3; }
.hotel-item-price { margin-top: auto; color: var(--muted); font-size: .95rem; }
.hotel-item-price b { color: var(--text); }
.rm-stops { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.rm-stops-title { font-weight: 700; font-size: 1.05rem; margin: 0 0 14px; }
.route-stops td { padding: 9px 12px; }
.route-stops td.rs-date { vertical-align: middle; white-space: nowrap; background: var(--surface); border-right: 1px solid var(--border); }
.route-stops tr.rm-stop-row { cursor: pointer; }
.route-stops tr.rm-stop-row:hover td { background: rgba(10,160,110,.08); }

/* --- Континенты в разделе «весь мир» --- */
.wc-continent { margin-bottom: 28px; }
.wc-cont-title {
  font-size: 1.25rem; font-weight: 750; margin: 0 0 14px;
  padding-bottom: 8px; border-bottom: 2px solid var(--accent-soft);
}

/* --- Каталог аэропортов --- */
.ap-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 6px; }
.ap-controls .filter-input { flex: 1 1 320px; max-width: none; }
.ap-visa-toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; user-select: none; white-space: nowrap; }
.ap-visa-toggle input { width: 18px; height: 18px; accent-color: var(--primary); }
.ap-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
/* Вкладки каталога аэропортов (Россия / СНГ / Все страны) */
.ap-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; border-bottom: 1px solid var(--border); }
.ap-tab {
  appearance: none; border: none; background: transparent; cursor: pointer;
  padding: 11px 16px; font: inherit; font-weight: 700; font-size: .98rem; color: var(--text-muted);
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s;
}
.ap-tab:hover { color: var(--text); }
.ap-tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.ap-tab-count { font-size: .78rem; font-weight: 600; color: var(--text-muted); background: var(--surface-2);
  padding: 1px 8px; border-radius: 999px; margin-left: 4px; }
/* Алфавитный указатель */
.ap-alpha-nav { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 18px; }
.ap-alpha-link { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px;
  border: 1px solid var(--border); border-radius: 8px; font-weight: 700; font-size: .88rem; color: var(--text); }
.ap-alpha-link:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.ap-letter-group { margin-bottom: 22px; scroll-margin-top: 90px; }
.ap-letter { font-size: 1.3rem; font-weight: 800; color: var(--primary); margin: 0 0 12px;
  padding-bottom: 6px; border-bottom: 2px solid var(--primary-soft); scroll-margin-top: 90px; }
.ap-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.ap-item:hover { border-color: var(--primary); transform: translateY(-1px); }
.ap-iata {
  flex: 0 0 auto; font-weight: 800; font-size: 0.85rem; letter-spacing: .04em;
  background: var(--primary-soft); color: var(--primary-dark);
  padding: 5px 8px; border-radius: 8px; min-width: 46px; text-align: center;
}
.ap-name { flex: 1 1 auto; font-weight: 650; line-height: 1.25; }
.ap-country { display: block; font-weight: 500; color: var(--text-muted); font-size: 0.82rem; }
.ap-airports { display: block; font-weight: 500; color: var(--text); font-size: 0.8rem; margin-top: 2px; }
/* Карточка информации об аэропорте (страница аэропорта) */
.ap-info-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 16px 18px; }
.ap-info-row { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.ap-info-row:last-of-type { border-bottom: none; }
.ap-info-lbl { flex: 0 0 160px; color: var(--text-muted); font-weight: 600; }
.ap-info-val { flex: 1 1 auto; font-weight: 600; }
.ap-info-note { margin: 10px 0 0; color: var(--text-muted); line-height: 1.5; }
/* Текстовая справка аэропорта (avia.tutu.ru): Об аэропорте / Контакты / Проезд */
.ap-desc { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.ap-desc-block { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 16px 18px; }
.ap-desc-h { margin: 0 0 8px; font-size: 1.05rem; color: var(--primary); }
.ap-desc-block p { margin: 0 0 8px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; word-break: break-word; }
.ap-desc-block p:last-child { margin-bottom: 0; }
.ap-desc-block, .ap-desc-block a { overflow-wrap: anywhere; word-break: break-word; }
.ap-visa {
  flex: 0 0 auto; font-size: 0.74rem; font-weight: 700; padding: 4px 9px;
  border-radius: 999px; white-space: nowrap;
}
.ap-visa-ok { background: #e7f6ec; color: #16794a; }
.ap-visa-warn { background: #fff4e5; color: #a35b00; }
.ap-visa-danger { background: #fdeaea; color: #c23636; }

/* --- Вокзалы города: карточки организаций (Яндекс.Карты) --- */
.vk-orgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.vk-org { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 16px; }
.vk-org-name { font-weight: 750; font-size: 1.12rem; }
.vk-org-cat { font-size: 0.85rem; margin-top: 2px; }
.vk-org-info { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; font-size: 0.94rem; }
.vk-org-info a { color: var(--primary); }
.vk-org-reviews { margin-top: 14px; }
.vk-org-reviews iframe { width: 100%; height: 340px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.vk-org-reviews-link { display: inline-block; margin-top: 8px; font-size: 0.9rem; }

/* --- Карточки городов в разделе «Отели» --- */
.hotel-city-card { display: flex; flex-direction: column; gap: 4px; }
.hcc-ic { font-size: 1.6rem; }
.hcc-name { font-weight: 700; font-size: 1.05rem; color: var(--text); }

/* ---- Страница вокзала: онлайн-табло, информация, отзывы ---- */
.vk-board-tabs { display: inline-flex; gap: 6px; margin-bottom: 12px; background: var(--surface); padding: 4px; border-radius: 12px; }
.vk-board-tab { border: 0; background: transparent; padding: 8px 18px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.vk-board-tab.is-active { background: var(--primary); color: #fff; }
.vk-board td.vk-board-time { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.vk-board .vk-board-msk { font-weight: 400; font-size: 11.5px; margin-top: 1px; }
.vk-board td.vk-board-date { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
.vk-board tr.is-today td.vk-board-date { color: var(--text); }
.vk-board tr.is-past { opacity: .5; }
.vk-board tr.is-past td, .vk-board tr.is-past td a { color: var(--muted); }
.vk-today { display: inline-block; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.vk-board-stations { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.vk-board-station { border: 1px solid var(--border); background: var(--surface); padding: 7px 14px; border-radius: 20px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.vk-board-station:hover { color: var(--text); }
.vk-board-station.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.vk-board-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.vk-board-todaychk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; user-select: none; }
.vk-board-wrap.vkb-today-only .vk-board-spane:not([hidden]) .vk-board-pane:not([hidden]) tr[data-today="0"] { display: none; }

/* Электрички: факты в hero, пустое состояние */
.elk-facts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.elk-fact { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; }
.elk-fact-ic { font-size: 18px; line-height: 1; margin-bottom: 3px; }
.elk-fact b { font-size: 16px; }
.elk-fact small { color: var(--muted); font-size: 12px; }
.elk-empty { display: flex; gap: 18px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; }
.elk-empty-ic { font-size: 40px; line-height: 1; flex: none; }
.elk-empty-tx b { font-size: 18px; display: block; margin-bottom: 6px; }
.elk-empty-tx p { margin: 0 0 14px; }
.elk-empty-btns { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 560px) { .elk-empty { flex-direction: column; gap: 10px; } }
.vk-info { display: grid; gap: 2px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--bg, #fff); }
.vk-info-row { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.vk-info-row:last-child { border-bottom: 0; }
.vk-info-k { font-weight: 700; color: var(--text); }
.vk-info-v { color: var(--text); }
.vk-info-v p { margin: 0 0 8px; }
.vk-info-v p:last-child { margin-bottom: 0; }
.vk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vk-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.vk-list { margin: 0; padding-left: 18px; }
.vk-list li { margin: 3px 0; }
.vk-reviews { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.vk-review { background: var(--bg, #fff); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.vk-review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.vk-review-author { font-weight: 700; }
.vk-review-stars { color: #f5a623; letter-spacing: 1px; }
.vk-review-date { font-size: 13px; }
.vk-review-text { color: var(--text); line-height: 1.55; }
@media (max-width: 720px) {
  .vk-info-row { grid-template-columns: 1fr; gap: 4px; }
  .vk-reviews { grid-template-columns: 1fr; }
}

/* Маршрут с пересадкой в таблице поездов */
.tr-transfer-label { font-weight: 700; color: var(--text); }
.tr-badge.tr-transfer { background: #fff4e5; color: #b45309; border: 1px solid #f5c98b; }

/* Вокзалы: подстанции в листинге и блок вокзалов города */
.ap-item-wrap { display:block; }
.vk-substations { list-style:disc; margin:2px 0 10px; padding:0 0 0 58px; columns:2; }
@media (max-width:640px){ .vk-substations { columns:1; padding-left:38px; } }
.vk-substations li { margin:2px 0; font-size:14px; }
.vk-substations li a { color:var(--muted); }
.vk-substations li a:hover { color:var(--brand); }
.vk-station-grid { display:grid; gap:12px; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); }
.vk-station-card { display:flex; flex-direction:column; gap:4px; padding:12px 14px; border:1px solid var(--border); border-radius:12px; background:var(--card,#fff); }
.vk-station-card:hover { border-color:var(--brand); box-shadow:0 3px 12px rgba(0,0,0,.06); }
.vk-station-card.is-current { border-color:var(--brand); background:var(--surface); }
.vk-station-ic { font-size:18px; }
.vk-station-name { font-weight:600; }
.vk-station-addr { font-size:12.5px; color:var(--muted); }

/* Расписание: табы прямые/пересадка */
/* Табы «Все / Прямые / С пересадкой» — в стиле помесячных вкладок (.mtabs)
   на страницах авиа: сегментированный контрол на серой подложке. */
.ti-tabs { display:inline-flex; flex-wrap:wrap; gap:6px; margin:0 0 14px; padding:4px; background:var(--surface-2); border-radius:12px; }
.ti-tab { border:none; background:none; font:inherit; font-weight:700; font-size:0.9rem; padding:8px 16px; border-radius:9px; cursor:pointer; color:var(--text-muted,var(--muted)); transition:background .15s,color .15s; }
.ti-tab:hover { color:var(--text,#1a2130); }
.ti-tab.is-active { background:var(--surface); color:var(--primary); box-shadow:var(--shadow); }
.ti-tab .ti-count { font-size:12px; opacity:.75; margin-left:4px; font-weight:600; }
/* Кнопка «Показать ещё» — по центру, в стилистике сайта */
.ti-more-wrap { display:flex; justify-content:center; margin-top:20px; }
.ti-more { min-width:220px; }
.ti-more span { opacity:.7; font-weight:600; margin-left:4px; }
.tix-badge.tix-transfer { background:#fef3c7; color:#92640a; }

/* Междугородние электрички: список по городу отправления */
.ic-list { display:flex; flex-direction:column; gap:14px; }
.ic-group { padding:12px 14px; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.ic-from { font-weight:700; margin-bottom:8px; }
.ic-dests { display:flex; flex-wrap:wrap; gap:7px; }
.ic-dest { font-size:13.5px; padding:4px 11px; border:1px solid var(--border); border-radius:16px; background:var(--card,#fff); }
.ic-dest:hover { border-color:var(--brand); color:var(--brand); }
.ic-dest small { color:var(--muted); font-size:11.5px; margin-left:3px; }

/* =========================================================================
   Доступность и взаимодействие — единый слой по чек-листу UI/UX Pro Max.
   Применяется ко всему сайту: focus-visible для клавиатуры, отключение
   анимаций по prefers-reduced-motion, курсоры, тач-таргеты, плавные ховеры.
   Источник методики: ui-ux-pro-max-skill (MIT). См. .claude/skills/.
   ========================================================================= */

/* 1) Видимый фокус для клавиатурной навигации (мышью — не мешает). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}
/* Поля ввода: мягкое кольцо вместо жёсткого контура. */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: transparent;
  box-shadow: 0 0 0 3px var(--primary-soft), inset 0 0 0 1px var(--primary);
}

/* 2) Курсор-указатель на всех кликабельных элементах. */
button,
[role="button"],
[role="tab"],
summary,
label[for],
.chip,
.btn,
.tab,
select { cursor: pointer; }
button[disabled],
[aria-disabled="true"] { cursor: not-allowed; }

/* 3) Плавные ховер-переходы (150–300мс) для кликабельного, где не заданы. */
a, button, .chip, .btn, .card, .tab, [role="tab"] {
  transition: color .18s ease, background-color .18s ease,
              border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

/* 4) Минимальный тач-таргет 44×44px на сенсорных экранах (навигация/кнопки). */
@media (hover: none) and (pointer: coarse) {
  .btn, button, .nav a, .chip, [role="tab"], .vk-board-tab, .mtab, .tab {
    min-height: 44px;
  }
}

/* 5) Respect prefers-reduced-motion — глушим анимации и скролл-поведение. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .rm-veh, .veh-plane, .veh-train { display: none !important; }
}

/* 6) Плавная прокрутка к якорям (только если пользователь не против движения). */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
