/* ---------- переменные ---------- */

:root {
  --color-bg: #f7f6f3;
  --color-surface: #ffffff;
  --color-border: #e5e2db;
  --color-text: #191b1a;
  --color-text-muted: #6b716f;
  --color-accent: #146661;
  --color-accent-dark: #0e4a46;
  --color-accent-contrast: #f2faf9;
  --color-accent-soft: #e3eeec;
  --color-accent-rgb: 20, 102, 97;
  --color-error-bg: #fbe9e5;
  --color-error-border: #d8503a;
  --color-error-text: #7a2413;
  /* Герой и тёмные панели (виджет на фото, финальный CTA, подвал) —
     отдельная пара цветов из дизайна «Спутник», не для обычного текста. */
  --color-hero-bg: #0e3e3a;
  --color-hero-accent: #8fe0d6;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-input: 10px;
  --radius: 18px; /* было 14px — крупнее карточки в дизайне «Спутник» */
  --radius-lg: 28px;
  --shadow: 0 4px 16px rgba(25, 27, 26, 0.07);
  --shadow-hover: 0 10px 24px rgba(var(--color-accent-rgb), 0.14);
}

/* Общий класс для приглушённого текста — используется на страницах
   направлений (marshruty.php): "ещё не рассчитан", "уточнит диспетчер". */
.muted {
  color: var(--color-text-muted);
}

a.muted {
  text-decoration: underline;
}

/* ---------- сброс ---------- */

*, *::before, *::after { box-sizing: border-box; }

/* [hidden] обязан прятать элемент всегда. Без этого правила классы вроде
   .order-form/.order-confirm (display:flex) перебивают стандартный
   display:none браузера для [hidden] — по правилам каскада авторские
   стили побеждают User-Agent независимо от специфичности селектора. */
[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  /* .site-header — position: sticky, так что без этого отступа заголовок
     любой секции при переходе по #якорю (меню в шапке, "Заказать" и т.п.)
     прячется под ней. Запас с небольшим буфером покрывает высоту шапки на
     всех ширинах (самая высокая — ~74px на десктопе). */
  scroll-padding-top: 90px;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.45;
}

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.01em; }

button { font-family: inherit; }

/* ---------- layout ---------- */

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- верхняя плашка с контактами ---------- */

.topbar {
  background: var(--color-hero-bg);
  color: rgba(255, 255, 255, 0.75);
  font-size: 12.5px;
}

.topbar .wrap {
  padding: 8px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 24px;
}

.topbar a {
  color: inherit;
  text-decoration: none;
}

.topbar a:hover {
  color: #fff;
}

@media (max-width: 480px) {
  .topbar .wrap {
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 14px;
    text-align: center;
  }
}

/* ---------- шапка ---------- */

.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.site-header .wrap {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-accent);
  text-decoration: none;
  flex: none;
}

.logo__img {
  height: 36px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 28px;
}

.main-nav a {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--color-text);
}

.header-cta {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 14px;
  flex: none;
  margin-left: auto; /* логотип слева, группа кнопок + бургер прижаты вправо,
    даже если .site-header .wrap когда-нибудь перестанет быть space-between */
}

.header-phone {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-input);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn-sm--ghost {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-sm--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .main-nav:not(.open) { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 8px 16px 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    gap: 0;
    z-index: 25;
  }
  .main-nav.open a {
    padding: 14px 2px;
    border-bottom: 1px solid var(--color-border);
    font-size: 16px;
  }
  .main-nav.open a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .header-phone { display: none; }
}

/* Совсем узкие экраны (375–390px): "Позвонить" остаётся видимой рядом с
   "Заказать" (раньше её просто прятали — теперь вместо этого ужимаем
   кнопки и логотип, чтобы шапка не переносилась на вторую строку). */
@media (max-width: 400px) {
  .site-header .wrap { padding: 12px; gap: 10px; }
  .logo__img { height: 30px; }
  .header-cta { gap: 6px; }
  .btn-sm { padding: 9px 11px; font-size: 12px; }
  .nav-toggle { width: 34px; padding: 6px; }
}

