/* ==========================================================================
   LisbonFaro.com — design tokens
   Palette sourced from the actual route: the ochre limestone cliffs of the
   Algarve, the teal water of the Ria Formosa lagoon at Faro, and the
   magenta bougainvillea that drapes the region's whitewashed walls.
   ========================================================================== */
:root {
  --gold-700: #a06a24;
  --gold-600: #c68a3d;
  --gold-500: #d9a45b;
  --gold-300: #ecc98f;
  --gold-100: #fbebd2;

  --teal-900: #0f3d39;
  --teal-800: #14524b;
  --teal-700: #175c56;
  --teal-600: #1f7167;
  --teal-500: #2a8f84;
  --teal-300: #8fc4bc;
  --teal-100: #e1f0ec;

  --magenta-700: #7e2748;
  --magenta-600: #a83358;
  --magenta-300: #d98faa;
  --magenta-100: #f6e3ea;

  --sand: #fbf6ec;
  --sand-deep: #f3e9d4;
  --white: #fffdf8;
  --ink: #23190f;
  --ink-soft: #5b4e3f;
  --line: #e2d3b0;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 12px 32px -12px rgba(35, 25, 15, 0.28);
  --shadow-sm: 0 4px 14px -6px rgba(35, 25, 15, 0.22);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-700); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); margin: 0 0 0.5em; line-height: 1.18; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 84px 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 0 40px; }
.section-eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--teal-700); margin-bottom: 10px;
}
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 100px; font-weight: 700; font-size: 0.98rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal-700); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-800); }
.btn-ghost { background: transparent; border-color: rgba(35,25,15,0.22); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-gold { background: var(--gold-600); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: var(--gold-700); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(251,246,236,0.92);
  backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line);
}
.header-grid {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center;
  gap: 20px; padding: 14px 24px; max-width: 1120px; margin: 0 auto;
}
.logo {
  font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.logo span { color: var(--teal-700); }
.nav-links { display: flex; gap: 22px; justify-self: center; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.94rem; font-weight: 600;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--teal-700); }
.persistent-cta {
  background: var(--gold-600); color: var(--white); padding: 10px 20px; border-radius: 100px;
  font-weight: 700; font-size: 0.92rem; text-decoration: none; white-space: nowrap;
}
.persistent-cta:hover { background: var(--gold-700); }
.nav-toggle {
  display: none; background: none; border: none; font-size: 1.4rem; color: var(--ink);
  cursor: pointer; padding: 6px 8px; line-height: 1;
}
/* Mobile-only CTA rendered inside the collapsible nav panel; hidden everywhere
   else (desktop keeps the single header .persistent-cta). */
.nav-cta { display: none; }

@media (max-width: 860px) {
  .header-grid { grid-template-columns: auto auto auto; }
  /* Single mobile CTA lives inside the hamburger panel instead of the header row. */
  .persistent-cta { display: none; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--white);
    flex-direction: column; gap: 0; padding: 0; border-bottom: none;
    box-shadow: var(--shadow); max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  /* Padding/border live only on the open state: at max-height:0 this browser's flex
     layout does not clip a container's own padding+border, so leaving them on the
     collapsed state renders a permanent ~17px white sliver (8px+8px padding + 1px
     border) below the header, overlapping the hero. */
  .nav-links.open { max-height: 420px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .nav-links a { padding: 13px 24px; width: 100%; border-top: 1px solid var(--line); color: var(--ink); }
  .nav-links a:first-child { border-top: none; }
  .nav-toggle { display: inline-block; }
  .nav-links .nav-cta {
    display: block; text-align: center; margin: 10px 24px 6px;
    padding: 12px 20px !important; background: var(--gold-600) !important;
    color: var(--white) !important; border-radius: 100px; font-weight: 700;
    border-top: none !important; width: auto;
  }
  .nav-links .nav-cta:hover { background: var(--gold-700) !important; }
}

/* ---------- hero (full-bleed photo background) ---------- */
.hero {
  padding: 88px 0 64px; border-top: none; position: relative;
  background:
    linear-gradient(100deg, rgba(35,25,15,0.85) 0%, rgba(35,25,15,0.68) 42%, rgba(35,25,15,0.28) 75%),
    url("images/hero-bridge.jpg");
  background-size: cover; background-position: center 45%;
}
.hero .container { display: block; }
.hero-content { max-width: 640px; }
.hero-kicker {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--gold-300); margin-bottom: 14px;
}
.hero h1 { color: var(--white); }
.hero-dek { font-size: 1.12rem; color: rgba(255,255,255,0.88); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero .btn-ghost { color: var(--white); border-color: rgba(255,255,255,0.55); }
.hero .btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; max-width: 980px;
}
.hero-stats div {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; box-shadow: var(--shadow);
}
.hero-stats b { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--teal-700); }
.hero-stats span { font-size: 0.84rem; color: var(--ink-soft); }
@media (max-width: 900px) { .hero-stats { grid-template-columns: 1fr 1fr; max-width: 460px; } }

