/* ===================================================================
   assets/home.css
   TravLeisure — Flight Search Homepage
   Single source of truth for styling (replaces old split inline/linked
   CSS so the cascade is predictable).
=================================================================== */

/* -------------------------------------------------------------
   DESIGN TOKENS
-------------------------------------------------------------- */
:root {
  --navy: #001d3d;
  --navy-light: #013a63;
  --navy-hover: #002a57;
  --gold: #c9a24b;
  --gold-light: #e4c987;
  --gold-dark: #a5822f;
  --ink: #101828;
  --muted: #6b7280;
  --border: #e6e9f0;
  --bg: #f5f7fb;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 10px 30px rgba(15, 30, 60, 0.08);
  --shadow-lift: 0 16px 40px rgba(0, 29, 61, 0.18);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); margin: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: var(--sans); }
main { overflow-x: hidden; }

/* Header styling now lives in flyheader.php (scoped to header.site-header),
   which is included directly inside <body>. Nothing header-related is
   defined here on purpose, so the two never fight over the cascade. */

/* -------------------------------------------------------------
   HERO
-------------------------------------------------------------- */
.hero-section {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 72px 20px 96px;
 background: #133458;
  min-height: 560px;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.55;
}
.hero-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #f4dfab;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-headings {
  margin-bottom: 34px;
  position: relative;
  z-index: 1;
}
.hero-headings h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
}
.hero-headings h2 {
  color: var(--gold-light);
  font-size: 1.15rem;
  font-family: var(--sans);
  font-weight: 500;
  font-style: normal;
  margin: 0;
  opacity: 0.95;
}

/* -------------------------------------------------------------
   SEARCH FORM
-------------------------------------------------------------- */
.form-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  background: #EAF0F0;
  border-radius: var(--radius-lg);
  padding: 26px 28px 24px;
  box-shadow: var(--shadow-lift);
}
.top-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.trip-type {
  display: inline-flex;
  background: #f0f2f7;
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.trip-type label {
  position: relative;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.15s;
  user-select: none;
  margin: 0;
}
.trip-type label:has(input:checked) {
  background: #30AFFF;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,29,61,0.25);
}
.trip-type input { position: absolute; opacity: 0; width: 0; height: 0; }
.direct-flights label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  margin: 0;
}
.direct-flights input { width: 16px; height: 16px; accent-color: var(--navy); }

.search-box {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 0.85fr 0.85fr 1fr 1.05fr auto;
  gap: 8px;
  align-items: stretch;
}
.search-box input[type="text"],
.search-box input[type="date"],
.search-box select {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  font-size: 14px;
  font-family: var(--sans);
  color: var(--ink);
  background: #fbfcfe;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  transition: 0.15s;
  appearance: none;
  max-width: none;
}
.search-box select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px;
  padding-left: 12px;
  padding-right: 26px;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.search-box input,
.search-box select {
  font-size: 13.5px;
}
.search-box input:focus,
.search-box select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0,29,61,0.09);
  background: #fff;
}
.search-box input::placeholder { color: #9aa4b2; }
.search-box button[type="submit"] {
  height: 52px;
  padding: 0 26px;
  background: #30AFFF;
  color: #fff;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,29,61,0.28);
  transition: 0.15s;
  animation: none;
  max-width: none;
}
.search-box button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,29,61,0.34);
}
.search-box button[type="submit"]:active { transform: translateY(0); }

.suggestions-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  max-height: 260px;
  overflow-y: auto;
  z-index: 20;
  width: auto;
  display: none;
}
.suggestions-box.visible { display: block; }
.suggestions-box > * {
  padding: 10px 14px;
  font-size: 13.5px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f7;
}
.suggestions-box > *:last-child { border-bottom: none; }
.suggestions-box > *:hover { background: #f5f7fb; }

/* -------------------------------------------------------------
   TRUST BAR
-------------------------------------------------------------- */
.trust-bar {
  max-width: 1080px;
  margin: -34px auto 0;
  position: relative;
  z-index: 1;
  background: #EFFAD3;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 18px 24px;
}
.trust-bar .trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  padding: 6px 14px;
}
.trust-bar .trust-item .icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f0f2f7;
  color: var(--gold-dark);
}
.trust-bar .trust-item .icon svg { width: 16px; height: 16px; }

