/* ===================== Variables ===================== */
:root {
  --navy: #0b2545;
  --navy-light: #13315c;
  --blue: #1d6fd6;
  --blue-dark: #145bb0;
  --accent: #ff8a3d;
  --bg: #f6f8fb;
  --white: #ffffff;
  --text: #1f2937;
  --text-muted: #5b6472;
  --border: #e2e8f0;
  --success: #1a9e6b;
  --danger: #d63b3b;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(11, 37, 69, 0.08);
  --shadow-lg: 0 16px 40px rgba(11, 37, 69, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================== Top notice bar ===================== */
.notice-bar {
  background: var(--navy);
  color: #cfe0f7;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}
.notice-bar strong { color: #fff; }

/* ===================== Header ===================== */
header.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: var(--navy);
}
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}
nav.main-nav {
  display: flex;
  gap: 28px;
}
nav.main-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
}
nav.main-nav a:hover { color: var(--blue); text-decoration: none; }

/* ===================== Hero ===================== */
.hero {
  background:
    linear-gradient(180deg, rgba(11,37,69,0.72), rgba(11,37,69,0.55)),
    linear-gradient(120deg, #0b2545 0%, #13315c 55%, #1d6fd6 100%);
  color: #fff;
  padding: 56px 0 90px;
  position: relative;
}
.hero h1 {
  font-size: 38px;
  font-weight: 800;
  margin: 0 0 10px;
  max-width: 720px;
}
.hero p.subtitle {
  font-size: 17px;
  color: #d7e4f7;
  max-width: 640px;
  margin: 0 0 32px;
}

/* Search card */
.search-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  color: var(--text);
}
.trip-type {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.trip-type button {
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.trip-type button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.search-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr 0.9fr;
  gap: 12px;
  align-items: start;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.field label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}
.field input, .field select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fbfcfe;
  width: 100%;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
}
.field input.input-error {
  border-color: var(--danger);
  background: #fff5f5;
}
.field-error {
  font-size: 12px;
  color: var(--danger);
  font-weight: 600;
  min-height: 14px;
  display: none;
}
.field-error.show { display: block; }
.field-hint {
  position: absolute;
  right: 10px;
  top: 38px;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  background: #eaf2fd;
  padding: 2px 6px;
  border-radius: 5px;
  pointer-events: none;
}

/* Autocomplete dropdown */
.autocomplete-wrap { position: relative; }
.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
  z-index: 60;
  display: none;
}
.autocomplete-list.show { display: block; }
.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #f1f4f8;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover,
.autocomplete-item.active {
  background: #f0f6ff;
}
.autocomplete-item .code {
  font-weight: 800;
  color: var(--navy);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 12.5px;
  flex-shrink: 0;
  min-width: 42px;
  text-align: center;
}
.autocomplete-item .info { display: flex; flex-direction: column; overflow: hidden; }
.autocomplete-item .city { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.autocomplete-item .airport-name { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.autocomplete-empty {
  padding: 14px 12px;
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
}

.swap-btn { display: none; }

.btn-search {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
  width: 100%;
}
.btn-search:hover { background: #ef7627; }
.btn-search:active { transform: translateY(1px); }

.passengers-row {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ===================== Trust strip ===================== */
.trust-strip {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  margin-top: -46px;
  position: relative;
  z-index: 5;
}
.trust-inner {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-around;
  padding: 20px 16px;
  flex-wrap: wrap;
  gap: 16px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 220px;
}
.trust-item .icon {
  font-size: 20px;
  flex-shrink: 0;
}

/* ===================== Disclaimer banner ===================== */
.disclaimer-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 40px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.disclaimer-banner .icon {
  font-size: 22px;
  flex-shrink: 0;
}
.disclaimer-banner p {
  margin: 0;
  font-size: 14.5px;
  color: #7c4a12;
}
.disclaimer-banner strong { color: #5c3610; }

/* ===================== Sections ===================== */
section { padding: 56px 0; }
.section-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 8px;
  text-align: center;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 15.5px;
}

/* How it works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.step-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 18px;
}
.step-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--navy);
}
.step-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-muted);
}

/* ===================== Loader (búsqueda de vuelos en tiempo real) ===================== */
.loader-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 4px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: rutavuelo-spin 0.8s linear infinite;
}
@keyframes rutavuelo-spin {
  to { transform: rotate(360deg); }
}

/* ===================== Route guides ===================== */
.routes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.route-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.route-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.route-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
}
.route-duration {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blue);
  background: #eaf2fd;
  padding: 3px 9px;
  border-radius: 999px;
}
.route-card dl {
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
}
.route-card dt {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.route-card dd {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}
.route-price-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* ===================== Tips list ===================== */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.tip-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
}
.tip-card .tip-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.tip-card h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  color: var(--navy);
}
.tip-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Results (mock/demo) */
.results-section { background: #fff; }
.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 14px;
  transition: box-shadow 0.15s ease;
}
.result-row:hover { box-shadow: var(--shadow); }
.airline-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 200px;
}
.airline-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--navy);
  font-size: 14px;
  border: 1px solid var(--border);
}
.airline-name { font-weight: 700; font-size: 15px; }
.airline-sub { font-size: 12.5px; color: var(--text-muted); }
.flight-times {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.flight-times .duration {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 400;
  text-align: center;
}
.flight-times .line {
  width: 60px;
  height: 1px;
  background: var(--border);
  position: relative;
}
.price-block {
  text-align: right;
  min-width: 140px;
}
.price {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}
.price-sub { font-size: 12px; color: var(--text-muted); }
.btn-redirect {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
}
.btn-redirect:hover { background: var(--blue-dark); }

.demo-tag {
  display: inline-block;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 8px;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--blue);
  font-weight: 400;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 14.5px;
}

