/* Flymundus design system
   Deliberately distinct from Farefinda (blue #2563EB) so the two sites don't read
   as the same operator: deep navy ink + teal brand + amber accent. */

:root {
  --ink:        #0B1B2B;
  --ink-2:      #1E3348;
  --muted:      #5B7086;
  --line:       #E3E9EF;
  --bg:         #FFFFFF;
  --bg-soft:    #F5F8FA;
  --brand:      #0D9488;
  --brand-dark: #0F766E;
  --brand-soft: #E6F5F3;
  --accent:     #F59E0B;
  --danger:     #DC2626;

  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 1px 2px rgba(11,27,43,.04), 0 8px 24px rgba(11,27,43,.06);
  --shadow-lg: 0 12px 40px rgba(11,27,43,.14);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { margin: 0 0 1em; }
a  { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section   { padding: 56px 0; }
.section--soft { background: var(--bg-soft); }
.lede { font-size: 1.05rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--ink);
  color: #fff;
  padding: 14px 0;
  position: relative;
  z-index: 50;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -.03em;
}
.logo:hover { text-decoration: none; }
.logo svg { width: 26px; height: 26px; color: var(--brand); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: rgba(255,255,255,.86); font-size: .9rem; font-weight: 500; }
.nav a:hover { color: #fff; text-decoration: none; }

/* ── Cards + link blocks ─────────────────────────────────────────────────── */
.grid { display: grid; gap: 14px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.card {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover { border-color: #C8D4DE; box-shadow: var(--shadow); text-decoration: none; transform: translateY(-1px); }
.card__route { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.card__route svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
.card__meta { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.card__price { margin-top: 10px; font-size: 1.15rem; font-weight: 800; color: var(--brand-dark); }
.card__price small { font-size: .72rem; font-weight: 600; color: var(--muted); display: block; }

.linklist { columns: 4 200px; column-gap: 26px; font-size: .88rem; }
.linklist a { display: block; padding: 4px 0; color: var(--ink-2); break-inside: avoid; }
.linklist a:hover { color: var(--brand-dark); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 11px 15px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td.is-cheapest { color: var(--brand-dark); font-weight: 700; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 18px; margin-bottom: 9px; background: #fff;
}
.faq summary { font-weight: 650; cursor: pointer; list-style: none; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--muted); font-weight: 400; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details[open] summary { margin-bottom: 9px; }
.faq p { margin: 0; color: var(--ink-2); font-size: .93rem; }

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumb { font-size: .82rem; color: var(--muted); padding: 14px 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand-dark); }
.breadcrumb span { margin: 0 7px; opacity: .5; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding: 46px 0 26px; margin-top: 60px; font-size: .88rem; }
.site-footer h4 { color: #fff; font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 12px; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: #fff; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { padding: 3px 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .8rem;
}
.disclosure { font-size: .78rem; color: rgba(255,255,255,.5); max-width: 70ch; margin-top: 8px; }

/* ── Results page (White Label host) ─────────────────────────────────────── */
.tpwl-search-header { background: var(--ink); padding: 14px 0; position: sticky; top: 0; z-index: 40; }
.results-main { min-height: 60vh; padding: 22px 0 50px; }
#tpwl-tickets { min-height: 300px; }
.results-loading { text-align: center; padding: 60px 20px; color: var(--muted); }
.results-loading .spinner {
  width: 34px; height: 34px; margin: 0 auto 16px;
  border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .section { padding: 40px 0; }
  .nav { gap: 14px; }
  .linklist { columns: 2 140px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO — full-bleed photo banner (Travelpayouts city imagery), dark scrim,
   search form sitting on top. Modelled on FareArena's hero.
   ═══════════════════════════════════════════════════════════════════════════ */
.hero { position: relative; padding: 64px 0 84px; color: #fff; overflow: hidden; background: var(--ink); }
.hero__media {
  position: absolute; inset: 0;
  background-image: var(--hero-img);
  background-size: cover; background-position: center;
  /* Dimmed for text contrast, but full colour — greyscale is reserved for the
     airline logo strip only. */
  filter: brightness(.66);
  transform: scale(1.03);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,27,43,.72) 0%, rgba(11,27,43,.55) 45%, rgba(11,27,43,.86) 100%);
}
.hero__inner { position: relative; z-index: 2; }
.hero__title { color: #fff; font-size: clamp(1.9rem, 4.4vw, 3rem); max-width: 18ch; margin-bottom: .35em; text-shadow: 0 2px 24px rgba(0,0,0,.3); }
.hero__sub { color: rgba(255,255,255,.85); max-width: 54ch; font-size: 1.05rem; margin-bottom: 26px; }

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH FORM — one row: [from ⇄ to] [depart] [return] [travellers] [search]
   ═══════════════════════════════════════════════════════════════════════════ */
.search-form { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 12px; }
.search-form--compact { box-shadow: none; padding: 0; background: transparent; flex: 1; min-width: 0; }

.trip-pills { display: flex; gap: 6px; margin-bottom: 10px; }
.search-form--compact .trip-pills { display: none; }
.pill {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 6px 14px; border-radius: 999px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.pill:hover { border-color: var(--brand); }
.pill.is-active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }

.search-row { display: flex; align-items: stretch; gap: 8px; }
.route-grid { display: flex; align-items: stretch; gap: 8px; flex: 2.1 1 0; min-width: 0; position: relative; }
.date-grid  { display: flex; align-items: stretch; gap: 8px; flex: 1.25 1 0; min-width: 0; }
.tv-wrap    { position: relative; flex: 1 1 0; min-width: 0; display: flex; }

/* One field: icon + (caption / value) */
.fld {
  position: relative; display: flex; align-items: center; gap: 10px;
  flex: 1 1 0; min-width: 0;
  padding: 9px 12px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: text; text-align: left; font: inherit; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.fld:hover { border-color: #C8D4DE; }
.fld:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fld--tv, .fld--date { cursor: pointer; }
.fld__icon { flex-shrink: 0; color: var(--brand); display: flex; }
.fld__icon svg { width: 19px; height: 19px; }
.fld__copy { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fld__copy small { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }
.fld__copy strong { font-size: .94rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fld__copy input {
  border: 0; padding: 0; margin: 0; font: inherit; font-size: .94rem; font-weight: 600;
  color: var(--ink); background: transparent; width: 100%; min-width: 0;
}
.fld__copy input:focus { outline: none; }
.fld__copy input::placeholder { color: #9AAABA; font-weight: 500; }

.fld__clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: #EEF2F6; color: var(--muted); border-radius: 50%;
  width: 19px; height: 19px; padding: 0; cursor: pointer; display: none;
  align-items: center; justify-content: center;
}
.fld__clear svg { width: 10px; height: 10px; }
.fld.has-value .fld__clear { display: flex; }
.fld__clear:hover { background: var(--danger); color: #fff; }

/* Native date input covers the field so the OS picker opens on click. */
.fld--date { position: relative; }
.date-native { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; }

.swap-btn {
  flex-shrink: 0; width: 34px; align-self: center;
  height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  color: var(--brand-dark); cursor: pointer; display: flex; align-items: center; justify-content: center;
  margin: 0 -6px; z-index: 3; transition: transform .18s, border-color .15s;
}
.swap-btn:hover { border-color: var(--brand); transform: rotate(180deg); }
.swap-btn svg { width: 15px; height: 15px; }

.search-submit {
  flex: 0 0 auto; padding: 0 30px; border: 0; border-radius: var(--radius-sm);
  background: var(--brand); color: #fff; font: inherit; font-size: .98rem; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: background .15s;
}
.search-submit:hover { background: var(--brand-dark); }

/* Travellers popover */
.tv-popover {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 70;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 14px; width: 290px;
}
.tv-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.tv-row strong { display: block; font-size: .9rem; }
.tv-row small { color: var(--muted); font-size: .76rem; }
.tv-counter { display: flex; align-items: center; gap: 10px; }
.tv-counter button {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-size: 1rem; cursor: pointer; line-height: 1;
}
.tv-counter button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-dark); }
.tv-counter button:disabled { opacity: .35; cursor: not-allowed; }
.tv-counter output { min-width: 18px; text-align: center; font-weight: 700; font-size: .95rem; }
.tv-cabins { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0 4px; }
.cabin {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px;
  font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.cabin:hover { border-color: var(--brand); }
.cabin.is-active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.tv-done {
  width: 100%; margin-top: 8px; padding: 9px; border: 0; border-radius: 8px;
  background: var(--ink); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}

/* Autocomplete */
.ac-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 80;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); max-height: 330px; overflow-y: auto; padding: 5px; min-width: 300px;
}
.ac-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 9px 11px; border: 0; background: none; border-radius: 8px; cursor: pointer; font: inherit;
}
.ac-item:hover, .ac-item.is-active { background: var(--bg-soft); }
.ac-code {
  flex-shrink: 0; font-size: .68rem; font-weight: 800; letter-spacing: .04em;
  color: var(--brand-dark); background: var(--brand-soft); padding: 3px 7px; border-radius: 5px;
}
.ac-body { display: flex; flex-direction: column; min-width: 0; }
.ac-name { font-size: .88rem; font-weight: 600; color: var(--ink); }
.ac-meta { font-size: .74rem; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   AIRLINE STRIP — infinite marquee, greyscale, colour on hover
   ═══════════════════════════════════════════════════════════════════════════ */
.strip-wrap { border-bottom: 1px solid var(--line); background: #fff; padding: 26px 0; }
.strip { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
         mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.strip__track { display: flex; align-items: center; gap: 52px; width: max-content; animation: strip-scroll 48s linear infinite; }
.strip__item { flex-shrink: 0; display: flex; align-items: center; }
.strip__item img {
  height: 30px; width: auto; object-fit: contain;
  filter: grayscale(100%) opacity(.5);
  transition: filter .25s;
}
.strip__item img:hover { filter: grayscale(0%) opacity(1); }
.strip:hover .strip__track { animation-play-state: paused; }
@keyframes strip-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .strip__track { animation: none; } }

/* ═══════════════════════════════════════════════════════════════════════════
   DESTINATION CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section__more { font-size: .88rem; font-weight: 600; }
.dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 24px; }
.dest-card {
  display: block; border-radius: var(--radius); overflow: hidden; background: #fff;
  border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.dest-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #C8D4DE; text-decoration: none; }
.dest-card__img {
  display: block; height: 158px; background-size: cover; background-position: center; background-color: var(--bg-soft);
  transition: transform .35s;
}
.dest-card:hover .dest-card__img { transform: scale(1.04); }
.dest-card__body { display: block; padding: 14px 16px 16px; }
.dest-card__name { display: block; font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.dest-card__meta { display: block; font-size: .8rem; color: var(--muted); margin-top: 1px; }
.dest-card__price { display: block; margin-top: 8px; font-size: .84rem; color: var(--muted); }
.dest-card__price strong { color: var(--brand-dark); font-size: 1.05rem; font-weight: 800; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESULTS HEADER — our own form, not the White Label widget
   ═══════════════════════════════════════════════════════════════════════════ */
.results-header { background: var(--ink); padding: 12px 0; position: sticky; top: 0; z-index: 60; }
.results-header__inner { display: flex; align-items: center; gap: 20px; }
.results-header .logo { flex-shrink: 0; }
.results-header .fld { background: rgba(255,255,255,.97); border-color: transparent; }
.results-header .search-row { gap: 7px; }

/* ── Responsive: form collapses to stacked rows ──────────────────────────── */
@media (max-width: 1080px) {
  .search-row { flex-wrap: wrap; }
  .route-grid { flex: 1 1 100%; }
  .date-grid  { flex: 1 1 60%; }
  .tv-wrap    { flex: 1 1 34%; }
  .search-submit { flex: 1 1 100%; padding: 13px; }
  .results-header__inner { flex-wrap: wrap; }
  .search-form--compact { flex: 1 1 100%; }
}
@media (max-width: 620px) {
  .route-grid { flex-wrap: wrap; }
  .route-grid .fld { flex: 1 1 100%; }
  .swap-btn { margin: -4px auto; transform: rotate(90deg); }
  .swap-btn:hover { transform: rotate(270deg); }
  .date-grid, .tv-wrap { flex: 1 1 100%; }
  .tv-popover { left: 0; right: 0; width: auto; }
  .hero { padding: 40px 0 56px; }
  .ac-panel { min-width: 0; }
}

/* ── Prose blocks: static pages (about/help/privacy/terms) and blog posts ──── */
/* The rest of the site is cards and tables; these are the only places with real
   running text, so the list and inline-code styling lives here rather than being
   repeated inline in every template. */
ul.plain { margin: 0 0 16px; padding-left: 20px; }
ul.plain li { margin-bottom: 6px; color: var(--ink, inherit); line-height: 1.7; }

code {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  background: var(--soft, #F1F5F9);
  border: 1px solid var(--line, #E2E8F0);
  border-radius: 4px;
  padding: 1px 5px;
  word-break: break-word;
}

/* ── Inline icons ─────────────────────────────────────────────────────────── */
/* Defensive: an inline SVG with only a viewBox has no natural size and falls back
   to 300x150. ARROW_SVG carries width/height attributes for this reason, but any
   icon dropped into a data table or link list gets a sane ceiling here too, so the
   next one added cannot blow a table row open. */
.icon-arrow { vertical-align: -2px; }
.table-wrap td svg,
.table-wrap th svg,
.linklist a svg { width: 14px; height: 14px; flex-shrink: 0; vertical-align: -2px; }
