/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root{
  --brand-700:#00457c;
  --brand-600:#0f56a7;
  --accent-500:#ff7a45;
  --text:#0f172a;
  --muted:#6b7280;
  --card:#ffffff;
  --shadow:0 8px 24px rgba(2,6,23,.12);
  --radius:12px;
}
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f9f9f9;
  color: var(--text);
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background-color: #00457c;
  padding: 1rem 0;
  color: #fff;
}
.nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px; /* Tightens spacing between logo and text */
}

.site-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  display: block;   /* removes the inline-image baseline gap */
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.5px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.main-nav a {
  color: #fff;
  font-weight: 500;
}

/* Hero */
.hero {
  background: url('../assets/images/banner.jpg') no-repeat center center/cover;
  position: relative;
  color: white;
  padding: 5rem 1rem 4rem;
  text-align: center;
}
.hero-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 2rem;
}
.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* Flight Search Form */
.modern-search-form {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
}
input, select {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.search-btn {
  margin-top: 1rem;
  background-color: #00457c;
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.search-btn:hover {
  background-color: #0063ad;
}

/* Sections */
.section-deals,
.section-trending,
.section-why-book {
  padding: 4rem 1rem;
  background-color: #fff;
}
h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.deal-cards,
.destination-cards,
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.deal-card,
.destination-card {
  background: #f2f2f2;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
}
.deal-card img,
.destination-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.feature-box {
  background: #e9f0f7;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}


/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
}
.close-btn {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-flex {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
  }
}
/* Hero Alt Section */
.hero-alt {
  background: url('../assets/images/hero-bg.jpg') no-repeat center center/cover;
  color: white;
  padding: 4rem 1rem;
}
.hero-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}
.hero-text {
  flex: 1 1 40%;
}
.hero-text h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}
.hero-text p {
  font-size: 1.1rem;
}

.search-box {
  flex: 1 1 55%;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  color: #333;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.search-box form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.input-row {
  display: flex;
  gap: 1rem;
}
.input-row input,
.input-row select {
  flex: 1;
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.radio-group {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
}
.radio-group input {
  margin-right: 5px;
}
/* Cabin field polish */
.search-box .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.search-box select,
.search-box input[type="number"],
.search-box input[type="text"],
.search-box input[type="date"],
.search-box input[type="time"] {
  width: 100%;
  height: 52px;
  font-size: 16px;
}

.search-btn {
  background-color: #00457c;
  color: white;
  padding: 0.8rem;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}
.search-btn:hover {
  background-color: #0063ad;
}

@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
  }
  .input-row {
    flex-direction: column;
  }
}
.section-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.8rem;
  color: #00457c;
}

.section-offers,
.section-trending {
  padding: 4rem 1rem;
  background-color: #fff;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #00457c;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  justify-content: center;
  align-items: stretch;
}

@media (max-width: 991px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background-color: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.card-title {
  padding: 1rem;
  text-align: center;
  font-weight: bold;
  font-size: 1.05rem;
  background-color: #f5f5f5;
}

.card-body {
  padding: 1rem;
  text-align: center;
}

.card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.card-body p {
  color: #666;
  font-size: 0.95rem;
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}
.modal-content h2 {
  margin-bottom: 1rem;
}
.modal-content p {
  margin-bottom: 0.5rem;
}
.close-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.8rem;
  color: #333;
  cursor: pointer;
}
.modal-content button {
  margin-top: 1rem;
  background-color: #00457c;
  color: white;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.why-book {
  padding: 4rem 1rem;
  background-color: #f0f7ff;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.why-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 2rem 1.2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  text-align: center;
  transition: transform 0.3s ease;
}

.why-card:hover {
  transform: translateY(-5px);
}

.why-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.why-card h3 {
  font-size: 1.15rem;
  color: #00457c;
  margin-bottom: 0.5rem;
}

.why-card p {
  font-size: 0.95rem;
  color: #555;
}

@media (max-width: 991px) {
  .why-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}
/* Footer */
.site-footer {
  background-color: #00324e;
  color: white;
  padding: 2rem 1rem 1rem;
  font-family: 'Segoe UI', sans-serif;
}
.footer-subscribe {
  text-align: center;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-subscribe p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.subscribe-form input {
  padding: 0.5rem;
  width: 240px;
  border-radius: 4px;
  border: none;
  margin-right: 0.5rem;
}
.subscribe-form button {
  padding: 0.5rem 1rem;
  background-color: #0d6efd;
  border: none;
  color: white;
  border-radius: 4px;
}
.footer-main {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  margin-bottom: 1rem;
}
.footer-logo img {
  width: 160px;
}
.footer-links h4, .footer-social h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.footer-links ul {
  list-style: none;
  padding: 0;
}
.footer-links li {
  margin-bottom: 0.5rem;
}
.footer-links a {
  color: white;
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}
.social-icons a img {
  width: 24px;
  margin-right: 0.5rem;
}
.footer-certifications {
  margin-top: 2rem;
  text-align: center;
  padding-bottom: 1.2rem;
}
.footer-certifications img {
  height: 45px;
  margin: 0 0.5rem;
}
.footer-bottom {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #ccc;
}
.footer-bottom a {
  color: #ccc;
}
.footer-bottom a:hover {
  text-decoration: underline;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  height: 60px;
  width: auto;
}

.footer-brand .brand-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: white;
  font-family: 'Poppins', sans-serif;
}

#results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
  max-width: 1000px;
  margin: auto;
}

