/* FlyJoy — дизайн D: тёмно-синяя страница, жёлтые акценты, открытки с рукописными подписями.
   Виджеты поиска (avia.css и др.) берут цвета из переменных --ink/--muted/--blue/--line/--lilac/--paper:
   на тёмной странице они светлые, а внутри «листов» (.fj-sheet, .fj-avia, «Моя поездка») — тёмные на светлом. */

:root {
  --navy: #0B1A2A; --navy-2: #12283D; --navy-line: #1E3A55;
  --yellow: #FFC83D; --yellow-hi: #FFE08A; --mint: #A8E6B5;
  --text: #EAF1F7; --text-muted: #BCCAD8;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Comic Sans MS', cursive;
  /* Переменные для виджетов — значения на тёмном фоне */
  --ink: var(--text); --muted: var(--text-muted); --blue: var(--yellow); --line: var(--navy-line); --lilac: var(--navy-2); --paper: var(--navy);
}

/* Светлые «листы»: поиск, результаты, окна заявки, «Моя поездка». */
.fj-sheet, .fj-avia, .fj-trip, .request__form, .cookie-bar {
  --ink: #0B1A2A; --muted: #52657A; --blue: #0B1A2A; --line: #E1E7EE; --lilac: #FFF4D6; --paper: #F5F7FA;
  color: var(--ink);
}
.fj-sheet, .fj-avia { background: var(--paper); border-radius: 28px; padding: clamp(16px, 3vw, 32px); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--navy); color: var(--text); font-family: var(--body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.fj-sheet a:focus-visible, .fj-avia a:focus-visible, .fj-avia button:focus-visible { outline-color: #0B1A2A; }
.skip-link { position: absolute; top: -80px; left: 20px; z-index: 50; background: #fff; color: var(--navy); padding: 12px; }
.skip-link:focus { top: 12px; }

.wrap { width: min(1680px, calc(100% - 2 * clamp(16px, 4vw, 72px))); margin: 0 auto; }
section { padding-top: 96px; }
section[id] { scroll-margin-top: 24px; }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; overflow-wrap: break-word; color: #fff; }
.fj-sheet h1, .fj-sheet h2, .fj-sheet h3, .fj-avia h2, .fj-avia h3, .fj-trip h2, .fj-trip h3 { color: var(--ink); }
h1 { font-size: clamp(36px, 4.6vw, 88px); line-height: 1.04; letter-spacing: -.03em; }
h2 { font-size: clamp(28px, 3vw, 54px); line-height: 1.1; }
h3 { font-size: 19px; line-height: 1.3; font-family: var(--body); font-weight: 800; letter-spacing: 0; }
h1 em, h2 em { font-style: normal; color: var(--yellow); }
p { margin: 0; color: var(--muted); }
.lead { font-size: 18px; max-width: 560px; }

/* Рукописная подпись над заголовком (вместо прежних КАПСЛОК-ярлыков). */
.hand, .section-label, .eyebrow { display: inline-block; font-family: var(--hand); font-weight: 700; font-size: 30px; line-height: 1.1; color: var(--yellow); transform: rotate(-2deg); margin-bottom: 6px; }

/* --- Шапка: меню-«пилюля» --- */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 10px 10px 10px 24px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.brand { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; color: #fff; text-decoration: none; }
.brand span { color: var(--yellow); }
.header-links { display: flex; flex-wrap: wrap; gap: 4px 20px; font-weight: 600; font-size: 15px; }
.header-links a { color: #C3D0DC; text-decoration: none; padding: 8px 0; white-space: nowrap; }
.header-links a:hover, .header-links a[aria-current='page'] { color: #fff; }
.header-links a[aria-current='page'] { box-shadow: inset 0 -2px 0 var(--yellow); }
.header-cta { display: inline-flex; align-items: center; gap: .28em; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 15px; text-decoration: none; }
.header-cta:hover { background: var(--mint); }
/* Кнопка меню — только на телефоне. Три полоски, в открытом состоянии — крестик. */
.menu-toggle { display: none; position: relative; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; margin: -1px 0 0 -9px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.menu-toggle span::before, .menu-toggle span::after { content: ''; margin: 0; left: 0; top: 0; }
.menu-toggle span::before { transform: translateY(-6px); }
.menu-toggle span::after { transform: translateY(6px); }
.is-open .menu-toggle span { background: transparent; }
.is-open .menu-toggle span::before { background: #fff; transform: rotate(45deg); }
.is-open .menu-toggle span::after { background: #fff; transform: rotate(-45deg); }

/* --- Кнопки --- */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border: 2px solid transparent; border-radius: 999px; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--yellow); color: var(--navy); }
.button.primary:hover { background: var(--mint); }
.button.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.button.secondary:hover { background: rgba(255,255,255,.08); }
.fj-sheet .button.secondary, .fj-avia .button.secondary, .request__form .button.secondary, .fj-trip .button.secondary { color: var(--ink); border-color: #C8D2DD; background: #fff; }
.button.dark { background: var(--navy); color: #fff; }

/* --- Главная: первый экран --- */
.hero { position: relative; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-top: 64px; overflow-x: clip; } /* штамп «прилетает» увеличенным — не даём ему расширить страницу на телефоне */
.hero__copy { flex: 1 1 460px; min-width: 0; }
.hero__copy h1 { margin: 6px 0 18px; }
.hero-note { margin-top: 16px; font-size: 13px; }

/* Два равных пути под заголовком: одинаковые светлые карточки. Капсула поиска лежит прямо в карточке — без своей подложки. */
.hero-paths { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.hero-path { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 28px; background: #fff; color: var(--navy); box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.hero-path p { color: #3B4C5E; font-size: 15px; line-height: 1.5; }
.hero-path__label { font-family: var(--hand); font-weight: 700; font-size: 24px; line-height: 1; color: #B07A00; }
.hero-path__title { font-size: 26px; color: var(--navy); }
.hero-path__points { display: grid; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; font-size: 14px; color: #3B4C5E; }
.hero-path__points li::before { content: '✓ '; color: #2E9B57; font-weight: 800; }
.hero-path__button { align-self: flex-start; margin-top: auto; }
.hero-path__steps { font-weight: 600; }
.hero-path .hero-note { margin-top: 2px; color: #52657A; }
.hero-path .hero-note a { color: var(--navy); }
.quick-search { color: var(--navy); }
.hero-path .quick-search__fields { grid-template-columns: 1fr 1fr 1.35fr auto; }
.hero-path .quick-search button { padding: 0 22px; }
@media (max-width: 900px) { .hero-paths { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .hero-path .quick-search__fields { grid-template-columns: 1fr 1fr; } }
.quick-search__tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px; }
.quick-search__tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: #EEF2F6; color: var(--navy); font-weight: 600; font-size: 14px; text-decoration: none; }
.quick-search__tabs a[aria-current='true'] { background: var(--navy); color: #fff; font-weight: 700; }
.quick-search__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.quick-search label { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border-radius: 16px; background: #F5F7FA; font-size: 12px; font-weight: 600; color: #52657A; }
.quick-search select, .quick-search input { border: 0; background: transparent; padding: 0; font-weight: 700; font-size: 16px; color: var(--navy); width: 100%; min-height: 26px; }
.quick-search__city { position: relative; display: grid; }
.quick-search__list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: max(100%, 280px); max-height: 320px; overflow: auto; margin: 0; padding: 6px; list-style: none; border-radius: 16px; background: #fff; box-shadow: 0 20px 50px rgba(11,26,42,.35); }
.quick-search__city + .quick-search__city .quick-search__list { left: auto; right: 0; }
.quick-search__list li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--navy); font-size: 15px; font-weight: 600; cursor: pointer; }
.quick-search__list li small { color: #52657A; font-weight: 400; }
.quick-search__list li b { color: #52657A; font-size: 12px; }
.quick-search__list li:hover, .quick-search__list li[aria-selected='true'] { background: #FFF1C7; }
.quick-search__list .qs-empty { color: #52657A; cursor: default; }
.quick-search__list .qs-empty:hover { background: none; }
.quick-search button { min-height: 56px; border: 0; border-radius: 16px; background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 16px; cursor: pointer; }
.quick-search button:hover { background: var(--mint); }

/* Коллаж открыток со штампом */
.postcards { flex: 1 1 440px; min-width: 0; position: relative; height: 540px; margin-inline: 16px; } /* поля: повёрнутые крайние открытки не срезаются краем первого экрана */
.postcards__route { position: absolute; inset: 0; width: 100%; height: 100%; }
.postcard { position: absolute; margin: 0; padding: 12px 12px 46px; background: #fff; border-radius: 6px; box-shadow: 0 22px 50px rgba(0,0,0,.45); }
.postcard img { display: block; width: 100%; object-fit: cover; border-radius: 3px; }
.postcard figcaption { position: absolute; left: 16px; bottom: 6px; font-family: var(--hand); font-weight: 700; font-size: 27px; color: var(--navy); }
/* Пять открыток: --r — наклон, --dx/--dy — откуда «прилетает» карточка при раскладывании. */
.postcard { transform: rotate(var(--r, 0deg)); }
.postcard img { height: 165px; }
.postcard--1 { left: 0; top: 0; width: 46%; --r: -7deg; --dx: 25%; --dy: 30%; z-index: 1; }
.postcard--1 img { height: 180px; }
.postcard--2 { right: 0; top: 4%; width: 42%; --r: 6deg; --dx: -25%; --dy: 30%; z-index: 2; }
.postcard--3 { left: 31%; top: 45%; width: 37%; --r: -2deg; --dx: 0%; --dy: 10%; z-index: 6; }
.postcard--3 img { height: 140px; }
.postcard--4 { left: 1%; bottom: -4%; width: 44%; --r: 4deg; --dx: 25%; --dy: -30%; z-index: 3; }
.postcard--5 { right: 3%; bottom: -6%; width: 42%; --r: -5deg; --dx: -25%; --dy: -30%; z-index: 5; }
.postcard--5 img { height: 150px; }
.stamp { position: absolute; z-index: 7; right: 41%; bottom: -2%; display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; border: 3px dashed var(--yellow); color: var(--yellow); font-family: var(--display); font-weight: 700; font-size: 13px; text-align: center; line-height: 1.25; transform: rotate(14deg); }

/* --- «Моя поездка»: шаги и телефон с примером поездки --- */
.trip-promo { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.trip-promo__copy { flex: 1 1 380px; min-width: 0; }
.trip-promo__copy h2 { margin-bottom: 16px; }
.steps { display: grid; gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps li > span { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 800; }
.steps li:last-child > span { background: #fff; }
.steps strong { display: block; color: #fff; font-size: 17px; }
/* Шаги карточками в блоке «Моя поездка». */
.steps--cards li { padding: 14px 18px; border-radius: 20px; background: var(--navy-2); border: 1px solid var(--navy-line); align-items: center; }
.steps--cards p { font-size: 14px; }
/* Телефон с экраном «Моей поездки» и плавающие карточки вокруг. */
.trip-phone { flex: 1.2 1 480px; min-width: 0; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-height: 660px; } /* колонка не шире блока: подпись не растягивает страницу на 320 px (D-07) */
.trip-phone__glow { position: absolute; width: min(560px, 100%); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255,200,61,.26), transparent 65%); }
.trip-phone__device { position: relative; width: 310px; height: 630px; padding: 12px; border-radius: 48px; background: #05101C; box-shadow: 0 0 0 2px #2A4560, 0 40px 80px rgba(0,0,0,.55); transform: rotate(-4deg); }
.trip-phone__screen { height: 100%; overflow: hidden; border-radius: 38px; background: #F5F7FA; color: var(--navy); }
.trip-phone__bar { display: flex; justify-content: space-between; padding: 14px 22px 6px; font-size: 12px; font-weight: 800; }
.trip-phone__app { padding: 6px 16px; }
.trip-phone__sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #52657A; }
.trip-phone__badge { padding: 2px 8px; border-radius: 999px; background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.trip-phone__caption { position: relative; z-index: 1; max-width: min(340px, 100%); margin: 18px auto 0; text-align: center; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.trip-phone__title { margin: 4px 0 2px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; color: var(--navy); line-height: 1.2; }
.trip-phone__map { position: relative; height: 120px; margin: 12px 0; border-radius: 18px; background: #0E2238 18% 22% / 260% auto no-repeat; }
.trip-phone__map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.trip-phone__day { margin: 10px 0 4px; font-family: var(--hand); font-weight: 700; font-size: 18px; color: #8A5F00; } /* контраст 5.3:1 (ТЗ, D-06) */
.trip-phone__item { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; padding: 10px; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(11,26,42,.06); line-height: 1.35; }
.trip-phone__icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #FFF1C7; font-size: 16px; }
.trip-phone__item b { display: block; font-size: 13px; }
.trip-phone__item div span { font-size: 11px; color: #52657A; }
.trip-phone__ok { margin-left: auto; color: #2E9B57; font-weight: 800; font-size: 13px; }
/* Живость: телефон плавно «дышит». */
@media (prefers-reduced-motion: no-preference) {
  .fj-anim .trip-phone__device { animation: fj-phone 6s ease-in-out infinite alternate; }
}
@keyframes fj-phone { from { transform: rotate(-4deg) translateY(0); } to { transform: rotate(-3deg) translateY(-10px); } }

/* --- Заголовок секции со ссылкой справа --- */
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; }
.section-heading > a { color: var(--yellow); font-weight: 700; text-decoration: none; }
.section-heading > a:hover { text-decoration: underline; }

/* --- Карточки подборок и направлений --- */
.collection-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 20px; }
.collection-card, .col-card { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 380px; padding: 20px; border-radius: 28px; overflow: hidden; color: #fff; text-decoration: none; background: var(--navy-2); transition: transform .2s; }
.collection-card img, .col-card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.collection-card::before, .col-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(11,26,42,.92)); }
.collection-card:hover, .col-card:hover { transform: translateY(-4px); }
/* «Живое» фото при наведении: медленный наезд камеры, как в видео. */
.collection-card:hover img, .col-card:hover img { animation: fj-kenburns 5s ease-in-out infinite alternate; }
@keyframes fj-kenburns {
  0% { transform: scale(1.06) translate(0, 0); }
  45% { transform: scale(1.22) translate(-4%, -3%); }
  100% { transform: scale(1.16) translate(4%, -1%); }
}
.collection-card .tag { position: absolute; top: 16px; left: 16px; padding: 6px 12px; border-radius: 999px; background: var(--yellow); color: var(--navy); font-size: 13px; font-weight: 800; }
.collection-card strong, .col-card strong { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.15; letter-spacing: -.01em; }
.collection-card span, .col-card span { color: rgba(255,255,255,.88); }
.collection-card small, .col-card small { color: var(--yellow); font-weight: 700; font-size: 14px; }
/* Карточка направления в подборке: вся карточка — ссылка (растянутая), внизу — вторая ссылка («Тур с отелем»). */
.col-card__link { color: inherit; text-decoration: none; }
.col-card__link::after { content: ''; position: absolute; inset: 0; }
.col-card:focus-within { outline: 3px solid var(--yellow); outline-offset: 3px; }
.col-card__link:focus-visible { outline: none; }
.col-card__more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 6px; }
.col-card__more a { position: relative; z-index: 1; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; font-size: 13px; font-weight: 800; text-decoration: none; backdrop-filter: blur(6px); }
.col-card__more a:hover { background: var(--yellow); color: var(--navy); }
/* Направление без фото: тёплое «солнце» в углу вместо снимка. */
.col-card--nophoto { background: radial-gradient(90% 70% at 100% 0%, rgba(255,200,61,.45), transparent 60%), radial-gradient(80% 60% at 0% 100%, rgba(168,230,181,.18), transparent 60%), linear-gradient(160deg, #18385A, #0E2032); }
/* Ссылки на поиск туров под подборками на главной. */
.tour-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 20px; }
.tour-pills > span { margin-right: 6px; color: var(--text); font-weight: 700; }
.tour-pills .pill-links { margin: 0; }
.col-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 20px; padding-top: 40px; }
.collection-grid--compact .collection-card { min-height: 300px; }
.collection-grid--compact .collection-card strong { font-size: 20px; }

/* --- «Где отдохнуть когда»: месяцы с направлениями, текущий — первым и жёлтым --- */
.month-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.month-card { position: relative; padding: 18px 18px 16px; border: 1px solid var(--navy-line); border-radius: 22px; background: var(--navy-2); }
.month-card h3 { margin: 0 0 10px; font-size: 17px; }
.month-card ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.month-card a { color: var(--text); text-decoration: none; font-weight: 600; }
.month-card a:hover { color: var(--yellow); }
.month-card.is-now { border-color: var(--yellow); }
.month-card.is-now::after { content: 'сейчас'; position: absolute; top: 14px; right: 14px; font-family: var(--hand); font-weight: 700; font-size: 20px; color: var(--yellow); transform: rotate(-4deg); }
/* «Ещё для поездки»: партнёрские услуги на месте (трансфер, экскурсии, аренда авто, eSIM). */
.extras-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.extras-grid > li { display: flex; flex-direction: column; }
.extras-card { display: grid; align-content: start; gap: 4px; flex: 1; padding: 18px; border: 1px solid var(--navy-line); border-radius: 22px; background: var(--navy-2); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
.extras-card:hover { border-color: var(--yellow); transform: translateY(-3px); }
.extras-card__icon { font-size: 28px; line-height: 1; }
.extras-card strong { margin-top: 6px; font-size: 17px; color: #fff; }
.extras-card span:not(.extras-card__icon) { color: var(--text-muted); font-size: 14px; }
.extras-card small { margin-top: 6px; color: var(--yellow); font-weight: 700; }
.extras-note { margin-top: 12px; font-size: 13px; color: var(--text-muted); }
.extras-ad { margin: 6px 4px 0; font-size: 11px; line-height: 1.3; color: var(--text-muted); opacity: .8; }
/* Маршруты по странам: карточки стран, Россия (больше всего городов) — на всю ширину. */
.country-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 18px; }
.country-row { padding: 16px 18px; border: 1px solid var(--navy-line); border-radius: 22px; background: var(--navy-2); }
.country-row:first-child { grid-column: 1 / -1; }
.country-row h3 { margin: 0 0 10px; font-size: 16px; }
.country-row .pill-links { margin: 0; }
.country-row .pill-links a { background: var(--navy); }
@media (max-width: 1000px) { .collection-grid, .col-grid { grid-template-columns: repeat(2, 1fr); } .month-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .collection-grid, .col-grid { grid-template-columns: 1fr; } .month-grid { grid-template-columns: repeat(2, 1fr); } }

/* --- Ссылки-«таблетки» (маршруты, подборки) --- */
.pill-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.pill-links a { display: inline-block; padding: 10px 16px; border: 1px solid var(--navy-line); border-radius: 999px; background: var(--navy-2); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.pill-links a:hover { border-color: var(--yellow); color: #fff; }

/* --- Страницы сервисов, маршрутов и подборок: верх страницы --- */
.page-hero, .fj-avia-hero, .route-hero { padding-top: 56px; }
.page-hero h1, .fj-avia-hero h1, .route-hero h1 { margin: 6px 0 14px; }
.page-hero > p, .fj-avia-hero > p, .route-hero > p { max-width: 640px; font-size: 17px; }
/* «Как оформить и оплатить»: шаги и короткие списки условий. */
.howto { max-width: 820px; }
.howto .steps { margin-top: 18px; }
.howto__list { display: grid; gap: 10px; margin: 18px 0 0; padding-left: 20px; }
.howto__list strong { color: #fff; }
.order-help { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--navy-line); }
.order-help h3 { margin: 0 0 6px; font-size: 18px; }
.fj-avia { margin-top: 32px; }
/* Страницы сервисов: справа от заголовка две открытки, под поиском — «как это работает». */
.service-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); column-gap: 48px; align-items: start; }
.service-hero > * { grid-column: 1; justify-self: start; }
.service-hero > .service-postcards { grid-column: 2; grid-row: 1 / span 6; justify-self: stretch; }
.service-postcards { position: relative; height: 250px; margin-top: -8px; }
.service-postcard { width: 58%; }
.service-postcard figcaption { font-size: 23px; white-space: nowrap; }
.service-postcards .postcard img { height: 150px; }
.service-postcard--1 { left: 0; top: 14px; --r: -6deg; --dx: 20%; --dy: 20%; z-index: 1; }
.service-postcard--2 { right: 0; top: 0; --r: 5deg; --dx: -20%; --dy: 20%; z-index: 2; }
@media (prefers-reduced-motion: no-preference) { .fj-js .service-postcard { animation: fj-deal .8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 140ms + 100ms); } }
.service-steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px 56px; align-items: start; }
.service-steps h2 { font-size: clamp(26px, 2.6vw, 44px); }
.service-steps__list { margin: 0; }
.service-steps__list p { font-size: 15px; }
.service-steps__more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 20px 24px; border: 1px solid var(--navy-line); border-radius: 24px; background: var(--navy-2); }
.service-steps__more p { color: var(--text); font-weight: 600; }
@media (max-width: 1000px) { .service-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); column-gap: 28px; } .service-postcards .postcard img { height: 110px; } .service-postcards { height: 200px; } }
.route-crumb { display: inline-block; font-family: var(--hand); font-weight: 700; font-size: 26px; color: var(--yellow); text-decoration: none; transform: rotate(-2deg); }
.route-crumb:hover { color: var(--yellow-hi); }
.route-hero p.hand { display: block; width: fit-content; margin: 10px 0 0; font-size: 26px; color: var(--mint); }
.route-hero__img { display: block; width: 100%; max-height: 380px; object-fit: cover; border-radius: 28px; margin-top: 32px; }
.route-section > p { max-width: 640px; margin: 12px 0 20px; }
.route-steps { display: grid; gap: 12px; max-width: 760px; margin: 18px 0 0; padding-left: 22px; }
.route-steps li { color: var(--muted); line-height: 1.6; }
.route-steps b { color: #fff; }
.route-fallback { color: var(--muted); font-size: 14px; }
/* Посадочные страницы туров (/tury/…): факты о стране, курорты, вопросы. */
.landing-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; max-width: 900px; margin: 24px 0 0; }
.landing-facts div { padding: 14px 16px; border: 1px solid var(--navy-line); border-radius: 18px; background: var(--navy-2); }
.landing-facts dt, .landing-list dt { color: var(--yellow); font-weight: 700; font-size: 14px; }
.landing-facts dd { margin: 4px 0 0; color: var(--text); line-height: 1.45; }
.landing-list { display: grid; gap: 14px; max-width: 760px; margin: 18px 0 0; }
.landing-list dd { margin: 4px 0 0; color: var(--muted); line-height: 1.6; }
.landing-list--short { margin-bottom: 18px; }
.landing-faq { display: grid; gap: 8px; max-width: 760px; margin: 18px 0 16px; }
.landing-faq details { border: 1px solid var(--navy-line); border-radius: 16px; background: var(--navy-2); padding: 14px 18px; }
.landing-faq summary { cursor: pointer; font-weight: 700; color: #fff; }
.landing-faq p { margin: 10px 0 0; color: var(--muted); line-height: 1.6; }

/* --- Призыв и заявка --- */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding: 48px; border-radius: 36px; background: var(--yellow); color: var(--navy); }
.cta-band > div { flex: 1 1 420px; min-width: 0; }
.cta-band .hand { color: var(--navy); }
.cta-band h2 { color: var(--navy); margin-bottom: 10px; }
.cta-band p { color: #2A3B4D; }
.cta-band .button.secondary { color: var(--navy); border-color: var(--navy); }
.cta-band .button.secondary:hover { background: rgba(11,26,42,.08); }

/* Блок заявки — тёмная карточка, как остальная страница; светлый «лист» только у самой формы. */
.request { position: relative; margin-top: 40px; padding: clamp(24px, 4vw, 48px); border-radius: 36px; border: 1px solid var(--navy-line);
  background: radial-gradient(circle at 82% 38%, rgba(255,200,61,.13), transparent 42%), var(--navy-2); }
.request h2 { margin-bottom: 14px; }
.request__lead { max-width: 760px; font-size: 16px; color: var(--text-muted); }
.form-loading-note { margin-top: 10px; font-size: 13px; }
.request .form-loading-note { color: var(--text-muted); }
.request__note { margin-top: 18px; font-size: 12px; line-height: 1.7; color: var(--text-muted); }
.request a { color: var(--text); text-underline-offset: 3px; }
.request__form a { color: var(--ink); }
.service-terms { max-width: 820px; margin-top: 18px; padding: 14px 18px; border-radius: 16px; background: var(--lilac); }
.service-terms p { color: var(--ink); font-size: 14px; }
.request .service-terms { background: rgba(255,200,61,.1); border: 1px solid rgba(255,200,61,.32); }
.request .service-terms p { color: var(--text); }
.request .service-terms strong { color: var(--yellow); }
/* Своя форма заявки на главной (request-form.js с api.flyjoy.ru). */
.request__form { max-width: 780px; margin-top: 24px; padding: clamp(16px, 2.4vw, 28px); border-radius: 28px; background: var(--paper); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.request-laptop-wrap { display: none; }
@media (min-width: 1100px) {
  .request__form, .request .form-loading-note, .request .service-terms { max-width: min(780px, calc(100% - 540px)); }
  .request-laptop-wrap { display: block; position: absolute; right: clamp(32px, 3.5vw, 56px); top: 230px; width: 460px; isolation: isolate; }
}
/* Ноутбук — «открытка» с наклоном и жёлтым свечением, чтобы выделялся на тёмном фоне. */
.request-laptop-wrap::before { content: ''; position: absolute; inset: -12% -10% 10%; z-index: -1; background: radial-gradient(closest-side, rgba(255,200,61,.3), transparent); filter: blur(12px); }
.request-laptop-wrap__note { display: block; margin: 22px 0 0 28px; font-size: 28px; }
/* Фото ноутбука; экран сайта ложится на экран на фото (matrix3d считает RequestLaptop.astro). */
.request-laptop { position: relative; overflow: hidden; border-radius: 24px; transform: rotate(2deg);
  box-shadow: 0 40px 80px -24px rgba(0,0,0,.75), 0 0 0 6px rgba(255,255,255,.08); }
.request-laptop__photo { display: block; width: 100%; height: auto; }
.request-laptop__screen { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 8px 9px 9px; overflow: hidden; border-radius: 6px; background: var(--navy); transform-origin: 0 0; }
/* Стекло: лёгкий блик сверху слева, как на исходном снимке. */
.request-laptop__screen::after { content: ''; position: absolute; inset: 0; z-index: 5; background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.04) 45%, rgba(0,0,0,.08)); pointer-events: none; }
.request-laptop__head { display: flex; align-items: center; justify-content: space-between; }
.request-laptop__brand { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.02em; color: #fff; }
.request-laptop__brand span { color: var(--yellow); }
.request-laptop .world-map { position: relative; isolation: isolate; flex: none; overflow: hidden; border-radius: 6px; background: #071526; }
.request-laptop .world-map__sat { display: block; width: 100%; height: auto; filter: brightness(1.3); }
.request-laptop .world-map svg { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; }
.world-dot { fill: var(--navy); stroke: #FFC83D; stroke-width: 3.5; transition: fill .3s; }
.world-dot.is-visited { fill: #FFC83D; }
.world-pin { position: absolute; z-index: 3; white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 12px; box-shadow: 0 4px 10px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .3s; }
.world-pin.is-current { opacity: 1; animation: fj-pin-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes fj-pin-pop { from { scale: .6; } to { scale: 1; } }
.fj-anim .world-trip.is-playing .world-leg-reveal { stroke-dasharray: 1; stroke-dashoffset: 1; }
.fj-anim .world-trip.is-playing .world-plane { opacity: 0; transition: opacity .4s; }
.fj-anim .world-trip.is-playing .world-plane.is-flying { opacity: 1; }
.request-laptop__now { display: flex; align-items: center; gap: 6px; margin: 0; padding: 5px 9px; border-radius: 6px; background: #fff; color: var(--navy); font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.request-laptop__now b { display: grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 50%; background: #2E9B57; color: #fff; font-size: 9px; }
.chosen-destination { padding: 12px 16px; border: 1px solid #C8D2DD; border-radius: 12px; background: #fff; color: var(--ink); font-size: 14px; }

.contacts { margin-top: 40px; padding: clamp(24px, 4vw, 48px); border-radius: 36px; background: var(--navy-2); border: 1px solid var(--navy-line); }
.contacts h2 { margin-bottom: 14px; }
.contacts p { max-width: 840px; }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin: 24px 0; }
.contact-links > a:first-child { font-family: var(--display); font-size: 24px; font-weight: 700; color: #fff; text-decoration: none; }
.operator { margin-top: 20px; font-size: 13px; }

/* --- Популярные маршруты и подвал --- */
.popular-routes { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 96px; padding: 28px 0; border-top: 1px solid var(--navy-line); font-size: 13px; }
.popular-routes a { color: var(--text-muted); text-decoration: none; }
.popular-routes a:hover { color: var(--yellow); text-decoration: underline; }
.popular-routes__from { display: none; }
.popular-routes__title { flex-basis: 100%; margin-bottom: 4px; font-family: var(--hand); font-size: 24px; font-weight: 700; color: var(--yellow) !important; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 24px 0 40px; border-top: 1px solid var(--navy-line); font-size: 13px; color: var(--text-muted); }
.site-footer .brand { font-size: 16px; text-decoration: none; }
.site-footer a { text-underline-offset: 3px; }
/* PWA: кнопка установки в подвале (видна, только когда установка возможна) и подсказка для iPhone. */
.pwa-install { justify-self: start; padding: 8px 14px; border: 1px solid var(--yellow); border-radius: 999px; background: transparent; color: var(--yellow); font: 700 13px var(--body); cursor: pointer; }
.pwa-install:hover { background: var(--yellow); color: var(--navy); }
.pwa-hint { width: min(380px, calc(100% - 32px)); padding: 24px; border: 0; border-radius: 24px; background: #fff; color: var(--navy); text-align: center; }
.pwa-hint::backdrop { background: rgba(11,26,42,.6); }
.pwa-hint img { border-radius: 16px; }
.pwa-hint h2 { margin: 12px 0; font-size: 20px; color: var(--navy); }
.pwa-hint ol { margin: 0 0 20px; padding-left: 20px; display: grid; gap: 8px; text-align: left; font-size: 15px; }
/* Предложение включить уведомления о заявке (создаёт pwa.js после отправки формы). */
.pwa-push { position: fixed; z-index: 1000; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(420px, calc(100% - 32px)); padding: 18px 20px; border-radius: 20px; background: #fff; color: var(--navy); box-shadow: 0 12px 40px rgba(11,26,42,.35); font: 15px/1.45 var(--body); }
.pwa-push p { margin: 0 0 12px; }
.pwa-push div { display: flex; flex-wrap: wrap; gap: 8px; }
.pwa-push button { padding: 9px 16px; border: 1px solid var(--navy); border-radius: 999px; background: transparent; color: var(--navy); font: 700 14px var(--body); cursor: pointer; }
.pwa-push button.primary { border-color: var(--yellow); background: var(--yellow); }
.pwa-push button:disabled { opacity: .6; cursor: wait; }

/* --- Живость в духе Polarsteps (только при включённой анимации: класс fj-anim ставит скрипт главной) --- */
.fj-anim .postcard { animation: fj-deal .8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 140ms + 150ms); }
@keyframes fj-deal { from { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 40px)) rotate(0deg) scale(.82); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
.fj-anim .postcards__route { animation: fj-fade-in .8s ease 1s both; }
.fj-anim .stamp { animation: fj-stamp-in .45s cubic-bezier(.3, 1.6, .5, 1) 1.05s both, fj-stamp-sway 3.4s ease-in-out 1.6s infinite alternate; }
@keyframes fj-stamp-in { from { opacity: 0; transform: rotate(30deg) scale(1.9); } to { opacity: 1; transform: rotate(14deg) scale(1); } }
@keyframes fj-stamp-sway { from { transform: rotate(14deg); } to { transform: rotate(4deg) translateY(-3px); } }
@keyframes fj-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Виджеты поиска (поверх avia.css): самолётик разгоняется, взлетает и садится; подсказки городов — быстрее. */
.fj-avia .fj-wait__line { height: 48px; background-position: 0 calc(100% - 7px); }
/* Дорожка ожидания — на всю ширину листа. По горизонтали самолёт идёт одним плавным движением
   (left в процентах), по вертикали отдельная анимация: разбег, взлёт, полёт, снижение, посадка. */
.fj-avia .fj-wait__route { max-width: none; }
.fj-avia .fj-wait__plane:not(.fj-wait__train) { top: auto; bottom: 6px; left: 0; animation: fj-fly-x 11s ease-in-out infinite, fj-fly-y 11s linear infinite; }
@keyframes fj-fly-x { 0% { left: -24px; opacity: 0; } 5% { opacity: 1; } 94% { opacity: 1; } 100% { left: calc(100% + 4px); opacity: 0; } }
@keyframes fj-fly-y {
  0%, 20% { transform: translateY(0) rotate(0deg); animation-timing-function: ease-in; }
  34% { transform: translateY(-11px) rotate(-20deg); animation-timing-function: ease-out; }
  46% { transform: translateY(-20px) rotate(0deg); animation-timing-function: ease-in-out; }
  62% { transform: translateY(-19px) rotate(0deg); animation-timing-function: ease-in; }
  76% { transform: translateY(-9px) rotate(14deg); animation-timing-function: ease-out; }
  88%, 100% { transform: translateY(0) rotate(0deg); }
}
.fj-avia .fj-city__list:not([hidden]) { animation-duration: .08s; }
/* Поиск поездов: паровоз едет по рельсам, покачивается, из трубы назад уходит дым. */
.fj-avia .fj-wait--train .fj-wait__line { height: 48px; }
.fj-avia .fj-wait__train { top: auto; bottom: 4px; left: 0; color: var(--ink); animation: fj-ride 15s linear infinite; }
@keyframes fj-ride { from { left: -46px; } to { left: calc(100% + 4px); } }
.fj-avia .fj-wait__train svg { animation: fj-chug .32s ease-in-out infinite alternate; }
@keyframes fj-chug { from { transform: translateY(0); } to { transform: translateY(-1px); } }
.fj-smoke { position: absolute; left: 24px; top: -2px; width: 8px; height: 8px; border-radius: 50%; background: #9AA7B5; opacity: 0; animation: fj-puff 1.2s ease-out infinite; }
.fj-smoke:nth-of-type(2) { animation-delay: .4s; }
.fj-smoke:nth-of-type(3) { animation-delay: .8s; }
@keyframes fj-puff { 0% { opacity: .85; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(-16px, -16px) scale(1.8); } }

/* --- Широкие экраны: страница на всю ширину, крупнее первый экран --- */
@media (min-width: 1440px) {
  .hero { gap: 64px; padding-top: 80px; }
  .lead { font-size: 20px; max-width: 640px; }
  .quick-search label { padding: 12px 18px; }
  .quick-search button { min-height: 66px; font-size: 17px; }
  .postcards { height: 660px; }
  .postcard img { height: 205px; }
  .postcard--1 img { height: 225px; }
  .postcard--5 img { height: 190px; }
  .postcard--3 img { height: 165px; }
  .postcard figcaption { font-size: 32px; }
  .stamp { width: 124px; height: 124px; font-size: 15px; }
  .trip-promo { gap: 80px; }
  .collection-card { min-height: 440px; }
}

/* Планшет: «Как это работает» есть на главной — убираем из меню, чтобы шапка уместилась в одну строку. */
@media (min-width: 761px) and (max-width: 1100px) { .header-links .nav-how { display: none; } .header-links { gap: 4px 16px; } }

/* --- Телефон --- */
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  section { padding-top: 64px; }
  h1 { font-size: clamp(28px, 9.2vw, 40px); }
  .site-header { border-radius: 24px; padding: 12px 16px; }
  .fj-sheet, .fj-avia { padding: 8px; border-radius: 22px; }
  .fj-avia .fj-wait__plane:not(.fj-wait__train) { animation-duration: 5s, 5s; }
  .fj-avia .fj-wait__train { animation-duration: 7s; }
  /* Меню: без JS — «таблетки» в две строки, с JS — раскрывается кнопкой. */
  .site-header { gap: 8px; }
  .header-cta { min-height: 44px; margin-left: auto; padding: 0 16px; font-size: 14px; }
  .menu-toggle { display: block; }
  .header-links { order: 3; display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; padding: 8px 0 4px; font-size: 15px; }
  .header-links a { display: flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 16px; background: rgba(255,255,255,.06); color: #fff; }
  .header-links a[aria-current='page'] { box-shadow: inset 0 0 0 2px var(--yellow); }
  .fj-js .header-links { display: none; }
  .fj-js .site-header.is-open .header-links { display: grid; animation: fj-fade-in .2s ease both; }
  .hero { padding-top: 36px; gap: 24px; }
  .lead { font-size: 16px; }
  .postcards { height: 380px; }
  .postcard { padding: 8px 8px 34px; }
  /* В одну строку: перенос уводил начало подписи на фото, где её не видно. */
  .postcard figcaption { font-size: min(21px, 5vw); left: 10px; white-space: nowrap; }
  .postcard img { height: 100px; }
  .postcard--1 img { height: 110px; }
  .postcard--5 img { height: 92px; }
  .postcard--3 img { height: 86px; }
  .postcard--3 { left: 27%; width: 46%; }
  .stamp { right: 0; bottom: auto; top: 46%; }
  .stamp { width: 80px; height: 80px; font-size: 11px; }
  .trip-promo { gap: 32px; }
  .trip-phone { min-height: 560px; flex-basis: 100%; }
  .trip-phone__device { transform: scale(.86) rotate(-3deg); margin: -40px 0; }
  @keyframes fj-phone { from { transform: scale(.86) rotate(-3deg); } to { transform: scale(.86) rotate(-2deg) translateY(-8px); } }
  .service-hero { display: block; }
  .service-postcards { display: none; }
  .service-steps { grid-template-columns: 1fr; }
  .service-steps__more { padding: 18px; }
  .service-steps__more .button { width: 100%; }
  .collection-card, .col-card { min-height: 280px; border-radius: 22px; }
  .cta-band { padding: 28px 22px; border-radius: 24px; }
  .request, .contacts { border-radius: 24px; }
  .popular-routes { margin-top: 64px; gap: 8px; }
  .popular-routes__from { display: block; flex-basis: 100%; margin-bottom: 4px; color: var(--text-muted); }
  .popular-routes a:not(.popular-routes__title) { padding: 6px 12px; border: 1px solid var(--navy-line); border-radius: 999px; background: var(--navy-2); color: var(--text); }
  .popular-routes__prefix { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hero-path { padding: 18px; border-radius: 22px; }
  .hero-path__title { font-size: 22px; }
  .quick-search__tabs { gap: 4px; padding: 0 0 8px; }
  .quick-search__tabs a { flex: 1 0 auto; justify-content: center; min-height: 36px; padding: 0 8px; font-size: 13px; }
  .site-footer { display: grid; }
}
@media (max-width: 370px) {
  .brand { font-size: 20px; }
  .site-header { padding: 10px 10px 10px 14px; }
  .header-cta { padding: 0 14px; }
  .header-cta__more { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fj-avia .fj-wait__plane, .fj-avia .fj-wait__train svg, .fj-smoke, .collection-card:hover img, .col-card:hover img { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
/* Место под окна поиска до загрузки скрипта: блоки ниже не прыгают (ТЗ, TECH-04 / D-12; CLS на /avia/ был 0.28).
   Высоты — замер окон после загрузки, 31.10.2026 (412 и 1280 px). */
.fj-avia { min-height: 346px; }
#fj-insurance, #fj-tours { min-height: 435px; }
@media (max-width: 760px) {
  #fj-avia { min-height: 500px; }
  #fj-rail { min-height: 580px; }
  #fj-hotels { min-height: 375px; }
  #fj-insurance { min-height: 460px; }
  #fj-tours { min-height: 800px; }
}
