/* ============================================================
   LETIM — HOMEPAGE ALIVE v3 (staging)
   Подключается только на index-v3.html. Прод-главную не трогает.
   Тёмная стеклянная форма на тонких светлых обводках; активная
   вкладка — акцентным (оранжевым) цветом. Переопределения виджета —
   со специфичностью .hero .search-shell.
   ============================================================ */

/* ---------- Оболочка: тёмное стекло, тонкая светлая рамка ---------- */
.hero .search-shell {
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  overflow: visible;
}

.hero .search-shell::before { display: none; }

/* Вкладки заменяют заголовок «Поиск авиабилетов» */
.hero .search-shell .search-shell__header { display: none; }

/* ---------- Вкладки ---------- */
.hero .search-shell .lt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 8px 12px 0;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px 14px 0 0;
}

.hero .search-shell .lt-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px 12px;
  margin: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px 10px 0 0;
  color: #CBD5E1;
  font: inherit;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.hero .search-shell .lt-tab:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, .04);
}

/* Активная вкладка — акцентным цветом LETIM */
.hero .search-shell .lt-tab.is-active {
  color: #FFFFFF;
  background: rgba(15, 23, 42, .5);
  border: 1px solid rgba(245, 158, 11, .7);
  border-bottom-color: transparent;
}

.hero .search-shell .lt-tab__ico {
  width: 16px;
  height: 16px;
  display: block;
  opacity: 1;
}

/* ---------- Панели ---------- */
.search-shell .lt-pane { display: none; }
.search-shell .lt-pane.is-active { display: block; }
.hero .search-shell .lt-pane { padding: 18px 22px 22px; }

