/* Asesorías Mejor Isapre: estilos del sitio */

:root {
  --navy: #1B2F5B;
  --navy-dark: #0F1E3D;
  --navy-soft: #2B4274;
  --ink: #16233F;
  --text: #3A4A66;
  --muted: #4A5568;
  --line: #D9DFE8;
  --input-line: #B8C3D4;
  --bg-soft: #F1F4F9;
  --amber: #F0B44C;
  --amber-soft: #FCEFD6;
  --amber-ink: #8A5A0B;
  --green: #15803D;
  --green-dark: #116632;
  --white: #FFFFFF;
  --radius: 18px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy); }
a:hover { color: var(--navy-dark); }

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: var(--white); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: inherit; font-size: 17px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn svg { flex: 0 0 auto; }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-dark); color: var(--white); }
.btn-outline-light { border-color: var(--white); color: var(--white); background: transparent; }
.btn-outline-light:hover { background: var(--white); color: var(--navy); }
.btn-ghost { border-color: var(--input-line); color: var(--navy); background: var(--white); min-height: 44px; font-size: 15px; padding: 0 18px; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 16px; }

/* Encabezado */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #E2E7EF;
  backdrop-filter: saturate(1.2) blur(6px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-mark { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-mark img { display: block; width: 46px; height: auto; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -0.2px; }

.nav { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 600; font-size: 16px; }
.nav-links a:hover { color: var(--navy); }

.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--white); color: var(--navy); cursor: pointer; align-items: center; justify-content: center;
}

/* Portada */
.hero { background: var(--navy); color: var(--white); }
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 88px; padding-bottom: 96px; }
.hero-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.eyebrow {
  display: flex; align-items: center; gap: 12px; color: var(--amber);
  font-weight: 700; font-size: 15px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--amber); border-radius: 2px; }