/* -------------------------------------------------------------
   SHARED SECTION HEADINGS
-------------------------------------------------------------- */
.eyebrow {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold-dark);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.section-heading {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 560px;
  margin: 0 auto;
}
.popular-section,
.map-search-section,
.info-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 28px 20px;
}

/* -------------------------------------------------------------
   POPULAR DESTINATIONS
-------------------------------------------------------------- */
.popular-locations-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.popular-destination {
  position: relative;
  height: 230px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: var(--navy);
}
.popular-destination:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}
.popular-destination img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.popular-destination:hover img { transform: scale(1.06); }
.popular-destination::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,29,61,0) 40%, rgba(0,20,45,0.88) 100%);
  z-index: 1;
}
.popular-destination .destination-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 16px 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.popular-destination .destination-name {
  color: #fff;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}
.popular-destination .destination-price {
  color: var(--gold-light);
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 4px;
}
.popular-destination .destination-arrow {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.35);
  display: grid;
  place-items: center;
  color: #fff;
  transition: 0.2s;
}
.popular-destination:hover .destination-arrow {
  background: var(--gold);
  border-color: var(--gold);
}
.popular-destination .destination-arrow svg { width: 14px; height: 14px; }
.popular-destination.skeleton {
  background: linear-gradient(100deg, #eef1f7 30%, #f7f8fb 50%, #eef1f7 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* -------------------------------------------------------------
   MAP SECTION
-------------------------------------------------------------- */
.map-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  margin-top: 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 20px;
}
.map-list {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 8px;
}
.map-list h3 {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.map-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: 0.12s;
  margin-bottom: 4px;
}
.map-item img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.map-item:hover {
  background: #f5f7fb;
  color: var(--navy);
}
.map-area {
  min-height: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* -------------------------------------------------------------
   INFO SECTION: NEWSLETTER + FEEDBACK
-------------------------------------------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}
.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 32px;
}
.info-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.info-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.newsletter-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.newsletter-form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
}
.newsletter-form svg { flex-shrink: 0; color: var(--muted); width: 18px; height: 18px; }
.newsletter-form input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 14px;
  padding: 10px 0;
  outline: none;
  color: var(--ink);
}
.newsletter-form input::placeholder { color: #9aa4b2; }
.newsletter-form button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.15s;
}
.newsletter-form button:hover { background: var(--navy-hover); }
.newsletter-form button svg { width: 16px; height: 16px; }
.newsletter-note {
  margin-top: 12px;
  font-size: 12px;
  color: #9aa4b2;
}
.feedback-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}
.feedback-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4285F4;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 26px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,29,61,0.22);
  transition: 0.15s;
}
.feedback-btn:hover { background: var(--navy-hover); transform: translateY(-1px); }

/* -------------------------------------------------------------
   FAQ
-------------------------------------------------------------- */
.faq-card { padding: 32px 32px 8px; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.faq-question .chev {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--navy);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}
.faq-question .chev svg { width: 12px; height: 12px; }
.faq-item.open .faq-question .chev { transform: rotate(180deg); background: #4285F4; color: #fff; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-item.open .faq-answer { max-height: 260px; }
.faq-answer p {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

/* -------------------------------------------------------------
   LOADER
-------------------------------------------------------------- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 29, 61, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.loader-overlay.visible { opacity: 1; visibility: visible; }
.loader-animation { text-align: center; color: #fff; }
.spinner {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255,255,255,0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-message {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: #e8edf5;
}

/* -------------------------------------------------------------
   FOOTER
-------------------------------------------------------------- */
footer {
  margin-top: 90px;
  background: var(--navy);
  color: #cfdcee;
  text-align: center;
  padding: 26px 20px;
  font-size: 13px;
}
footer p { margin: 0; }

/* -------------------------------------------------------------
   RESPONSIVE
-------------------------------------------------------------- */
@media (max-width: 992px) {
  .popular-locations-container { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .search-box { grid-template-columns: 1fr 1fr; }
  .search-box button[type="submit"] { grid-column: 1 / -1; }
  .map-container { grid-template-columns: 1fr; }
  .map-list { max-height: 220px; }
}
@media (max-width: 600px) {
  .hero-section { padding: 48px 16px 90px; }
  .form-container { padding: 20px 16px; }
  .search-box { grid-template-columns: 1fr; }
  .trust-bar { flex-direction: column; align-items: center; gap: 4px; }
  .popular-locations-container { grid-template-columns: 1fr; }
  .faq-card { padding: 24px 20px 8px; }
}