:root {
  --ink: #081432;
  --muted: #657089;
  --line: #e3e8f1;
  --teal: #b0cf3e;
  --teal-dark: #98ab49;
  --bg: #ffffff;
  --shadow: 0 2px 4px rgba(8, 20, 50, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  /* Резервируем место под вертикальный скроллбар всегда — чтобы при открытии модалки
     (body overflow:hidden убирает скроллбар) страница не сдвигалась вправо. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  color: var(--ink);
  /* Фон намеренно прозрачный: непрозрачный фон body перекрыл бы небесный слой .sky (z-index:-1).
     Белый fallback остаётся на html. */
  background: transparent;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body.modal-open {
  overflow: hidden;
}

/* ─── Фоновое «небо»: облака-картинки (public/img/cloud1-4.jpg) плывут сверху вниз ─── */
/* Слой лежит за всем контентом (z-index:-1), карточки/шапка непрозрачны и остаются поверх.
   Облака создаёт скрипт в layout: случайная картинка, случайное место по горизонтали,
   случайные размер и скорость. */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: #fff;
}

/* Одно облако. Позицию/размер/картинку/скорость задаёт JS.
   mix-blend-mode: multiply — белый фон JPG сливается с белым небом, видны только облака. */
.sky-cloud {
  position: absolute;
  top: 0;
  left: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  mix-blend-mode: multiply;
  opacity: 0.8; /* даже полностью проявленное облако на 20% прозрачно (посветлее) */
  /* Радиальная маска растворяет прямоугольные края JPG — виден только мягкий «клуб». */
  -webkit-mask-image: radial-gradient(ellipse at center, #000 52%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, #000 52%, transparent 80%);
  will-change: transform;
  animation: cloud-fall linear forwards;
}

/* Проезд сверху вниз: старт над экраном, финиш под ним (JS задаёт длительность).
   Облако плавно проявляется в начале и растворяется в конце — без резкого появления. */
@keyframes cloud-fall {
  0%   { transform: translateY(-35vh); opacity: 0; }
  14%  { opacity: 0.8; }
  86%  { opacity: 0.8; }
  100% { transform: translateY(135vh); opacity: 0; }
}

/* Уважаем «меньше движения»: облака не плывут (скрипт раскладывает их статично). */
@media (prefers-reduced-motion: reduce) {
  .sky-cloud { animation: none; }
}

button,
a {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

.header {
  padding: 0 32px;
  /* Фон прозрачный — сквозь шапку видно небесный слой .sky. */
  background: transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  height: 136px;
  max-width: 1476px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 230px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0;
}

.logo-mark {
  display: inline-block;
  width: 64px;
  height: 64px;
  padding: 12px;
  border-radius: 16px;
  background: var(--teal);
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 61px;
  flex: 1 1 auto;
  padding-left: 235px;
  font-size: 22px;
  font-weight: 500;
}

.nav a {
  white-space: nowrap;
}

.profile {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: 70px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.profile svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page {
  padding: 27px 32px 58px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: flex-start;
  max-width: 1476px;
  margin: 0 auto;
}

.filter-block {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.filter-label {
  padding-left: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(8, 20, 50, 0.03);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.05;
  white-space: nowrap;
}

.chip svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.chip.active {
  color: #fff;
  border-color: transparent;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.18), transparent 46%),
    linear-gradient(135deg, var(--teal), var(--teal-dark));
  box-shadow: 0 16px 30px rgba(5, 185, 166, 0.24);
}

.deals {
  max-width: 1476px;
  margin: 40px auto 0;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 74px;
  margin-bottom: 22px;
}

h1 {
  margin: 7px 0 0;
  font-family: Manrope, Inter, "Segoe UI", Arial, sans-serif;
  font-size: 31px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: 168px;
  height: 64px;
  margin-right: 1px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #535f79;
  background: #fff;
  font-size: 19px;
  font-weight: 400;
}

.filter-btn svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sort {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.sort-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 15px;
  border-radius: 9px;
  color: #535f79;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.sort-btn svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sort-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
}

.tickets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.ticket-wrap {
  /* drop-shadow follows the masked (notched) silhouette, unlike box-shadow */
  filter: drop-shadow(var(--shadow));
}

.ticket {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  width: 100%;
  min-height: 190px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  overflow: hidden;
  /* two real cut-outs punched on the fold line (top & bottom edges) */
  -webkit-mask:
    radial-gradient(circle 14px at calc(100% - 124px) 0, #0000 13px, #000 14px),
    radial-gradient(circle 14px at calc(100% - 124px) 100%, #0000 13px, #000 14px);
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle 14px at calc(100% - 124px) 0, #0000 13px, #000 14px),
    radial-gradient(circle 14px at calc(100% - 124px) 100%, #0000 13px, #000 14px);
  mask-composite: intersect;
}

.ticket-main {
  position: relative;
  min-width: 0;
  padding: 30px 20px 22px 24px;
  background: #fff;
}

.ticket-main::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  z-index: 2;
  height: 100%;
  border-right: 2px dashed #d8dde8;
}

.route {
  display: grid;
  /* Самолёт всегда по центру билета (равные 1fr слева/справа); коды и города — по строкам. */
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  align-items: start;
  column-gap: 10px;
}

.route .from-code { grid-column: 1; grid-row: 1; justify-self: start; }
.route .plane     { grid-column: 2; grid-row: 1; justify-self: center; }
.route .to-code   { grid-column: 3; grid-row: 1; justify-self: start; }

/* Город отправления — от левого края до конца значка самолёта, дальше перенос. */
.route .from-city { grid-column: 1 / 3; grid-row: 2; }

/* Город назначения — на всю ширину до пунктирной линии, дальше перенос.
   Правый padding ticket-main (20px) съедаем отрицательным margin, чтобы блок
   доходил ровно до линии (.ticket-main::after), а не до края content-box. */
.route .to-city   { grid-column: 3;     grid-row: 2; margin-right: -20px; padding-right: 4px; }

.route strong {
  display: block;
  font-family: Manrope, Inter, "Segoe UI", Arial, sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.route span {
  display: block;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.1;
  /* Длинные названия городов переносим по слогам с дефисом (нужен lang="ru" на <html>),
     а не по одной букве. break-word — страховка для слов, что не влезают даже с переносом. */
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}

.plane {
  width: 27px;
  height: 27px;
  margin-top: -2px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(4deg);
}

.date {
  margin: 28px 0 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
}

.date span + span::before {
  content: " · ";
  color: #8a93a8;
}

.trip-duration {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.2;
}

.trip-duration strong {
  font-weight: 800;
}

.modal-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.modal-climate {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
}

.modal-climate span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.climate-air {
  color: #e8730c;
}

.climate-water {
  color: #0a89c7;
}

.modal-climate svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.modal-visa {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.modal-visa svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.modal-visa.visa-free {
  color: #1a7f4b;
  background: #e3f6ea;
}

.modal-visa.visa-arrival,
.modal-visa.visa-evisa {
  color: #b06a00;
  background: #fdf1dd;
}

.modal-visa.visa-required {
  color: #b3401a;
  background: #fce6df;
}

.modal-visa.visa-closed {
  color: #8a1c1c;
  background: #f6dede;
}

.ticket-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 30px 12px 22px;
}

.modal-flight-card {
  margin-top: 26px;
  padding: 26px 24px 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(8, 20, 50, 0.10);
}

.modal-flight-top {
  display: grid;
  gap: 18px;
  align-items: start;
}

.modal-flight-summary {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.modal-flight-price {
  font-family: Manrope, Inter, "Segoe UI", Arial, sans-serif;
  font-size: 29px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.modal-flight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.modal-flight-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  color: #535f79;
  background: #edf1f6;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.modal-flight-legs {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.flight-segment {
  display: grid;
  grid-template-columns: 32px minmax(78px, 0.58fr) minmax(150px, 1.35fr) minmax(78px, 0.58fr) 36px;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.segment-carrier,
.segment-pin,
.airline-fallback {
  display: grid;
  place-items: center;
}

.segment-carrier {
  width: 32px;
  height: 32px;
}

.airline-logo {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eef2f7;
  object-fit: contain;
}

.airline-fallback {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #4e6c9b;
  background: #e8eef8;
}

.airline-fallback svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.segment-point {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.segment-point strong {
  overflow: hidden;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-point span,
.segment-point small {
  overflow: hidden;
  color: #7c879a;
  font-size: 14px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-point small {
  color: #8994a6;
}

.segment-point-end {
  text-align: right;
}

.segment-path {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.segment-meta {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  gap: 8px;
  align-items: center;
  color: #8a94a5;
}

.segment-meta svg {
  width: 17px;
  height: 17px;
  justify-self: center;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
}

.segment-meta span {
  overflow: hidden;
  color: #8a94a5;
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-track {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
}

/* Линия делится на (пересадки + 1) отрезков; между ними — точки-стыковки. */
.segment-track-line {
  flex: 1 1 0;
  height: 4px;
  border-radius: 999px;
  background: #d5dbe4;
}

.segment-stop {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 2px solid #0077ff;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.segment-airports {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.segment-airports strong {
  overflow: hidden;
  color: #0077ff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-pin {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #243044;
  background: #f1f4f8;
}

.segment-pin svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.deal-modal[hidden] {
  display: none;
}

.deal-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
}

.deal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 50, 0.46);
}

.deal-modal-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(780px, calc(100vh - 56px));
  padding: 30px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(8, 20, 50, 0.22);
  overflow: auto;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.modal-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.modal-selected {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  padding-right: 54px;
}

.modal-destination {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-flag {
  flex: 0 0 auto;
  display: block;
  width: 46px;
  height: 31px;
  border-radius: 5px;
  background: #eef2f7;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(8, 20, 50, 0.12);
}

.modal-kicker {
  margin: 0;
  color: #657089;
  font-size: 15px;
  line-height: 1;
}

.modal-selected h2 {
  margin: 0;
  font-family: Manrope, Inter, "Segoe UI", Arial, sans-serif;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

.modal-date {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.2;
}

.modal-nights {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.modal-price {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.modal-price strong {
  font-family: Manrope, Inter, "Segoe UI", Arial, sans-serif;
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
}

.modal-price a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.price-check-status {
  color: #657089;
  font-size: 13px;
  line-height: 1.25;
  text-align: right;
}

.price-refresh {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #535f79;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.price-refresh:disabled {
  color: #a8b0c2;
  cursor: default;
}

.modal-price svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.modal-variants {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.modal-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.modal-section-title h3 {
  margin: 0;
  font-family: Manrope, Inter, "Segoe UI", Arial, sans-serif;
  font-size: 22px;
  line-height: 1.15;
}

.variant-sort {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.variant-sort button {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: #535f79;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.variant-sort button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
}

.variant-list {
  display: grid;
  gap: 10px;
}

.variant-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.variant-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto 22px;
  gap: 18px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 14px 16px;
  border: 0;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.variant-row:hover {
  background: #f6f9fd;
}

.variant-chevron {
  width: 20px;
  height: 20px;
  color: #8994a6;
  transition: transform 0.2s ease;
}

.variant-row[aria-expanded="true"] .variant-chevron {
  transform: rotate(180deg);
}

.variant-details {
  min-width: 0;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--line);
}

.variant-details:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.variant-climate {
  display: flex;
}

.variant-climate:empty {
  display: none;
}

.variant-climate .modal-climate {
  font-size: 22px;
}

.variant-climate .modal-climate svg {
  width: 20px;
  height: 20px;
}

.variant-details .modal-flight-legs {
  width: 100%;
  min-width: 0;
  margin-top: 16px;
}

.variant-details .flight-segment {
  width: 100%;
}

.variant-cta {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
  margin-top: 18px;
  padding: 11px 18px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.variant-cta svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.variant-route,
.variant-date {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.variant-route strong,
.variant-date strong {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variant-route small,
.variant-date small {
  color: #657089;
  font-size: 13px;
  line-height: 1;
}

.variant-price {
  font-family: Manrope, Inter, "Segoe UI", Arial, sans-serif;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.side-blue {
  background: linear-gradient(135deg, #fff 0%, #eef5ff 100%);
}

.side-pink {
  background: linear-gradient(135deg, #fff 0%, #ffeef4 100%);
}

.side-peach {
  background: linear-gradient(135deg, #fff 0%, #fff0ec 100%);
}

.side-cream {
  background: linear-gradient(135deg, #fff 0%, #fff8f2 100%);
}

.flag {
  position: relative;
  display: block;
  width: 56px;
  height: 38px;
  border-radius: 5px;
  background: #eef2f7;
  object-fit: cover;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(8, 20, 50, 0.12);
}

.flag-placeholder {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 48%),
    #eef2f7;
}

.country {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1;
  text-align: center;
}

.price {
  margin-top: 26px;
  font-family: Manrope, Inter, "Segoe UI", Arial, sans-serif;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.page-link,
.page-gap {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border-radius: 10px;
  color: #535f79;
  font-size: 17px;
  font-weight: 600;
}

.page-link {
  border: 1px solid var(--line);
  background: #fff;
}

.page-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.page-link.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
}

.page-link.disabled {
  color: #a8b0c2;
  pointer-events: none;
}

.page-gap {
  min-width: 28px;
  color: #8a93a8;
}

@media (max-width: 1320px) {
  .header-inner {
    height: auto;
    min-height: 112px;
    padding: 24px 0;
  }

  .nav {
    gap: 34px;
    padding-left: 80px;
  }

  .profile {
    margin-left: 36px;
  }

  .tickets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .header {
    padding: 0 18px;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 24px;
  }

  .logo {
    min-width: 0;
  }

  .nav {
    order: 3;
    justify-content: flex-start;
    width: 100%;
    padding-left: 0;
    overflow-x: auto;
  }

  .profile {
    margin-left: auto;
  }

  .page {
    padding: 22px 18px 42px;
  }

  .filter-bar {
    gap: 14px 18px;
  }

  .filter-chips {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .title-row {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 20px;
  }

  .sort {
    max-width: 100%;
    overflow-x: auto;
  }

  h1 {
    margin-left: 0;
    font-size: 30px;
  }

  .filter-btn {
    width: 100%;
    margin: 0;
  }

  .tickets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deal-modal {
    padding: 18px;
  }

  .deal-modal-panel {
    max-height: calc(100vh - 36px);
    padding: 24px;
  }

  .modal-selected {
    grid-template-columns: 1fr;
    padding-right: 48px;
  }

  .modal-price {
    justify-items: start;
  }

  .variant-row {
    grid-template-columns: 1fr 22px;
    gap: 12px 14px;
  }

  .variant-route,
  .variant-date,
  .variant-price {
    grid-column: 1;
  }

  .variant-chevron {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
  }
}

@media (max-width: 520px) {
  .sort {
    width: 100%;
  }

  .sort-btn {
    flex: 1 0 auto;
    justify-content: center;
    padding: 0 16px;
    font-size: 16px;
  }

  .tickets {
    grid-template-columns: 1fr;
  }

  .header {
    padding: 0 18px;
  }

  .logo {
    gap: 10px;
    font-size: 32px;
  }

  .logo-mark {
    width: 52px;
    height: 52px;
    padding: 10px;
    border-radius: 13px;
  }

  .nav {
    gap: 22px;
    font-size: 18px;
  }

  .modal-flight-card {
    padding: 20px 18px 16px;
    border-radius: 20px;
  }

  .modal-flight-top {
    gap: 14px;
  }

  .modal-flight-price {
    font-size: 27px;
  }

  .flight-segment {
    grid-template-columns: 30px minmax(62px, 0.7fr) minmax(108px, 1fr) minmax(62px, 0.7fr);
    gap: 8px;
  }

  .segment-pin {
    display: none;
  }

  .segment-point strong {
    font-size: 19px;
  }

  .segment-point span,
  .segment-point small {
    font-size: 12px;
  }

  .segment-meta {
    grid-template-columns: 18px minmax(0, 1fr) 18px;
    gap: 4px;
  }

  .segment-meta span {
    font-size: 11px;
  }

  .segment-airports strong {
    font-size: 11px;
  }

  .route strong {
    font-size: 24px;
  }

  .route span,
  .country {
    font-size: 14px;
  }

  .plane {
    width: 25px;
    height: 25px;
  }

  .date {
    margin-top: 18px;
    font-size: 15px;
  }

  .flag {
    width: 48px;
    height: 38px;
  }

  .price {
    margin-top: 24px;
    font-size: 20px;
  }

  .modal-selected h2 {
    font-size: 28px;
  }

  .modal-climate {
    font-size: 28px;
  }

  .modal-climate svg {
    width: 24px;
    height: 24px;
  }

  .modal-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .variant-details {
    padding: 12px 10px 14px;
  }

  .variant-details .modal-flight-legs {
    gap: 14px;
    margin-top: 12px;
  }

  .variant-details .flight-segment {
    grid-template-columns: 26px minmax(42px, 0.72fr) minmax(66px, 1fr) minmax(42px, 0.72fr);
    gap: 6px;
  }

  .variant-details .segment-carrier {
    width: 26px;
    height: 26px;
  }

  .variant-details .airline-logo,
  .variant-details .airline-fallback {
    width: 24px;
    height: 24px;
  }

  .variant-details .segment-point strong {
    font-size: 17px;
  }

  .variant-details .segment-point span,
  .variant-details .segment-point small,
  .variant-details .segment-meta span,
  .variant-details .segment-airports strong {
    font-size: 10px;
  }

}

/* --- Футер ------------------------------------------------------------- */
.footer {
  margin-top: 40px;
  padding: 40px 32px;
  border-top: 1px solid var(--line);
  background: #fafbfd;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px 40px;
  max-width: 1476px;
  margin: 0 auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 28px;
  font-weight: 800;
}

.footer-logo-mark {
  width: 44px;
  height: 44px;
  padding: 9px;
  border-radius: 12px;
  background: var(--teal);
  object-fit: contain;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  justify-content: center;
  font-size: 17px;
  font-weight: 500;
}

.footer-nav a {
  color: var(--ink);
}

.footer-nav a:hover {
  color: var(--teal-dark);
}

/* Кнопка-CTA на Telegram-канал (третья колонка футера, фирменный синий Telegram). */
.footer-telegram {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: #229ed9;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(34, 158, 217, 0.28);
  transition: background 0.15s ease, transform 0.15s ease;
}

.footer-telegram:hover {
  background: #1c8dc2;
  color: #fff;
  transform: translateY(-1px);
}

.footer-telegram i {
  width: 18px;
  height: 18px;
}

.footer-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.footer-copy {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Сквозная SEO-перелинковка в футере (страны + месяцы). */
.footer-seo {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer-seo-col h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.footer-seo-col ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-seo-col a {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.footer-seo-col a:hover {
  color: var(--teal-dark);
}

/* Контентная перелинковка на главной (карточки хабов стран/месяцев). */
.seo-hub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 1476px;
  margin: 20px auto 0;
}

/* Без карточки: блоки перелинковки сливаются с фоном страницы (фон не нужен). */
.seo-hub-block {
  padding: 0;
}

.seo-hub-block h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
}

.seo-hub-block p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: #2a3350;
}

.seo-hub-block a {
  color: var(--teal-dark);
  white-space: nowrap;
}

.seo-hub-block a:hover {
  text-decoration: underline;
}

/* Редакторский SEO-текст посадочной (страна/месяц/бюджет). */
/* Без карточки: левый край блока совпадает с листингом (max-width 1476 + auto),
   а текст внутри ограничен читаемой шириной и остаётся слева. */
.landing-article {
  max-width: 1476px;
  margin: 20px auto 0;
}

.landing-article > * {
  max-width: 900px;
}

.landing-article h2 {
  margin: 24px 0 12px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.landing-article h2:first-child {
  margin-top: 0;
}

.landing-article p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.65;
  color: #2a3350;
}

.landing-article ul {
  margin: 0;
  padding-left: 22px;
}

.landing-article li {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.6;
  color: #2a3350;
}

@media (max-width: 760px) {
  .footer-seo,
  .seo-hub {
    grid-template-columns: 1fr;
  }
}

/* --- Информационные страницы (FAQ, о компании) ------------------------- */
.info-page {
  max-width: 760px;
  margin: 0 auto;
}

.info-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  /* Тот же max-width, что у листинга/заголовка — левый край крошек совпадает с заголовком.
     На узких контейнерах (.info-page 760, .ticket-page) ограничивает уже родитель. */
  max-width: 1476px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 14px;
}

.info-breadcrumbs a {
  color: var(--muted);
}

.info-breadcrumbs a:hover {
  color: var(--teal-dark);
}

.info-title {
  margin: 0 0 14px;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
}

.info-lead {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.faq-item {
  margin-bottom: 28px;
}

.faq-item h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
}

.faq-item p {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.6;
}

.faq-item ul {
  margin: 0 0 10px;
  padding-left: 22px;
}

.faq-item li {
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 1.6;
}

.info-cta {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.6;
}

.info-cta a,
.faq-item a {
  color: var(--teal-dark);
  font-weight: 500;
}

.info-cta a:hover,
.faq-item a:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .footer {
    padding: 32px 18px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-note {
    text-align: center;
  }

  .info-title {
    font-size: 30px;
  }

  .info-lead {
    font-size: 17px;
  }
}

/* --- Страница конкретного билета (/bilet/ORIGIN-DEST) ------------------------ */

.ticket-page {
  max-width: 960px;
  margin: 0 auto;
}

/* Карточки-блоки страницы билета (переиспуем оформление карточки перелёта). */
.ticket-hero,
.ticket-intro,
.ticket-hotels,
.ticket-page .modal-variants {
  margin-top: 20px;
  padding: 26px 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(8, 20, 50, 0.10);
}

/* Вводный текстовый блок маршрутной страницы (SEO-контент из данных). */
.ticket-intro p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.55;
  color: #2a3350;
}

.ticket-intro p:last-child {
  margin-bottom: 0;
}

/* Верхний intro посадочных (страна/месяц/бюджет) — без карточки, но с прежними отступами
   (padding наследуется от .ticket-intro). Не трогает .ticket-intro на /bilet/ и /aviabilety/. */
.country-intro,
.seasonal-intro,
.budget-intro {
  background: none;
  box-shadow: none;
}

/* «Уложиться в бюджет» на главной — перечень ссылок без карточки (переопределяет .ticket-intro). */
.budget-landings {
  max-width: 1476px;
  margin: 20px auto 0;
  padding: 0;
  background: none;
  box-shadow: none;
}

/* Суммы — кликабельные ссылки, зелёные как перелинковка ниже. */
.budget-landings a {
  color: var(--teal-dark);
  white-space: nowrap;
}

.budget-landings a:hover {
  text-decoration: underline;
}

.ticket-hero {
  margin-top: 6px;
}

/* На странице нет кнопки закрытия — снимаем зарезервированный под неё отступ. */
.ticket-hero .modal-selected {
  padding-right: 0;
}

/* Заголовок города — как h2 в модалке, но это h1 страницы. */
.ticket-city {
  margin: 0;
  font-family: Manrope, Inter, "Segoe UI", Arial, sans-serif;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

/* Варианты на странице — своя белая карточка, без верхней линии-разделителя модалки. */
.ticket-page .modal-variants {
  border-top: 0;
}

/* Плашка состояния билета (актуальность/даты/цена). */
.ticket-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.45;
}

.ticket-banner svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ticket-banner-gone {
  color: #8a3b12;
  background: #fdeee3;
}

.ticket-banner-dates {
  color: #8a5a12;
  background: #fdf5e3;
}

.ticket-banner-price {
  color: #1f6b4d;
  background: #e5f6ee;
}

/* Блок гостиниц. */
.ticket-hotels-sub {
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 16px;
}

.ticket-hotels-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  font-size: 16px;
  font-weight: 700;
}

.ticket-hotels-cta svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  .ticket-hero,
  .ticket-hotels,
  .ticket-page .modal-variants {
    padding: 20px 16px;
  }

  .ticket-city {
    font-size: 27px;
  }

  .ticket-hotels-cta {
    width: 100%;
    justify-content: center;
  }
}