.flight-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  flex-wrap: wrap;
}

.flight-card-header {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
}

.airline-logo {
  height: 24px;
  object-fit: contain;
}

.itinerary {
  flex: 2;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: #333;
}

.flight-price {
  flex: 1;
  text-align: right;
}

.book-now-btn {
  margin-top: 10px;
  padding: 8px 16px;
  background: #00539C;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

.book-now-btn:hover {
  background: #004080;
}
.hidden {
  display: none !important;
}
.flight-filters {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 1rem auto;
  max-width: 1000px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.flight-filters .filter-group {
  margin-bottom: 1.2rem;
}

.flight-filters h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #00457c;
}

.flight-filters label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.flight-filters input[type="time"] {
  padding: 0.3rem;
  margin: 0.3rem 0.5rem 0.3rem 0;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#applyFilters {
  padding: 0.5rem 1.2rem;
  background: #00457c;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
#applyFilters:hover {
  background: #0063ad;
}
/* Reduce spacing between filters and results */

#results {
  margin-top: 0; /* override any extra space */
}

#results {
  width: 100%;
  max-width: 1000px;
  padding: 1rem;
}

#results {
  width: 100%;
  max-width: 1000px;
  padding: 1rem;
  margin-top: 1rem;
}

/* ===============================
   🔧 FILTER & RESULTS CONTAINER FIX
================================= */

/* Prevent spacing issues */
#results {
  margin-top: 1rem;
  padding-top: 0;
}

/* Optional: tighten overall vertical rhythm */
.flight-card {
  margin-top: 1rem;
}
/* ===============================
   🔧 LAYOUT: Filter + Results Side by Side
================================= */

.flight-container {
  display: flex;
  gap: 2rem;
  max-width: 1000px;
  margin: 2rem auto;
  align-items: flex-start;
}

#filterWrapper {
  flex: 0 0 250px;
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

#resultsWrapper {
  flex: 1;
  padding-top: 0.5rem;
}

#results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.flight-card {
  margin-top: 1rem;
}
.destination-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.8rem;
  color: #333;
  cursor: pointer;
  font-weight: bold;
  z-index: 10;
}
@media (max-width: 600px) {
  .destination-close {
    font-size: 2.2rem;
    right: 10px;
  }
}
.age-note {
  color: #ffffff;
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
}
#loadingOverlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}
.loading-box {
  text-align: center;
  font-family: 'Segoe UI', sans-serif;
  color: #222;
}
.loading-logo {
  width: 80px;
  margin-bottom: 10px;
}
.loading-lines p {
  margin: 0.3rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.hidden {
  display: none !important;
}
.loading-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.1;
}
.why-icon.coinbase-icon img {
  height: 40px;
  display: block;
  margin: 0 auto;
}
/* ===== Flight card layout cleanup (flex, stable) ===== */
.flight-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}

/* Top row: header grows, price stays right */
.flight-card-header {
  order: 1;
  flex: 1 1 320px;
  min-width: 260px;
}
.flight-price {
  order: 2;
  margin-left: auto;       /* push to the far right of the row */
  text-align: right;
  flex: 0 0 auto;
}

/* Visual separator before the return section */
.flight-card .airport-route:not(:first-of-type) {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
}

/* Small polish */
.flight-card-header .flight-airline { font-weight: 700; }
.flight-card-header .flight-date { font-size: 13px; color: #6b7280; }
.airline-logo { height: 24px; width: auto; object-fit: contain; }
.flight-price .fare-rules-link { margin-right: 10px; font-size: 14px; color: #00457c; text-decoration: none; }
.flight-price .fare-rules-link:hover { text-decoration: underline; }

/* Mobile: stack everything, keep price readable and inside card */
@media (max-width: 700px) {
  .flight-card-header { flex-basis: 100%; }
  .flight-price { order: 4; flex-basis: 100%; text-align: right; margin-top: 6px; }
}
/* --- Stable card layout: header + price row; details grid below --- */
.flight-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

/* Top row */
.flight-card-header {
  flex: 1 1 320px;
  min-width: 260px;
}
.flight-price {
  margin-left: auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.book-now-btn { white-space: nowrap; }
.fare-rules-link { color: #00457c; text-decoration: none; }
.fare-rules-link:hover { text-decoration: underline; }

/* Details: two columns on desktop, one on mobile */
.details-grid {
  order: 3;
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 24px;
}
.itinerary-col .airport-route {
  margin: 8px 0 6px;
  font-weight: 600;
}
.itinerary-col .itinerary {
  margin: 0;
  list-style: none;
  padding: 0;
  font-size: 14px;
  color: #333;
}

/* Divider before the second (return) column */
.details-grid .itinerary-col:nth-child(2) {
  border-top: 1px dashed #e5e7eb;
  padding-top: 10px;
}

/* Desktop: put outbound on left, return on right */
@media (min-width: 900px) {
  .details-grid {
    grid-template-columns: 1fr 1fr;
  }
  .details-grid .itinerary-col:nth-child(2) {
    border-top: 0;
    padding-top: 0;
    border-left: 1px dashed #e5e7eb;
    padding-left: 24px;
  }
}

/* Mobile: everything stacks, never overflows */
@media (max-width: 700px) {
  .flight-card-header { flex-basis: 100%; }
  .flight-price { flex-basis: 100%; }
}