/* ---------- Поля: тёмные со светлой обводкой ---------- */
.hero .search-shell .lt-label { color: #94A3B8; }

.hero .search-shell .lt-input {
  background-color: rgba(2, 6, 23, .45);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #F1F5F9;
  border-radius: 12px;
  height: 50px;
}

.hero .search-shell .lt-input:focus {
  border-color: rgba(245, 158, 11, .8);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
}

.hero .search-shell .lt-input::placeholder { color: #64748B; }

.hero .search-shell .lt-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.hero .search-shell input[type="date"].lt-input::-webkit-calendar-picker-indicator { filter: invert(0.8); }

/* ---------- Кнопка ---------- */
.hero .search-shell .lt-btn {
  border-radius: 12px;
  height: 50px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(245, 158, 11, .35);
}

.hero .search-shell .lt-btn::after {
  content: '→';
  margin-left: 8px;
  font-weight: 700;
}

.hero .search-shell .lt-btn--reset::after { content: none; }

.hero .search-shell .lt-note { color: #94A3B8; }

/* ---------- Однострочная раскладка полей поиска (desktop) ---------- */
@media (min-width: 769px) {
  .hero .search-shell .lt-group--from { flex: 1.1; }
  .hero .search-shell .lt-group--to { flex: 1.1; }
  .hero .search-shell .lt-group--date { flex: 1; }
  .hero .search-shell .lt-group--pass { flex: .75; }
}

/* ---------- S1: Hero без мини-терминала — контент в одну колонку ---------- */
.hero .hero__top {
  grid-template-columns: 1fr;
}
.hero .hero__content { max-width: 760px; }

/* ---------- Автокомплит: тёмный, position:fixed (ставится из JS) ---------- */
.lt-ac {
  position: fixed;
  z-index: 300;
  max-height: 340px;
  overflow-y: auto;
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}

.lt-ac__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background .15s;
}

.lt-ac__item.is-active,
.lt-ac__item:hover { background: #334155; }

.lt-ac__name {
  color: #E2E8F0;
  font-size: .92rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lt-ac__sub { color: #94A3B8; font-size: .78rem; white-space: nowrap; flex-shrink: 0; }

/* ---------- Мобильные ---------- */
@media (max-width: 768px) {
  .hero .search-shell .lt-tab { padding: 10px 12px 11px; font-size: .86rem; }
  .hero .search-shell .lt-pane { padding: 16px; }
}

/* ---------- S2: блок B — список и карта рядом на десктопе ---------- */
.tb-deals .tb-body__list { min-width: 0; }

/* Фото города в строке направления */
.tb-row__photo {
  width: 64px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface);
}

/* Карточка города на карте (клик по точке) — фото + переход в поиск */
.tb-deals .tb-body .tb-tip { pointer-events: auto; padding: 8px; }
.tb-deals .tb-body .tb-tip__link {
  display: flex;
  gap: 10px;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
}
.tb-deals .tb-body .tb-tip__img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 64px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface);
}
.tb-deals .tb-body .tb-tip__body { min-width: 0; }

/* Компактная строка направления — колонка узкая (карта рядом или планшет).
   Применяем на ВСЕХ ширинах v3: иначе на 821–979px ряд (min ~836px) вылезал. */
.tb-deals .tb-body .tb-row {
  grid-template-columns: 1fr auto;
  grid-template-areas: "dest price" "when when" "carrier go";
  gap: 6px 12px;
  padding: 10px 14px;
}
.tb-deals .tb-body .tb-row__dest { grid-area: dest; }
.tb-deals .tb-body .tb-row__price { grid-area: price; }
.tb-deals .tb-body .tb-row__when { grid-area: when; }
.tb-deals .tb-body .tb-row__carrier { grid-area: carrier; }
.tb-deals .tb-body .tb-row__go { grid-area: go; justify-self: end; padding: 6px 12px; font-size: .78rem; }
.tb-deals .tb-body .tb-row__go svg { width: 12px; height: 12px; }
.tb-deals .tb-body .tb-row__photo { width: 52px; height: 38px; }
.tb-deals .tb-body .tb-row__city { font-size: .96rem; }
.tb-deals .tb-body .tb-row__price-num { font-size: 1.05rem; }
.tb-deals .tb-body .tb-row__price-label { display: none; }
.tb-deals .tb-body .tb-row__when { flex-direction: row; align-items: center; gap: 6px; }
.tb-deals .tb-body .tb-row__carrier { flex-direction: row; align-items: center; gap: 6px; }

@media (min-width: 980px) {
  .tb-deals .tb-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 28px;
    align-items: stretch; /* карта растягивается на высоту списка (свёрнутый вид) */
  }
  .tb-deals .tb-views { display: none; }
  .tb-deals .tb-body .tb-map[hidden] { display: block; }
  .tb-deals .tb-body .tb-map { aspect-ratio: auto; min-height: 340px; }

  /* Раскрыли весь список — карта фиксируется при прокрутке */
  .tb-deals .tb-body.is-expanded { align-items: start; }
  .tb-deals .tb-body.is-expanded .tb-map { position: sticky; top: 96px; height: 560px; }
}

@media (max-width: 979px) {
  .tb-deals .tb-body { display: block; }
}

/* ============================================================
   S4: блок C #dossier — фото-баннер + плитки + «Практика аэропорта»
   ============================================================ */
.td-dossier { padding-bottom: 8px; }

.td-banner {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(140deg, #1E293B, #0F172A);
  min-height: 440px;
  isolation: isolate;
}
.td-banner.is-loading { opacity: .6; }

.td-banner__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 70% center;
  z-index: 0;
}
/* Фолбэк-фото (Tripster, 800×600): растягиваем фоном и размываем, чтобы не мылило.
 * Курированные /img/cities/* остаются резкими (класс не навешивается). */
.td-banner__media.is-approx {
  filter: blur(6px) brightness(.5) saturate(1.15);
  transform: scale(1.08);
}
.td-banner__grad {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(15,23,42,.97) 0%, rgba(15,23,42,.9) 30%, rgba(15,23,42,.55) 58%, rgba(15,23,42,.15) 100%),
    linear-gradient(0deg, rgba(15,23,42,.7), rgba(15,23,42,0) 45%);
}
.td-banner__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 28px 36px;
  align-items: center;
  padding: 38px 40px;
  min-height: 440px;
}
.td-banner__lead { max-width: 560px; }
.td-banner__title {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.02;
  color: #FFFFFF;
  letter-spacing: -.01em;
}
.td-banner__sub {
  margin: 0 0 12px;
  color: #CBD5E1;
  font-size: .98rem;
  font-weight: 600;
}
.td-banner__sub .td-rate { color: var(--accent); }
.td-banner__desc {
  margin: 0 0 18px;
  color: #B1B1B1;
  font-size: .94rem;
  line-height: 1.55;
}
.td-banner__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(245, 158, 11, .3);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.td-banner__cta:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(245, 158, 11, .42); }
.td-banner__cta[hidden] { display: none; }
.td-banner .td-hint {
  margin: 4px 0 14px;
  max-width: none;
  text-align: left;
  line-height: 1.9;
  font-size: .84rem;
}

