/* ==========================================
   FlightHub - Global Styles
   ========================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand-orange: #FF6B2B;
  --brand-orange-dark: #E55A1A;
  --brand-orange-light: #FFF3EE;
  --brand-blue: #1A3C6B;
  --brand-blue-light: #2A5298;
  --header-bg: #F1F2EC;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --green-500: #10B981;
  --green-100: #D1FAE5;
  --red-500: #EF4444;
  --red-100: #FEE2E2;
  --yellow-400: #FBBF24;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--gray-100); color: var(--gray-800); line-height: 1.5; min-height: 100vh; }

/* ==========================================
   HEADER
   ========================================== */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-logo img {
  height: 36px;
  width: auto;
  cursor: pointer;
}

.header-logo {
  text-decoration: none;
  flex-shrink: 0;
}

.header-spacer { flex: 1; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav a, .header-nav button.nav-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-700);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.header-nav a:hover, .header-nav button.nav-btn:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

.currency-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--gray-700) !important;
}

.btn-signin {
  background: var(--brand-orange) !important;
  color: white !important;
  font-weight: 600;
  padding: 8px 18px !important;
  border-radius: var(--radius) !important;
}
.btn-signin:hover {
  background: var(--brand-orange-dark) !important;
}

/* Currency Dropdown */
.currency-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  min-width: 200px;
  z-index: 2000;
  overflow: hidden;
  margin-top: 4px;
}

.currency-dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: background var(--transition);
}

.currency-dropdown-item:hover { background: var(--gray-50); }
.currency-dropdown-item.active { background: var(--brand-orange-light); color: var(--brand-orange); font-weight: 600; }

/* Search Summary Bar */
.search-summary-bar {
  background: var(--brand-blue);
  color: white;
  padding: 8px 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background var(--transition);
}

.search-summary-bar:hover { background: var(--brand-blue-light); }
.search-summary-bar .summary-route { font-weight: 700; font-size: 14px; }
.search-summary-bar .summary-sep { opacity: 0.5; }
.search-summary-bar .modify-btn {
  margin-left: auto;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: background var(--transition);
}
.search-summary-bar .modify-btn:hover { background: rgba(255,255,255,0.3); }

/* ==========================================
   HERO / SEARCH FORM
   ========================================== */
.hero {
  background: linear-gradient(135deg, var(--brand-blue) 0%, #2A5298 40%, #1565C0 100%);
  padding: 50px 20px 70px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-title {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

.hero-title h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-title p {
  font-size: 16px;
  opacity: 0.85;
}

/* Search Card */
.search-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 28px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

/* Trip Type Tabs */
.trip-type-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--gray-200);
  padding-bottom: 0;
}

.trip-tab {
  padding: 8px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  position: relative;
  transition: color var(--transition);
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.trip-tab.active {
  color: var(--brand-orange);
  border-bottom-color: var(--brand-orange);
  font-weight: 700;
}

.trip-tab:hover:not(.active) { color: var(--gray-700); }

/* Search Options Row */
.search-options-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* Dropdown Triggers */
.option-dropdown {
  position: relative;
}

.option-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-700);
  transition: border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.option-trigger:hover, .option-trigger.open {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(255,107,43,0.1);
}

.option-trigger .chevron {
  margin-left: 4px;
  transition: transform var(--transition);
  font-size: 10px;
}

.option-trigger.open .chevron { transform: rotate(180deg); }

/* Dropdown Panel */
.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 500;
  min-width: 280px;
  overflow: hidden;
}

/* Class Dropdown */
.class-option {
  padding: 12px 18px;
  cursor: pointer;
  font-size: 14px;
  transition: background var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.class-option:hover { background: var(--gray-50); }
.class-option.active { background: var(--brand-orange-light); color: var(--brand-orange); font-weight: 600; }

/* Passenger Selector */
.pax-panel { padding: 16px 20px 20px; min-width: 320px; }
.pax-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.pax-row:last-child { border-bottom: none; }
.pax-info { flex: 1; }
.pax-label { font-size: 15px; font-weight: 600; color: var(--gray-800); }
.pax-desc { font-size: 12px; color: var(--gray-400); }
.pax-controls { display: flex; align-items: center; gap: 12px; }
.pax-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-300);
  background: white;
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-600);
  transition: all var(--transition);
  font-family: inherit;
}
.pax-btn:hover:not(:disabled) {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  background: var(--brand-orange-light);
}
.pax-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pax-count { font-size: 16px; font-weight: 700; min-width: 24px; text-align: center; }

/* Search Fields Row */
.search-fields-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.search-field {
  position: relative;
  flex: 1;
}

