/* ================================================================
   Qasda — structural component compatibility layer
   Material Design 3 · Clean · Functional · Premium
   ================================================================ */

/* ---- Tokens ---- */
:root {
  --blue:       #1A73E8;
  --blue-dk:    #1557B0;
  --blue-lt:    #E8F0FE;
  --blue-mid:   #D2E3FC;
  --red:        #D93025;
  --red-lt:     #FCE8E6;
  --green:      #137333;
  --green-lt:   #E6F4EA;
  --amber:      #F9AB00;
  --amber-lt:   #FEF7E0;

  --bg:         #FFFFFF;
  --surface:    #F8F9FA;
  --surface-2:  #F1F3F4;
  --border:     #E8EAED;
  --border-dk:  #DADCE0;

  --text:       #202124;
  --text-2:     #5F6368;
  --text-3:     #9AA0A6;
  --text-4:     #BDC1C6;

  --volz:       #1A73E8;
  --volz-lt:    #E8F0FE;
  --mondial:    #D93025;
  --mondial-lt: #FCE8E6;

  --r-xs:  4px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-pill:50px;

  --elev-1: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
  --elev-2: 0 1px 2px rgba(60,64,67,.3), 0 2px 6px 2px rgba(60,64,67,.15);
  --elev-3: 0 4px 8px 3px rgba(60,64,67,.15), 0 1px 3px rgba(60,64,67,.3);

  --t: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ---- Reset ---- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'Roboto',system-ui,sans-serif;
  background:var(--bg);color:var(--text);
  min-height:100vh;
  display:flex;
  flex-direction:column;
  -webkit-font-smoothing:antialiased;
  font-size:14px;
}
[dir="rtl"], [dir="rtl"] body, [dir="rtl"] button, [dir="rtl"] input, [dir="rtl"] select {
  font-family: 'Cairo', 'Roboto', system-ui, sans-serif;
}
a{text-decoration:none;color:inherit}
img{display:block;max-width:100%}
button{cursor:pointer;font-family:inherit;border:none;background:none;font-size:14px}
input,select{font-family:inherit;border:none;outline:none;font-size:14px}
::-webkit-scrollbar{width:5px}
::-webkit-scrollbar-track{background:var(--surface)}
::-webkit-scrollbar-thumb{background:var(--border-dk);border-radius:3px}

/* ================================================================
   NAVBAR — Google-style minimal top bar
   ================================================================ */
.navbar{
  position:sticky;top:0;z-index:100;
  height:64px;
  background:var(--bg);
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;
  padding:0 24px;gap:24px;
}

.nav-logo{
  display:flex;align-items:center;gap:10px;
  flex-shrink:0;
}
.nav-logo svg{color:var(--blue)}
.nav-logo-text{
  font-size:20px;font-weight:400;
  color:var(--text);letter-spacing:-0.3px;
}
.nav-logo-text span{color:var(--blue);font-weight:500}

/* Spacer */
.nav-spacer{flex:1}