/* ---------- подвал ---------- */

.site-footer {
  background: var(--color-hero-bg);
  color: rgba(255, 255, 255, 0.6);
  padding: 28px 0;
  font-size: 13px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
}

.site-footer__logo {
  height: 26px;
  width: auto;
  border-radius: 4px;
}

.site-footer__phones {
  margin: 0;
  font-weight: 600;
  color: #fff;
}

.site-footer__phones a {
  color: inherit;
  text-decoration: none;
}

.site-footer__copy {
  margin: 0;
}

.site-footer__attribution {
  margin: 0;
  font-size: 12px;
}

.site-footer__attribution a {
  color: inherit;
}

.calc {
  padding: 36px 0 72px; /* было 24px/48px — 1.5x, воздуха вокруг калькулятора больше */
}

/* ---------- виджет калькулятора (боксом) ---------- */

.widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* На главной виджет лежит на фото — тёмное стекло вместо светлой карточки. */
.hero .widget {
  background: rgba(9, 38, 35, 0.55);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

/* Подзаголовок над калькулятором — заметно легче и мельче заголовка страницы,
   не спорит с ним за внимание. */
.calc__title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: normal;
  color: var(--color-text-muted);
  margin-bottom: 22px;
}

.hero .calc__title {
  color: rgba(255, 255, 255, 0.65);
}

/* ---------- строка "откуда — куда" с коннектором ---------- */

.calc__route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px;
}

.calc__route-line {
  display: flex;
  align-items: center;
  padding-bottom: 14px;
  flex: none;
}

.calc__route-line svg { width: 32px; height: 10px; }

@media (max-width: 480px) {
  .calc__route { grid-template-columns: 1fr; gap: 4px; }
  .calc__route-line { display: none; }
}

/* ---------- доп. поля виджета: дата и пассажиры ---------- */

.widget__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 480px) {
  .widget__row { grid-template-columns: 1fr; }
}

.field select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
}

.field input[type="date"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  display: block;
  -webkit-appearance: none;
  appearance: none;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
}

/* Тёмный виджет на фото — поля светлые на полупрозрачном фоне, а не белые
   карточки, иначе плохо читаются поверх фото. */
.hero .field label { color: rgba(255, 255, 255, 0.55); }
.hero .field select,
.hero .field input[type="date"] {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  color-scheme: dark;
}
.hero .field select option { background: #fff; color: var(--color-text); }

/* ---------- герой ---------- */

.hero {
  background:
    linear-gradient(to bottom, transparent 0%, transparent 94%, var(--color-bg) 100%),
    radial-gradient(ellipse 1100px 700px at 30% 0%, rgba(20, 85, 80, 0.22) 0%, rgba(14, 62, 58, 0.4) 60%, rgba(14, 62, 58, 0.48) 100%),
    url(/assets/img/hero-bg.jpg) center 38% / cover no-repeat;
  color: #fff;
}

/* На узких экранах "cover" почти не обрезает по высоте (герой намного уже
   и выше по пропорциям, чем фото) — обрезка идёт по ширине, и центр фото
   (50%) приходится на пассажира у трапа, а не на машину. Сдвигаем точку
   обрезки вправо, к машине, и добавляем свой тёмный градиент сверху —
   иначе текст попадает на светлое небо почти без контраста. */
@media (max-width: 768px) {
  .hero {
    background:
      linear-gradient(to bottom, rgba(9, 38, 35, 0.78) 0%, rgba(9, 38, 35, 0.42) 38%, rgba(9, 38, 35, 0.12) 60%, transparent 76%),
      linear-gradient(to bottom, transparent 0%, transparent 94%, var(--color-bg) 100%),
      radial-gradient(ellipse 1100px 700px at 30% 0%, rgba(20, 85, 80, 0.22) 0%, rgba(14, 62, 58, 0.4) 60%, rgba(14, 62, 58, 0.48) 100%),
      url(/assets/img/hero-bg.jpg) 70% center / cover no-repeat;
  }
}

.hero .wrap {
  padding: 48px 16px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.hero__eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-hero-accent);
  font-weight: 700;
  margin: 0 0 16px;
}