.search-input-wrap {
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: white;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.search-input-wrap:hover, .search-input-wrap:focus-within {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(255,107,43,0.1);
}

.search-input-wrap.error { border-color: var(--red-500); box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }

.field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  margin-bottom: 2px;
}

.field-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  min-height: 1.2em;
}

.field-value.placeholder { color: var(--gray-400); font-weight: 500; font-size: 15px; }

.field-value input {
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  width: 100%;
  font-family: inherit;
  background: transparent;
}

.field-value input::placeholder { color: var(--gray-400); font-weight: 400; }

/* Swap Button */
.swap-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 16px;
  transition: all var(--transition);
  align-self: center;
  flex-shrink: 0;
  z-index: 10;
}

.swap-btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  background: var(--brand-orange-light);
  transform: rotate(180deg);
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 9600;
  max-height: 320px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.autocomplete-item:hover, .autocomplete-item.highlighted { background: var(--gray-50); }
.autocomplete-item.active { background: var(--brand-orange-light); }

.autocomplete-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.autocomplete-icon.city { background: var(--brand-blue); color: white; }

.autocomplete-text { flex: 1; }
.autocomplete-name { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.autocomplete-sub { font-size: 12px; color: var(--gray-400); }
.autocomplete-code { font-size: 13px; font-weight: 700; color: var(--gray-500); margin-left: auto; flex-shrink: 0; }

/* Calendar */
.calendar-overlay {
  position: fixed;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 9500;
  padding: 20px;
  min-width: 320px;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cal-nav-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--gray-200);
  background: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all var(--transition);
}

.cal-nav-btn:hover { background: var(--gray-100); border-color: var(--gray-300); }

.cal-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cal-month-title {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: var(--gray-800);
  margin-bottom: 12px;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  padding: 4px 0;
  text-transform: uppercase;
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition);
  position: relative;
  padding: 4px 2px;
}

.cal-day:hover:not(.disabled):not(.empty) { background: var(--brand-orange-light); color: var(--brand-orange); }
.cal-day.disabled { opacity: 0.35; cursor: not-allowed; }
.cal-day.empty { cursor: default; }
.cal-day.selected { background: var(--brand-orange); color: white; font-weight: 700; border-radius: var(--radius-sm); }
.cal-day.in-range { background: var(--brand-orange-light); color: var(--brand-orange); border-radius: 0; }
.cal-day.range-start { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.cal-day.range-end { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.cal-day.today { font-weight: 700; }
.cal-day.today::after { content: ''; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--brand-orange); }
.cal-day.selected.today::after { background: white; }

.cal-price {
  font-size: 9px;
  line-height: 1;
  margin-top: 2px;
}
.cal-price.low { color: var(--green-500); }
.cal-price.high { color: var(--red-500); }
.cal-day.selected .cal-price { color: rgba(255,255,255,0.8); }

.calendar-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cal-hint { font-size: 13px; color: var(--gray-400); }

/* Search Button */
.search-btn {
  background: var(--brand-orange);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0 32px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  min-height: 64px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(255,107,43,0.3);
}

.search-btn:hover {
  background: var(--brand-orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255,107,43,0.4);
}

.search-btn:active { transform: translateY(0); }

/* Error Message */
.error-msg {
  font-size: 11px;
  color: var(--red-500);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================
   LOADING SCREEN
   ========================================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.97);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.loading-plane {
  font-size: 48px;
  animation: flyAcross 2s ease-in-out infinite;
}

@keyframes flyAcross {
  0%, 100% { transform: translateX(-20px) rotate(-5deg); }
  50% { transform: translateX(20px) rotate(5deg); }
}

.loading-bar {
  width: 300px;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-orange-dark));
  border-radius: 3px;
  animation: loadProgress 2.5s ease-in-out forwards;
}

@keyframes loadProgress {
  0% { width: 0%; }
  30% { width: 45%; }
  70% { width: 72%; }
  90% { width: 88%; }
  100% { width: 100%; }
}

.loading-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-700);
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.loading-step {
  font-size: 13px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.5s;
}

.loading-step.done { color: var(--green-500); }
.loading-step.active { color: var(--brand-orange); font-weight: 600; }

/* ==========================================
   RESULTS PAGE LAYOUT
   ========================================== */
.results-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

/* ==========================================
   PRICE CALENDAR WIDGET
   ========================================== */