.lang-switcher{
  display:flex;align-items:center;
  border:1px solid var(--border-dk);
  border-radius:var(--r-pill);
  overflow:hidden;
}
.lang-btn{
  font-size:12px;font-weight:500;
  color:var(--text-2);
  padding:6px 14px;
  letter-spacing:0.25px;
  transition:all var(--t);
  border-right:1px solid var(--border-dk);
}
.lang-btn:last-child{border-right:none}
.lang-btn.active{background:var(--blue);color:#fff}
.lang-btn:hover:not(.active){background:var(--surface)}

/* ================================================================
   HERO — subtle blue gradient sky, no image
   ================================================================ */
.hero{
  background:linear-gradient(180deg, #EAF1FB 0%, #F5F8FF 40%, #FFFFFF 100%);
  padding:36px 24px 10px;
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.hero-inner{
  max-width:1020px;width:100%;margin:0 auto;
  text-align:center;
}

.hero-title{
  font-size:40px;font-weight:400;
  color:var(--text);letter-spacing:-0.5px;
  margin-bottom:8px;line-height:1.2;
}
.hero-title strong{font-weight:700;color:var(--blue)}

.hero-sub{
  font-size:15px;color:var(--text-2);
  font-weight:400;margin-bottom:28px;
}

/* Payment badges */
.pay-strip{
  display:flex;align-items:center;justify-content:center;
  gap:8px;flex-wrap:wrap;margin-bottom:28px;
}
.pay-chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:5px 12px;
  border:1px solid var(--border-dk);
  border-radius:var(--r-pill);
  font-size:12px;font-weight:500;
  color:var(--text-2);
  background:var(--bg);
  transition:all var(--t);
  box-shadow:0 1px 3px rgba(0,0,0,0.03);
}
.pay-chip svg { flex-shrink:0; }
.pay-chip.cib   {border-color:#AECBFA;color:var(--blue);background:var(--blue-lt)}
.pay-chip.dahab {border-color:#FEEFC3;color:#B06000;background:var(--amber-lt)}

/* ================================================================
   SEARCH BOX — Google Flights pill style
   ================================================================ */
.search-box{
  max-width:1020px;width:100%;margin:0 auto;
  background:var(--bg);
  border-radius:var(--r-xl);
  box-shadow:var(--elev-3);
  overflow:visible;
  padding:0;
  position:relative;
  z-index:80; /* Raises search box stacking context above flight cards, below navbar (100) */
  transform:translateY(12px);
}

/* Trip type row */
.trip-row{
  display:flex;align-items:center;gap:0;
  padding:16px 20px 12px;
  border-bottom:1px solid var(--border);
}
.trip-tab{
  display:flex;align-items:center;gap:6px;
  font-size:13px;font-weight:500;color:var(--text-2);
  padding:7px 14px;border-radius:var(--r-pill);
  transition:all var(--t);
  letter-spacing:0.1px;
}
.trip-tab.active{background:var(--blue-lt);color:var(--blue)}
.trip-tab:hover:not(.active){background:var(--surface)}
.trip-tab svg{width:16px;height:16px}

/* Search fields row */
.search-fields{
  display:grid;
  grid-template-columns:1.1fr 1.1fr 155px 155px 155px auto;
  align-items:stretch;
  min-height:60px;
}
.search-fields.oneway-mode {
  grid-template-columns: 1.1fr 1.1fr 200px 170px auto;
}
.search-fields.oneway-mode #return-sf {
  display: none !important;
}

/* Each field */
.sf{
  border-right:1px solid var(--border);
  display:flex;align-items:center;gap:0;
  position:relative;
  cursor:text;
}
.sf:last-of-type{border-right:none}

.sf-inner{
  display:flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 12px;width:100%;height:100%;
  transition:background var(--t);
  text-align:center;
}
.sf-inner:hover{background:var(--surface)}

.sf.focused .sf-inner,
.sf:focus-within .sf-inner{
  background:var(--blue-lt);
  outline:2px solid var(--blue);
  outline-offset:-2px;
  border-radius:var(--r-sm);
}

.sf svg{color:var(--text-3);flex-shrink:0;width:18px;height:18px}

.sf-label{
  font-size:11px;font-weight:500;
  color:var(--text-3);letter-spacing:0.3px;
  line-height:1;margin-bottom:3px;
  text-align:center;
}
.sf-text{font-size:15px;font-weight:500;color:var(--text);line-height:1;text-align:center}
.sf-input{
  position:absolute;inset:0;opacity:0;
  cursor:text;width:100%;
}

.sf-content{display:flex;flex-direction:column;align-items:center;text-align:center;flex:1}

.sf input,
.sf select{
  background:transparent;color:var(--text);
  font-size:15px;font-weight:500;width:100%;
  cursor:pointer;
  text-align:center;
}
.sf input::placeholder{color:var(--text-3);font-weight:400}
.sf select option{background:var(--bg)}

/* Swap button */
.swap-wrap{
  position:absolute;right:-18px;top:50%;transform:translateY(-50%);
  z-index:10;
  width:36px;height:36px;
  background:var(--bg);
  border:1px solid var(--border-dk);
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:var(--text-2);
  box-shadow:var(--elev-1);
  transition:all var(--t);
}
.swap-wrap:hover{background:var(--surface);color:var(--blue)}

/* Avoid overlap between floating swap button and destination icon */
.search-fields .sf:nth-child(2) .sf-inner {
  padding-left: 28px;
}

.search-btn-wrap{
  display:flex;align-items:center;justify-content:center;
  padding:12px 16px;
  border-top:0;
}

.search-btn{
  display:flex;align-items:center;gap:8px;
  background:var(--blue);color:#fff;
  font-size:14px;font-weight:500;
  padding:10px 24px;
  border-radius:var(--r-pill);
  transition:all var(--t);
  letter-spacing:0.25px;
  white-space:nowrap;
  box-shadow:0 1px 2px rgba(26,115,232,.4);
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  cursor:pointer;
}
.search-btn:hover{background:var(--blue-dk);box-shadow:var(--elev-2)}
.search-btn svg{width:18px;height:18px;pointer-events:none}
.search-btn span{pointer-events:none}

/* Pax field */
.pax-wrap{position:relative}
.pax-popup{
  display:none;
  position:absolute;top:calc(100% + 8px);left:0;z-index:300;
  background:var(--bg);
  border-radius:var(--r-lg);
  padding:20px;min-width:280px;
  box-shadow:var(--elev-3);
  border:1px solid var(--border);
}
.pax-popup.open{display:block}
.pax-row{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 0;border-bottom:1px solid var(--border);
}
.pax-row:last-of-type{border-bottom:none}
.pax-lbl{font-size:14px;font-weight:500;color:var(--text)}
.pax-sub{font-size:12px;color:var(--text-3);margin-top:1px}
.pax-row select{
  background:var(--surface);border:1px solid var(--border-dk);
  color:var(--text);padding:5px 10px;border-radius:var(--r-sm);
  font-size:13px;font-weight:500;
}
.pax-ok{
  width:100%;background:var(--blue);color:#fff;
  font-size:13px;font-weight:500;
  padding:9px;border-radius:var(--r-pill);
  margin-top:14px;letter-spacing:0.25px;
  transition:background var(--t);
}
.pax-ok:hover{background:var(--blue-dk)}

/* ================================================================
   MAIN CONTENT AREA
   ================================================================ */
.main{
  max-width:1020px;width:100%;margin:0 auto;
  padding:24px 0 80px;
}

/* ================================================================
   RESULTS HEADER
   ================================================================ */
.results-hd{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:12px;
  margin-bottom:16px;
}
.results-title{
  font-size:22px;font-weight:400;
  color:var(--text);letter-spacing:-0.3px;
}
.results-count{
  font-size:13px;color:var(--text-2);margin-top:4px;width:100%;
}

/* Progress Bar & Dynamic Loader Status */
.search-progress-wrap {
  display: flex;
  flex-direction: column;
  margin: 16px auto 0;
  width: 100%;
  max-width: 1020px;
}
.search-progress-bar {
  height: 4px;
  width: 100%;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  overflow: hidden;
  position: relative;
}
.search-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue) 0%, #34A853 100%);
  border-radius: var(--r-pill);
  transition: width 0.4s ease;
}

/* ================================================================
   AIRLINE FILTER CARDS
   ================================================================ */
.airline-filter-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  width: 100%;
}
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-dk);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all var(--t);
  opacity: 0;
  pointer-events: none;
}
.scroll-btn svg { width: 16px; height: 16px; }
.scroll-btn:hover { background: var(--surface-2); color: var(--blue); }
.scroll-btn.show { opacity: 1; pointer-events: auto; }
.scroll-btn.scroll-left { left: 4px; }
.scroll-btn.scroll-right { right: 4px; }