/* ---------- Плитки 2×3 ---------- */
.td-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.td-tile {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .62);
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: inherit;
  text-decoration: none;
  transition: border-color .16s var(--ease), background .16s var(--ease), transform .16s var(--ease);
}
a.td-tile:hover {
  border-color: rgba(245, 158, 11, .55);
  background: rgba(15, 23, 42, .82);
  transform: translateY(-1px);
}
.td-tile__ico {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.td-tile__ico svg { width: 22px; height: 22px; display: block; }
.td-tile__body { min-width: 0; }
.td-tile__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 7px; }
.td-tile__label { color: #94A3B8; font-size: .78rem; }
.td-tile__value { color: #FFFFFF; font-weight: 700; font-size: .95rem; }
.td-tile__sub { display: block; margin-top: 3px; color: #94A3B8; font-size: .78rem; line-height: 1.35; }

/* ---------- Практика аэропорта ---------- */
.td-body[hidden] { display: none; }
.td-practice { margin-top: 30px; }
.td-practice__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.td-practice__title { margin: 0; font-size: 1.25rem; color: #FFFFFF; }
.td-practice__all { color: var(--link); font-size: .88rem; }
.td-practice__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.td-practice__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
}
.td-practice__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.td-practice__name { color: #E2E8F0; font-weight: 600; font-size: .96rem; }
.td-practice__iata { color: var(--accent); font-weight: 700; letter-spacing: .08em; font-size: .9rem; }
.td-practice__facts { display: grid; gap: 10px; }
.td-practice__fact { display: grid; grid-template-columns: 88px 1fr; gap: 2px 12px; align-items: baseline; }
.td-practice__k { color: var(--text-muted); font-size: .82rem; }
.td-practice__v { color: #E2E8F0; font-size: .9rem; }
.td-practice__h { grid-column: 2; color: var(--text-muted); font-size: .78rem; }
.td-practice__links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.td-practice__links a { color: var(--link); font-size: .86rem; }

/* ---------- Адаптив ---------- */
@media (max-width: 979px) {
  .td-banner__grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 28px;
    min-height: 0;
  }
  .td-banner__lead { max-width: none; }
  .td-banner { min-height: 0; }
  .td-banner__media { background-position: 60% 35%; }
  .td-banner__grad {
    background:
      linear-gradient(180deg, rgba(15,23,42,.55) 0%, rgba(15,23,42,.85) 55%, rgba(15,23,42,.97) 100%);
  }
}
@media (max-width: 560px) {
  .td-banner__grid { padding: 26px 20px; }
  .td-tiles { grid-template-columns: 1fr; gap: 10px; }
  .td-banner__title { font-size: 1.9rem; }
}

/* ============================================================
   S5: блок D #trip — опора-перелёт + шаги одной поездки
   ============================================================ */
.tc-builder { display: grid; gap: 20px; }

.tc-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(245, 158, 11, .16), rgba(30, 41, 59, .92) 60%);
  border: 1px solid rgba(245, 158, 11, .38);
  color: inherit;
  text-decoration: none;
  transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.tc-hero:hover {
  border-color: rgba(245, 158, 11, .7);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(245, 158, 11, .16);
}
.tc-hero__ico { flex: 0 0 40px; width: 40px; height: 40px; color: var(--accent); }
.tc-hero__ico svg { width: 40px; height: 40px; display: block; }
.tc-hero__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tc-hero__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: #94A3B8; font-weight: 700; }
.tc-hero__value { font-size: 1.9rem; font-weight: 800; color: #FFFFFF; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tc-hero__meta { color: #94A3B8; font-size: .86rem; }
.tc-hero__btn {
  flex-shrink: 0;
  padding: 12px 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  font-weight: 700;
  font-size: .92rem;
  box-shadow: 0 8px 22px rgba(245, 158, 11, .3);
}

.tc-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.tc-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 20px 18px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.tc-step:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, .5);
  background: linear-gradient(180deg, rgba(245, 158, 11, .07), var(--surface));
}
.tc-step__n {
  position: absolute;
  top: -10px;
  left: 16px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #0F172A;
  font-size: .72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tc-step__ico { width: 20px; height: 20px; color: var(--icon); margin-bottom: 4px; }
.tc-step__ico svg { width: 20px; height: 20px; display: block; }
.tc-step__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; }
.tc-step__value { font-size: 1.25rem; font-weight: 800; color: var(--headline); line-height: 1.15; font-variant-numeric: tabular-nums; }
.tc-step__sub { font-size: .78rem; color: var(--text-muted); }
.tc-step__extra { font-size: .72rem; color: rgba(148, 163, 184, .85); margin-top: 2px; }

@media (max-width: 720px) {
  .tc-hero { flex-wrap: wrap; gap: 14px; padding: 18px 18px; }
  .tc-hero__value { font-size: 1.55rem; }
  .tc-hero__btn { width: 100%; text-align: center; }
  .tc-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .tc-steps { grid-template-columns: 1fr; }
}

/* ============================================================
   S6: E meta-полоса + F FAQ с CTA-картой + футер
   ============================================================ */
.home-meta { padding: 0; }
.home-meta[hidden] { display: none; }
.home-meta__inner {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 26px 0;
}
.home-meta__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 40px;
}
.home-meta__item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text-muted);
  font-size: .92rem;
}
.home-meta__item b {
  color: var(--headline);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.home-meta__src {
  margin-top: 14px;
  text-align: center;
  font-size: .74rem;
  color: rgba(148, 163, 184, .75);
  letter-spacing: .02em;
}

/* FAQ: 2 колонки (перебиваем style.css .faq .faq__container — он специфичнее inline) */
.faq .faq__container {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: 44px;
  max-width: 1120px;
  margin: 0 auto;
}
.faq .faq__header { text-align: left; max-width: none; }
section.faq .faq__header .section-subtitle { margin: 0; max-width: none; }
@media (max-width: 1024px) {
  .faq .faq__container { grid-template-columns: 1fr; }
  .faq .faq__aside { position: static; }
}


/* Футер: социальные ссылки */
.footer__social { display: flex; gap: 10px; margin-top: 14px; }
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, .5);
  color: #94A3B8;
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.footer__social a:hover { color: var(--accent); border-color: rgba(245, 158, 11, .5); background: rgba(245, 158, 11, .08); }
.footer__social svg { width: 20px; height: 20px; }

@media (max-width: 979px) {
  .home-meta__row { gap: 12px 26px; }
  .home-meta__item { font-size: .84rem; }
  .home-meta__item b { font-size: 1.15rem; }
}

/* Партнёрская полоса «Плати по миру» (728×90) в блоке FAQ */
.home-ppvm {
  margin: 28px auto 0;
  text-align: center;
}
.home-ppvm__link {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, .3);
  box-shadow: 0 22px 54px -32px rgba(59, 130, 246, .6);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.home-ppvm__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 62px -30px rgba(59, 130, 246, .75);
}
.home-ppvm__link img { display: block; max-width: 100%; height: auto; }
.home-ppvm__label {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #cfe0ff;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 6px;
  padding: 3px 7px;
  background: rgba(10, 16, 31, .55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.home-ppvm__disc { margin-top: 8px; font-size: 11.5px; color: #7d8aa6; }
@media (max-width: 560px) {
  .home-ppvm__link { border-radius: 12px; }
  .home-ppvm__label { top: 6px; right: 8px; font-size: 9px; }
}
