/* ============================================================
   MyFareScout — Main Stylesheet
   Dark navy theme, mobile-first, premium travel-tech UI
   ============================================================ */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --bg-primary:    #0b1120;
  --bg-secondary:  #111827;
  --bg-card:       #1a2235;
  --bg-card-hover: #1f2a42;
  --bg-input:      #1e2d47;
  --border:        #243550;
  --border-light:  #2d4060;
  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --accent:        #38bdf8;
  --accent-dark:   #0284c7;
  --accent-glow:   rgba(56,189,248,0.15);
  --green:         #22c55e;
  --green-dark:    #16a34a;
  --yellow:        #f59e0b;
  --red:           #ef4444;
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --shadow:        0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow:   0 0 20px rgba(56,189,248,0.2);
  --transition:    all 0.2s ease;
  --header-h:      64px;
}

/* ── Reset & Base ────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.85; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul { list-style: none; }

/* ── Layout ──────────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

/* ── Typography ──────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem);   font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem;    font-weight: 600; }
p  { color: var(--text-secondary); }
.text-accent   { color: var(--accent); }
.text-green    { color: var(--green); }
.text-yellow   { color: var(--yellow); }
.text-red      { color: var(--red); }
.text-muted    { color: var(--text-muted); }
.text-sm       { font-size: 0.875rem; }
.text-xs       { font-size: 0.75rem; }
.text-center   { text-align: center; }
.font-bold     { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium   { font-weight: 500; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius); border: none;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); white-space: nowrap;
  text-decoration: none; line-height: 1;
}
.btn-primary {
  background: var(--accent); color: #0b1120;
}
.btn-primary:hover { background: #60cafa; opacity: 1; transform: translateY(-1px); }
.btn-green {
  background: var(--green); color: #fff;
}
.btn-green:hover { background: var(--green-dark); opacity: 1; }
.btn-ghost {
  background: transparent; color: var(--text-primary); border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-card); border-color: var(--border-light); opacity: 1; }
.btn-outline {
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-glow); opacity: 1; }
.btn-danger {
  background: var(--red); color: #fff;
}
.btn-danger:hover { opacity: 0.85; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-icon { padding: 10px; }

/* ── Form Elements ───────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 6px; color: var(--text-secondary); }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="tel"],
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 36px; }
textarea { resize: vertical; min-height: 100px; }
.form-error { color: var(--red); font-size: 0.8rem; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card-body { padding: 20px; }
.card-header { padding: 20px; border-bottom: 1px solid var(--border); }
.card-footer { padding: 16px 20px; border-top: 1px solid var(--border); }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 99px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-low      { background: rgba(34,197,94,0.15);  color: var(--green); }
.badge-typical  { background: rgba(245,158,11,0.15); color: var(--yellow); }
.badge-high     { background: rgba(239,68,68,0.15);  color: var(--red); }
.badge-excellent{ background: rgba(34,197,94,0.2);   color: var(--green); }
.badge-good     { background: rgba(56,189,248,0.15); color: var(--accent); }
.badge-average  { background: rgba(245,158,11,0.15); color: var(--yellow); }
.badge-demo     { background: rgba(245,158,11,0.15); color: var(--yellow); }
.badge-success  { background: rgba(34,197,94,0.15);  color: var(--green); }
.badge-danger   { background: rgba(239,68,68,0.15);  color: var(--red); }
.badge-muted    { background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,17,32,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.nav-container {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-primary); font-weight: 700; font-size: 1.2rem;
  text-decoration: none;
}
.logo-icon { width: 28px; height: 28px; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  transition: var(--transition); text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); background: var(--bg-card); }
.nav-link-icon { padding: 8px; display: flex; align-items: center; }
.nav-link-icon svg { width: 20px; height: 20px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.nav-avatar-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); padding: 6px 12px; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500;
}
.nav-avatar-btn:hover { border-color: var(--border-light); }
.nav-username { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { width: 14px; height: 14px; transition: var(--transition); }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius); min-width: 180px;
  box-shadow: var(--shadow-lg); z-index: 200;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: var(--transition);
}
.dropdown-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: block; padding: 10px 16px;
  color: var(--text-secondary); font-size: 0.875rem;
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.dropdown-item-danger { color: var(--red); }
.dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }

/* Mobile menu */
.mobile-menu-btn {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 6px;
}
.mobile-menu-btn span {
  width: 22px; height: 2px;
  background: var(--text-primary); border-radius: 99px;
  transition: var(--transition);
}
.mobile-menu {
  display: none; flex-direction: column;
  background: var(--bg-secondary); border-top: 1px solid var(--border);
  position: absolute; top: var(--header-h); left: 0; right: 0;
  z-index: 99; padding: 12px 20px;
}
.mobile-menu.open { display: flex; }
.mobile-nav-link {
  padding: 12px 0; color: var(--text-primary);
  border-bottom: 1px solid var(--border); font-size: 0.95rem;
}