.airline-filter-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 12px;
  scroll-behavior: smooth;
  width: 100%;
}
.airline-filter-row::-webkit-scrollbar{display:none}

.al-filter-card{
  display:flex;flex-direction:row;align-items:center;
  gap:10px;
  padding:8px 14px;
  border:1.5px solid var(--border);
  border-radius:40px;
  background:var(--bg);
  cursor:pointer;
  transition:all var(--t);
  flex-shrink:0;
  white-space:nowrap;
}
.al-filter-card:hover:not(.active){
  background:var(--surface);
  border-color:var(--blue);
  box-shadow:0 2px 8px rgba(26,115,232,0.1);
}
.al-filter-card.active{
  border-color:var(--blue);
  background:var(--blue-lt);
  box-shadow:0 2px 10px rgba(26,115,232,0.18);
}
.al-filter-logo-wrap{
  width:32px;height:32px;
  border-radius:50%;
  background:var(--bg);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
  overflow:hidden;
  border:1px solid var(--border);
}
.al-filter-logo{
  width:26px;height:26px;object-fit:contain;
}
.al-filter-logo-fb{
  font-size:10px;font-weight:700;color:var(--text-2);
}
.al-filter-info{
  display:flex;flex-direction:column;align-items:flex-start;gap:1px;
}
.al-filter-name{
  font-size:12px;font-weight:600;color:var(--text);
  line-height:1.2;
}
.al-filter-card.active .al-filter-name{color:var(--blue-dk)}
.al-filter-price{
  font-size:11px;font-weight:500;color:var(--text-2);
}
.al-filter-card.active .al-filter-price{color:var(--blue);font-weight:700;}

