/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --navy:       #1B3A6B;
  --navy-dark:  #122850;
  --sky:        #3B82F6;
  --sky-light:  #EFF6FF;
  --green:      #16A34A;
  --green-bg:   #DCFCE7;
  --amber:      #B45309;
  --amber-bg:   #FEF3C7;
  --red:        #DC2626;
  --red-bg:     #FEE2E2;
  --gray-50:    #F9FAFB;
  --gray-100:   #F3F4F6;
  --gray-200:   #E5E7EB;
  --gray-400:   #9CA3AF;
  --gray-600:   #4B5563;
  --gray-800:   #1F2937;
  --white:      #FFFFFF;
  --radius:     10px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 25px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }

/* ── Layout helpers ────────────────────────────────────────────────────── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--navy);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}

.logo-plane {
  font-size: 1.4rem;
}

.logo-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-greeting {
  color: rgba(255,255,255,.85);
  font-size: .9rem;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 22px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--sky);
  color: var(--white);
  border-color: var(--sky);
}
.btn-primary:hover { background: #2563EB; border-color: #2563EB; }

.btn-success {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-success:hover { background: #15803D; border-color: #15803D; }

.btn-outline {
  background: transparent;
  color: var(--gray-600);
  border-color: var(--gray-200);
}
.btn-outline:hover { background: var(--gray-100); border-color: var(--gray-400); }

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.5);
  padding: 7px 18px;
  font-size: .875rem;
}
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.8); }

.btn-lg {
  padding: 13px 32px;
  font-size: 1.05rem;
}

.btn-hero {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
  padding: 14px 34px;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
}
.btn-hero:hover { background: var(--sky-light); }

/* ── Error banner ──────────────────────────────────────────────────────── */
.error-banner {
  background: var(--red-bg);
  border-left: 4px solid var(--red);
  color: var(--red);
  padding: 14px 24px;
  font-size: .9rem;
  font-weight: 500;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy-dark) 0%, #1B5FAD 60%, #2E86DE 100%);
  min-height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Subtle grid/pattern overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.06) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 60px 24px 60px 10%;
  max-width: 640px;
}

.hero-tagline {
  color: rgba(255,255,255,.7);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-headline {
  color: var(--white);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 20px;
}

.hero-sub {
  color: rgba(255,255,255,.8);
  font-size: 1.15rem;
  margin-bottom: 36px;
}

/* ── Features ──────────────────────────────────────────────────────────── */
.features {
  padding: 64px 0;
  background: var(--white);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: box-shadow .15s;
}
.feature-card:hover { box-shadow: var(--shadow-md); }

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
}

.feature-card p {
  font-size: .875rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* ── CTA band ──────────────────────────────────────────────────────────── */
.cta-band {
  background: var(--sky-light);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: 56px 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-inner h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}

.cta-inner p {
  color: var(--gray-600);
  font-size: .95rem;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  margin-top: auto;
  background: var(--navy-dark);
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 22px 24px;
  font-size: .85rem;
}
.footer strong { color: rgba(255,255,255,.85); }

/* ── Flights page ──────────────────────────────────────────────────────── */
.flights-main {
  flex: 1;
  padding-bottom: 48px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

/* ── Search card ───────────────────────────────────────────────────────── */
.search-section {
  background: var(--navy);
  padding: 36px 0;
}

.search-section .section-title {
  color: var(--white);
}

.search-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-lg);
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 180px;
}

.form-group--narrow {
  min-width: 100px;
  max-width: 120px;
  flex: 0 0 auto;
}

.form-group label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.form-group select,
.form-group input[type="date"],
.form-group input[type="number"] {
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: .95rem;
  color: var(--gray-800);
  background: var(--white);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.form-group input[type="date"] {
  background-image: none;
  cursor: text;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* ── Results ───────────────────────────────────────────────────────────── */
.results-section {
  padding: 36px 0;
}

.flight-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Flight card ───────────────────────────────────────────────────────── */
.flight-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, border-color .15s;
}

.flight-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--sky);
}

.fc-airline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.fc-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fc-airline-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--gray-800);
  line-height: 1.3;
}

.fc-flight-no {
  font-size: .78rem;
  color: var(--gray-400);
  margin-top: 2px;
}

.fc-route {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}

.fc-time {
  text-align: center;
  min-width: 56px;
}

.fc-clock {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1;
}

.fc-airport {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-400);
  margin-top: 3px;
}

.fc-time--right { text-align: right; }

.fc-arrow {
  flex: 1;
  text-align: center;
  max-width: 180px;
}

.fc-duration {
  font-size: .78rem;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.fc-line {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.fc-line span {
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }

/* ── Price column ──────────────────────────────────────────────────────── */
.fc-price-col {
  text-align: right;
  min-width: 140px;
}

.fc-total {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.fc-per-person {
  font-size: .75rem;
  color: var(--gray-400);
  margin-top: 2px;
}

.fc-seats {
  font-size: .75rem;
  color: var(--red);
  font-weight: 600;
  margin: 6px 0 10px;
}

/* ── Review section ────────────────────────────────────────────────────── */
.review-section {
  padding: 36px 0;
}

.review-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  max-width: 580px;
  margin-bottom: 24px;
}

.review-flight-summary {}

.rfs-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: .9rem;
  gap: 12px;
}

.rfs-row:last-child { border-bottom: none; }

.rfs-label {
  color: var(--gray-600);
  font-weight: 500;
  flex-shrink: 0;
}

.rfs-value {
  color: var(--gray-800);
  font-weight: 600;
  text-align: right;
}

.rfs-row--total {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 2px solid var(--gray-200);
}

.rfs-price {
  font-size: 1.2rem;
  color: var(--navy);
}

.review-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Confirm section ───────────────────────────────────────────────────── */
.confirm-section {
  padding: 48px 0;
}

.confirm-card {
  background: var(--white);
  border: 1.5px solid var(--green-bg);
  border-radius: var(--radius);
  padding: 48px 36px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.confirm-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.confirm-card h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 10px;
}

.confirm-ref {
  font-size: 1.05rem;
  color: var(--gray-600);
  margin-bottom: 28px;
}

.confirm-ref strong {
  color: var(--navy);
  font-size: 1.2rem;
  letter-spacing: .05em;
}

.confirm-flight-info {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .9rem;
  color: var(--gray-600);
  text-align: left;
  margin-bottom: 28px;
}

.confirm-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .flight-card {
    flex-direction: column;
    align-items: stretch;
  }

  .fc-airline { min-width: unset; }

  .fc-route {
    justify-content: space-between;
  }

  .fc-price-col {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    min-width: unset;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-content {
    padding: 40px 24px;
  }

  .form-group--narrow {
    max-width: unset;
    flex: 1;
  }
}
