/* ================================================================
   AVIATCKT — Landing & Search Form · search.css
   ================================================================ */

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 3rem) 0 4rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, #071550 0%, #1254e8 52%, #0d3bbf 100%);
  z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute;
  top: -15%;
  right: -8%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,255,255,.05) 0%, transparent 65%);
  border-radius: 50%;
}
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -8%;
  left: -4%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(249,115,22,.1) 0%, transparent 65%);
  border-radius: 50%;
}
/* subtle dot grid */
.hero-bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 768px) { .hero-inner { padding: 0 2rem; } }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-full);
  padding: .375rem 1rem;
  color: rgba(255,255,255,.85);
  font-size: .8125rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.hero-h1 {
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.04em;
  line-height: 1.08;
  margin-bottom: .875rem;
}
.hero-h1 span { color: #93c5fd; }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.7);
  margin-bottom: 2.5rem;
  line-height: 1.55;
}

/* ── Search Card ───────────────────────────────────────────── */
.search-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-xl);
  max-width: 960px;
}

/* Trip tabs */
.trip-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius-full);
  width: fit-content;
  margin-bottom: 1.5rem;
}
.trip-tab {
  padding: .4rem 1.25rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
}
.trip-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(21,88,246,.28);
}

/* Form rows */
.search-form { display: flex; flex-direction: column; gap: .75rem; }

.search-row-main {
  display: grid;
  grid-template-columns: 1fr 44px 1fr 175px 175px;
  gap: .625rem;
  align-items: end;
}

/* ── Search Field ──────────────────────────────────────────── */
.sf {
  position: relative;
  display: flex;
  flex-direction: column;
}
.sf label {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: .375rem;
  padding-left: .125rem;
}
.sf input[type="text"],
.sf input[type="date"] {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--ease);
  cursor: text;
  appearance: none;
  -webkit-appearance: none;
}
.sf input:hover { border-color: var(--border); }
.sf input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(21,88,246,.08);
}
.sf input::placeholder { color: #a0aec0; font-weight: 400; }
.sf input.has-value { background: #fff; border-color: var(--border); }

/* ── Autocomplete ──────────────────────────────────────────── */
.sugg {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 300;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(.99);
  pointer-events: none;
  transition: all var(--ease);
  max-height: 340px;
  overflow-y: auto;
}
.sugg.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.sugg-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .75rem 1rem;
  cursor: pointer;
  transition: background var(--ease);
}
.sugg-item:hover, .sugg-item.focused { background: var(--bg); }
.sugg-item + .sugg-item { border-top: 1px solid var(--border); }

.sugg-iata-box {
  width: 44px;
  min-width: 44px;
  height: 36px;
  background: #eff6ff;
  border: 1.5px solid #dbeafe;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6875rem;
  font-weight: 800;
  color: var(--primary);
  font-family: ui-monospace, monospace;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.sugg-info { flex: 1; min-width: 0; }
.sugg-name {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sugg-detail {
  font-size: .75rem;
  color: var(--muted);
  margin-top: .125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sugg-loading, .sugg-empty {
  padding: .875rem 1rem;
  font-size: .875rem;
  color: var(--muted);
  text-align: center;
}

/* ── Swap button ───────────────────────────────────────────── */
.swap-btn {
  width: 44px; height: 44px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--ease);
  color: var(--muted);
  flex-shrink: 0;
  align-self: flex-end;
}
.swap-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: rotate(180deg);
}

/* ── Passengers ────────────────────────────────────────────── */
.pax-wrap { position: relative; }
.pax-trigger {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  transition: all var(--ease);
  white-space: nowrap;
}
.pax-trigger:hover { border-color: var(--border); }
.pax-trigger.open {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(21,88,246,.08);
}
.pax-trigger svg { color: var(--muted); flex-shrink: 0; transition: transform var(--ease); }
.pax-trigger.open svg { transform: rotate(180deg); }

.pax-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 300;
  padding: 1rem;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: all var(--ease);
  min-width: 220px;
}
.pax-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.pax-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
  gap: 1rem;
}
.pax-row + .pax-row { border-top: 1px solid var(--border); }
.pax-label-text { font-size: .875rem; font-weight: 600; }
.pax-label-sub { font-size: .75rem; color: var(--muted); }
.pax-controls { display: flex; align-items: center; gap: .625rem; }
.pax-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: none;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--ease);
  line-height: 1;
}
.pax-btn:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.pax-btn:disabled { opacity: .3; cursor: not-allowed; }
.pax-num { font-weight: 700; font-size: .9375rem; min-width: 18px; text-align: center; }
.pax-done {
  margin-top: .75rem;
  width: 100%;
  padding: .5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  transition: background var(--ease);
}
.pax-done:hover { background: var(--primary-dark); }

