:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-2: #0ea5e9;
  --shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.18);
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.sky-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 85% -8%, rgba(14, 165, 233, 0.14), transparent 60%),
    radial-gradient(55% 50% at 12% -5%, rgba(37, 99, 235, 0.12), transparent 60%);
  pointer-events: none;
}

.grad {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* NAV */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 5vw, 56px);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 247, 251, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}
.brand img { height: 46px; width: auto; display: block; }
.menu { display: flex; gap: 28px; }
.menu a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: 0.2s;
}
.menu a:hover { color: var(--brand); border-color: var(--brand); }

/* HERO */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) 16px 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
.hero-copy h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 18ch;
}
.hero-copy .lead {
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 46ch;
}

/* SEARCH CARD */
.search-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: visible;
  position: relative;
  z-index: 10;
}
.tabbar {
  display: flex;
  gap: 4px;
  padding: 10px 14px 0;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}
.tab {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 16px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: 0.2s;
}
.tab.active { color: var(--brand); border-color: var(--brand); }

.search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 12px;
  padding: 18px;
}
.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.field label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.field input, .field select {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  width: 100%;
  outline: none;
  transition: 0.2s;
  appearance: none;
}
.field input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }

.btn-buscar {
  grid-column: 1 / -1;
  border: 0;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 12px;
  padding: 15px 20px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 10px 24px -8px rgba(37, 99, 235, 0.5);
}
.btn-buscar:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(37, 99, 235, 0.55); }
.btn-buscar:active { transform: translateY(0); }

.search-note {
  text-align: center;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  background: #fbfdff;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* SUGGESTIONS */
.suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 30;
  display: none;
  max-height: 300px;
  overflow: auto;
}
.suggest.open { display: block; }
.suggest-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.suggest-item:hover { background: #eff6ff; }
.suggest-item .nm { font-weight: 600; font-size: 0.92rem; }
.suggest-item .sub { font-size: 0.78rem; color: var(--muted); }

/* SECTIONS */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 16px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; letter-spacing: -0.01em; }
.chip {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}

.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.deal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  transition: transform 0.18s, box-shadow 0.2s;
}
.deal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.deal-route {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
}
.deal-route .dep { white-space: nowrap; }
.deal-route .arr { color: var(--brand-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-sub { color: var(--muted); font-size: 0.82rem; margin-top: 2px; }
.deal-price {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--brand);
  margin-top: 10px;
  line-height: 1.1;
}
.deal-price small { font-size: 0.72rem; font-weight: 600; color: var(--muted); display: block; }
.deal-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.deal-meta span {
  font-size: 0.72rem;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
}
.deal-cta {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--brand);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 9px 16px;
  border-radius: 10px;
  transition: 0.2s;
}
.deal-card:hover .deal-cta { background: var(--brand); border-color: var(--brand); color: #fff; }

.skeleton { height: 140px; border-radius: var(--radius); background: linear-gradient(90deg, #eef2f7, #e2e8f0, #eef2f7); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.step-num {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; font-weight: 700; }
.step p { color: var(--muted); font-size: 0.92rem; margin-top: 6px; }

.footer {
  border-top: 1px solid var(--line);
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer p { font-size: 0.85rem; }
.muted { color: var(--muted); font-size: 0.78rem !important; }

@media (max-width: 760px) {
  .menu { display: none; }
  .search-grid { grid-template-columns: 1fr 1fr; }
  .btn-buscar { width: 100%; }
  .deals-grid { grid-template-columns: 1fr; }
}

/* ---------- CALENDÁRIO DENTRO DA CAIXA ---------- */
.cal-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 320px;
  max-width: min(320px, calc(100vw - 48px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 60;
  padding: 14px;
  display: none;
}
.cal-pop.open { display: block; }
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cal-head strong { font-size: 0.92rem; text-transform: capitalize; }
.cal-nav {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.cal-nav:hover { border-color: var(--brand); color: var(--brand); }
.cal-nav:disabled { opacity: 0.35; cursor: default; }
.cal-dow, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.cal-dow span { font-size: 0.68rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-day {
  border: 0;
  background: none;
  font: inherit;
  border-radius: 10px;
  padding: 5px 2px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-height: 44px;
}
.cal-day:hover:not(:disabled) { background: #eff6ff; }
.cal-day:disabled { opacity: 0.28; cursor: default; }
.cal-day .dn { font-size: 0.85rem; font-weight: 600; }
.cal-day .pr { font-size: 0.62rem; font-weight: 700; color: #047857; line-height: 1; }
.cal-day.sel { background: var(--brand); color: #fff; }
.cal-day.sel .pr { color: #dbeafe; }
.cal-day.inrange { background: #dbeafe; border-radius: 0; }
.cal-hint { font-size: 0.75rem; color: var(--muted); margin-top: 8px; text-align: center; }

/* ---------- RESULTADOS ---------- */
.results-wrap { padding-top: 8px; }
.res-note { margin-bottom: 14px; }
.results-list { display: grid; gap: 12px; }
.res-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  align-items: center;
}
.res-card.best { border-color: var(--brand); box-shadow: 0 8px 24px -10px rgba(37, 99, 235, 0.4); }
.res-dates { font-weight: 700; font-size: 0.98rem; }
.res-sub { color: var(--muted); font-size: 0.82rem; grid-column: 1; }
.res-price { font-weight: 800; font-size: 1.4rem; color: var(--brand); text-align: right; white-space: nowrap; }
.res-price small { display: block; font-size: 0.7rem; font-weight: 600; color: var(--muted); }
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  margin-right: 7px;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  vertical-align: 2px;
}
.res-buy {
  grid-column: 1 / -1;
  justify-self: start;
  border: 0;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 10px;
  padding: 10px 22px;
  cursor: pointer;
}
.res-buy:hover { filter: brightness(1.06); }
.res-group { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 8px; }
.live-filters {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
}
.lf-sort select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.85rem;
  background: #f8fafc;
  margin-left: 6px;
}
.lf-check { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.lf-check input { width: 16px; height: 16px; accent-color: var(--brand); }
.lf-toggle {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 8px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--brand);
}
.lf-adv {
  flex-basis: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 2px;
}
.lf-group { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; }
.lf-group > span { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.lf-group label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 500; }
.lf-group input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); }
.lf-list { display: flex; flex-direction: column; gap: 4px; max-height: 132px; overflow: auto; }
.lf-group input[type="range"] { width: 100%; accent-color: var(--brand); }
.lf-clear {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  align-self: start;
}
.lf-clear:hover { border-color: var(--brand); color: var(--brand); }
.res-skel { height: 96px; border-radius: var(--radius); background: linear-gradient(90deg, #eef2f7, #e2e8f0, #eef2f7); background-size: 200% 100%; animation: shimmer 1.4s infinite; }

/* ---------- RODAPÉ COM ANIMAÇÃO DE VOO ---------- */
.footer {
  border-top: 1px solid var(--line);
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer p { font-size: 0.85rem; }
.foot-brand { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.foot-brand span { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.flight-line { position: relative; margin: 4px 0 2px; }
.flight-line svg { width: 100%; height: 90px; display: block; }
.flight-tags { display: flex; justify-content: space-between; max-width: 100%; font-size: 0.72rem; font-weight: 800; color: var(--muted); letter-spacing: 0.08em; padding: 0 18px; margin-top: -6px; }