.price-calendar-widget {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.price-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.price-cal-title { font-size: 14px; font-weight: 700; color: var(--gray-700); }
.price-cal-days {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.price-cal-day {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  text-align: center;
  cursor: pointer;
  min-width: 80px;
  transition: all var(--transition);
}

.price-cal-day:hover { border-color: var(--brand-orange); }
.price-cal-day.selected { border-color: var(--brand-orange); background: var(--brand-orange); color: white; }
.price-cal-day.cheapest { border-color: var(--green-500); background: var(--green-100); }
.price-cal-day.most-expensive { border-color: var(--red-500); background: var(--red-100); }
.price-cal-day.selected.cheapest, .price-cal-day.selected.most-expensive { background: var(--brand-orange); border-color: var(--brand-orange); color: white; }

.pcd-date { font-size: 11px; font-weight: 600; color: inherit; margin-bottom: 2px; }
.pcd-price { font-size: 14px; font-weight: 700; }
.price-cal-day.cheapest .pcd-price { color: var(--green-500); }
.price-cal-day.most-expensive .pcd-price { color: var(--red-500); }
.price-cal-day.selected .pcd-date, .price-cal-day.selected .pcd-price { color: white; }

/* ==========================================
   FILTER SIDEBAR
   ========================================== */
.filter-sidebar {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: sticky;
  top: 80px;
}

.filter-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-header h2 { font-size: 16px; font-weight: 700; }

.reset-all-btn {
  font-size: 12px;
  color: var(--brand-orange);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.reset-all-btn:hover { background: var(--brand-orange-light); }

.filter-section {
  border-bottom: 1px solid var(--gray-100);
}

.filter-section:last-child { border-bottom: none; }

.filter-section-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background var(--transition);
}

.filter-section-header:hover { background: var(--gray-50); }
.filter-section-title { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.filter-section-toggle { font-size: 12px; color: var(--gray-400); transition: transform var(--transition); }
.filter-section.collapsed .filter-section-toggle { transform: rotate(-90deg); }

.filter-section-body {
  padding: 0 20px 16px;
  overflow: hidden;
  max-height: 1000px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.filter-section.collapsed .filter-section-body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Checkboxes */
.filter-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
}

.filter-checkbox-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--brand-orange);
  cursor: pointer;
}

.filter-checkbox-label { font-size: 13px; color: var(--gray-700); flex: 1; cursor: pointer; }
.filter-checkbox-price { font-size: 12px; color: var(--gray-400); }

/* Range Slider */
.range-slider-wrap { padding: 8px 0; }
.range-slider-labels { display: flex; justify-content: space-between; margin-top: 8px; }
.range-slider-label { font-size: 12px; font-weight: 600; color: var(--gray-700); }

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--brand-orange) 0%, var(--brand-orange) var(--val, 50%), var(--gray-200) var(--val, 50%));
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--brand-orange);
  border: 3px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}

/* Airline filter */
.airline-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
}

.airline-filter-logo {
  width: 24px; height: 24px;
  border-radius: 4px;
  object-fit: contain;
  border: 1px solid var(--gray-100);
  background: white;
}