/* ── Search button ─────────────────────────────────────────── */
.search-submit {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: all var(--ease);
  box-shadow: 0 4px 18px rgba(21,88,246,.32);
  letter-spacing: -.01em;
}
.search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(21,88,246,.42);
}
.search-submit:active { transform: none; }

/* ── Error ─────────────────────────────────────────────────── */
.search-err {
  display: none;
  align-items: center;
  gap: .5rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: .5rem .875rem;
  color: var(--danger);
  font-size: .875rem;
  font-weight: 500;
}
.search-err.show { display: flex; }

/* ── Hero stats ────────────────────────────────────────────── */
.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.hero-stat { color: rgba(255,255,255,.65); font-size: .875rem; }
.hero-stat strong { display: block; color: #fff; font-size: 1.25rem; font-weight: 700; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .search-row-main {
    grid-template-columns: 1fr 44px 1fr;
    grid-template-rows: auto auto;
    row-gap: .75rem;
  }
  .sf--date { grid-column: 1; grid-row: 2; }
  .sf--pax  { grid-column: 2 / 4; grid-row: 2; }
}
@media (max-width: 640px) {
  .hero { min-height: auto; padding: calc(var(--nav-h) + 2rem) 0 3rem; }
  .search-card { padding: 1.25rem; }
  .search-row-main {
    grid-template-columns: 1fr 40px 1fr;
  }
  .sf--date, .sf--pax {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .hero-stats { gap: 1.5rem; }
}

/* ── How it works ──────────────────────────────────────────── */
.how-it-works { padding: 6rem 0; background: #fff; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(33.333% - 10px);
  right: calc(33.333% - 10px);
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary-light));
  pointer-events: none;
}
.step {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
}
.step-num {
  width: 48px; height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 14px rgba(21,88,246,.3);
  position: relative;
  z-index: 1;
}
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.step p { font-size: .875rem; color: var(--muted); line-height: 1.65; }

@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid::before { display: none; }
}

/* ── Features ──────────────────────────────────────────────── */
.features { padding: 6rem 0; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 3.5rem;
}
.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--ease-slow);
}
.feat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #bfdbfe;
}
.feat-icon {
  width: 48px; height: 48px;
  background: #eff6ff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}
.feat-card h3 { font-size: .9375rem; font-weight: 700; margin-bottom: .375rem; }
.feat-card p { font-size: .875rem; color: var(--muted); line-height: 1.65; }

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ── Popular routes ────────────────────────────────────────── */
.popular { padding: 5rem 0; background: #fff; }
.routes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}
.route-card {
  background: linear-gradient(135deg, var(--bg), #dbeafe);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--ease);
  text-decoration: none;
  display: block;
}
.route-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.route-from { font-size: .75rem; color: var(--muted); font-weight: 500; }
.route-arrow { font-size: 1.25rem; margin: .25rem 0; }
.route-to { font-size: .9375rem; font-weight: 700; }
.route-code { font-size: .75rem; color: var(--muted); margin-top: .25rem; font-family: monospace; }

@media (max-width: 768px) { .routes-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .routes-grid { grid-template-columns: 1fr; } }