/* ================================================================
   FILTER CHIPS ROW
   ================================================================ */
.filter-row{
  display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px;
}
.fchip{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 14px;
  border:1px solid var(--border-dk);
  border-radius:var(--r-pill);
  font-size:13px;font-weight:500;
  color:var(--text-2);
  background:var(--bg);
  cursor:pointer;transition:all var(--t);
  user-select:none;
}
.fchip svg{width:14px;height:14px;color:var(--text-3)}
.fchip.active{
  border-color:var(--blue);
  color:var(--blue);
  background:var(--blue-lt);
}
.fchip.active svg{color:var(--blue)}
.fchip:hover:not(.active){background:var(--surface)}

/* ================================================================
   FLIGHT CARD — Compact row + expandable detail panel
   ================================================================ */
.flight-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 4px;
  overflow: hidden;
  transition: box-shadow var(--t), border-color var(--t);
  animation: cardIn 0.25s ease both;
}
.flight-card:hover { border-color: var(--blue); box-shadow: var(--elev-1); }

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

/* ── Compact clickable row ─────────────────────────────────────── */
.flight-row {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 16px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--t);
  min-width: 0;
}
.fr-legs-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.fr-leg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.flight-row:hover { background: var(--surface); }
.flight-row.expanded { background: #eef2ff; }

/* Airline logo + name */
.fr-airline {
  display: flex; flex-direction: column;
  align-items: center; gap: 5px;
  flex-shrink: 0; width: 68px;
}
.fr-logo-wrap {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.fr-logo-wrap img { width: 26px; height: 26px; object-fit: contain; }
.fr-logo-fb {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: var(--text-2);
}
.fr-airline-name {
  font-size: 11px; font-weight: 500; color: var(--text-2);
  text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 68px;
}

/* Departure column */
.fr-dep { display: flex; flex-direction: column; flex-shrink: 0; min-width: 80px; }

/* Arrival column */
.fr-arr { display: flex; flex-direction: column; flex-shrink: 0; min-width: 80px; }

/* Shared time styles */
.fr-time {
  font-size: 20px; font-weight: 400;
  color: var(--text); letter-spacing: -0.4px; line-height: 1.1;
  white-space: nowrap;
}
.fr-city { font-size: 11px; color: var(--text-3); margin-top: 2px; white-space: nowrap; }
.fr-dayshift {
  font-size: 10px; font-weight: 600; color: #d32f2f;
  vertical-align: super; margin-left: 1px;
}

/* Center: duration + track + stops */
.fr-meta {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px; min-width: 0;
}
.fr-dur { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.fr-track {
  display: flex; align-items: center; gap: 3px;
  width: 100%; max-width: 120px;
}
.fr-dot   { width: 5px; height: 5px; border-radius: 50%; background: var(--text-4); flex-shrink: 0; }
.fr-line  { flex: 1; height: 1px; background: var(--border-dk); }
.fr-plane-icon { color: var(--text-3); flex-shrink: 0; line-height: 0; display: flex; }
.fr-direct { font-size: 11px; font-weight: 500; color: var(--green); white-space: nowrap; }
.fr-stop   { font-size: 11px; font-weight: 500; color: var(--red);   white-space: nowrap; }

/* Bagage inclus badge (Option 1) */
.fr-bag-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-2);
  padding: 1px 7px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.fr-bag-chip svg {
  color: var(--text-3);
}

/* Round-trip A/R badge */


/* Best price */
.fr-price-col { text-align: right; flex-shrink: 0; min-width: 110px; }
.fr-price {
  font-size: 18px; font-weight: 500; color: var(--text);
  white-space: nowrap; letter-spacing: -0.4px;
}
.fr-cur { font-size: 12px; font-weight: 400; color: var(--text-2); }
.fr-price-label { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* Chevron */
.fr-chevron {
  flex-shrink: 0; color: var(--text-3);
  transition: transform 0.25s ease, color var(--t);
  display: flex; align-items: center;
}
.fr-chevron svg { width: 18px; height: 18px; display: block; }
.flight-row.expanded .fr-chevron { transform: rotate(180deg); color: var(--blue); }
.flight-row:hover .fr-chevron { color: var(--blue); }

/* ── Expandable detail panel ──────────────────────────────────── */
.flight-detail {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.flight-detail.open { max-height: 800px; }

/* Leg summaries inside panel (round-trip only) */
.detail-legs {
  padding: 12px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.detail-leg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 6px 0;
  width: 100%;
}
.detail-leg-left {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 220px;
  flex-shrink: 0;
}
.detail-leg-route {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}
.detail-leg-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 220px;
  flex-shrink: 0;
}
.dl-tag {
  font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; padding: 2px 7px;
  border-radius: var(--r-sm); flex-shrink: 0;
}
.dl-tag.out { background: var(--blue-lt); color: var(--blue); }
.dl-tag.ret { background: var(--green-lt); color: var(--green); }
.dl-times { font-weight: 500; color: var(--text); white-space: nowrap; }
.dl-dur   { color: var(--text-2); font-size: 12px; white-space: nowrap; }
.dl-direct { font-size: 11px; font-weight: 500; color: var(--green); white-space: nowrap; }
.dl-stop   { font-size: 11px; font-weight: 500; color: var(--red);   white-space: nowrap; }

/* Provider rows */
.providers-list { border-top: 1px solid var(--border); }
.provider-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
.provider-row:last-child { border-bottom: none; }
.provider-row:hover { background: var(--surface); }

.pr-name {
  font-size: 14px; font-weight: 500; color: var(--text);
  min-width: 130px; flex-shrink: 0;
}
.pr-price {
  font-size: 16px; font-weight: 600; color: var(--text);
  letter-spacing: -0.3px; white-space: nowrap; flex-shrink: 0;
}
.pr-cur { font-size: 11px; font-weight: 400; color: var(--text-3); margin-left: 2px; }
.provider-row.best .pr-price { color: var(--green); }

.pr-best-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 500;
  background: var(--green-lt); color: var(--green);
  padding: 3px 9px; border-radius: var(--r-pill);
  white-space: nowrap; flex-shrink: 0;
}
.est-badge {
  font-size: 10px; font-weight: 500;
  color: var(--text-3); margin-left: 4px;
  background: var(--surface-2); padding: 2px 6px;
  border-radius: var(--r-pill); vertical-align: middle;
}

.pr-predicted {
  opacity: 0.8; font-style: italic;
}
.predicted-row {
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.01) 10px, rgba(0,0,0,0.01) 20px);
}
.pr-badge-placeholder { flex-shrink: 0; }
.pr-spacer { flex: 1; }