/* ── Flash Messages ──────────────────────────────────────────── */
.flash-container { max-width: 1280px; margin: 16px auto 0; padding: 0 20px; }
.flash-message {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-radius: var(--radius); margin-bottom: 10px;
  font-size: 0.9rem; font-weight: 500;
}
.flash-success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; }
.flash-error   { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }
.flash-info    { background: rgba(56,189,248,0.12); border: 1px solid rgba(56,189,248,0.3); color: var(--accent); }
.flash-warning { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: var(--yellow); }
.flash-close   { background: none; border: none; color: inherit; font-size: 1.2rem; opacity: 0.7; cursor: pointer; }
.flash-close:hover { opacity: 1; }

/* ── Demo Banner ─────────────────────────────────────────────── */
.demo-banner {
  background: rgba(245,158,11,0.1); border-bottom: 1px solid rgba(245,158,11,0.2);
  color: var(--yellow); text-align: center; padding: 8px 20px;
  font-size: 0.8rem; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.demo-banner svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0b1120 0%, #0f1f3d 50%, #0b1a2e 100%);
  padding: 60px 0 80px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -200px; right: -100px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(56,189,248,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { margin-bottom: 12px; }
.hero h1 span { color: var(--accent); }
.hero-sub { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 36px; max-width: 520px; }

/* ── Search Form ─────────────────────────────────────────────── */
.search-form {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.search-tabs { display: flex; gap: 4px; margin-bottom: 20px; }
.search-tab {
  padding: 8px 18px; border-radius: var(--radius-sm);
  background: none; border: none; color: var(--text-muted);
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
  transition: var(--transition);
}
.search-tab.active {
  background: var(--accent); color: #0b1120; font-weight: 600;
}
.search-tab:hover:not(.active) { background: var(--bg-input); color: var(--text-primary); }
.search-row { display: grid; grid-template-columns: 1fr auto 1fr 1fr 1fr auto; gap: 8px; align-items: end; }
.search-field { position: relative; }
.search-field label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px;
}
.search-field input, .search-field select {
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-primary); padding: 13px 14px; font-size: 1rem;
  border-radius: var(--radius); font-weight: 500;
}
.search-field input:focus, .search-field select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.swap-btn {
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--accent); width: 40px; height: 48px;
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); align-self: flex-end;
  flex-shrink: 0;
}
.swap-btn:hover { background: var(--accent-glow); border-color: var(--accent); }
.swap-btn svg { width: 18px; height: 18px; transition: transform 0.3s ease; }
.swap-btn:hover svg { transform: rotate(180deg); }
.search-submit { height: 48px; padding: 0 28px; align-self: flex-end; font-size: 1rem; white-space: nowrap; }

