﻿/* ==========================================================================
   TripVerse — Travel Booking Platform
   Design system v3 — EaseMyTrip-style: bright, blue + orange, dense, boxy
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  /* brand — EMT blue family */
  --navy: #0b2f5e;
  --navy-2: #123f7a;
  --blue: #0068cd;
  --blue-600: #0f5cb0;
  --blue-400: #2a92e6;
  --blue-soft: #e8f2fd;
  --blue-soft-2: #f3f8fe;
  --grad-blue: linear-gradient(180deg, #1178dc 0%, #0059b3 100%);
  --grad-navy: linear-gradient(90deg, #0b2f5e 0%, #14528f 55%, #0f6bbd 100%);

  /* accent — EMT orange */
  --orange: #f6821f;
  --orange-2: #f4511e;
  --orange-soft: #fff3e6;
  --grad-orange: linear-gradient(180deg, #ff9d2e 0%, #f4670f 100%);

  --green: #17a34a;
  --green-soft: #e8f7ee;
  --red: #d92d3f;
  --red-soft: #fdecee;
  --amber: #e08600;

  /* neutrals */
  --ink: #17253d;
  --ink-2: #2c3e5c;
  --body: #48576f;
  --muted: #7d8ca3;
  --line: #dde5ee;
  --line-2: #eef2f7;
  --bg: #f2f6fb;
  --white: #fff;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;

  --shadow-xs: 0 1px 2px rgba(23, 37, 61, .06);
  --shadow-sm: 0 1px 6px rgba(23, 37, 61, .08);
  --shadow: 0 4px 18px rgba(23, 37, 61, .12);
  --shadow-lg: 0 16px 44px rgba(23, 37, 61, .22);

  --header-h: 56px;
  /* one shared side gap for the whole site — header, hero, results, footer */
  --gutter: 20px;
  --font: 'Poppins', "Segoe UI", Roboto, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--body);
  background: var(--bg);
  overflow-x: hidden;          /* fallback for older browsers */
  -webkit-font-smoothing: antialiased;
}
/* `overflow: hidden` turns body into a scroll container, which kills
   position:sticky on its children (the results bar). `clip` contains the
   same overflow without creating a scroll container, so sticky keeps working. */
@supports (overflow-x: clip) {
  body { overflow-x: clip; }
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
ul { list-style: none; }

h1, h2, h3, h4, h5 { color: var(--ink); line-height: 1.28; font-weight: 600; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.02rem; }
h4 { font-size: .93rem; }

::selection { background: rgba(0, 104, 205, .16); }

.container { width: 100%; max-width: 100%; margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 1040px; }

/* NOTE: these elements also carry .container, so only the BLOCK (vertical)
   padding may be set here — a `padding` shorthand would wipe out the
   container's side gutter and let content touch the screen edge. */
.section { padding-block: 26px; position: relative; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { position: relative; padding-left: 12px; }
.section-head h2::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 20px; border-radius: 3px; background: var(--orange);
}
.section-head p { font-size: .82rem; color: var(--muted); margin-top: 2px; padding-left: 12px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; color: var(--orange);
}
.section-head .eyebrow { padding-left: 12px; }
.link-more {
  display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-weight: 600;
  font-size: .82rem; white-space: nowrap; transition: .18s;
}
.link-more:hover { color: var(--orange-2); }
.gtext { color: var(--blue); }

/* ------------------------------ Utilities ------------------------------- */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.wrap { flex-wrap: wrap; }
.gap-6 { gap: 6px; } .gap-10 { gap: 10px; } .gap-16 { gap: 16px; }
.text-sm { font-size: .82rem; }
.text-xs { font-size: .74rem; }
.muted { color: var(--muted); }
.strike { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------- Buttons -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: .88rem;
  transition: filter .18s, box-shadow .18s, background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad-blue); color: #fff; box-shadow: 0 2px 6px rgba(0, 89, 179, .3); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-accent { background: var(--grad-orange); color: #fff; box-shadow: 0 2px 8px rgba(244, 103, 15, .35); }
.btn-accent:hover { filter: brightness(1.06); }
.btn-outline { border: 1px solid var(--blue); color: var(--blue); background: #fff; }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink-2); background: #fff; }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 15px; font-size: .8rem; }
.btn-lg { padding: 13px 34px; font-size: .95rem; }

/* -------------------------------- Badges -------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--radius-xs);
  font-size: .68rem; font-weight: 600;
}
.badge-green { background: var(--green-soft); color: #0f7a37; }
.badge-orange { background: var(--orange-soft); color: #c25a08; }
.badge-blue { background: var(--blue-soft); color: var(--blue-600); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-grey { background: var(--line-2); color: var(--body); }

.rating {
  display: inline-flex; align-items: center; gap: 3px; background: #1a7f37; color: #fff;
  padding: 2px 7px; border-radius: var(--radius-xs); font-size: .74rem; font-weight: 700;
}

/* -------------------------------- Header -------------------------------- */
/* The header is injected into a #site-header wrapper. A sticky element can
   never leave its parent's box, so the WRAPPER has to be the sticky one —
   otherwise the header scrolls away after its own height. */
#site-header {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 200;
}
.header {
  position: relative; z-index: 200; color: #fff;
  background: var(--grad-navy);
  box-shadow: 0 2px 8px rgba(11, 47, 94, .25);
}
.header.scrolled { box-shadow: 0 3px 14px rgba(11, 47, 94, .38); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 12px; }

.logo { display: flex; align-items: center; gap: 8px; font-size: 1.16rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none;
  background: var(--grad-orange); font-size: .9rem; color: #fff;
}
.logo span.accent { color: var(--orange); }

/* icon nav, EMT style */
.nav { display: none; margin: 0 auto; align-items: stretch; gap: 14px; height: 100%; }
.nav a {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 1px;
  padding: 0 16px; font-size: .72rem; font-weight: 500; color: rgba(255, 255, 255, .82);
  transition: color .18s, background .18s;
}
.nav a i { font-size: 1.02rem; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a.active { color: #fff; }
.nav a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--orange);
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav + .header-actions { margin-left: 0; }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm); display: grid; place-items: center;
  color: #fff; font-size: 1rem; background: rgba(255, 255, 255, .12); transition: .18s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .22); }
.btn-login {
  background: var(--grad-orange); color: #fff; padding: 8px 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .82rem; transition: filter .18s;
}
.btn-login:hover { filter: brightness(1.07); }
.menu-toggle { display: grid; }

/* Off-canvas drawer */
.drawer {
  position: fixed; inset: 0 26% 0 0; max-width: 310px; min-width: 262px;
  background: #fff; z-index: 400; transform: translateX(-105%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1); display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }
.drawer-head { position: relative; background: var(--grad-navy); color: #fff; padding: 18px 16px; }
.drawer-head .u { display: flex; align-items: center; gap: 11px; padding-right: 40px; }
.drawer-close {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 1.05rem;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22);
  transition: background .18s, transform .18s;
}
.drawer-close:hover { background: rgba(255, 255, 255, .3); }
.drawer-close:active { transform: scale(.92); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 1.15rem; }
.drawer nav { padding: 6px 0; overflow-y: auto; flex: 1; }
.drawer nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-weight: 500;
  color: var(--ink-2); font-size: .9rem; border-bottom: 1px solid var(--line-2);
}
.drawer nav a i { color: var(--blue); width: 20px; text-align: center; }
.drawer nav a:hover { background: var(--blue-soft-2); }
.drawer nav a.active { background: var(--blue-soft); color: var(--blue-600); font-weight: 600; }
.drawer-foot { padding: 13px 16px; border-top: 1px solid var(--line); }
.overlay { position: fixed; inset: 0; background: rgba(11, 30, 55, .5); z-index: 350; opacity: 0; visibility: hidden; transition: .22s; }
.overlay.show { opacity: 1; visibility: visible; }

/* Bottom tab bar (mobile) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 250; background: #fff;
  border-top: 1px solid var(--line); display: flex;
  padding: 5px 2px calc(5px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(23, 37, 61, .1);
}
.tabbar a { position: relative; flex: 1; display: grid; justify-items: center; gap: 2px; font-size: .64rem; font-weight: 500; color: var(--muted); padding: 4px 0; }
.tabbar a i { font-size: 1.08rem; }
.tabbar a.active { color: var(--blue); font-weight: 600; }
.tabbar a.active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--orange); }

/* --------------------------- Hero + Search ------------------------------ */
.hero { position: relative; padding: 0 0 0; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 52% 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(9, 40, 79, .78) 0%, rgba(12, 62, 118, .72) 100%),
    url('https://images.unsplash.com/photo-1436491865332-7a61a109cc05?w=1800&q=70') center/cover;
}
.hero-inner { padding-block: 22px 42px; position: relative; }
.hero-title { color: #fff; text-align: center; font-size: 1.4rem; font-weight: 600; margin-bottom: 12px; }
.hero-title em { font-style: normal; color: var(--orange); }
.hero-title small { display: block; font-weight: 400; font-size: .82rem; color: rgba(255,255,255,.82); margin-top: 4px; }

.hero-pills { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; font-size: .73rem; font-weight: 500;
}
.hero-pill i { color: var(--orange); }

/* --- search card: white, boxy, tab strip on top, button hanging below --- */
.search-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: 0 8px 28px rgba(9, 34, 66, .28);
  position: relative; overflow: visible; margin-bottom: 30px;
}

.mode-tabs {
  display: flex; overflow-x: auto; gap: 0; padding: 10px 6px 0; scrollbar-width: none;
  border-bottom: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #fff;
}
.mode-tabs::-webkit-scrollbar { display: none; }
.mode-tab {
  flex: none; position: relative; display: grid; justify-items: center; gap: 2px; padding: 11px 15px 10px;
  font-size: .74rem; font-weight: 500; color: var(--body); min-width: 74px; transition: color .18s;
}
.mode-tab i { font-size: 1.24rem; color: var(--muted); transition: color .18s; }
.mode-tab:hover { color: var(--blue); }
.mode-tab:hover i { color: var(--blue); }
.mode-tab.active { color: var(--blue); font-weight: 600; }
.mode-tab.active i { color: var(--blue); }
.mode-tab.active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--blue);
}