.page-title--hero {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin: 0 0 18px;
  color: #fff;
}

.hero__lead {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.68);
  margin: 0;
  max-width: 38ch;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 32px; }
  .page-title--hero { font-size: 36px; }
}

.page-title {
  font-size: 34px;
  margin: 32px 0 10px; /* было 24px 0 8px */
}

.content-block {
  padding: 28px 0;
  border-top: 1px solid var(--color-border);
}

.content-block h2 {
  font-size: 22px;
  margin-bottom: 14px;
}

.content-block p {
  margin: 0 0 12px;
  line-height: 1.6;
}

/* ---------- 404 ---------- */

.notfound {
  text-align: center;
  padding: 80px 0;
}

.notfound__code {
  font-size: 56px;
  font-weight: 800;
  color: var(--color-accent-soft);
}

.notfound p {
  font-size: 17px;
  margin: 12px 0 24px;
  color: var(--color-text-muted);
}

.notfound .btn {
  display: inline-flex;
  width: auto;
  text-decoration: none;
  padding: 13px 28px;
}


/* FAQ на <details>/<summary> — сворачивается по-настоящему, не просто
   текстовый список с постоянно открытыми ответами. */
.faq__item {
  border-bottom: 1px solid var(--color-border);
  padding: 14px 0;
}

.faq__item:first-of-type {
  border-top: 1px solid var(--color-border);
}

.faq__question {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__chevron {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}

.faq__item[open] .faq__chevron {
  transform: rotate(180deg);
}

/* Приём с grid-template-rows 0fr/1fr — единственный способ анимировать
   высоту <details> плавно, а не скачком. display:grid!important нужен,
   чтобы перебить принудительный display:none у закрытого <details>
   в стандартных стилях браузера — саму видимость после этого целиком
   держит grid-template-rows. */
.faq__answer-wrap {
  display: grid !important;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.faq__item[open] .faq__answer-wrap {
  grid-template-rows: 1fr;
}

.faq__answer-wrap > .faq__answer {
  overflow: hidden;
  margin: 10px 0 0;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.route-text p {
  line-height: 1.7;
  margin: 0 0 14px;
}

.route-summary {
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

.route-list__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14.5px;
}

.route-list__row:first-child {
  border-top: 1px solid var(--color-border);
}

.route-list__row a {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}

.route-list__row a:hover {
  color: var(--color-accent);
}

.route-list__row .route-list__price {
  color: var(--color-text-muted);
  white-space: nowrap;
}

.route-list__row .route-list__manual {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.route-list__row .route-list__manual:hover {
  color: var(--color-accent-dark);
}

.todo-marker {
  background: #fff3a3;
  color: #7a2413;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: bold;
}

/* ---------- форма ---------- */

.calc__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0; /* поле — ячейка грида/флекса (.calc__route, .widget__row,
    .order-fields): без этого содержимое не даёт ячейке сжаться уже своего
    "естественного" размера, и поле вылезает за карточку на узких экранах. */
}

.field label {
  font-size: 14px;
  color: var(--color-text-muted);
}

.field input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  font-size: 16px; /* меньше — iOS зумит страницу при фокусе */
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  color: var(--color-text);
}

.field input[type="text"]:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.15);
}

/* ---------- автокомплит ---------- */

.autocomplete {
  position: relative;
}

.autocomplete__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5000; /* выше любых других всплывающих элементов виджета */
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--color-surface);
  color: var(--color-text); /* явно, не по наследству — список всплывает и
    поверх тёмного виджета в hero (.hero{color:#fff}), без этого текст
    подсказок был бы белым на светлом фоне и не читался бы вообще */
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 260px;
  overflow-y: auto;
}