/* ===================== Footer ===================== */
footer.site-footer {
  background: var(--navy);
  color: #cbd9ee;
  padding: 48px 0 24px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand .logo { color: #fff; }
.footer-brand p {
  color: #9db2cf;
  font-size: 13.5px;
  margin-top: 12px;
  max-width: 280px;
}
.footer-col h4 {
  color: #fff;
  font-size: 14px;
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  color: #b7c8e2;
  margin-bottom: 10px;
  font-size: 13.5px;
}
.footer-col a:hover { color: #fff; }
.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 12.5px;
  color: #93a8c7;
  line-height: 1.7;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 20px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: #8ca0bf;
}

/* ===================== Cookie banner ===================== */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.12);
  padding: 20px 24px;
  z-index: 999;
  display: none;
}
#cookie-banner.show { display: block; }
.cookie-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-text {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 700px;
}
.cookie-text a { font-weight: 600; }
.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.btn-cookie {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--navy);
}
.btn-cookie.accept {
  background: var(--navy);
  color: #fff;
}
.btn-cookie.reject {
  background: #fff;
  color: var(--navy);
}

/* ===================== Legal pages ===================== */
.legal-page { background: #fff; }
.legal-hero {
  background: var(--navy);
  color: #fff;
  padding: 40px 0;
}
.legal-hero h1 { margin: 0; font-size: 30px; }
.legal-hero p { color: #cfe0f7; margin: 8px 0 0; font-size: 14px; }
.legal-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.legal-content h2 {
  color: var(--navy);
  font-size: 20px;
  margin: 36px 0 12px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li {
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
}
.legal-content ul { padding-left: 20px; }
.legal-content .updated {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 0;
}
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 600;
}

/* ===================== Responsive ===================== */
@media (max-width: 960px) {
  .search-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-inner { flex-direction: column; align-items: flex-start; }
  .routes-grid { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .search-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .result-row { flex-direction: column; align-items: stretch; }
  .price-block { text-align: left; }
  nav.main-nav { display: none; }
  .cookie-inner { flex-direction: column; align-items: stretch; }
  .cookie-actions { justify-content: flex-end; }
}