/* ---------- search band ---------- */
.search-band { background: var(--teal-900); color: var(--white); padding: 36px 0 20px; }
.search-band .section-eyebrow { color: var(--gold-300); }
.search-band h2 { color: var(--white); }
.search-band-head p { color: var(--teal-100); }
.search-band-head { margin-bottom: 24px; }
.search-panel { max-width: 1320px; margin: 0 auto; padding: 0 24px 8px; }
#firebird-search-widget { min-height: 220px; }

/* ---------- journey scrollytelling ---------- */
.journey-wrap { position: relative; }
.journey-rail {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 760px; margin: 0 auto; padding: 16px 24px;
  position: sticky; top: 76px; z-index: 20; background: var(--sand);
}
.journey-stages { padding-top: 32px; }
.journey-rail::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: 50%; height: 3px;
  background: var(--line); z-index: 0;
}
.journey-rail-fill {
  position: absolute; left: 24px; top: 50%; height: 3px; background: var(--gold-600);
  z-index: 1; width: 0%;
}
.journey-stop {
  position: relative; z-index: 2; width: 15px; height: 15px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--line); transition: background-color .3s ease, border-color .3s ease, transform .3s ease;
}
.journey-stop.active { background: var(--gold-600); border-color: var(--gold-600); transform: scale(1.3); }
.journey-train {
  position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 1.3rem;
  z-index: 3; left: 0;
}

.journey-stage {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  padding: 44px 0; opacity: 0.35; transition: opacity .4s ease;
}
.journey-stage.active { opacity: 1; }
.journey-stage:not(:last-child) { border-bottom: 1px dashed var(--line); }
.journey-stage-num {
  font-family: var(--serif); font-size: 0.85rem; font-weight: 700; color: var(--gold-600);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; display: block;
}
.journey-scene { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--white); }
.journey-scene svg, .journey-scene img { width: 100%; height: auto; display: block; }
.journey-stage:nth-child(even) .journey-scene { order: 2; }

@media (max-width: 780px) {
  .journey-stage { grid-template-columns: 1fr; }
  .journey-stage:nth-child(even) .journey-scene { order: -1; }
}

/* ---------- route map ---------- */
.route-map-diagram { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px 28px; box-shadow: var(--shadow-sm); }
.route-map-diagram svg { width: 100%; height: auto; }
.route-map-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; font-size: 0.88rem; color: var(--ink-soft); }
.route-map-legend span { display: inline-flex; align-items: center; gap: 7px; }
.route-map-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--gold-600); display: inline-block; }
.route-map-legend i.junction { background: var(--magenta-600); }