.pr-book {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 18px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--blue); color: var(--blue);
  background: transparent; text-decoration: none;
  transition: all var(--t); white-space: nowrap;
  flex-shrink: 0; cursor: pointer;
}
.pr-book:hover { background: var(--blue); color: #fff; box-shadow: 0 1px 4px rgba(26,115,232,.35); }

/* Responsive */
@media (max-width: 680px) {
  .flight-row { padding: 12px 14px; gap: 8px; }
  .fr-airline { width: 48px; }
  .fr-logo-wrap { width: 30px; height: 30px; }
  .fr-logo-wrap img { width: 22px; height: 22px; }
  .fr-airline-name { font-size: 10px; max-width: 48px; }
  .fr-time { font-size: 16px; }
  .fr-price { font-size: 15px; }
  .fr-city { display: none; }
  .provider-row { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .pr-name { min-width: 100px; }
  .pr-spacer { display: none; }
}
@media (max-width: 440px) {
  .fr-meta { display: none; }
  
}

/* ================================================================
   SKELETON
   ================================================================ */
.skel{
  background:var(--bg);border:1px solid var(--border);
  border-radius:var(--r-lg);padding:20px;margin-bottom:8px;
  overflow:hidden;position:relative;
}
.skel::after{
  content:'';position:absolute;inset:0;
  background:linear-gradient(90deg,transparent,rgba(60,64,67,.04),transparent);
  animation:shimmer 1.4s infinite;
}
@keyframes shimmer{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
.sl{height:12px;background:var(--surface-2);border-radius:3px;margin-bottom:8px}
.sl.s{width:28%}.sl.m{width:50%}.sl.l{width:75%}
.sl.xl{height:20px;width:38%;margin:4px 0 12px}

/* ================================================================
   NO RESULTS
   ================================================================ */
.no-results{text-align:center;padding:80px 20px;color:var(--text-2)}
.no-results svg{margin:0 auto 16px;color:var(--text-4)}
.no-results h3{font-size:18px;font-weight:500;margin-bottom:6px;color:var(--text)}
.no-results p{font-size:14px}

/* ================================================================
   POPULAR ROUTES
   ================================================================ */
.popular-section{
  background:var(--surface);
  border-top:1px solid var(--border);
  padding:48px 24px;
}
.popular-inner{max-width:900px;margin:0 auto}

.section-eyebrow{
  font-size:11px;font-weight:700;
  letter-spacing:0.15em;text-transform:uppercase;
  color:var(--blue);margin-bottom:8px;
}
.section-title{
  font-size:24px;font-weight:400;
  color:var(--text);margin-bottom:24px;
  letter-spacing:-0.3px;
}
.section-title strong{font-weight:700}

.routes-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:10px;
}

.route-card{
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  padding:16px;cursor:pointer;
  transition:all var(--t);
}
.route-card:hover{
  border-color:var(--blue);
  box-shadow:var(--elev-1);
}

.rc-codes{
  font-size:13px;font-weight:700;
  color:var(--text);letter-spacing:0.5px;
  margin-bottom:3px;
}
.rc-cities{font-size:12px;color:var(--text-3);line-height:1.5}
.rc-price{
  font-size:15px;font-weight:700;
  color:var(--blue);margin-top:10px;
}
.rc-from{font-size:11px;color:var(--text-3);margin-top:1px}

/* ================================================================
   FOOTER
   ================================================================ */
footer{
  border-top:1px solid var(--border);
  padding:40px 24px 28px;
  background:var(--bg);
  margin-top:auto;
}
.footer-inner{
  max-width:1020px;width:100%;margin:0 auto;
  display:block;
  margin-bottom:24px;
}
.footer-brand .fw{
  font-size:16px;font-weight:500;color:var(--text);margin-bottom:10px;
}
.footer-brand .fw span{color:var(--blue);font-weight:700}
.footer-brand p{font-size:13px;color:var(--text-2);line-height:1.7;max-width:500px}

.footer-col h5{
  font-size:11px;font-weight:700;letter-spacing:0.12em;
  text-transform:uppercase;color:var(--text-3);margin-bottom:12px;
}
.footer-col ul{list-style:none;display:flex;flex-direction:column;gap:8px}
.footer-col ul li a{font-size:13px;color:var(--text-2);transition:color var(--t)}
.footer-col ul li a:hover{color:var(--blue)}

.footer-bottom{
  border-top:1px solid var(--border);padding-top:20px;
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:10px;
  max-width:1020px;width:100%;margin:0 auto;
}
.footer-bottom p{font-size:12px;color:var(--text-3)}
.fp-links{display:flex;gap:20px}
.fp-link{font-size:12px;color:var(--text-3);transition:color var(--t)}
.fp-link:hover{color:var(--blue)}

/* ================================================================
   TOAST & SCROLL
   ================================================================ */
.toast-wrap{position:fixed;bottom:20px;right:20px;z-index:9999;display:flex;flex-direction:column;gap:8px}
.toast{
  background:var(--text);color:#fff;
  padding:12px 16px;border-radius:var(--r-md);
  font-size:13px;font-weight:400;
  animation:toastIn 0.2s ease;
  box-shadow:var(--elev-3);
  display:flex;align-items:center;gap:8px;
}
@keyframes toastIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

.scroll-top{
  position:fixed;bottom:20px;left:20px;z-index:999;
  width:40px;height:40px;
  background:var(--bg);border:1px solid var(--border-dk);
  border-radius:50%;
  display:none;align-items:center;justify-content:center;
  color:var(--text-2);box-shadow:var(--elev-2);
  transition:all var(--t);
}
.scroll-top.show{display:flex}
.scroll-top:hover{border-color:var(--blue);color:var(--blue)}

/* ================================================================
   AUTOCOMPLETE SUGGESTIONS
   ================================================================ */
.sf-content {
  position: relative;
}
.ac-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 360px; /* Premium wide layout to fit long city & airport names */
  max-width: calc(100vw - 32px); /* Responsive bounds on mobile devices! */
  background: var(--bg);
  border: 1px solid var(--border-dk);
  border-radius: var(--r-lg);
  box-shadow: var(--elev-3);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  margin-top: 8px;
  display: none;
}
[dir="rtl"] .ac-dropdown {
  left: auto;
  right: 0;
}
.ac-dropdown.open {
  display: block;
}
.ac-dropdown::-webkit-scrollbar {
  width: 6px;
}
.ac-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.ac-dropdown::-webkit-scrollbar-thumb {
  background: var(--border-dk);
  border-radius: var(--r-pill);
}

.ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all var(--t);
  border-bottom: 1px solid var(--border);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ac-item:last-child {
  border-bottom: none;
}
.ac-item:hover, .ac-item.highlighted {
  background: var(--blue-lt);
}
.ac-icon {
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color var(--t);
}
.ac-icon svg {
  width: 14px;
  height: 14px;
}
.ac-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  text-align: left;
}
[dir="rtl"] .ac-details {
  text-align: right;
}
.ac-main {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ac-city {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: color var(--t);
}
.ac-item:hover .ac-city, .ac-item.highlighted .ac-city {
  color: var(--blue);
}
.ac-code {
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-lt);
  padding: 2px 6px;
  border-radius: var(--r-pill);
  line-height: 1;
}
.ac-code.city-code {
  background: var(--blue);
  color: #ffffff;
}
.ac-city-group .ac-icon {
  color: var(--blue);
  background: var(--blue-lt);
  border-radius: var(--r-sm);
  padding: 6px;
  width: 26px;
  height: 26px;
}
.ac-apt {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media(max-width:880px){
  .search-fields,
  .search-fields.oneway-mode {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
  .search-fields .sf:nth-child(4){border-right:none}
  .search-btn-wrap{grid-column:1/-1;border-top:1px solid var(--border);justify-content:flex-start;padding-left:20px}
  .footer-inner{grid-template-columns:1fr 1fr}
}
@media(max-width:640px){
  .hero{padding:28px 16px 0}
  .hero-title{font-size:26px}
  .navbar{padding:0 16px}
  .search-fields,
  .search-fields.oneway-mode {
    grid-template-columns: 1fr 1fr;
  }
  .search-fields .sf:nth-child(even) {
    border-right: none;
  }
  .swap-wrap{display:none}
  /* price cells already stacked */
  .sort-tab{min-width:110px;padding:10px 14px}
  .footer-inner{grid-template-columns:1fr}
  .main{padding-top:40px}

  /* Expanded detail panel mobile polish */
  .detail-leg {
    flex-wrap: wrap;
    gap: 6px;
  }
  .detail-leg-route {
    width: 100%;
    order: 3;
    text-align: left;
    padding: 2px 0 0;
  }
  .detail-leg-right {
    margin-left: auto;
  }
  .provider-row {
    padding: 12px 14px;
    gap: 8px;
  }
  .pr-name {
    min-width: 95px;
    font-size: 13px;
  }
  .pr-price {
    font-size: 15px;
  }
}

/* Card animation delays */
.flight-card:nth-child(1){animation-delay:.03s}
.flight-card:nth-child(2){animation-delay:.06s}
.flight-card:nth-child(3){animation-delay:.09s}
.flight-card:nth-child(4){animation-delay:.12s}
.flight-card:nth-child(5){animation-delay:.15s}
.flight-card:nth-child(6){animation-delay:.18s}

/* RTL */
[dir="rtl"] .price-cell:first-child{border-right:none;border-left:1px solid var(--border)}
[dir="rtl"] .card-arrival{align-items:flex-start}
[dir="rtl"] .card-tags{justify-content:flex-start}
[dir="rtl"] .toast-wrap{right:auto;left:20px}

/* ================================================================
   GOOGLE FLIGHTS STYLE DATE CALENDAR PICKER
   ================================================================ */
.cal-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 620px; /* Double month view on desktop! */
  max-width: calc(100vw - 32px);
  background: var(--bg);
  border: 1px solid var(--border-dk);
  border-radius: var(--r-lg);
  box-shadow: var(--elev-3);
  z-index: 1000;
  margin-top: 8px;
  display: none;
  overflow: hidden;
  padding: 16px;
}

[dir="rtl"] .cal-dropdown {
  left: auto;
  right: 0;
}

.cal-dropdown.open {
  display: block;
}

/* Flex Month Wrappers for Dual Panel */
.cal-months-wrap {
  display: flex;
  gap: 20px;
}

.cal-month-panel {
  flex: 1;
  min-width: 260px;
}

/* Header Month Navigation */
.cal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  height: 36px;
  padding: 0 4px;
}