.autocomplete__item {
  display: flex;
  align-items: center;
  min-height: 44px; /* область нажатия пальцем */
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  color: inherit;
}

/* Заметное выделение и при наведении мышью, и при навигации стрелками
   (.is-active ставит autocomplete.js) — тот же акцентный стиль, что и
   у активных элементов в остальном интерфейсе (.tariff-row.active и т.п.),
   чтобы не просто чуть темнее фона, а однозначно читалось как "выбрано". */
.autocomplete__item:hover,
.autocomplete__item.is-active {
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
}

.autocomplete__empty {
  padding: 10px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: var(--radius-input);
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(var(--color-accent-rgb), 0.25);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

.btn--primary:not(:disabled):hover {
  background: var(--color-accent-dark);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn--secondary:not(:disabled):hover {
  background: var(--color-accent-contrast);
}

.btn__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.noscript-banner {
  background: var(--color-error-bg);
  color: var(--color-error-text);
  border-bottom: 1px solid var(--color-error-border);
  padding: 12px 16px;
  text-align: center;
  font-size: 14px;
}

.form-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ---------- ошибка ---------- */

.error-box {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--color-error-border);
  background: var(--color-error-bg);
  color: var(--color-error-text);
  border-radius: var(--radius);
  font-size: 14px;
}

/* ---------- ошибка конкретного поля (например, обязательная дата поездки) ---------- */
/* Видимость — через [hidden], как и у .error-box, а не через класс. */

.field__error {
  font-size: 12.5px;
  color: var(--color-error-text);
}

.field--error input[type="date"],
.field--error input[type="text"],
.field--error input[type="tel"] {
  border-color: var(--color-error-border);
}

/* ---------- результат ---------- */

.result {
  margin-top: 24px;
}

.result__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--color-text-muted);
}

.result__summary span:first-child {
  color: var(--color-text);
  font-weight: 600;
}

/* ---------- карточки тарифов ---------- */

.tariffs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px; /* было 12px */
  margin-bottom: 20px;
}

.tariff-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 18px; /* было 14px 16px */
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tariff-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.tariff-card__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tariff-card__badge {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tariff-card__badge svg {
  width: 32px;
  height: auto;
  display: block;
}

.tariff-card__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tariff-card__price {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-accent);
}

/* Новая территория — провайдер маршрутов не вызывался, цены нет.
   Спокойный приглушённый вид, не похожий на ошибку. */
.tariff-card__price--pending {
  color: var(--color-text-muted);
  font-style: italic;
  font-weight: normal;
}

.tariff-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.tariff-card__perkm {
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.tariff-card__order-btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px 16px;
  font-size: 15px;
}

.tariff-card--selected {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(var(--color-accent-rgb), 0.2);
}

/* ---------- результат расчёта: один выделенный тариф + список ----------
   Рендерится в app.js после расчёта — и на главной, и на странице
   направления (там же общий calc-form). Карточки "Стоимость поездки" на
   marshruty.php выше по странице — обычная сетка .tariffs/.tariff-card,
   короткая справка из кэша, без выбора: сам заказ — через кнопку "Заказать"
   на одной из них, которая проксирует клик в этот же calc-form. */

.tariffs-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 780px) {
  .tariffs-layout { grid-template-columns: 1fr; }
}

.tariff-featured {
  background: var(--color-hero-bg);
  color: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.tariff-featured__photo {
  height: 170px;
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.08);
}

.tariff-featured__body {
  padding: 24px 26px 28px;
}

