/* ==========================================================================
   flight-page.css — блоки коммерческой посадочной страницы полётов.
   Дополняет page.css, ничего в нём не переопределяет.

   Что переиспользуется из ваших стилей:
     .page, .page__lead, .page__hero, .page__tags, .btn-cta, .btn-cta-wrap,
     .inline-form, .related-services — берутся как есть из page.css.
   Что добавлено здесь:
     .page__section, .page__note, .page__crumbs (элементы блока .page),
     .facts, .actions, .tariffs, .extras, .steps, .places, .two-cols,
     .price-table, .promo, .reviews, .faq, .final-cta, .links-row,
     модификаторы .btn-cta--ghost / --sm / --block.

   Файл переиспользуемый: подключайте на /sochi-paraplan, /fly-chegem,
   /dz-southsky и других коммерческих страницах.

   Подключение: строку <link rel="stylesheet" href="/css/flight-page.css">
   лучше добавить в includes/header.php сразу после page.css. Пока она стоит
   в $page_head — модификаторы кнопок написаны с запасом по специфичности,
   поэтому работают при любом порядке загрузки.
   ========================================================================== */

:root {
    --fly-accent:      #e25c5c;  /* коралл — кнопки, как в btn-cta */
    --fly-accent-dark: #c94b4b;
    --fly-cyan:        #35b5cd;  /* циан — акценты, поля форм */
    --fly-teal:        #2d8a8e;  /* тил — заголовки h2 */
    --fly-ink:         #1e2b2e;
    --fly-muted:       #5f7276;
    --fly-line:        #dde9eb;
    --fly-soft:        #f3fafb;
    --fly-radius:      14px;
    --fly-shadow:      0 2px 12px rgba(30, 43, 46, .08);
}

.page img { max-width: 100%; height: auto; }
.page figcaption { margin-top: 10px; color: var(--fly-muted); font-size: 15px; }

/* --- Секции ------------------------------------------------------------- */
.page__section { margin: 48px 0; }
.page__section > h2 { margin-top: 0; }
.page__note { margin: 0 0 22px; color: var(--fly-muted); font-size: 15px; }

/* --- Хлебные крошки ----------------------------------------------------- */
.page__crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; font-size: 14px; color: var(--fly-muted); }
.page__crumbs li::after { content: "/"; margin-left: 8px; color: var(--fly-line); }
.page__crumbs li:last-child::after { content: ""; }
.page__crumbs a { color: var(--fly-muted); }

/* --- Первый экран ------------------------------------------------------- */
.hero-offer { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: center; margin-bottom: 44px; }
.hero-offer__media { margin: 0; }
.hero-offer__media img { border-radius: var(--fly-radius); display: block; width: 100%; }
.hero-offer__price { font-size: 15px; color: var(--fly-muted); margin: 0 0 20px; }
.hero-offer__price b { color: var(--fly-ink); font-size: 22px; }
.hero-offer__contacts { display: flex; gap: 10px; align-items: center; margin: 16px 0 0; font-size: 15px; color: var(--fly-muted); }

.facts { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.facts li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.4; }
.facts li::before { content: ""; position: absolute; left: 0; top: .35em; width: 14px; height: 8px; border-left: 2px solid var(--fly-cyan); border-bottom: 2px solid var(--fly-cyan); transform: rotate(-45deg); }

/* --- Кнопки: модификаторы к вашему .btn-cta ----------------------------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.page .btn-cta--ghost { background: #fff; color: var(--fly-teal); border: 2px solid var(--fly-line); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.page .btn-cta--ghost:hover { border-color: var(--fly-cyan); color: var(--fly-cyan); background: #fff; }
.page .btn-cta--sm { padding: 11px 20px; font-size: 15px; }
.page .btn-cta--block { width: 100%; }
.page .btn-cta:focus-visible,
.faq summary:focus-visible { outline: 3px solid var(--fly-cyan); outline-offset: 2px; }

/* --- Тарифы ------------------------------------------------------------- */
.tariffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.tariff { position: relative; display: flex; flex-direction: column; border: 1px solid var(--fly-line); border-radius: var(--fly-radius); padding: 22px 20px 20px; background: #fff; box-shadow: var(--fly-shadow); }
.tariff--best { border-color: var(--fly-accent); box-shadow: 0 4px 18px rgba(226, 92, 92, .16); }
.tariff__badge { position: absolute; top: -11px; left: 20px; background: var(--fly-accent); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.tariff__name { margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.tariff__time { margin: 0 0 14px; color: var(--fly-muted); font-size: 15px; }

/* «Шкала воздуха»: длина полосы пропорциональна минутам в полёте */
.tariff__bar { height: 6px; border-radius: 3px; background: var(--fly-soft); margin: 0 0 16px; overflow: hidden; }
.tariff__bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--fly-cyan), var(--fly-teal)); }

.tariff__price { font-size: 28px; font-weight: 700; line-height: 1; margin: 0 0 16px; }
.page .tariff__list { list-style: none; margin: 0 0 20px; padding: 0; font-size: 15px; line-height: 1.5; flex-grow: 1; }
.tariff__list li { position: relative; padding-left: 20px; margin-bottom: 7px; }
.tariff__list li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 7px; height: 7px; border-radius: 50%; background: var(--fly-cyan); }