.cal-month-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-transform: capitalize;
}

.cal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--t);
  border: 1px solid transparent;
}
.cal-nav-btn:hover {
  background: var(--surface-2);
  color: var(--blue);
}
.cal-nav-btn.disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}
.cal-nav-btn svg {
  width: 16px;
  height: 16px;
}

/* Weekday Row */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 6px;
}

.cal-wkdy {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  height: 24px;
  line-height: 24px;
}

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

/* Single Day Block */
.cal-day {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  z-index: 1;
}

/* Core Day circle highlight */
.cal-day-cell {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
  z-index: 2;
}

.cal-day:hover:not(.disabled) .cal-day-cell {
  background: var(--surface-2);
}

/* Disabled/Past state */
.cal-day.disabled {
  color: var(--text-4);
  cursor: not-allowed;
  pointer-events: none;
}

/* Selected Bounds */
.cal-day.sel-bound .cal-day-cell {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(26,115,232,0.3);
}

.cal-day.sel-bound {
  font-weight: 700;
}

/* Range Shading Highlight */
.cal-day.range-highlight {
  background: var(--blue-lt);
}

/* Round highlights at ends of range shading */
.cal-day.range-start {
  border-top-left-radius: var(--r-pill);
  border-bottom-left-radius: var(--r-pill);
}
.cal-day.range-end {
  border-top-right-radius: var(--r-pill);
  border-bottom-right-radius: var(--r-pill);
}
[dir="rtl"] .cal-day.range-start {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: var(--r-pill);
  border-bottom-right-radius: var(--r-pill);
}
[dir="rtl"] .cal-day.range-end {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: var(--r-pill);
  border-bottom-left-radius: var(--r-pill);
}