/* Autocomplete */
.autocomplete-wrapper { position: relative; }
.autocomplete-list {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 50; max-height: 220px; overflow-y: auto; margin-top: 4px;
}
.autocomplete-item {
  padding: 10px 14px; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 12px;
}
.autocomplete-item:hover, .autocomplete-item.highlighted { background: var(--bg-card-hover); }
.autocomplete-code {
  background: var(--bg-input); color: var(--accent);
  padding: 2px 8px; border-radius: 4px;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.autocomplete-name { font-size: 0.875rem; color: var(--text-primary); }
.autocomplete-city { font-size: 0.75rem; color: var(--text-muted); }

/* Passenger selector */
.pax-selector {
  position: relative;
}
.pax-btn {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-primary); padding: 13px 14px; font-size: 1rem;
  border-radius: var(--radius); cursor: pointer; text-align: left;
  display: flex; justify-content: space-between; align-items: center;
}
.pax-dropdown {
  position: absolute; top: 100%; left: 0; min-width: 260px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 50; padding: 16px; margin-top: 4px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: var(--transition);
}
.pax-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.pax-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.pax-row:last-child { border-bottom: none; }
.pax-label { font-size: 0.9rem; font-weight: 500; }
.pax-sub { font-size: 0.75rem; color: var(--text-muted); }
.pax-controls { display: flex; align-items: center; gap: 12px; }
.pax-controls button {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 1.1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.pax-controls button:hover { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }
.pax-count { min-width: 24px; text-align: center; font-weight: 600; }

/* ── Search Options Row ───────────────────────────────────────── */
.search-options { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.search-option {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-muted); cursor: pointer;
}
.search-option input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; }

/* ── Results Page ────────────────────────────────────────────── */
.results-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.filter-sidebar {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  position: sticky; top: calc(var(--header-h) + 12px);
}
.filter-section { margin-bottom: 24px; }
.filter-section h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 12px; }
.filter-option { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.filter-option input { accent-color: var(--accent); }
.filter-option label { font-size: 0.875rem; cursor: pointer; }
.filter-count { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); }
.filter-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* Price range slider */
.price-slider { width: 100%; accent-color: var(--accent); margin: 8px 0; }
.price-range-labels { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); }

/* Results list */
.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.results-count { font-size: 0.9rem; color: var(--text-muted); }
.results-sort { display: flex; gap: 8px; }
.sort-btn {
  padding: 7px 14px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: var(--transition);
}
.sort-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }
.sort-btn:hover { border-color: var(--border-light); color: var(--text-primary); }

/* Active filters */
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent-glow); border: 1px solid var(--accent);
  color: var(--accent); padding: 4px 10px; border-radius: 99px;
  font-size: 0.8rem; font-weight: 500;
}
.filter-chip button { background: none; border: none; color: inherit; font-size: 1rem; line-height: 1; }

/* Flight card */
.result-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 12px;
  transition: var(--transition); overflow: hidden;
}
.result-card:hover { border-color: var(--border-light); box-shadow: var(--shadow); }
.result-card-main { padding: 20px; display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.airline-info { display: flex; align-items: center; gap: 12px; min-width: 160px; }
.airline-logo { width: 40px; height: 40px; object-fit: contain; border-radius: var(--radius-sm); background: #fff; padding: 4px; }
.airline-initials {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; border: 1px solid var(--border);
}
.airline-name-text { font-size: 0.875rem; font-weight: 500; }
.airline-fare-type { font-size: 0.75rem; color: var(--text-muted); }
.flight-times { display: flex; align-items: center; gap: 16px; flex: 1; }
.time-block { text-align: center; }
.time-big { font-size: 1.3rem; font-weight: 700; }
.time-airport { font-size: 0.75rem; color: var(--text-muted); }
.flight-path { flex: 1; display: flex; align-items: center; gap: 8px; }
.path-line { flex: 1; height: 1px; background: var(--border); position: relative; }
.path-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-light); flex-shrink: 0; }
.flight-duration { font-size: 0.8rem; color: var(--text-muted); text-align: center; }
.flight-stops { font-size: 0.8rem; color: var(--text-primary); font-weight: 500; text-align: center; }
.flight-stops.nonstop { color: var(--green); }
.flight-price-col { text-align: right; min-width: 140px; }
.price-main { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); }
.price-per { font-size: 0.75rem; color: var(--text-muted); }
.price-total { font-size: 0.8rem; color: var(--text-muted); }
.result-actions { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }
.save-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-muted); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.save-btn:hover, .save-btn.saved { color: var(--red); border-color: var(--red); background: rgba(239,68,68,0.1); }
.save-btn svg { width: 16px; height: 16px; }
.result-card-details {
  border-top: 1px solid var(--border); padding: 20px;
  display: none;
}
.result-card-details.open { display: block; }
.details-toggle {
  width: 100%; background: none; border: none;
  color: var(--accent); font-size: 0.85rem; font-weight: 500;
  padding: 10px 20px; border-top: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: var(--transition);
}
.details-toggle:hover { background: var(--bg-card-hover); }
.details-toggle svg { width: 16px; height: 16px; transition: transform 0.2s; }
.details-toggle.open svg { transform: rotate(180deg); }