.hero h1 { margin: 0; font-size: clamp(36px, 5vw, 58px); line-height: 1.08; font-weight: 800; letter-spacing: -1px; }
.hero-lead { margin: 0; font-size: 20px; color: #D6DEEC; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.hero-actions .btn { min-height: 56px; font-size: 18px; }
.hero-note { margin: 8px 0 0; font-size: 15px; color: #B9C5DA; }

.hero-card {
  flex: 1 1 340px; max-width: 440px; background: var(--white); color: var(--ink);
  border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 20px;
  box-shadow: 0 24px 48px rgba(8, 18, 40, 0.28);
}
.hero-card h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.check {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--amber-soft); color: var(--amber-ink); display: flex; align-items: center; justify-content: center;
}
.contact-lines { border-top: 1px solid #E2E7EF; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.contact-lines a { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.contact-lines a:hover { color: var(--navy); text-decoration: underline; }

/* Secciones */
.section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 32px; }
.section h2 { margin: 0; font-size: 32px; line-height: 1.2; font-weight: 800; letter-spacing: -0.5px; }
.section-head p { margin: 0; color: var(--muted); }

/* Carrusel de logos de Isapres (se mueve solo, se pausa al pasar el mouse) */
.logo-marquee {
  --gap: 20px;
  display: flex; gap: var(--gap); overflow: hidden; padding: 6px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.logo-track {
  display: flex; flex-shrink: 0; gap: var(--gap); min-width: 100%; justify-content: space-around;
  list-style: none; margin: 0; padding: 0;
  animation: logo-scroll 28s linear infinite;
}
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-track li {
  flex: 0 0 auto; width: 220px; height: 104px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  display: flex; align-items: center; justify-content: center; padding: 18px 22px;
}
.logo-combo { gap: 12px; }
.logo-track .logo-combo img { height: 46px; max-height: none; width: auto; flex-shrink: 0; }
.logo-combo span { font-weight: 800; font-size: 22px; letter-spacing: -0.3px; white-space: nowrap; line-height: 1.1; }
.logo-colmena span { color: #0074C4; }
.logo-esencial span { color: #2E9B4F; }
.logo-nuevamasvida img { border-radius: 8px; }
.logo-nuevamasvida span { color: #0084C8; }
.logo-track img { display: block; max-width: 100%; max-height: 48px; width: auto; height: auto; object-fit: contain; }
@keyframes logo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - var(--gap))); }
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.step-num {
  width: 48px; height: 48px; border-radius: 14px; background: var(--amber); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px;
}
.step h3 { margin: 4px 0 0; font-size: 21px; }
.step p { margin: 0; color: var(--muted); }


/* Contacto */
.contact-grid { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.form-card { flex: 1 1 480px; min-width: 0; border: 1px solid var(--line); border-radius: 20px; padding: 32px; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form[hidden] { display: none; }
.form-row { display: flex; flex-wrap: wrap; gap: 18px; }
.form-row > div { flex: 1 1 200px; }
.form label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.form .optional { font-weight: 400; color: var(--muted); }
.form input[type="text"], .form input[type="tel"], .form input[type="email"], .form select {
  width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--input-line); border-radius: 10px;
  font: inherit; font-size: 16px; color: var(--ink); background: var(--white);
}
.form select { padding-right: 36px; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; }
.checkbox input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--navy); flex: 0 0 22px; }
.checkbox label { font-weight: 400; font-size: 15px; color: var(--text); margin: 0; }
.form .legal { font-size: 14px; color: var(--muted); margin: 0; }
.form .btn { align-self: flex-start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; flex-direction: column; gap: 12px; align-items: flex-start; padding: 16px 0; }
.form-status.is-visible { display: flex; }
.form-status .ok-icon {
  width: 52px; height: 52px; border-radius: 50%; background: #DCF2E3; color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.form-status h3 { margin: 0; font-size: 22px; }
.form-status p { margin: 0; color: var(--muted); }
.form-error { color: #B42318; font-size: 15px; margin: 0; display: none; }
.form-error.is-visible { display: block; }

.direct-card {
  flex: 1 1 300px; min-width: 0; background: var(--navy); color: var(--white); border-radius: 20px; padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
}
.direct-card h3 { margin: 0; font-size: 22px; font-weight: 800; }
.direct-card .btn { width: 100%; }
.direct-card .contact-lines { border-top-color: rgba(255,255,255,0.18); }
.direct-card .contact-lines a { color: #E3E9F3; }
.direct-card .contact-lines a:hover { color: var(--white); }

/* Pie */
.site-footer { background: var(--navy-dark); color: #B9C5DA; font-size: 15px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 32px; padding-bottom: 32px; }
.footer-inner strong { color: var(--white); }
.site-footer a { color: #D6DEEC; }
.site-footer a:hover { color: var(--white); }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; background: var(--green); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(8, 18, 40, 0.3);
  transition: opacity .2s, transform .2s;
}
.wa-float:hover { background: var(--green-dark); color: var(--white); }
.js .wa-float { opacity: 0; transform: translateY(12px); pointer-events: none; }
.js .wa-float.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* Páginas de texto (privacidad, 404) */
.page { padding: 64px 0 80px; }
.page .container { max-width: 760px; }
.page h1 { font-size: clamp(30px, 4vw, 40px); line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.5px; }
.page h2 { font-size: 22px; margin: 36px 0 8px; }
.page p, .page li { color: var(--text); }
.page .updated { color: var(--muted); font-size: 15px; margin: 0 0 24px; }

/* Celular */
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--white); border-bottom: 1px solid #E2E7EF;
    padding: 8px 24px 16px; box-shadow: 0 16px 24px rgba(8, 18, 40, 0.08);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; font-size: 18px; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-name { font-size: 17px; }
  .hero-inner { padding-top: 48px; padding-bottom: 56px; gap: 36px; }
  .hero-lead { font-size: 18px; }
  .hero-actions .btn { width: 100%; }
  .hero-card, .form-card, .direct-card { padding: 24px; }
  .section { padding: 56px 0; }
  .section h2 { font-size: 27px; }
  .logo-marquee { --gap: 12px; }
  .logo-track { animation-duration: 20s; }
  .logo-track li { width: 168px; height: 80px; padding: 14px 16px; }
  .logo-track img { max-height: 38px; }
  .logo-track .logo-combo img { height: 36px; }
  .logo-combo { gap: 9px; }
  .logo-combo span { font-size: 18px; }
  .logo-nuevamasvida span { font-size: 17px; }
  .form .btn { width: 100%; }
  .wa-float { width: 56px; height: 56px; right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  /* Con "reducir movimiento" activado (común en Windows) el carrusel sigue, pero más lento */
  .logo-track { animation-duration: 60s; }
}