.search-body { padding: 20px 14px 30px; }

/* trip type = radio pills */
.trip-types { display: flex; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.chip {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: .79rem; font-weight: 500; color: var(--body); transition: .18s;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-600); font-weight: 600; }
.trip-types .chip { border-radius: var(--radius-xs); }

/* one bordered row split by dividers (EMT signature) */
.field-grid {
  display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: visible; background: #fff;
}
.field-grid > * { border-bottom: 1px solid var(--line); position: relative; }
.field-grid > *:last-child { border-bottom: none; }
.field {
  position: relative; border: none; border-radius: 0; padding: 10px 14px; background: #fff;
  transition: background .18s; height: 100%;
}
.field:hover { background: var(--blue-soft-2); }
.field:focus-within { background: var(--blue-soft-2); box-shadow: inset 0 0 0 1.5px var(--blue); }
.field label { display: block; font-size: .7rem; color: var(--muted); font-weight: 500; margin-bottom: 1px; }
.field input, .field select {
  width: 100%; border: none; outline: none; font-size: 1.05rem; font-weight: 600; color: var(--ink);
  background: transparent; letter-spacing: -.01em;
}
.field input::placeholder { color: #b9c3d1; font-weight: 400; }
.field .sub { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.swap-btn {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 1px solid var(--line);
  color: var(--blue); display: grid; place-items: center; z-index: 5; box-shadow: var(--shadow-xs); transition: .25s;
}
.swap-btn:hover { transform: translateY(-50%) rotate(180deg); border-color: var(--blue); }

/* the hanging Search button */
.search-submit { position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%); margin: 0; z-index: 6; }
.search-submit .btn {
  min-width: 190px; border-radius: 999px; font-size: .95rem; font-weight: 600;
  padding: 12px 40px; letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(244, 103, 15, .45);
}

/* hero search widget sits one extra gutter in from the page alignment.
   Phones get none of it — screen space there is too scarce to give away. */
#searchWidget { padding: 0; }
@media (min-width: 768px) { #searchWidget { padding: 0 calc(var(--gutter) / 2); } }
@media (min-width: 992px) { #searchWidget { padding: 0 var(--gutter); } }

/* Autocomplete */
.ac-list {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 2px); background: #fff; z-index: 60;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 274px; overflow-y: auto;
}
.ac-list li { padding: 9px 14px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.ac-list li:last-child { border-bottom: none; }
.ac-list li:hover, .ac-list li.hl { background: var(--blue-soft); }
.ac-list b { color: var(--ink); font-size: .88rem; display: block; font-weight: 600; }
.ac-list span { font-size: .73rem; color: var(--muted); }

/* ------------------------------- Cards ---------------------------------- */
.card {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow-xs); overflow: hidden; transition: box-shadow .2s, border-color .2s, transform .2s;
}
a.card:hover, .card.hoverable:hover { box-shadow: var(--shadow); border-color: #c6d8ec; transform: translateY(-2px); }
.card-pad { padding: 13px; }

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }

.rail { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: 0 0 76%; max-width: 300px; scroll-snap-align: start; }

/* --------------------------- Slider / carousel --------------------------- */
.slider { position: relative; }
.slider-track {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-track > * { flex: 0 0 82%; scroll-snap-align: start; }

.slider-btn {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 6;
  width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid var(--line);
  color: var(--navy); display: grid; place-items: center; box-shadow: 0 3px 14px rgba(23, 37, 61, .22);
  font-size: .9rem; transition: background .18s, color .18s, opacity .18s, transform .18s;
}
.slider-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.slider-btn:active { transform: translateY(-50%) scale(.92); }
/* on phones the arrows sit just inside the edge, over the cards */
.slider-btn.prev { left: 2px; }
.slider-btn.next { right: 2px; }
.slider-btn[disabled] { opacity: .35; pointer-events: none; }
.slider.no-scroll .slider-btn { display: none !important; }
.slider-dots { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
.slider-dots button { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; transition: .2s; }
.slider-dots button.active { background: var(--blue); width: 20px; border-radius: 4px; }

@media (min-width: 480px) { .slider-track > * { flex-basis: calc((100% - 12px) / 2); } }
@media (min-width: 768px) {
  /* clear of the cards on larger screens */
  .slider-btn { width: 42px; height: 42px; font-size: .95rem; }
  .slider-btn.prev { left: -15px; }
  .slider-btn.next { right: -15px; }
  .slider-track > * { flex-basis: calc((100% - 24px) / 3); }
}
/* capped at 4 per view so the track always has somewhere to scroll */
@media (min-width: 1280px) { .slider-track > * { flex-basis: calc((100% - 36px) / 4); } }

/* Offer card */
.offer { display: block; }
.offer .thumb { height: 132px; background-size: cover; background-position: center; position: relative; }
.offer .thumb .badge { position: absolute; top: 9px; left: 9px; z-index: 2; background: #fff; box-shadow: var(--shadow-xs); }
.offer h4 { font-size: .9rem; margin-bottom: 3px; }
.offer p { font-size: .78rem; color: var(--muted); }
.coupon {
  margin-top: 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--orange);
  color: #c25a08; font-weight: 700; font-size: .74rem; padding: 4px 11px; border-radius: var(--radius-xs);
  background: var(--orange-soft); transition: .18s;
}
.coupon:hover { background: var(--orange); color: #fff; border-style: solid; }

/* Destination card */
.dest { position: relative; border-radius: var(--radius); overflow: hidden; height: 168px; color: #fff; display: block; border: 1px solid var(--line); }
.dest .bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s; }
.dest:hover .bg { transform: scale(1.07); }
.dest::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,20,38,0) 42%, rgba(9,20,38,.85) 100%); }
.dest .txt { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 2; }
.dest .txt h4 { color: #fff; font-size: 1rem; }
.dest .txt span { font-size: .75rem; color: rgba(255,255,255,.85); }
.dest .pricepill {
  position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--orange);
  color: #fff; font-size: .7rem; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-xs);
}

/* Feature/USP */
.usp { display: flex; gap: 11px; align-items: flex-start; padding: 13px; }
.usp i {
  width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center;
  font-size: 1.08rem; flex: none; color: var(--blue); background: var(--blue-soft);
}
.usp:nth-child(2) i { color: var(--orange-2); background: var(--orange-soft); }
.usp:nth-child(3) i { color: #0f7a37; background: var(--green-soft); }
.usp:nth-child(4) i { color: #7c3aed; background: #f1ecff; }
.usp h4 { font-size: .9rem; margin-bottom: 2px; }
.usp p { font-size: .78rem; color: var(--muted); }

/* stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.stat { background: #fff; padding: 14px; text-align: center; }
.stat b { display: block; font-size: 1.35rem; font-weight: 700; color: var(--blue-600); }
.stat span { font-size: .74rem; color: var(--muted); }

/* --------------------------- Results layout ----------------------------- */
.results-bar {
  color: #fff; padding: 9px 0; z-index: 150;
  position: -webkit-sticky; position: sticky; top: var(--header-h);
  background: var(--navy); border-bottom: 2px solid var(--orange);
}
.results-bar .summary { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.results-bar .route { font-weight: 600; font-size: .95rem; }
.results-bar .meta { font-size: .74rem; color: rgba(255,255,255,.7); }
.btn-modify {
  background: #fff; color: var(--navy); border: none; padding: 7px 15px; border-radius: var(--radius-xs);
  font-size: .77rem; font-weight: 600; transition: .18s;
}
.btn-modify:hover { background: var(--orange); color: #fff; }

.layout { display: grid; grid-template-columns: 1fr; gap: 14px; padding-block: 14px 20px; }

.filters { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-xs); }
.filters-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--blue-soft-2); border-radius: var(--radius) var(--radius) 0 0; }
.filters-head h3 { font-size: .95rem; }
.filter-group { padding: 13px 14px; border-bottom: 1px solid var(--line-2); }
.filter-group:last-child { border-bottom: none; }
.filter-group h4 { font-size: .78rem; color: var(--ink); margin-bottom: 9px; font-weight: 600; }
.check { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: .84rem; cursor: pointer; }
.check:hover { color: var(--blue); }
.check input { width: 16px; height: 16px; accent-color: var(--blue); flex: none; }
.check .price { margin-left: auto; font-size: .75rem; color: var(--muted); }
input[type="range"] { width: 100%; accent-color: var(--blue); }

.filters.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; top: 10%; z-index: 400; border-radius: 14px 14px 0 0;
  transform: translateY(102%); transition: transform .3s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column;
}
.filters.sheet.open { transform: translateY(0); }
.filters.sheet .scroll { overflow-y: auto; flex: 1; }
.filters.sheet .sheet-foot { padding: 11px 14px calc(11px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; }

.toolbar { display: flex; gap: 7px; align-items: center; overflow-x: auto; padding: 2px 2px 6px; margin-bottom: 10px; scrollbar-width: none; }
.toolbar::-webkit-scrollbar { display: none; }
.toolbar .chip { flex: none; background: #fff; }
.result-count { font-size: .8rem; color: var(--muted); margin-bottom: 9px; }

/* Flight card */
.f-card {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-xs);
  padding: 13px; margin-bottom: 10px; transition: box-shadow .18s, border-color .18s;
}
.f-card:hover { box-shadow: var(--shadow); border-color: #c6d8ec; }
.f-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.airline-logo { width: 34px; height: 34px; border-radius: var(--radius-xs); display: grid; place-items: center; font-weight: 700; font-size: .7rem; color: #fff; flex: none; }
.f-name { font-weight: 600; font-size: .87rem; color: var(--ink); }
.f-code { font-size: .71rem; color: var(--muted); }
.f-times { display: flex; align-items: center; gap: 8px; }
.f-time { text-align: center; }
.f-time b { display: block; font-size: 1.1rem; color: var(--ink); font-weight: 600; }
.f-time span { font-size: .72rem; color: var(--muted); }
.f-path { flex: 1; text-align: center; position: relative; padding: 0 4px; }
.f-path .dur { font-size: .71rem; color: var(--muted); }
.f-path .line { height: 1px; background: var(--line); margin: 6px 0; position: relative; }
.f-path .line::before, .f-path .line::after { content: ""; position: absolute; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
.f-path .line::before { left: 0; } .f-path .line::after { right: 0; }
.f-path .stops { font-size: .7rem; color: var(--green); font-weight: 600; }
.f-path .stops.has { color: var(--amber); }
.f-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line); }
.price-tag { font-size: 1.28rem; font-weight: 700; color: var(--ink); }
.price-tag small { display: block; font-size: .69rem; font-weight: 400; color: var(--muted); }
.f-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }

/* Hotel card */
.h-card {
  display: grid; grid-template-columns: 1fr; background: #fff; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow-xs); overflow: hidden; margin-bottom: 10px;
  transition: box-shadow .18s, border-color .18s;
}
.h-card:hover { box-shadow: var(--shadow); border-color: #c6d8ec; }
.h-card .pic { height: 176px; background-size: cover; background-position: center; position: relative; }
.h-card .pic .badge { position: absolute; top: 9px; left: 9px; background: #fff; box-shadow: var(--shadow-xs); }
.h-body { padding: 13px; display: flex; flex-direction: column; gap: 8px; }
.h-body h3 { font-size: 1rem; }
.h-loc { font-size: .78rem; color: var(--muted); }
.amenities { display: flex; flex-wrap: wrap; gap: 5px; }
.amenities span { font-size: .71rem; background: var(--line-2); color: var(--body); padding: 3px 8px; border-radius: var(--radius-xs); }
.h-price { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 2px; }

/* Train / Bus card */
.t-card {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-xs);
  padding: 13px; margin-bottom: 10px; transition: box-shadow .18s, border-color .18s;
}
.t-card:hover { box-shadow: var(--shadow); border-color: #c6d8ec; }
.t-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.t-head h3 { font-size: .97rem; }
.t-head .num { font-size: .73rem; color: var(--muted); }
.classes { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 5px; scrollbar-width: none; }
.classes::-webkit-scrollbar { display: none; }
.cls {
  flex: none; min-width: 112px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 11px;
  cursor: pointer; transition: .18s; background: #fff;
}
.cls:hover, .cls.active { border-color: var(--blue); background: var(--blue-soft); }
.cls b { display: block; font-size: .82rem; color: var(--ink); font-weight: 600; }
.cls .av { font-size: .73rem; font-weight: 600; }
.cls .av.ok { color: var(--green); } .cls .av.wl { color: var(--amber); } .cls .av.no { color: var(--red); }
.cls .pr { font-size: .8rem; color: var(--ink); font-weight: 600; }

/* Empty state */
.empty { text-align: center; padding: 46px 16px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.empty i { font-size: 1.9rem; color: var(--blue); margin: 0 auto 12px; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--blue-soft); }
.empty h3 { margin-bottom: 5px; }
.empty p { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }

/* ------------------------------ Booking --------------------------------- */
.steps { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px 0; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.step { display: flex; align-items: center; gap: 7px; flex: none; }
.step .dot { width: 25px; height: 25px; border-radius: 50%; background: #d6dfea; color: #fff; display: grid; place-items: center; font-size: .73rem; font-weight: 600; }
.step span { font-size: .78rem; font-weight: 500; color: var(--muted); }
.step.done .dot { background: var(--green); }
.step.active .dot { background: var(--blue); }
.step.done span, .step.active span { color: var(--ink); font-weight: 600; }
.step-line { width: 28px; height: 2px; background: #d6dfea; flex: none; }

.panel { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-xs); margin-bottom: 12px; overflow: hidden; }
.panel-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--blue-soft-2); }
.panel-head h3 { font-size: .95rem; }
.panel-body { padding: 14px; }

.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.form-row { display: grid; gap: 5px; }
.form-row label { font-size: .77rem; font-weight: 500; color: var(--ink-2); }
.form-row input, .form-row select, .form-row textarea {
  border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 10px 12px; outline: none;
  background: #fff; transition: border-color .18s, box-shadow .18s; width: 100%; font-weight: 500; color: var(--ink);
}
.form-row input::placeholder, .form-row textarea::placeholder { font-weight: 400; color: #b9c3d1; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,104,205,.12); }
.form-row .err { color: var(--red); font-size: .73rem; display: none; }
.form-row.invalid input, .form-row.invalid select, .form-row.invalid textarea { border-color: var(--red); }
.form-row.invalid .err { display: block; }

.fare-line { display: flex; justify-content: space-between; font-size: .85rem; padding: 6px 0; }
.fare-total {
  display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--ink);
  font-size: 1.05rem; border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 10px;
}
.summary-sticky { position: sticky; top: calc(var(--header-h) + 12px); }

.pay-methods { display: grid; gap: 9px; }
.pay-opt { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; transition: .18s; }
.pay-opt:hover { border-color: #c6d8ec; }
.pay-opt.active { border-color: var(--blue); background: var(--blue-soft); }
.pay-opt i { font-size: 1.1rem; color: var(--blue); width: 22px; text-align: center; }
.pay-opt input { accent-color: var(--blue); width: 17px; height: 17px; }

/* Bus seat map */
.seat-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--blue-soft-2); }
.deck-label { font-size: .73rem; color: var(--muted); font-weight: 600; margin-bottom: 11px; display: flex; align-items: center; gap: 7px; }
.seat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 330px; }
.seat {
  aspect-ratio: 1 / 1; border: 1px solid #c8d3e0; border-radius: var(--radius-xs); background: #fff;
  font-size: .77rem; font-weight: 600; color: var(--body); display: grid; place-items: center; transition: .16s;
}
.seat:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.seat.sel { background: var(--green); border-color: var(--green); color: #fff; }
.seat.taken, .seat:disabled { background: #e6ebf2; border-color: #e6ebf2; color: #aab6c6; cursor: not-allowed; }
.seat-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: .75rem; color: var(--muted); }
.seat-legend i { width: 13px; height: 13px; border-radius: 3px; display: inline-block; vertical-align: -2px; margin-right: 5px; }

/* Confirmation ticket */
.ticket { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.ticket-top { background: linear-gradient(180deg, #19a45a, #0f7a41); color: #fff; padding: 24px 16px; text-align: center; }
.ticket-top i { font-size: 2.4rem; margin-bottom: 8px; display: block; }
.ticket-top h2 { color: #fff; font-size: 1.28rem; }
.ticket-top p { font-size: .84rem; color: rgba(255,255,255,.92); }
.pnr-box { background: rgba(255,255,255,.2); border: 1px dashed rgba(255,255,255,.55); border-radius: var(--radius-xs); padding: 8px 16px; display: inline-block; margin-top: 12px; letter-spacing: .1em; font-weight: 700; }
.ticket-mid { padding: 16px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .85rem; }
.kv:last-child { border-bottom: none; }
.kv b { color: var(--ink); text-align: right; font-weight: 600; }

/* My trips */
.trip-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-xs); padding: 13px; margin-bottom: 10px; transition: box-shadow .18s; }
.trip-card:hover { box-shadow: var(--shadow); }
.trip-card .th { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.trip-card .ico { width: 38px; height: 38px; border-radius: var(--radius-sm); background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 1.02rem; flex: none; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 500; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(11, 30, 55, .55); }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius); width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .2s ease both; }
.modal-head { padding: 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; background: var(--blue-soft-2); }
.modal-body { padding: 16px; max-height: 70vh; overflow-y: auto; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 16px); z-index: 600;
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: var(--radius-sm); font-size: .84rem;
  opacity: 0; transition: .22s; pointer-events: none; max-width: 90vw; text-align: center; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* App banner */
.app-cta { position: relative; overflow: hidden; border-radius: var(--radius); color: #fff; padding: 24px 18px; display: grid; gap: 14px; background: var(--grad-navy); }
.app-cta h2 { color: #fff; font-size: 1.2rem; }
.app-cta p { font-size: .84rem; color: rgba(255,255,255,.82); }
.store-btns { display: flex; gap: 9px; flex-wrap: wrap; }
.store-btn { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.24); padding: 8px 14px; border-radius: var(--radius-sm); font-size: .8rem; transition: .18s; }
.store-btn:hover { background: #fff; color: var(--navy); }
.store-btn i { font-size: 1.25rem; }

/* -------------------------------- Footer -------------------------------- */
.footer { background: #fff; color: var(--body); padding: 26px 0 0; margin-top: 18px; border-top: 3px solid var(--orange); }
.footer h4 { color: var(--ink); font-size: .86rem; margin-bottom: 10px; }
.footer-grid { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
.footer-grid .brandcol { grid-column: 1 / -1; }
.footer .brandcol .logo { color: var(--ink); margin-bottom: 8px; }
.footer .brandcol .logo span.accent { color: var(--orange); }
.footer a { font-size: .8rem; display: block; padding: 3px 0; color: var(--body); transition: color .18s; }
.footer a:hover { color: var(--blue); }
.footer p { font-size: .8rem; }
.socials { display: flex; gap: 8px; margin-top: 11px; }
.socials a { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: .92rem; padding: 0; }
.socials a:hover { background: var(--blue); color: #fff; }
.footer-bottom { background: var(--navy); color: rgba(255,255,255,.72); margin-top: 22px; padding: 13px 0; text-align: center; font-size: .77rem; }
body.has-tabbar .footer-bottom { padding-bottom: 72px; }

/* Skeleton loader */
.skel { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-card { height: 116px; margin-bottom: 10px; }

@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

.only-mobile { display: inline-flex; }
.only-desktop { display: none; }
@media (min-width: 992px) {
  .only-mobile { display: none !important; }
  .only-desktop { display: block; }
}

/* =========================== RESPONSIVE ================================= */

@media (max-width: 359px) {
  .mode-tab { min-width: 66px; padding: 10px 10px 9px; font-size: .68rem; }
  .price-tag { font-size: 1.1rem; }
  .hero-title { font-size: 1.22rem; }
}

@media (min-width: 480px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .rail > * { flex-basis: 54%; }
  .hero-title { font-size: 1.65rem; }
  .stat-strip { grid-template-columns: repeat(4, 1fr); }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .field-grid > * { border-right: 1px solid var(--line); }
  .field-grid > *:nth-child(2n) { border-right: none; }
  .field-grid > *:nth-last-child(-n+2):nth-child(2n+1) { border-bottom: none; }
  .field-grid > *:last-child { border-bottom: none; }
}

@media (min-width: 768px) {
  body { font-size: 14.5px; }
  :root { --gutter: 28px; }
  .section { padding-block: 32px; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.45rem; }

  .hero::before { inset: 0 0 46% 0; }
  .hero-inner { padding-block: 34px 46px; }
  .hero-title { font-size: 2.05rem; margin-bottom: 16px; }
  .hero-title small { font-size: .9rem; }
  .mode-tabs { padding: 14px 8px 0; }
  .search-body { padding: 24px 18px 36px; }

  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .rail { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; }
  .rail > * { max-width: none; }

  .h-card { grid-template-columns: 250px 1fr; }
  .h-card .pic { height: 100%; min-height: 186px; }

  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid .span-2 { grid-column: span 2; }

  .app-cta { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 30px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-grid .brandcol { grid-column: auto; }
}

@media (min-width: 992px) {
  :root { --header-h: 64px; --gutter: 48px; }
  .nav { display: flex; }
  .menu-toggle { display: none; }
  .tabbar { display: none; }
  body.has-tabbar .footer-bottom { padding-bottom: 13px; }

  .hero-title { font-size: 2.3rem; }

  /* the EMT single-row search bar */
  .field-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .field-grid > *, .field-grid > *:nth-child(2n) { border-right: 1px solid var(--line); border-bottom: none; }
  .field-grid > *:last-child { border-right: none; }
  .field-grid .span-2 { grid-column: span 1; }
  .field { padding: 12px 16px; min-height: 74px; }
  .field input, .field select { font-size: 1.15rem; }

  .layout { grid-template-columns: 262px 1fr; padding-block: 18px 30px; }
  .filters.sheet { position: static; transform: none; inset: auto; display: block; }
  .filters.sheet .sheet-foot { display: none; }
  .filters.sheet .scroll { overflow: visible; }
  .filters { position: sticky; top: calc(var(--header-h) + 60px); max-height: calc(100vh - var(--header-h) - 80px); overflow-y: auto; }

  .booking-layout { display: grid; grid-template-columns: 1fr 330px; gap: 16px; align-items: start; }
  .rail { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1280px) {
  :root { --gutter: 76px; }
  .nav { gap: 26px; }
  .nav a { padding: 0 12px; }
  .hero-title { font-size: 2.6rem; }
  .layout { grid-template-columns: 288px 1fr; gap: 18px; }
  .booking-layout { grid-template-columns: 1fr 366px; gap: 20px; }
  .h-card { grid-template-columns: 320px 1fr; }
  .rail.rail-3 { grid-template-columns: repeat(3, 1fr); }
  .field-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

@media (min-width: 1600px) {
  :root { --gutter: 120px; }
  body { font-size: 15px; }
  .section { padding-block: 40px; }
  .hero-title { font-size: 3rem; }
  .layout { grid-template-columns: 316px 1fr; gap: 22px; }
  .booking-layout { grid-template-columns: 1fr 400px; }
  .rail { grid-template-columns: repeat(5, 1fr); }
  .rail.rail-3 { grid-template-columns: repeat(3, 1fr); }
  .h-card { grid-template-columns: 390px 1fr; }
  .dest { height: 210px; }
  .offer .thumb { height: 160px; }
}

@media (min-width: 2000px) {
  :root { --gutter: 190px; }
  .rail { grid-template-columns: repeat(6, 1fr); }
  .layout { grid-template-columns: 336px 1fr; }
}

@media (max-height: 480px) and (orientation: landscape) {
  .filters.sheet { top: 4%; }
  .drawer-head { padding: 12px 16px; }
}

@media print {
  .header, .tabbar, .footer, .no-print, .drawer, .overlay { display: none !important; }
  body { background: #fff; }
  .ticket { box-shadow: none; border: 1px solid #ccc; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   MOBILE HARDENING — applies on top of everything above
   ========================================================================== */

/* 1. Nothing may push the page sideways. Grid/flex children default to
      min-width:auto, which lets long words and wide rows blow out the layout. */
.layout > *, .booking-layout > *, .grid > *, .rail > *, .slider-track > *,
.f-card, .h-card, .t-card, .trip-card, .panel, .card { min-width: 0; }
.h-body, .f-top > div, .t-head > div, .trip-card .th > div { min-width: 0; }
.f-name, .h-body h3, .t-head h3, .trip-card h3, .ac-list b { overflow-wrap: anywhere; }
.kv b, .field .sub, .footer p { overflow-wrap: anywhere; }

/* 1b. Anything scrolled into view must clear the sticky header. */
.form-row input, .form-row select, .form-row textarea,
.panel, .f-card, .h-card, .t-card, .card { scroll-margin-top: calc(var(--header-h) + 16px); }

/* 2. Never let a row of price + button collide on a narrow screen. */
.f-bottom, .h-price, .t-head, .trip-card .th { flex-wrap: wrap; }
.f-bottom > *, .h-price > * { min-width: 0; }

@media (max-width: 767px) {
  /* iOS zooms the whole page when a focused input is under 16px — force 16px. */
  .field input, .field select,
  .form-row input, .form-row select, .form-row textarea,
  #couponInput { font-size: 16px; }

  /* comfortable tap targets */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; padding: 9px 16px; }
  .chip { min-height: 36px; display: inline-flex; align-items: center; }
  .check { padding: 8px 0; }
  .check input { width: 20px; height: 20px; }
  .icon-btn { width: 38px; height: 38px; }

  /* navbar runs the full width — minimal inset so the controls sit at the edges */
  .header-inner { gap: 6px; padding-left: 6px; padding-right: 6px; }
  .logo { margin-right: auto; }
  .header-actions { gap: 6px; }
  .logo { font-size: 1.04rem; }
  .logo-mark { width: 28px; height: 28px; }
  .btn-login { padding: 8px 14px; font-size: .78rem; min-height: 38px; }

  /* results bar must never overflow — the route line truncates instead */
  .results-bar .summary { gap: 8px; }
  .results-bar .route { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .results-bar .meta { font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .results-bar > .container > .summary > div:first-child { min-width: 0; flex: 1; }
  .btn-modify { flex: none; padding: 8px 13px; }

  /* flight/train/bus rows: give the times room, keep the fare on its own line */
  .f-time b { font-size: 1.02rem; }
  .f-times { gap: 6px; }
  .f-bottom { gap: 8px; }
  .price-tag { font-size: 1.18rem; }

  /* hotel card image a touch shorter so more of the card is visible */
  .h-card .pic { height: 158px; }

  /* section rhythm */
  .section { padding-block: 22px; }
  .section-head { margin-bottom: 12px; }
  h2 { font-size: 1.12rem; }

  /* hero + search card */
  .hero-inner { padding-block: 16px 38px; }
  .hero-title { font-size: 1.28rem; }
  .hero-title small { font-size: .78rem; }
  .hero-pills { gap: 6px; }
  .hero-pill { padding: 4px 10px; font-size: .69rem; }
  .search-body { padding: 16px 12px 28px; }
  .mode-tab { padding: 9px 13px; min-width: 70px; }
  .search-submit .btn { min-width: 170px; padding: 12px 30px; }

  /* the drawer should not cover the whole screen */
  .drawer { inset: 0 18% 0 0; }

  /* modals and sheets stay inside the viewport */
  .modal { padding: 12px; align-items: flex-end; }
  .modal-box { max-height: 88vh; }
  .filters.sheet { top: 8%; }

  /* toast clears the bottom tab bar */
  .toast { bottom: 78px; left: 12px; right: 12px; transform: translateY(16px); max-width: none; }
  .toast.show { transform: translateY(0); }

  /* footer columns stack cleanly */
  .footer { padding-top: 22px; }
  .footer-grid { gap: 16px; }
}

/* sections opting into one full-width card per row on phones */
@media (max-width: 599px) {
  .grid.stack-sm { grid-template-columns: 1fr; gap: 10px; }
  .grid.stack-sm .usp { padding: 14px; align-items: center; }
  .grid.stack-sm .usp i { width: 44px; height: 44px; font-size: 1.15rem; }
  .grid.stack-sm .usp h4 { font-size: .95rem; }
  .grid.stack-sm .usp p { font-size: .82rem; }
}

/* very small phones — 320px class devices */
@media (max-width: 400px) {
  .f-time b { font-size: .96rem; }
  .f-time span { font-size: .68rem; }
  .airline-logo { width: 30px; height: 30px; font-size: .64rem; }
  .badge { padding: 3px 7px; font-size: .64rem; }
  .amenities span { font-size: .67rem; }
  .seat-grid { gap: 6px; }
  .steps .step span { font-size: .72rem; }
  .step-line { width: 16px; }
  .grid-4 { gap: 10px; }
  .usp { padding: 11px; gap: 9px; }
  .usp i { width: 36px; height: 36px; font-size: .95rem; }
}

/* single-column fields until there is genuinely room for two */
@media (min-width: 480px) and (max-width: 599px) {
  .field-grid { grid-template-columns: 1fr; }
  .field-grid > * { border-right: none !important; border-bottom: 1px solid var(--line); }
  .field-grid > *:last-child { border-bottom: none; }
}

/* tablet portrait — two columns of cards reads better than four */
@media (min-width: 600px) and (max-width: 767px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .rail > * { flex-basis: 46%; }
}

/* phones in landscape: short viewport, keep chrome small */
@media (max-height: 520px) and (orientation: landscape) {
  .hero-inner { padding-block: 12px 34px; }
  .hero-title { font-size: 1.15rem; margin-bottom: 8px; }
  .hero-pills { display: none; }
  .filters.sheet { top: 4%; }
  .tabbar { padding: 3px 2px calc(3px + env(safe-area-inset-bottom)); }
  .tabbar a i { font-size: .95rem; }
}

/* sticky pay bar on the checkout page (phones + tablets) */
.paybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 260; background: #fff;
  border-top: 1px solid var(--line); box-shadow: 0 -2px 14px rgba(23, 37, 61, .14);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
}
.paybar span { font-size: .72rem; color: var(--muted); display: block; line-height: 1.2; }
.paybar b { font-size: 1.12rem; color: var(--ink); font-weight: 700; }
.paybar .btn { flex: none; min-width: 148px; }
body.checkout { padding-bottom: 74px; }
body.checkout .tabbar { display: none; }
body.checkout .footer-bottom { padding-bottom: 13px; }
@media (min-width: 992px) {
  .paybar { display: none; }
  body.checkout { padding-bottom: 0; }
}

/* coarse pointers (touch) regardless of width — hover-only affordances stay put */
@media (pointer: coarse) {
  .slider-btn { width: 38px; height: 38px; }
  a.card:hover, .card.hoverable:hover, .f-card:hover, .h-card:hover,
  .t-card:hover, .trip-card:hover { transform: none; }
}