/* ---------- cards / grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card-grid + h3, .split-block + h3, .table-wrap + h3 { margin-top: 32px; }
.train-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.train-card.featured { border-color: var(--gold-500); box-shadow: var(--shadow); }
.train-card-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--white); background: var(--gold-600);
  padding: 4px 10px; border-radius: 100px; margin-bottom: 12px;
}
.train-card ul { margin: 14px 0 0; padding-left: 20px; color: var(--ink-soft); }
.train-card li { margin-bottom: 6px; }
.train-card-img {
  width: calc(100% + 56px); max-width: none; height: 200px; object-fit: cover; margin: -28px -28px 20px; display: block;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* text + photo side-by-side block, used inside prose sections */
.split-block { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; margin: 28px 0; }
.split-block img {
  width: 100%; height: auto; max-height: 320px; object-fit: cover; display: block;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
@media (max-width: 780px) { .split-block { grid-template-columns: 1fr; } }
@media (max-width: 780px) { .card-grid { grid-template-columns: 1fr; } }

/* card icon + top accent, used on the Scenic Highlights and Compare-modes grids */
.card-icon {
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; margin-bottom: 16px; background: var(--sand-deep);
}
.card-grid--accent .train-card { border-top: 4px solid var(--line); }
.card-grid--accent .train-card:nth-child(3n+1) { border-top-color: var(--gold-600); }
.card-grid--accent .train-card:nth-child(3n+1) .card-icon { background: var(--gold-100); }
.card-grid--accent .train-card:nth-child(3n+2) { border-top-color: var(--teal-600); }
.card-grid--accent .train-card:nth-child(3n+2) .card-icon { background: var(--teal-100); }
.card-grid--accent .train-card:nth-child(3n+3) { border-top-color: var(--magenta-600); }
.card-grid--accent .train-card:nth-child(3n+3) .card-icon { background: var(--magenta-100); }
.card-time-badge {
  display: inline-block; font-size: 0.78rem; font-weight: 700; color: var(--ink-soft);
  background: var(--sand-deep); padding: 3px 10px; border-radius: 100px; margin-left: 10px;
  vertical-align: middle;
}
#scenic .card-grid, #compare .card-grid { grid-template-columns: repeat(3, 1fr); }

/* Scenic Highlights — full-bleed photo background, same treatment as hero/CTA */
#scenic {
  border-top: none; position: relative;
  background:
    linear-gradient(180deg, rgba(15,25,20,0.72) 0%, rgba(15,25,20,0.82) 100%),
    url("images/scenic-bg.jpg");
  background-size: cover; background-position: center 60%;
}
#scenic .section-eyebrow { color: var(--gold-300); }
#scenic h2 { color: var(--white); }
#scenic .section-head p { color: rgba(255,255,255,0.85); }
@media (max-width: 900px) {
  #scenic .card-grid, #compare .card-grid { grid-template-columns: 1fr; }
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.note-small { margin-top: 14px; font-size: 0.88rem; color: var(--ink-soft); }
table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 0.95rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--sand-deep); font-family: var(--serif); font-weight: 700; color: var(--teal-800); }
tr:last-child td { border-bottom: none; }

/* ---------- fare cards ---------- */
.fare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
.fare-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow-sm); }
.fare-card b { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--magenta-600); margin-bottom: 4px; }
.fare-card span { font-size: 0.86rem; color: var(--ink-soft); }
@media (max-width: 780px) { .fare-grid { grid-template-columns: 1fr; } }

/* ---------- stations ---------- */
.station-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.station-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.station-card .train-card-img { width: calc(100% + 52px); margin: -26px -26px 20px; }
.station-card h3 { color: var(--teal-800); }
@media (max-width: 780px) { .station-grid { grid-template-columns: 1fr; } }

/* ---------- info cards (secondary detail tiles — deliberately lighter-weight
   and a different column count than the photo cards above them, so the two
   groups never read as one uniform grid) ---------- */
