/* ═══════════════════════════════════════════════════════ RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:   #0f172a;
  --accent:    #e63946;
  --accent2:   #ff6b6b;
  --blue:      #2563eb;
  --green:     #16a34a;
  --bg:        #f8fafc;
  --card:      #ffffff;
  --border:    #e2e8f0;
  --text:      #1e293b;
  --muted:     #64748b;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════════════════════ HEADER */
.header {
  background: var(--primary);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  color: white;
}

.logo-icon { font-size: 1.4rem; }
.logo-text strong { color: var(--accent); }

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover { color: white; }

/* ── Language switcher ── */
.lang-switcher {
  display: flex;
  gap: 4px;
}

.lang-btn {
  background: none;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
}

.lang-btn.active {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.6);
}

/* ═══════════════════════════════════════════════════════ HERO */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 100%);
  color: white;
  padding: 72px 0 80px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.accent { color: var(--accent2); }

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  margin: 0 auto 40px;
}

/* ── Search box ── */
.search-box {
  background: white;
  border-radius: 16px;
  padding: 28px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: left;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field input,
.field select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: white;
  transition: border-color 0.2s;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue);
}

.search-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-search {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-search:first-child {
  background: var(--accent);
  color: white;
}

.btn-search:first-child:hover {
  background: #c1121f;
  transform: translateY(-1px);
}

.btn-mobile {
  background: var(--primary);
  color: white;
}

.btn-mobile:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.search-note {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════ STATS */
.stats {
  background: var(--accent);
  padding: 32px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat { color: white; }
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.stat-label {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════ SECTIONS */
.section {
  padding: 72px 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ═══════════════════════════════════════════════════════ CALCULATOR */
.calc-section { background: white; }

.calc-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.calc-inputs {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px;
  border: 1.5px solid var(--border);
}

.calc-inputs .field { margin-bottom: 20px; }

.calc-inputs small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 4px;
}

.btn-calc {
  width: 100%;
  padding: 14px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-calc:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.calc-result {
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  padding: 28px;
}

.calc-result h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.result-rows { margin-bottom: 20px; }

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 0.95rem;
}

.result-row.total {
  margin-top: 8px;
  padding-top: 16px;
  font-size: 1.15rem;
  font-weight: 700;
  border-top: 2px solid rgba(255,255,255,0.2);
  border-bottom: none;
}

.result-val { font-weight: 600; }

.result-row.total .result-val { color: var(--accent2); font-size: 1.3rem; }

.result-saving {
  background: rgba(22, 163, 74, 0.15);
  border: 1px solid rgba(22, 163, 74, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #86efac;
  margin-bottom: 16px;
}

.result-note {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}

.btn-seguros {
  display: block;
  text-align: center;
  background: var(--accent);
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn-seguros:hover { background: #c1121f; }

/* ═══════════════════════════════════════════════════════ STEPS */
.how-section { background: var(--bg); }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step {
  background: white;
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1.5px solid var(--border);
  text-align: center;
}

.step-num {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step p { font-size: 0.88rem; color: var(--muted); }

/* ═══════════════════════════════════════════════════════ SEGUROS */
.seguros-section { background: white; }

.seguros-box {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
}

.seguros-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
  text-align: left;
}

.feature {
  font-size: 0.9rem;
  color: var(--text);
}

.btn-seguros-cta {
  display: inline-block;
  background: var(--green);
  color: white;
  padding: 14px 36px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
}

.btn-seguros-cta:hover {
  background: #15803d;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════ FAQ */
.faq-section { background: var(--bg); }

.faq-list { max-width: 720px; margin: 0 auto; }

.faq-item {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 12px;
  border: 1.5px solid var(--border);
}

.faq-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.faq-item p { font-size: 0.9rem; color: var(--muted); }

/* ═══════════════════════════════════════════════════════ FOOTER */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo-text { color: white; font-size: 1.1rem; }
.footer-brand p { margin-top: 12px; font-size: 0.88rem; max-width: 280px; }

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.footer-links strong {
  display: block;
  color: white;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.footer-links a {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-links a:hover { color: white; }

.footer-bottom {
  text-align: center;
  padding: 20px;
  font-size: 0.78rem;
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════ RESPONSIVE */
@media (max-width: 768px) {
  .search-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid  { grid-template-columns: repeat(2, 1fr); }
  .steps       { grid-template-columns: 1fr 1fr; }
  .calc-wrapper { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .nav { display: none; }
  .seguros-features { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .search-grid { grid-template-columns: 1fr; }
  .steps       { grid-template-columns: 1fr; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  .hero h1     { font-size: 1.7rem; }
}