/* Segment timeline */
.segment-timeline { display: flex; flex-direction: column; gap: 16px; }
.segment-item { display: grid; grid-template-columns: 40px 1fr; gap: 12px; }
.segment-line { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.segment-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg-card); flex-shrink: 0; }
.segment-line-bar { flex: 1; width: 2px; background: var(--border-light); }

/* Sponsored card */
.sponsored-card { border-color: rgba(245,158,11,0.3) !important; }
.sponsored-label {
  background: rgba(245,158,11,0.1); color: var(--yellow);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 4px 12px;
}
.sponsored-content { padding: 16px 20px; display: flex; align-items: center; gap: 16px; }
.sponsor-logo { height: 36px; width: auto; object-fit: contain; border-radius: var(--radius-sm); }

/* Mobile filter button */
.mobile-filter-btn {
  display: none; position: fixed; bottom: 20px; right: 20px;
  background: var(--accent); color: #0b1120;
  border: none; border-radius: 99px;
  padding: 12px 20px; font-weight: 600; font-size: 0.9rem;
  box-shadow: var(--shadow-lg); z-index: 50;
  align-items: center; gap: 8px;
}
.mobile-filter-btn svg { width: 18px; height: 18px; }
.filter-drawer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-secondary); border-top: 1px solid var(--border-light);
  border-radius: 20px 20px 0 0;
  padding: 20px; z-index: 200;
  max-height: 80vh; overflow-y: auto;
  transform: translateY(100%); transition: transform 0.3s ease;
}
.filter-drawer.open { transform: translateY(0); }
.filter-drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 199; display: none;
}
.filter-drawer-overlay.open { display: block; }

/* ── Destination Cards ────────────────────────────────────────── */
.dest-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 3/2; cursor: pointer; display: block; color: inherit;
  text-decoration: none;
}
.dest-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.dest-card:hover img { transform: scale(1.06); }
.dest-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
  padding: 20px; display: flex; flex-direction: column; justify-content: flex-end;
  transition: var(--transition);
}
.dest-card:hover .dest-card-overlay { background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, transparent 55%); }
.dest-city { font-size: 1.1rem; font-weight: 700; color: #fff; }
.dest-country { font-size: 0.8rem; color: rgba(255,255,255,0.7); }
.dest-price { font-size: 0.9rem; color: var(--green); font-weight: 600; margin-top: 4px; }
.dest-save {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0,0,0,0.5); border: none; color: #fff;
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); backdrop-filter: blur(4px);
}
.dest-save:hover { background: rgba(239,68,68,0.7); }
.dest-save svg { width: 16px; height: 16px; }

/* ── Deal Cards ──────────────────────────────────────────────── */
.deal-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: var(--transition); display: flex; flex-direction: column;
}
.deal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-light); }
.deal-card-img { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.deal-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.deal-card:hover .deal-card-img img { transform: scale(1.05); }
.deal-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.deal-route { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.deal-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.deal-prices { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.deal-price { font-size: 1.4rem; font-weight: 700; color: var(--green); }
.deal-normal { font-size: 0.875rem; color: var(--text-muted); text-decoration: line-through; }
.deal-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.deal-expiry { font-size: 0.75rem; color: var(--text-muted); }

/* ── Alerts Page ─────────────────────────────────────────────── */
.alert-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
  margin-bottom: 12px; transition: var(--transition);
}
.alert-card:hover { border-color: var(--border-light); }
.alert-route { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.alert-meta { font-size: 0.85rem; color: var(--text-muted); }
.alert-price-current { font-size: 1.5rem; font-weight: 700; color: var(--green); }
.alert-price-target  { font-size: 0.85rem; color: var(--text-muted); }
.alert-actions { display: flex; gap: 8px; align-items: start; }
.bell-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-muted); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.bell-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-glow); }
.bell-btn svg { width: 16px; height: 16px; }