.info-grid-label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-soft); margin: 36px 0 14px;
}
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.info-card {
  background: var(--sand-deep); border: none; border-radius: var(--radius);
  padding: 20px;
}
.info-card-icon {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.05rem; margin-bottom: 12px; background: var(--teal-300);
  box-shadow: 0 1px 3px rgba(35,25,15,0.12);
}
.info-card h3 { font-size: 0.96rem; margin-bottom: 6px; color: var(--teal-800); }
.info-card p { margin: 0; color: var(--ink-soft); font-size: 0.86rem; }
.info-card:nth-child(3n+1) .info-card-icon { background: var(--gold-300); }
.info-card:nth-child(3n+2) .info-card-icon { background: var(--teal-300); }
.info-card:nth-child(3n+3) .info-card-icon { background: var(--magenta-300); }
@media (max-width: 900px) { .info-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .info-grid { grid-template-columns: 1fr; } }

/* ---------- tips ---------- */
.tips-columns { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
.tips-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; list-style: none; margin: 0 0 8px; padding: 0; }
.tips-list--single { grid-template-columns: 1fr; margin: 0; }
.tips-list li {
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--teal-600);
  border-radius: var(--radius-sm); padding: 18px 20px; color: var(--ink-soft);
}
.tips-list strong { color: var(--ink); }
.tips-aside .info-grid-label { margin-top: 0; }
.info-grid--stack { grid-template-columns: 1fr; }
@media (max-width: 780px) { .tips-list { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .tips-columns { grid-template-columns: 1fr; } }

/* ---------- quick facts ---------- */
.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fact-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.fact-icon {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem; margin-bottom: 14px;
}
.fact-card:nth-child(3n+1) .fact-icon { background: var(--gold-100); }
.fact-card:nth-child(3n+2) .fact-icon { background: var(--teal-100); }
.fact-card:nth-child(3n+3) .fact-icon { background: var(--magenta-100); }
.fact-card h3 { font-size: 1.05rem; margin-bottom: 6px; color: var(--ink); }
.fact-card p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
@media (max-width: 900px) { .fact-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .fact-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; padding: 20px 0; font-family: var(--serif); font-weight: 700; font-size: 1.06rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--gold-600); flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { color: var(--ink-soft); padding-bottom: 20px; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    linear-gradient(120deg, rgba(15,61,57,0.88), rgba(15,61,57,0.93)),
    url("images/cta-algarve-cliffs.jpg");
  background-size: cover; background-position: center;
  color: var(--white); text-align: center; border-top: none;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--teal-100); max-width: 560px; margin: 0 auto 26px; }
.cta-band .btn-gold { font-size: 1.05rem; padding: 15px 32px; }