/* --- Доп. услуги -------------------------------------------------------- */
.page .extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; }
.extras li { border: 1px solid var(--fly-line); border-radius: 12px; padding: 16px 18px; background: var(--fly-soft); }
.extras b { display: block; font-size: 16px; margin-bottom: 4px; }
.extras span { color: var(--fly-muted); font-size: 14px; }
.extras em { display: block; margin-top: 8px; font-style: normal; font-weight: 700; color: var(--fly-teal); font-size: 17px; }

/* --- Как проходит полёт ------------------------------------------------- */
.page .steps { list-style: none; counter-reset: fly-step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.steps li { counter-increment: fly-step; padding-top: 42px; position: relative; font-size: 15px; line-height: 1.55; color: var(--fly-muted); }
.steps li::before { content: counter(fly-step); position: absolute; top: 0; left: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--fly-teal); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.steps b { display: block; color: var(--fly-ink); font-size: 16px; margin-bottom: 5px; }

/* --- Площадки ----------------------------------------------------------- */
.page .places { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
.places li { border-left: 3px solid var(--fly-cyan); padding: 4px 0 4px 16px; }
.places b { display: block; font-size: 17px; margin-bottom: 4px; }
.places span { color: var(--fly-muted); font-size: 15px; line-height: 1.5; }

/* --- Две колонки -------------------------------------------------------- */
.two-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.two-cols h3 { margin: 0 0 12px; font-size: 19px; }
.two-cols ul { margin: 0; padding-left: 20px; line-height: 1.6; }
.two-cols li { margin-bottom: 8px; }

/* --- Таблица цен -------------------------------------------------------- */
.price-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.price-table th, .price-table td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--fly-line); }
.price-table th { background: var(--fly-soft); font-weight: 600; color: var(--fly-teal); }
.price-table td:last-child, .price-table th:last-child { text-align: right; white-space: nowrap; }
.price-table tr:last-child td { border-bottom: 0; }

/* --- Врезка (сертификат) ------------------------------------------------ */
.promo { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; background: var(--fly-soft); border: 1px solid var(--fly-line); border-radius: var(--fly-radius); padding: 26px 28px; }
.promo h2 { margin: 0 0 8px; }
.promo p { margin: 0; color: var(--fly-muted); }

/* --- Отзывы ------------------------------------------------------------- */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.review { border: 1px solid var(--fly-line); border-radius: var(--fly-radius); padding: 20px; background: #fff; }
.review__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.review__name { font-weight: 700; }
.review__date { color: var(--fly-muted); font-size: 14px; }
.review__stars { color: #f0a020; letter-spacing: 2px; font-size: 15px; margin-bottom: 8px; }
.review p { margin: 0; font-size: 15px; line-height: 1.55; }

/* --- FAQ: нативный аккордеон, без JS ------------------------------------ */
.faq details { border-bottom: 1px solid var(--fly-line); }
.faq details[open] summary { color: var(--fly-teal); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-size: 17px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 24px; width: 10px; height: 10px; border-right: 2px solid var(--fly-cyan); border-bottom: 2px solid var(--fly-cyan); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq__answer { padding: 0 0 18px; margin: 0; color: var(--fly-muted); line-height: 1.6; font-size: 16px; }
.faq__answer p { margin: 0 0 10px; }
.faq__answer p:last-child { margin-bottom: 0; }

/* --- Финальный CTA ------------------------------------------------------ */
.final-cta { background: var(--fly-teal); color: #fff; border-radius: var(--fly-radius); padding: 34px 32px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.final-cta h2 { margin: 0 0 8px; color: #fff; }
.final-cta p { margin: 0; opacity: .9; }
.page .final-cta .btn-cta--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.page .final-cta .btn-cta--ghost:hover { border-color: #fff; color: #fff; background: transparent; }

/* --- Перелинковка ------------------------------------------------------- */
.page .links-row { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.links-row a { display: inline-block; padding: 9px 16px; border: 1px solid var(--fly-line); border-radius: 999px; text-decoration: none; color: var(--fly-teal); font-size: 15px; transition: border-color .18s, background-color .18s; }
.links-row a:hover { border-color: var(--fly-cyan); background: var(--fly-soft); }

/* --- Адаптив ------------------------------------------------------------ */
@media (max-width: 860px) {
    .hero-offer { grid-template-columns: 1fr; gap: 22px; }
    /* Фото идёт после текста: на телефоне цена и кнопка должны попадать
       в первый экран без прокрутки — 83 % показов страницы мобильные. */
    .promo, .final-cta { grid-template-columns: 1fr; }
    .page__section { margin: 36px 0; }
}

@media (max-width: 520px) {
    .facts { grid-template-columns: 1fr; }
    .actions .btn-cta { width: 100%; }
    .price-table th, .price-table td { padding: 11px 10px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .page * { transition: none !important; animation: none !important; }
}