/* ── Auth Pages ──────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse at 60% 30%, rgba(56,189,248,0.05) 0%, transparent 60%);
}
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-xl); padding: 40px;
  width: 100%; max-width: 440px; box-shadow: var(--shadow-lg);
}
.auth-logo { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 28px; }
.auth-logo svg { width: 32px; height: 32px; color: var(--accent); }
.auth-logo-text { font-size: 1.4rem; font-weight: 700; }
.auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-sub { text-align: center; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 28px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 0.8rem; color: var(--text-muted); }
.auth-footer { text-align: center; font-size: 0.875rem; margin-top: 20px; color: var(--text-muted); }

/* ── Profile Page ────────────────────────────────────────────── */
.profile-header {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px;
  display: flex; align-items: center; gap: 24px; margin-bottom: 24px;
}
.profile-avatar-wrap { position: relative; }
.profile-avatar-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); }
.profile-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  background: var(--accent); color: #0b1120;
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.75rem; font-weight: 700;
}
.profile-stats { display: flex; gap: 24px; margin-top: 16px; }
.profile-stat { text-align: center; }
.profile-stat-num { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.profile-stat-label { font-size: 0.75rem; color: var(--text-muted); }
.profile-tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px; }
.profile-tab { flex: 1; padding: 10px; border-radius: var(--radius-sm); background: none; border: none; color: var(--text-muted); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: var(--transition); }
.profile-tab.active { background: var(--bg-input); color: var(--text-primary); }

/* ── Saved Trips ─────────────────────────────────────────────── */
.saved-flight-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
  margin-bottom: 12px;
}
.price-changed { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); }
.expired-fare  { opacity: 0.6; }
.compare-tray {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-secondary); border-top: 2px solid var(--accent);
  padding: 14px 20px; z-index: 100;
  display: none; align-items: center; justify-content: space-between;
  transform: translateY(100%); transition: transform 0.3s ease;
}
.compare-tray.open { display: flex; transform: translateY(0); }

/* ── Explore / Map ────────────────────────────────────────────── */
.explore-hero { padding: 40px 0; text-align: center; }
.interest-filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.interest-btn {
  padding: 8px 18px; border-radius: 99px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 6px;
}
.interest-btn:hover, .interest-btn.active {
  background: var(--accent-glow); border-color: var(--accent); color: var(--accent);
}
.map-placeholder {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); height: 400px;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 12px; color: var(--text-muted);
  margin-bottom: 32px;
}
.map-placeholder svg { width: 48px; height: 48px; opacity: 0.4; }

/* ── Toast ───────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 12px 20px;
  font-size: 0.875rem; font-weight: 500; box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease forwards;
  min-width: 240px; text-align: center;
}
.toast-success { border-color: var(--green); color: var(--green); }
.toast-error   { border-color: var(--red); color: var(--red); }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Skeleton Loaders ────────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { height: 110px; border-radius: var(--radius-lg); margin-bottom: 12px; }
.skeleton-text-sm { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-text-lg { height: 22px; margin-bottom: 10px; border-radius: 4px; }

/* ── Loading State ───────────────────────────────────────────── */
.loading-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px; gap: 16px; color: var(--text-muted);
}
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.plane-loader {
  font-size: 2rem; animation: planeFly 1.5s ease-in-out infinite;
}
@keyframes planeFly { 0%,100% { transform: translateX(-10px) rotate(-10deg); } 50% { transform: translateX(10px) rotate(10deg); } }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 20px; text-align: center; gap: 12px;
}
.empty-state svg { width: 64px; height: 64px; color: var(--text-muted); opacity: 0.5; }
.empty-state h3 { font-size: 1.2rem; }
.empty-state p  { max-width: 360px; font-size: 0.9rem; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.page-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--accent); color: #0b1120; border-color: var(--accent); }