/* ---------- footer ---------- */
footer { background: var(--ink); color: var(--sand-deep); padding: 44px 0 30px; }
footer .container { max-width: 1120px; }
footer p { font-size: 0.86rem; color: #c9bda4; max-width: 860px; }
footer a { color: var(--gold-300); text-decoration: underline; }
footer .footer-bottom { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.8rem; color: #a89a7c; }
footer .footer-bottom a { text-decoration: none; }

/* ---------- misc ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white);
  padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- first-screen compaction ----------
   Goal: the HST search widget (card + SEARCH button) is inside the first screen on
   desktop and phones. Desktop/tablet: compact photo hero (text left, stat cards right
   on wide screens). Phones (<=767px): photo band with kicker + H1, widget right under
   it, then the intro paragraph and stat cards (existing nodes re-ordered with
   display:contents + flex order; nothing duplicated). On phones only the search band's
   eyebrow + one-line intro and the hero buttons are hidden (header keeps its CTA). */
.hero-head { display: block; }
#firebird-search-widget > div { padding-top: 20px !important; padding-bottom: 12px !important; }
/* The widget assumes a white host page; on the dark teal band these labels vanish. */
#firebird-search-widget .ant-checkbox-label,
#firebird-search-widget .ant-checkbox-label * { color: var(--teal-100) !important; }
@media (max-width: 767px) {
  #firebird-search-widget .ant-form-item-label label,
  #firebird-search-widget .ant-picker,
  #firebird-search-widget .ant-picker-input input,
  #firebird-search-widget .ant-picker input { color: var(--white) !important; }
}
@media (min-width: 768px) {
  .hero { padding: 34px 0; }
  .hero h1 { margin-bottom: .4em; }
  .hero-kicker { margin-bottom: 8px; }
  .hero-content { max-width: none; }
  .hero-dek { font-size: 1rem; line-height: 1.55; max-width: none; margin-bottom: 0; }
  .hero-actions { margin-top: 18px; gap: 12px; }
  .hero-actions .btn { padding: 10px 20px; font-size: .92rem; }
  .hero-stats { gap: 12px; margin-top: 20px; }
  .hero-stats div { padding: 12px 14px; }
  .hero-stats b { font-size: 1.15rem; }
  .hero-stats span { font-size: .8rem; line-height: 1.3; display: block; }
  .search-band { padding: 26px 0 8px; }
  .search-band-head { margin-bottom: 6px; }
  .search-band .section-eyebrow { margin-bottom: 4px; }
  .search-band h2 { margin-bottom: .25em; font-size: 1.75rem; }
  .search-band-head p { margin-bottom: 0; }
}
@media (min-width: 861px) {
  .hero { background: linear-gradient(100deg, rgba(35,25,15,0.88) 0%, rgba(35,25,15,0.78) 55%, rgba(35,25,15,0.5) 100%), url("images/hero-bridge.jpg"); background-size: cover; background-position: center 45%; }
  .hero .container { display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 40px; align-items: center; }
  .hero h1 { font-size: clamp(1.9rem, 2.9vw, 2.5rem); max-width: 22em; }
  .hero-stats { grid-template-columns: 1fr 1fr; margin-top: 0; max-width: none; }
}
@media (max-width: 860px) {
  /* hamburger sits at the right edge (the hidden header CTA left an empty grid column) */
  .header-grid { grid-template-columns: 1fr auto; }
  .nav-toggle { justify-self: end; }
}
@media (max-width: 767px) {
  main { display: flex; flex-direction: column; }
  .hero, .hero .container, .hero-content { display: contents; }
  .hero-head {
    order: -6; padding: 26px 20px 24px;
    background: linear-gradient(180deg, rgba(35,25,15,.62), rgba(35,25,15,.78)), url("images/hero-bridge.jpg") center 45% / cover;
  }
  .hero-kicker { font-size: .7rem; margin-bottom: 8px; }
  .hero h1 { font-size: clamp(1.45rem, 6.6vw, 1.75rem); margin: 0; text-shadow: 0 1px 12px rgba(0,0,0,.5); }
  .search-band { order: -5; padding: 20px 0 4px; }
  .search-band .container { padding: 0 20px; }
  .search-band-head { margin-bottom: 6px; }
  .search-band .section-eyebrow, .search-band-head p { display: none; }
  .search-band h2 { font-size: 1.2rem; margin: 0; }
  .search-panel { padding: 0 12px 4px; zoom: .86; }
  .hero-dek { order: -4; color: var(--ink-soft); font-size: .95rem; line-height: 1.6; margin: 0; padding: 28px 20px 0; max-width: none; }
  .hero-actions { display: none; }
  .hero-stats { order: -3; margin: 20px 20px 0; max-width: none; gap: 10px; }
  .hero-stats div { padding: 12px 14px; }
  .hero-stats b { font-size: 1.2rem; }
  .hero-stats span { font-size: .8rem; line-height: 1.35; }
}
/* reserve the widget's height so the layout below does not jump when it renders */
@media (min-width: 861px) { #firebird-search-widget { min-height: 220px; } }
@media (max-width: 767px) { #firebird-search-widget { min-height: 400px; } }