.airline-filter-all-btns {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.airline-filter-btn {
  font-size: 12px;
  color: var(--brand-orange);
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
}
.airline-filter-btn:hover { background: var(--brand-orange-light); }

/* Time filter */
.time-filter-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.time-btn {
  padding: 8px 6px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  font-size: 12px;
  text-align: center;
  transition: all var(--transition);
  font-family: inherit;
}

.time-btn:hover { border-color: var(--brand-orange); }
.time-btn.active { border-color: var(--brand-orange); background: var(--brand-orange-light); color: var(--brand-orange); font-weight: 700; }
.time-btn .time-icon { font-size: 16px; display: block; margin-bottom: 2px; }
.time-btn .time-label { font-size: 11px; }
.time-btn .time-range { font-size: 10px; color: var(--gray-400); }
.time-btn.active .time-range { color: var(--brand-orange); }

/* ==========================================
   RESULTS MAIN AREA
   ========================================== */
.results-main { min-width: 0; }

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.results-count { font-size: 14px; color: var(--gray-500); }
.results-count strong { color: var(--gray-800); }

/* Sort Tabs */
.sort-tabs {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}

.sort-tabs-inner {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.sort-tabs-inner::-webkit-scrollbar { display: none; }

.sort-tab {
  flex: 1;
  min-width: 100px;
  padding: 14px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  position: relative;
  transition: background var(--transition);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.sort-tab:hover:not(.active) { background: var(--gray-50); }
.sort-tab.active { border-bottom-color: var(--brand-orange); background: var(--brand-orange-light); }

.sort-tab-label { font-size: 13px; font-weight: 600; color: var(--gray-600); }
.sort-tab.active .sort-tab-label { color: var(--brand-orange); }
.sort-tab-price { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.sort-tab.active .sort-tab-price { color: var(--brand-orange); opacity: 0.8; }

/* ==========================================
   FLIGHT CARDS
   ========================================== */
.flight-cards { display: flex; flex-direction: column; gap: 12px; }

.flight-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1.5px solid transparent;
  animation: cardFadeIn 0.4s ease forwards;
  opacity: 0;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.flight-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.flight-card.best-value { border-color: var(--brand-orange); }

/* Badges */
.card-badges {
  display: flex;
  gap: 6px;
  padding: 10px 20px 0;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-best { background: #FFF3E0; color: #E65100; }
.badge-cheapest { background: #E8F5E9; color: #1B5E20; }
.badge-fastest { background: #E3F2FD; color: #0D47A1; }
.badge-limited { background: #FCE4EC; color: #880E4F; }

/* Card Body */
.card-body { padding: 16px 20px; }

.flight-segment {
  display: grid;
  grid-template-columns: 100px 1fr 140px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}

.flight-segment + .flight-segment {
  border-top: 1px dashed var(--gray-200);
  padding-top: 12px;
  margin-top: 4px;
}

.airline-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.airline-logo {
  width: 40px; height: 40px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid var(--gray-100);
  background: white;
  padding: 4px;
}

.airline-name {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.2;
}

/* Flight Route */
.flight-route {
  display: flex;
  align-items: center;
  gap: 0;
}

.route-time {
  text-align: center;
  min-width: 70px;
}

.route-time .time {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}

.route-time .airport {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

.route-time .offset {
  font-size: 10px;
  color: var(--red-500);
  font-weight: 600;
  vertical-align: super;
}

.route-line {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
}

.route-line-track {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
}

.route-line-segment { flex: 1; height: 1.5px; background: var(--gray-300); }
.route-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-400); flex-shrink: 0; }
.route-plane { font-size: 14px; color: var(--gray-500); }

.route-info { text-align: center; }
.route-duration { font-size: 12px; font-weight: 600; color: var(--gray-600); }
.route-stops { font-size: 11px; margin-top: 2px; }
.route-stops.direct { color: var(--green-500); font-weight: 600; }
.route-stops.one-stop { color: var(--yellow-400); font-weight: 600; }
.route-stops.multi-stop { color: var(--red-500); font-weight: 600; }

/* Price area */
.price-area {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}

.original-price {
  font-size: 13px;
  color: var(--gray-400);
  text-decoration: line-through;
}

.current-price {
  font-size: 26px;
  font-weight: 900;
  color: var(--brand-orange);
  line-height: 1;
}

.price-per-person { font-size: 11px; color: var(--gray-400); }

.select-btn {
  background: var(--brand-orange);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
  width: 100%;
}

.select-btn:hover {
  background: var(--brand-orange-dark);
  transform: scale(1.02);
}

/* Details Toggle */
.card-footer {
  border-top: 1px solid var(--gray-100);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.details-toggle {
  font-size: 13px;
  color: var(--brand-blue-light);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  transition: color var(--transition);
}
.details-toggle:hover { color: var(--brand-orange); }
.details-toggle .toggle-icon { font-size: 10px; transition: transform 0.2s; }
.details-toggle.open .toggle-icon { transform: rotate(180deg); }

/* Details Panel */
.details-panel {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.details-panel.open {
  max-height: 600px;
  padding: 0 20px 20px;
}

.detail-segment {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.detail-segment:last-child { margin-bottom: 0; }

.detail-segment-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.detail-row:last-child { margin-bottom: 0; }
.detail-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.detail-text { flex: 1; }
.detail-label { font-weight: 600; color: var(--gray-800); }

/* ==========================================
   PRICE ALERT BANNER
   ========================================== */
.price-alert-banner {
  background: linear-gradient(135deg, #E3F2FD, #EDE7F6);
  border: 1px solid #BBDEFB;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.price-alert-icon { font-size: 24px; }
.price-alert-text { flex: 1; }
.price-alert-title { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.price-alert-sub { font-size: 12px; color: var(--gray-500); }

.alert-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  left: 2px; top: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider { background: var(--brand-orange); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ==========================================
   SHOW MORE / PAGINATION
   ========================================== */
.show-more-wrap {
  text-align: center;
  padding: 20px 0;
}

.show-more-btn {
  background: white;
  border: 2px solid var(--brand-orange);
  color: var(--brand-orange);
  border-radius: var(--radius-lg);
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.show-more-btn:hover {
  background: var(--brand-orange);
  color: white;
}

/* ==========================================
   PROMOTIONS MODAL
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-banner {
  background: linear-gradient(135deg, var(--brand-orange), #FF9A42);
  padding: 32px 28px 24px;
  color: white;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.modal-close:hover { background: rgba(255,255,255,0.3); }
.modal-banner h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.modal-banner p { font-size: 15px; opacity: 0.9; }

.modal-body { padding: 24px 28px; }

.modal-email-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 12px;
  transition: border-color var(--transition);
}

.modal-email-input:focus { outline: none; border-color: var(--brand-orange); }

.modal-subscribe-btn {
  width: 100%;
  background: var(--brand-orange);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition);
}

.modal-subscribe-btn:hover { background: var(--brand-orange-dark); }
.modal-skip { text-align: center; margin-top: 12px; font-size: 13px; color: var(--gray-400); cursor: pointer; }
.modal-skip:hover { color: var(--gray-600); }

/* ==========================================
   PRICE CHANGE NOTIFICATION
   ========================================== */
.price-change-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: white;
  padding: 12px 24px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-xl);
  z-index: 8000;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.price-change-banner button {
  background: var(--brand-orange);
  border: none;
  color: white;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
  background: var(--gray-900);
  color: white;
  padding: 48px 20px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-newsletter {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light));
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-bottom: 40px;
}

.footer-newsletter h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.footer-newsletter p { font-size: 14px; opacity: 0.85; margin-bottom: 20px; }

.newsletter-form { display: flex; gap: 8px; max-width: 400px; margin: 0 auto; }

.newsletter-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: none;
  font-size: 14px;
  font-family: inherit;
}

.newsletter-btn {
  background: var(--brand-orange);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background var(--transition);
}

.newsletter-btn:hover { background: var(--brand-orange-dark); }

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-400); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--gray-300); font-size: 14px; text-decoration: none; padding: 4px 0; transition: color var(--transition); }
.footer-col a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy { font-size: 13px; color: var(--gray-500); }
.footer-social { display: flex; gap: 12px; }
.social-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--gray-800);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  font-size: 16px;
  text-decoration: none;
  transition: all var(--transition);
}
.social-btn:hover { background: var(--brand-orange); color: white; }

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

/* Tablet */
@media (max-width: 1023px) {
  .results-page {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    position: fixed;
    inset: 0;
    z-index: 2000;
    overflow-y: auto;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    max-width: 320px;
  }

  .filter-sidebar.open { transform: translateX(0); }

  .filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
  }
  .filter-overlay.open { display: block; }

  .mobile-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
  }

  .search-fields-row {
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
  }

  .search-field.date-range {
    grid-column: span 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .header-inner { padding: 0 12px; }
  .header-nav .nav-hide-mobile { display: none; }

  .hero { padding: 24px 12px 48px; }
  .search-card { padding: 16px 12px; border-radius: var(--radius-lg); }
  .search-options-row { gap: 6px; }

  .search-fields-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .swap-btn { display: none; }
  .calendar-overlay { min-width: calc(100vw - 24px); width: calc(100vw - 24px); left: 12px !important; right: 12px !important; transform: none !important; }
  .cal-months { grid-template-columns: 1fr; }

  .results-page { padding: 12px; gap: 12px; }

  .flight-segment {
    grid-template-columns: 60px 1fr;
    gap: 8px;
  }

  .price-area {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
    margin-top: 4px;
  }

  .current-price { font-size: 22px; }
  .select-btn { width: auto; padding: 8px 16px; }

  .sort-tab { min-width: 80px; padding: 10px 8px; }
  .sort-tab-label { font-size: 11px; }

  .price-cal-days { gap: 4px; }
  .price-cal-day { min-width: 68px; padding: 6px 8px; }

  .newsletter-form { flex-direction: column; }

  .footer-links { grid-template-columns: 1fr 1fr; }

  .price-change-banner { width: 90%; font-size: 12px; padding: 10px 16px; }
}

/* Mobile filter button - hidden on desktop */
.mobile-filter-btn { display: none; }

@media (max-width: 1023px) {
  .mobile-filter-btn { display: flex; }
}

/* ==========================================
   UTILITY
   ========================================== */
.hidden { display: none !important; }
.fade-in { animation: cardFadeIn 0.3s ease forwards; }

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Multi-city extras */
.multicity-segment {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
}

.add-flight-btn {
  border: 1.5px dashed var(--gray-300);
  background: none;
  border-radius: var(--radius);
  padding: 12px;
  width: 100%;
  font-size: 14px;
  color: var(--gray-500);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.add-flight-btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  background: var(--brand-orange-light);
}

/* Validation */
.search-input-wrap.error .field-label { color: var(--red-500); }