/* ── Guides Page ─────────────────────────────────────────────── */
.guide-card { text-decoration: none; color: inherit; }
.guide-card-img { aspect-ratio: 16/9; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.guide-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.guide-card:hover .guide-card-img img { transform: scale(1.05); }
.guide-hero-img { width: 100%; height: 400px; object-fit: cover; border-radius: var(--radius-xl); margin-bottom: 32px; }
.guide-content h2 { margin: 28px 0 10px; font-size: 1.4rem; }
.guide-content p  { margin-bottom: 16px; color: var(--text-secondary); }
.guide-content ul { margin-bottom: 16px; padding-left: 20px; }
.guide-content ul li { color: var(--text-secondary); margin-bottom: 6px; list-style: disc; }

/* ── Contact Page ────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

/* ── Static Pages ────────────────────────────────────────────── */
.static-page { max-width: 800px; margin: 0 auto; padding: 60px 20px; }
.static-page h1 { margin-bottom: 8px; }
.static-page .updated { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 32px; }
.static-page h2 { margin: 32px 0 10px; font-size: 1.2rem; }
.static-page p  { margin-bottom: 14px; color: var(--text-secondary); }
.static-page ul { padding-left: 20px; margin-bottom: 14px; }
.static-page ul li { color: var(--text-secondary); margin-bottom: 6px; list-style: disc; }

/* ── Section Headers ─────────────────────────────────────────── */
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.section-header h2 { margin-bottom: 4px; }
.section-header .section-sub { color: var(--text-muted); font-size: 0.875rem; }
.section-header .view-all { font-size: 0.875rem; color: var(--accent); white-space: nowrap; }

/* ── Cookie Notice ───────────────────────────────────────────── */
.cookie-notice {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-secondary); border-top: 1px solid var(--border);
  padding: 14px 20px; z-index: 300;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex-wrap: wrap;
}
.cookie-notice p { color: var(--text-secondary); font-size: 0.875rem; margin: 0; }

/* ── Booking Redirect ────────────────────────────────────────── */
.redirect-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px;
  max-width: 500px; margin: 0 auto; text-align: center;
}
.redirect-countdown { font-size: 2rem; font-weight: 700; color: var(--accent); margin: 16px 0; }
.redirect-disclaimer {
  background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius); padding: 14px; margin: 16px 0;
  font-size: 0.85rem; color: var(--yellow);
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border);
  margin-top: 80px;
}
.footer-container { max-width: 1280px; margin: 0 auto; padding: 60px 20px 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; color: var(--text-primary); font-weight: 700; font-size: 1.1rem; margin-bottom: 14px; text-decoration: none; }
.footer-tagline { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 12px; }
.footer-disclaimer { font-size: 0.75rem; color: var(--text-muted); line-height: 1.6; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-secondary); font-size: 0.875rem; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--text-primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.footer-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-badge { font-size: 0.7rem; padding: 3px 10px; border: 1px solid var(--border); border-radius: 99px; color: var(--text-muted); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .results-layout { grid-template-columns: 1fr; }
  .filter-sidebar { display: none; position: static; }
  .mobile-filter-btn { display: flex; }
  .search-row { grid-template-columns: 1fr auto 1fr 1fr; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .site-header { position: sticky; }
  .search-row { grid-template-columns: 1fr auto 1fr; }
  .search-submit { grid-column: 1 / -1; width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .profile-header { flex-direction: column; text-align: center; }
  .result-card-main { grid-template-columns: 1fr; gap: 12px; }
  .flight-price-col { text-align: left; }
  .result-actions { justify-content: flex-start; }
  .results-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .results-sort { flex-wrap: wrap; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .search-options { flex-direction: column; gap: 10px; }
  .auth-card { padding: 28px 20px; }
}
@media (max-width: 480px) {
  .hero { padding: 40px 0 50px; }
  .search-form { padding: 20px; border-radius: var(--radius-lg); }
  .search-row { grid-template-columns: 1fr; }
  .swap-btn { display: none; }
  h1 { font-size: 1.75rem; }
}

/* ── Utilities ───────────────────────────────────────────────── */
.mt-8  { margin-top: 8px;  } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; }
.p-16  { padding: 16px; } .p-20 { padding: 20px; } .p-24 { padding: 24px; }
.w-full { width: 100%; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.rounded-full { border-radius: 99px; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.cursor-pointer { cursor: pointer; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-title { font-size: clamp(1.3rem,2.5vw,1.8rem); font-weight: 700; }
.flex-1 { flex: 1; }