.tariff-featured__name {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.tariff-featured__price {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 18px;
}

.tariff-featured__price span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

.tariff-featured__price--pending {
  font-size: 22px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
}

.btn-cta {
  display: inline-block;
  background: var(--color-hero-accent);
  color: var(--color-hero-bg);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  padding: 13px 22px;
  border: none;
  border-radius: var(--radius-input);
  cursor: pointer;
}

.btn-cta:hover { background: #fff; }

.btn-cta.disabled { opacity: 0.4; pointer-events: none; }

.tariff-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tariff-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 13px 16px;
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.tariff-row:hover,
.tariff-row.active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.tariff-row__name { font-weight: 700; font-size: 14px; flex: 1; }
.tariff-row__perkm { font-size: 12px; color: var(--color-text-muted); margin-right: 4px; }
.tariff-row__price { font-weight: 800; font-size: 15px; }
.tariff-row__cta { font-size: 13px; font-weight: 700; color: var(--color-accent); white-space: nowrap; }
.tariff-row__unfit { display: none; font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); white-space: nowrap; }

.tariff-row.unfit {
  opacity: 0.55;
  cursor: default;
}
.tariff-row.unfit .tariff-row__cta { display: none; }
.tariff-row.unfit .tariff-row__unfit { display: inline; }

/* ---------- подробные карточки тарифов (статический справочный блок) ---------- */

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.detail-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.detail-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.detail-card__photo {
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  height: 130px;
}

.detail-card__name { font-size: 16px; font-weight: 800; }
.detail-card__price { font-size: 13.5px; color: var(--color-text-muted); margin-top: -8px; }
.detail-card dt { font-size: 11.5px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; }
.detail-card dd { margin: 0 0 10px; font-size: 13px; }
.detail-card__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.detail-card__list li { padding-left: 15px; position: relative; font-size: 13px; }
.detail-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ---------- как это работает: линия-таймлайн ---------- */

.how-timeline {
  display: flex;
  gap: 24px;
  position: relative;
  margin-top: 8px;
}

.how-timeline::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.how-step { flex: 1; position: relative; z-index: 1; }
.how-step__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 16px;
}
.how-step h3 { margin: 0 0 6px; font-size: 15px; }
.how-step p { margin: 0; font-size: 13.5px; color: var(--color-text-muted); }

@media (max-width: 780px) {
  .how-timeline { flex-direction: column; gap: 24px; }
  .how-timeline::before { display: none; }
}

/* ---------- вкладки «о компании» ---------- */

.tabs input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.tabs label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  margin: 0 8px 8px 0;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
}
.tabs input:checked + label { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.tabs__panel {
  display: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 10px;
  font-size: 15px;
}
.tabs__panel p { margin: 0 0 12px; }
.tabs__panel p:last-child { margin-bottom: 0; }
#t-work:checked ~ .tabs__panel[data-p="work"] { display: block; }
#t-fleet:checked ~ .tabs__panel[data-p="fleet"] { display: block; }
#t-price:checked ~ .tabs__panel[data-p="price"] { display: block; }

/* ---------- популярные маршруты: карточки с фото городов ---------- */

.popular-routes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 860px) {
  .popular-routes { grid-template-columns: 1fr; }
}

.route-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.route-card__title { font-size: 16px; font-weight: 800; }

.route-card__cities { display: flex; align-items: center; gap: 8px; }
.route-card__city { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.route-card__photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-accent-soft);
  background: var(--color-accent-dark) center/cover no-repeat;
  flex-shrink: 0;
}
.route-card__city span { font-size: 12px; font-weight: 700; text-align: center; }

.route-card__price { font-size: 14px; color: var(--color-text-muted); }
.route-card__price b { color: var(--color-accent-dark); font-size: 16px; }
.route-card__price.manual { color: var(--color-accent-dark); font-weight: 700; }