/* Responsive adjust */
.cal-next-btn-mobile {
  display: none !important;
}

@media (max-width: 660px) {
  .cal-dropdown {
    width: 290px;
    padding: 12px;
  }
  .cal-months-wrap {
    flex-direction: column;
    gap: 16px;
  }
  .cal-month-panel:last-child {
    display: none; /* Hide second month panel on mobile to fit nicely! */
  }
  .cal-next-btn-mobile {
    display: flex !important;
  }
  .cal-spacer-desktop {
    display: none !important;
  }
}

/* ================================================================
   AIRLINE COMPANY FILTER POPOVER
   ================================================================ */
.fchip-wrap {
  position: relative;
  display: inline-block;
}
.airline-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 350;
  background: var(--bg);
  border: 1px solid var(--border-dk);
  border-radius: var(--r-lg);
  box-shadow: var(--elev-3);
  padding: 12px 16px;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
}
[dir="rtl"] .airline-dropdown {
  left: auto;
  right: 0;
}
.airline-dropdown.open {
  display: block;
}
.airline-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
.airline-option:last-child {
  border-bottom: none;
}
.airline-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--blue);
  flex-shrink: 0;
}
.airline-option label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  gap: 10px;
}
.airline-logo-sm {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

/* ================================================================
   SPINNER ANIMATION
   ================================================================ */
.spinner {
  animation: rotate 2s linear infinite;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  display: inline-block;
  vertical-align: text-bottom;
}
.spinner .path {
  stroke: var(--blue);
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}
@keyframes rotate {
  100% { transform: rotate(360deg); }
}
@keyframes dash {
  0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}
