/* ─────────────────────────────────────────────────────────
   homepage.css — Flight homepage visual overrides
   Extends search.css with photo-backed hero, deal cards,
   and trending routes.  Loaded only by index.html.
   ───────────────────────────────────────────────────────── */

/* ── Navigation gradient + button overrides ────────────── */
.nav {
  background: linear-gradient(110deg, #031a48 0%, #042878 45%, #1050a8 80%, #1260b8 100%);
  box-shadow: 0 2px 24px rgba(0,18,80,0.6), inset 0 1px 0 rgba(255,255,255,0.10);
}
.btn--ghost-light {
  background: rgba(255,255,255,0.22);
  color: white;
  border: none;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.btn--ghost-light:hover { background: rgba(255,255,255,0.32); }
.btn--cta {
  background: white;
  color: #012060;
  font-weight: 700;
  border: none;
}
.btn--cta:hover { background: #f0f4ff; }

/* ── Hero with background photo ───────────────────────── */
.hero {
  padding: 40px 0 120px;
}
.hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  z-index: 0;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0, 12, 48, 0.30) 0%,
    rgba(0, 33, 90, 0.22) 55%,
    rgba(0, 18, 64, 0.36) 100%
  );
  z-index: 1;
}
/* When photo loads, suppress the gradient on .hero itself */
.hero__bg-img + .hero__overlay ~ .hero__content,
.hero__bg-img ~ .hero__content {
  position: relative;
  z-index: 2;
}
.hero__glow { display: none; } /* replaced by overlay */

/* ── Trust bar — floating card, icons centred above text ── */
.trust-bar {
  background: #cdd2e4;
  border: none;
  padding: 0;
  margin-top: 0;
}
.trust-bar__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: #ffffff;
  border-radius: 0;
  box-shadow:
    0 2px 4px rgba(0,21,85,0.04),
    0 8px 24px rgba(0,21,85,0.08),
    0 20px 56px rgba(0,21,85,0.07);
  padding: 36px 48px;
  width: 100%;
}
.trust-item {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 0 20px;
  border-right: 1px solid var(--color-outline-variant);
}
.trust-item:last-child { border-right: none; }
.trust-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #e6f1ff 0%, #cce3ff 100%);
  box-shadow:
    0 4px 12px rgba(0,98,204,0.18),
    inset 0 1px 0 rgba(255,255,255,0.85);
}
.trust-icon-wrap svg {
  width: 20px;
  height: 20px;
}

/* ── Exclusive Deals section ───────────────────────────── */
.deals-section {
  padding: 64px 0 48px;
}
.deals-section .section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
}
.deals-section .section-header p {
  margin-top: 6px;
}
.deals-see-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary-container);
  text-decoration: none;
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.15s;
}
.deals-see-all:hover { border-bottom-color: var(--color-primary-container); }

.deals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.deal-card {
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-surface-container-lowest);
  box-shadow: 0 4px 16px rgba(0,21,85,0.08);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  text-decoration: none;
  display: block;
}
.deal-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,21,85,0.16);
}
.deal-card__img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #002155, #1565c0);
}
.deal-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.4s var(--ease-out);
}
.deal-card:hover .deal-card__photo { transform: scale(1.06); }
.deal-card__img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: 0.35;
}
.deal-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--color-secondary-container);
  color: var(--color-on-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 20px;
}
.deal-card__body {
  padding: 18px 20px 20px;
}
.deal-card__destination {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--color-on-surface);
  margin-bottom: 4px;
}
.deal-card__tagline {
  font-size: 13px;
  color: var(--color-on-surface-variant);
  margin-bottom: 14px;
}
.deal-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.deal-card__from-label {
  font-size: 11px;
  color: var(--color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.deal-card__price {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary-container);
}
.deal-card__cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary-container);
  background: var(--color-primary-fixed);
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.deal-card__cta:hover { background: var(--color-primary-fixed-dim); }

/* ── Route cards — full-bleed photo with overlaid info ──── */
.popular-routes .routes-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Card is purely the photo — no white section below */
.popular-routes .route-card {
  position: relative;
  background: transparent;
}
.popular-routes .route-card__visual {
  position: relative;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* shift IATA codes up so they clear the bottom info overlay */
  padding-bottom: 48px;
}

.route-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.4s var(--ease-out);
}
.route-card:hover .route-card__photo { transform: scale(1.07); }

.route-card__visual-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.route-card__code {
  position: relative;
  z-index: 2;
  font-size: 26px !important;
  letter-spacing: -0.01em !important;
}
.popular-routes .route-card__visual > svg {
  position: relative;
  z-index: 2;
  width: 20px;
  height: 20px;
}

/* Info overlaid at bottom of photo */
.popular-routes .route-card__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px 13px;
  background: linear-gradient(to top, rgba(0,10,40,0.90) 0%, rgba(0,10,40,0.45) 65%, transparent 100%);
  z-index: 3;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.popular-routes .route-card__cities {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}
.popular-routes .route-card__fare {
  color: #8ecfff !important;
  font-size: 17px !important;
}
.popular-routes .route-card__label {
  color: rgba(255,255,255,0.55);
}



/* ── Special fares toggle — mobile only ───────────────── */
.special-fares-toggle {
  display: none; /* hidden on desktop */
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .deals-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .hero { padding: 16px 0 80px; }
  .hero__eyebrow { display: none; }
  .hero__subline  { display: none; }
  .hero__headline { font-size: 22px; margin-bottom: 8px; }

  .site-footer__inner { padding-bottom: 0; }

  .trust-bar__inner {
    grid-template-columns: repeat(2, 1fr);
    padding: 24px 20px;
    gap: 0;
  }
  .trust-item {
    padding: 12px 12px;
    border-right: none;
    border-bottom: 1px solid var(--color-outline-variant);
  }
  .trust-item:nth-child(odd) { border-right: 1px solid var(--color-outline-variant); }
  .trust-item:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 600px) {
  .deals-grid { grid-template-columns: 1fr; }
  .deals-section .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* FROM / TO side by side like Google Flights */
  .search-row {
    grid-template-columns: 1fr auto 1fr;
    gap: 12px 8px;
  }
  .swap-btn    { display: flex; }
  #depart-wrap { grid-column: 1 / -1; }
  #return-wrap { grid-column: 1 / -1; }
  #pax-wrap    { grid-column: 1 / -1; }

  /* Autocomplete: keep old spacious width, FROM expands right, TO expands left */
  #from-wrap .autocomplete-list { left: -12px; right: auto; min-width: 260px; }
  #to-wrap   .autocomplete-list { right: -12px; left: auto; min-width: 260px; }

  /* Special fares toggle */
  .special-fares-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary-container);
    background: var(--color-primary-fixed);
    border: none;
    border-radius: var(--radius-full);
    padding: 5px 12px;
    margin-top: 4px;
    cursor: pointer;
  }
  .special-fares-arrow {
    display: inline-block;
    transition: transform 0.2s;
  }
  .special-fares-toggle[aria-expanded="true"] .special-fares-arrow { transform: rotate(180deg); }
  #fare-chips-row { display: none; }
  #fare-chips-row.is-open { display: flex; margin-top: 8px; }
}