.route-card__actions { display: flex; gap: 8px; margin-top: auto; }
.route-card__actions a {
  flex: 1;
  text-align: center;
  padding: 11px 10px;
  border-radius: var(--radius-input);
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
}
.route-card__actions a.primary { background: var(--color-accent); color: #fff; }
.route-card__actions a.secondary { background: var(--color-accent-soft); color: var(--color-accent-dark); }

/* ---------- анимированный блок маршрута на странице направления ---------- */

.route-anim {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-hero-bg);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  color: #fff;
  margin: 4px 0 24px;
}
.route-anim__city { display: flex; flex-direction: column; align-items: center; gap: 10px; flex-shrink: 0; }
.route-anim__photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-hero-accent);
  background: var(--color-accent-dark) center/cover no-repeat;
  flex-shrink: 0;
}
.route-anim__label { font-weight: 800; font-size: 14px; text-align: center; }
.route-anim__track {
  flex: 1;
  position: relative;
  height: 3px;
  min-width: 30px;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.45) 0 9px, transparent 9px 18px);
}
.route-anim__car {
  position: absolute;
  left: 0;
  top: 50%;
  width: 40px;
  height: 25px;
  transform: translate(-50%, -100%);
  animation: routeCarMove 7s ease-in-out infinite;
}
.route-anim__car svg { width: 100%; height: 100%; display: block; }
.route-anim__city--a .route-anim__photo { animation: routeCityA 7s ease-in-out infinite; }
.route-anim__city--b .route-anim__photo { animation: routeCityB 7s ease-in-out infinite; }
@keyframes routeCarMove { 0% { left: 0%; } 50% { left: 100%; } 100% { left: 0%; } }
@keyframes routeCityA { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.85); } }
@keyframes routeCityB { 0%, 100% { transform: scale(0.85); } 50% { transform: scale(1); } }

@media (max-width: 560px) {
  .route-anim { padding: 22px 14px; gap: 10px; }
  .route-anim__photo { width: 76px; height: 76px; }
  .route-anim__label { font-size: 12px; }
}

.route-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
  margin: 0 0 24px;
}
.route-stats__value { font-size: 19px; font-weight: 800; color: var(--color-accent-dark); }
.route-stats__label { font-size: 12px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }
.route-stats__manual {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-accent-dark);
  background: var(--color-accent-soft);
  padding: 10px 18px;
  border-radius: 999px;
}

/* ---------- финальный CTA ---------- */

.final-cta {
  background: var(--color-hero-bg);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.final-cta h2 { font-size: 28px; font-weight: 800; margin: 0 0 20px; }
.final-cta a.btn-cta { padding: 15px 30px; font-size: 15px; text-decoration: none; }

/* ---------- форма заказа ---------- */

.order-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 860px) {
  .order-layout { grid-template-columns: 460px 1fr; align-items: start; }
}

.order-section {
  margin-bottom: 20px;
  padding: 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.order-card__tariff {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.order-section__title {
  font-size: 18px;
  margin: 0;
}

.order-section__title span {
  color: var(--color-accent);
}

.order-reassure {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 6px;
}
.order-reassure__item b { display: block; font-size: 15px; margin-bottom: 4px; }
.order-reassure__item span { font-size: 14px; color: var(--color-text-muted); }

.order-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 560px) { .order-fields { grid-template-columns: 1fr; } }

.order-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  font-size: 16px; /* как у input — не даём iOS зумить страницу */
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  resize: vertical;
}

.order-form textarea:focus,
.order-form input[type="tel"]:focus,
.order-form input[type="date"]:focus,
.order-form input[type="time"]:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.15);
}

.order-form input[type="tel"],
.order-form input[type="date"],
.order-form input[type="time"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  color: var(--color-text);
}

.order-form input[type="date"],
.order-form input[type="time"] {
  display: block;
  -webkit-appearance: none;
  appearance: none;
}

/* Приманка для ботов: спрятана визуально и от скринридеров, но остаётся
   в DOM обычным полем — так её чаще заполняют примитивные боты, которые
   просто проходятся по всем полям формы (в отличие от display:none,
   который некоторые боты научились пропускать). */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.order-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px;
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  border-radius: var(--radius);
  font-size: 14.5px;
}

.order-confirm svg {
  flex: none;
  margin-top: 2px;
}

/* ---------- планшет и шире ---------- */

@media (min-width: 768px) {
  .tariffs {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .tariffs {
    grid-template-columns: repeat(3, 1fr);
  }
}
