/* Igualdad Salud — hoja de estilos del sitio.
   Paleta institucional: celeste #00A1C6 y blanco. Todos los tonos oscuros son celestes
   saturados (no azul marino ni grises cálidos); no se usa ningún color ajeno a la marca.
   Títulos en Raleway, cuerpo en Manrope. Formas con una esquina viva abajo a la izquierda
   y cortes diagonales entre secciones.
   Organización: variables → base → utilidades → componentes → responsive. */

/* ---------------- Variables ---------------- */
:root {
  /* Escala del celeste institucional, de más claro a más oscuro. */
  --c-50: #f1fafd;
  --c-100: #d9f1f8;
  --c-200: #b3e4f1;
  --c-300: #6fcde5;
  --c-400: #24b4d6;
  --c-500: #00a1c6; /* color de marca */
  --c-600: #0089aa;
  --c-700: #00718f;
  --c-800: #005872;
  --c-900: #00394a; /* el más oscuro: fondos "noche" */

  --brand: var(--c-500);
  --wa: #25d366;
  --alert: #c81f36;
  --ok: #17865a;

  --ink: #062b37;
  --body: #476a76;
  --muted: #6d8d99;
  --line: #dceef3;
  --bg: #ffffff;
  --card: #ffffff;

  --shadow-sm: 0 1px 2px rgba(0, 57, 74, .05), 0 6px 16px rgba(0, 57, 74, .05);
  --shadow: 0 2px 6px rgba(0, 57, 74, .05), 0 18px 44px rgba(0, 57, 74, .1);
  --shadow-lg: 0 34px 70px rgba(0, 57, 74, .24);
  --ring: 0 0 0 4px rgba(0, 161, 198, .16);

  /* Esquina inferior izquierda viva: el detalle de forma que identifica al sitio. */
  --radius: 14px 14px 14px 3px;
  --radius-lg: 22px 22px 22px 4px;
  --radius-pill: 999px;

  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2.25rem);
  --sp-section: clamp(3.5rem, 7vw, 6.25rem);
  --font-head: 'Raleway', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-h: 84px;
  --cut: clamp(30px, 4.5vw, 58px); /* alto del corte diagonal */

  /* Retícula de puntos celestes que da textura a las secciones claras. */
  --dots: radial-gradient(circle at 1px 1px, rgba(0, 161, 198, .14) 1px, transparent 0);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.7;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .6em;
  font-weight: 800;
  letter-spacing: -.02em;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--c-700); text-decoration-color: rgba(0, 161, 198, .4); text-underline-offset: 3px; }
a:hover { color: var(--c-800); }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

:focus-visible { outline: 3px solid var(--c-600); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.skip {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%); z-index: 200;
  background: var(--c-600); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 10px 10px;
  font-weight: 700; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 0; color: #fff; }

/* ---------------- Estructura ---------------- */
.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.container--flush { width: 100%; }

.section { position: relative; padding-block: var(--sp-section); }
.section--tight { padding-block: clamp(2rem, 4vw, 3.25rem); }
.section--loose { padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.section--sep { padding-block: clamp(1rem, 3vw, 2rem); }
/* Las secciones celestes llevan la retícula de puntos, que las separa sin líneas duras. */
.section--tint { background: var(--c-50) var(--dots); background-size: auto, 22px 22px; }
.section--brand { background: linear-gradient(135deg, var(--c-600), var(--c-800)); color: #e6f8fd; }
.section--brand h1, .section--brand h2, .section--brand h3 { color: #fff; }
.section--dark { background: var(--c-900); color: #bfe2ec; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.center { text-align: center; }

.h1 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.25rem); }
.h2 { font-size: clamp(1.65rem, 1.2rem + 1.9vw, 2.5rem); }
.h3 { font-size: clamp(1.2rem, 1.05rem + .7vw, 1.55rem); }
.lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem); color: var(--muted); }

/* Antetítulo dentro de una pastilla celeste clara: reemplaza al texto suelto de antes. */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  margin: 0 0 .85rem; padding: .3rem .8rem .3rem .6rem;
  border-radius: var(--radius-pill); background: var(--c-100);
  font-family: var(--font-body); font-size: .72rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--c-800);
}
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c-500); }
.eyebrow--light { background: rgba(255, 255, 255, .16); color: #fff; }
.eyebrow--light::before { background: #fff; }

.section-head { max-width: 48rem; margin: 0 auto clamp(2rem, 4vw, 3rem); }
.section-head--center { text-align: center; }
.section-head--left { margin-inline: 0; text-align: left; }
.section-head .h2 { margin-bottom: .4rem; }
.section-head__text { color: var(--muted); font-size: 1.05rem; margin: 0; }

.sep { border: 0; border-top: 2px dotted var(--c-200); margin: 0; }

/* ---------------- Botones ---------------- */
.btn {
  --btn-bg: var(--c-500); --btn-fg: #fff; --btn-bd: transparent;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.55rem; border: 2px solid var(--btn-bd); border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-body); font-weight: 700; font-size: .96rem; line-height: 1.25;
  text-decoration: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .22s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); color: var(--btn-fg); }
.btn:active { transform: none; }
.btn svg { flex: none; }
.btn--sm { padding: .55rem 1.1rem; font-size: .88rem; }
.btn--primary { background: linear-gradient(135deg, var(--c-500), var(--c-700)); color: #fff; box-shadow: 0 10px 24px rgba(0, 113, 143, .3); }
.btn--primary:hover { background: linear-gradient(135deg, var(--c-600), var(--c-900)); box-shadow: 0 14px 30px rgba(0, 57, 74, .32); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--c-800); --btn-bd: var(--c-200); }
.btn--outline:hover { --btn-bd: var(--c-500); --btn-bg: var(--c-50); }
.btn--white { --btn-bg: #fff; --btn-fg: var(--c-800); box-shadow: 0 10px 26px rgba(0, 57, 74, .22); }
.btn--white:hover { --btn-fg: var(--c-900); }
.btn--ghost-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .5); }
.btn--ghost-light:hover { --btn-bg: rgba(255, 255, 255, .16); --btn-bd: #fff; }
.btn--wa { --btn-bg: var(--wa); --btn-fg: #fff; box-shadow: 0 8px 20px rgba(37, 211, 102, .3); }
.btn--wa:hover { --btn-bg: #1ebe5b; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn-row--center { justify-content: center; }
.section-head + .btn-row--center { margin-top: 0; }

/* ---------------- Barra de emergencias ---------------- */
.emergency { background: var(--c-900); color: #cfe8f0; }
.emergency--night { background: var(--c-900); }
.emergency--brand { background: linear-gradient(120deg, var(--c-700), var(--c-500)); color: #eafaff; }
.emergency--tint { background: var(--c-100); color: var(--c-900); }
.emergency--alert { background: #8c1425; color: #ffe6ea; }
.emergency__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1.5rem; padding-block: .6rem;
}
.emergency__text { min-width: 0; display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.emergency__title {
  display: flex; align-items: center; gap: .55rem; margin: 0;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; line-height: 1.3; color: #fff;
}
.emergency--tint .emergency__title { color: var(--c-900); }
.emergency__pulse {
  flex: none; width: 8px; height: 8px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .65); animation: pulse 2.4s infinite;
}
.emergency--tint .emergency__pulse { background: var(--c-500); box-shadow: 0 0 0 0 rgba(0, 161, 198, .6); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); }
  70% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.emergency__sub { margin: 0; font-size: .72rem; opacity: .65; }
.emergency__phones { display: flex; flex-wrap: wrap; gap: .45rem .6rem; }
.emergency__phone {
  display: inline-flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none;
  padding: .28rem .9rem .28rem .45rem; border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-pill); transition: border-color .2s, background .2s;
}
.emergency--tint .emergency__phone { border-color: rgba(0, 113, 143, .3); }
.emergency__phone:hover { border-color: #fff; background: rgba(255, 255, 255, .12); color: inherit; }
.emergency--tint .emergency__phone:hover { border-color: var(--c-600); background: #fff; }
.emergency__ico {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff;
}
.emergency--tint .emergency__ico { background: #fff; color: var(--c-600); }
.emergency__data { display: flex; flex-direction: column; line-height: 1.15; }
.emergency__data small { font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; opacity: .65; }
.emergency__data b { font-size: .85rem; white-space: nowrap; color: #fff; font-variant-numeric: tabular-nums; }
.emergency--tint .emergency__data b { color: var(--c-900); }
.emergency--card { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.emergency--card .emergency__inner { padding-block: 1.35rem; }
.emergency--card .emergency__title { font-size: 1rem; letter-spacing: .04em; }
.emergency--card .emergency__sub { font-size: .85rem; }
.emergency--card .emergency__data b { font-size: 1.05rem; }

/* ---------------- Encabezado ---------------- */
.site-header { position: sticky; top: 0; z-index: 90; background: #fff; transition: box-shadow .25s ease; }
.site-header.is-stuck { box-shadow: 0 8px 26px rgba(0, 57, 74, .09); }
.site-header__edge { display: block; height: 3px; background: linear-gradient(90deg, var(--c-800), var(--c-500) 45%, var(--c-200)); }
.header__inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.brand { flex: none; display: inline-flex; align-items: center; }
.brand img { width: auto; height: 56px; object-fit: contain; }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; }
/* Indicador de sección activa: subrayado celeste que crece desde la izquierda. */
.nav__link {
  display: block; padding: .5rem .72rem; font-size: .92rem; font-weight: 600;
  color: var(--ink); text-decoration: none; white-space: nowrap; transition: color .2s;
}
.nav__link span { position: relative; display: inline-block; padding-bottom: 4px; }
.nav__link span::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--c-500); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav__link:hover { color: var(--c-700); }
.nav__link:hover span::after, .nav__link.is-active span::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--c-700); }

/* Botón de acceso de afiliados: pastilla con ícono, antetítulo y nombre. */
.portal-btn {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .42rem 1rem .42rem .45rem; border: 1.5px solid var(--c-200); border-radius: var(--radius-pill);
  background: #fff; color: var(--ink); text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
}
.portal-btn:hover { border-color: var(--c-500); box-shadow: var(--ring); transform: translateY(-1px); color: var(--ink); }
.portal-btn__ico {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: var(--radius); background: linear-gradient(135deg, var(--c-500), var(--c-700)); color: #fff;
}
.portal-btn__text { display: flex; flex-direction: column; line-height: 1.15; }
.portal-btn__text small { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.portal-btn__text strong { font-family: var(--font-head); font-size: .95rem; font-weight: 700; }
.portal-btn__go { display: inline-flex; color: var(--c-500); transition: transform .2s; }
.portal-btn:hover .portal-btn__go { transform: translateX(3px); }
.nav__cta { display: none; }

.burger {
  display: none; align-items: center; justify-content: center; width: 46px; height: 46px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer;
}
.burger__close { display: none; }
.burger[aria-expanded='true'] .burger__open { display: none; }
.burger[aria-expanded='true'] .burger__close { display: inline-flex; }

/* ---------------- Slider de portada ---------------- */
/* Todas las placas comparten la misma celda de la grilla: se superponen sin
   posicionamiento absoluto, así la más alta define el alto. */
.hero { position: relative; isolation: isolate; background: var(--c-900); display: grid; }
.hero--tall { min-height: min(80vh, 660px); }
.hero--medium { min-height: min(58vh, 460px); }
.hero__slide {
  grid-area: 1 / 1; position: relative; display: flex; align-items: center;
  background-size: cover; background-position: center;
  opacity: 0; pointer-events: none; transition: opacity .8s ease;
}
.hero__slide.is-on { opacity: 1; pointer-events: auto; z-index: 2; }
.hero__slide--dark::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(96deg, rgba(0, 45, 58, .92) 0%, rgba(0, 57, 74, .68) 38%, rgba(0, 88, 114, .1) 78%);
}
.hero__inner { position: relative; z-index: 1; display: flex; padding-block: clamp(3.5rem, 9vw, 6rem) clamp(5.5rem, 11vw, 8rem); }
.hero__inner--left { justify-content: flex-start; }
.hero__inner--center { justify-content: center; text-align: center; }
.hero__inner--right { justify-content: flex-end; }
.hero__box { position: relative; max-width: 37rem; color: #fff; padding-left: clamp(1rem, 2.5vw, 1.75rem); }
.hero__inner--center .hero__box { padding-left: 0; }
/* Barra vertical blanca que ancla el texto al borde del contenedor. */
.hero__accent { position: absolute; left: 0; top: .4rem; bottom: .4rem; width: 3px; border-radius: 3px; background: linear-gradient(#fff, rgba(255, 255, 255, .15)); }
.hero__inner--center .hero__accent { display: none; }
.hero__logo { width: clamp(120px, 16vw, 172px); margin-bottom: 1.1rem; }
.hero__title { color: #fff; font-size: clamp(1.95rem, 1.2rem + 3.1vw, 3.4rem); margin-bottom: .55rem; }
.hero__lead { font-size: clamp(1rem, .95rem + .45vw, 1.2rem); color: rgba(255, 255, 255, .88); margin: 0; }
.hero__actions { margin-top: 1.75rem; }

/* Controles alineados con el contenido, no flotando en los bordes. */
.hero__controls { grid-area: 1 / 1; align-self: end; z-index: 5; padding-bottom: clamp(1.25rem, 3vw, 2.25rem); }
.hero__controls-inner { display: flex; align-items: center; gap: clamp(.85rem, 2vw, 1.6rem); }
.hero__counter {
  margin: 0; display: flex; gap: .3rem; align-items: baseline;
  font-family: var(--font-head); font-size: .85rem; font-weight: 700;
  color: rgba(255, 255, 255, .5); font-variant-numeric: tabular-nums;
}
.hero__counter b { font-size: 1.15rem; color: #fff; }
.hero__bars { display: flex; gap: .4rem; flex: 1; max-width: 240px; }
.hero__bar {
  flex: 1; height: 4px; padding: 0; border: 0; border-radius: 3px; cursor: pointer;
  background: rgba(255, 255, 255, .28); transition: background .25s;
}
.hero__bar:hover { background: rgba(255, 255, 255, .55); }
.hero__bar.is-on { background: #fff; }
.hero__arrows { display: flex; gap: .4rem; margin-left: auto; }
.hero__arrow {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, .32); border-radius: 50%; background: transparent; color: #fff;
  cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.hero__arrow:hover { background: #fff; border-color: #fff; color: var(--c-800); }

/* ---------------- Encabezado de página ---------------- */
/* Corte diagonal al pie, en lugar de la onda del diseño anterior. */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background: linear-gradient(112deg, var(--c-900) 0%, var(--c-700) 52%, var(--c-400) 100%);
  padding-block: clamp(2.5rem, 6vw, 4rem) calc(clamp(3rem, 6vw, 4.5rem) + var(--cut));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 0 100%);
}
.page-hero--image { background-size: cover; background-position: center; }
.page-hero__deco { position: absolute; right: -2%; top: -14%; width: min(340px, 46%); color: rgba(255, 255, 255, .13); z-index: -1; }
.page-hero__inner { position: relative; }
.page-hero__head { display: flex; align-items: center; gap: .9rem; }
.page-hero__title { color: #fff; font-size: clamp(2rem, 1.4rem + 2.7vw, 3.1rem); margin: 0; }
.page-hero__icon {
  flex: none; display: inline-flex; padding: .7rem; border-radius: var(--radius);
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); color: #fff;
}
.page-hero__lead { max-width: 46rem; margin: 1rem 0 0; font-size: clamp(1rem, .96rem + .35vw, 1.12rem); color: rgba(255, 255, 255, .88); }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.crumbs {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem;
  margin-bottom: 1.1rem; padding: .3rem .9rem; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .12); font-size: .78rem; color: rgba(255, 255, 255, .82);
}
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs__sep { display: inline-flex; opacity: .45; }
.crumbs [aria-current] { font-weight: 700; color: #fff; }

/* ---------------- Grillas ---------------- */
.cols { display: grid; gap: clamp(1rem, 2.4vw, 1.75rem); }
.cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ---------------- Tarjetas ---------------- */
/* Ícono en pastilla celeste maciza, texto a la izquierda y una barra que crece al pasar. */
.card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  gap: .3rem; padding: clamp(1.5rem, 2.4vw, 2rem);
  border-radius: var(--radius-lg); background: var(--card); overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card::before {
  content: ''; position: absolute; left: 0; bottom: 0; width: 3px; height: 36px;
  background: linear-gradient(var(--c-400), var(--c-700)); transition: height .35s ease;
}
.card:hover::before { height: 100%; }
.card--card { box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.card--outline { border: 1.5px solid var(--c-100); }
.card--plain { padding-inline: 0; }
.card--plain::before { display: none; }
.card--card:hover, .card--outline:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-200); }
.card__img { width: 56px; height: 56px; object-fit: contain; margin-bottom: .8rem; }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
  margin-bottom: .9rem; border-radius: var(--radius);
  background: linear-gradient(140deg, var(--c-500), var(--c-800)); color: #fff;
  box-shadow: 0 10px 22px rgba(0, 113, 143, .28);
}
.card__title { font-size: 1.08rem; margin: 0 0 .35rem; }
.card__text { margin: 0; font-size: .94rem; color: var(--muted); }
.card__link { margin-top: .95rem; display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .9rem; text-decoration: none; color: var(--c-700); }
.card__link:hover { gap: .6rem; color: var(--c-900); }
.section--brand .card, .section--dark .card { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); }
.section--brand .card__title, .section--dark .card__title { color: #fff; }
.section--brand .card__text, .section--dark .card__text { color: rgba(255, 255, 255, .84); }
.section--brand .card__icon, .section--dark .card__icon { background: #fff; color: var(--c-700); box-shadow: none; }
.section--brand .card__link, .section--dark .card__link { color: #fff; }

/* ---------------- Imagen y texto ---------------- */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.75rem, 4vw, 3.75rem); align-items: center; }
.split--right .split__media { order: 2; }
.split__media { position: relative; display: flex; justify-content: center; }
/* Mancha celeste difusa detrás de la imagen (reemplaza al marco desplazado). */
.split__media::before {
  content: ''; position: absolute; inset: 8% -4% 4% -4%; z-index: -1;
  background: radial-gradient(60% 60% at 50% 45%, var(--c-100), transparent 72%);
}
.split__img { width: 100%; position: relative; }
.split__img--rounded { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.split__img--cover { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }
/* Los mockups de celular flotan: sin recuadro ni sombra de caja. */
.split__img--device { width: auto; max-width: min(100%, 330px); margin-inline: auto; filter: drop-shadow(0 30px 44px rgba(0, 57, 74, .26)); }
.split__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  margin-bottom: 1rem; border-radius: var(--radius);
  background: linear-gradient(140deg, var(--c-500), var(--c-800)); color: #fff;
  box-shadow: 0 10px 22px rgba(0, 113, 143, .28);
}
.split__text .h2 { margin-bottom: .6rem; }
.section--brand .split__icon, .section--dark .split__icon { background: #fff; color: var(--c-700); box-shadow: none; }
.section--tint .split__media::before { background: radial-gradient(60% 60% at 50% 45%, #fff, transparent 72%); }

/* ---------------- Texto con formato ---------------- */
.prose { max-width: 48rem; }
.prose--wide { max-width: none; }
.prose--center { margin-inline: auto; text-align: center; }
.section-head + .prose { margin-inline: auto; }
.prose h2 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.8rem); margin-top: 1.9em; }
.prose h3 { font-size: clamp(1.08rem, 1rem + .5vw, 1.3rem); margin-top: 1.7em; color: var(--c-800); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--c-500); }
.prose blockquote {
  margin: 1.5em 0; padding: 1rem 1.4rem; border-left: 4px solid var(--c-500);
  background: var(--c-50); border-radius: 0 12px 12px 0;
}
.prose__image { width: 100%; border-radius: var(--radius-lg); margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.section--brand .prose li::marker, .section--dark .prose li::marker { color: #fff; }

/* ---------------- Listas en columnas ---------------- */
.list-cols { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem clamp(1rem, 3vw, 2.5rem); }
.list-cols li {
  display: flex; align-items: flex-start; gap: .65rem; padding: .5rem .6rem;
  border-radius: var(--radius); transition: background .2s;
}
.list-cols li:hover { background: #fff; box-shadow: var(--shadow-sm); }
.section--tint .list-cols li:hover { background: #fff; }
.list-cols svg { flex: none; margin-top: .2rem; color: var(--c-500); }
.list-cols .mk { flex: none; color: var(--c-500); font-weight: 800; line-height: 1.7; }
.section--brand .list-cols li:hover, .section--dark .list-cols li:hover { background: rgba(255, 255, 255, .1); box-shadow: none; }
.section--brand .list-cols svg, .section--dark .list-cols svg, .section--brand .list-cols .mk, .section--dark .list-cols .mk { color: #fff; }

/* ---------------- Tarjetas con foto ---------------- */
.photo-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.photo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-200); color: inherit; }
.photo-card__media { position: relative; aspect-ratio: 16 / 10; background: var(--c-50); overflow: hidden; }
.photo-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.photo-card:hover .photo-card__img { transform: scale(1.05); }
.photo-card__body { position: relative; padding: 1.15rem 1.3rem 1.45rem; }
.photo-card__body::before { content: ''; position: absolute; left: 1.3rem; top: -3px; width: 44px; height: 3px; border-radius: 2px; background: var(--c-500); }
.photo-card__body h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.photo-card__body p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------------- Pasos, preguntas, galería ---------------- */
.steps { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: .9rem; max-width: 52rem; }
.step {
  display: flex; gap: 1.15rem; padding: 1.25rem 1.45rem; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-lg); transition: border-color .2s, box-shadow .2s;
}
.step:hover { border-color: var(--c-200); box-shadow: var(--shadow-sm); }
.step__n {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: var(--radius); background: linear-gradient(140deg, var(--c-500), var(--c-800)); color: #fff;
  font-family: var(--font-head); font-weight: 800;
}
.step h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.step p { margin: 0; font-size: .95rem; color: var(--muted); }

.faq { max-width: 52rem; margin-inline: auto; display: grid; gap: .55rem; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.faq__item[open] { border-color: var(--c-300); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer;
  padding: 1rem 1.25rem; font-family: var(--font-head); font-weight: 700; color: var(--ink); list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary svg { flex: none; transition: transform .2s; color: var(--c-500); }
.faq__item[open] summary svg { transform: rotate(180deg); }
.faq__item .prose { padding: 0 1.25rem 1.2rem; }

.gallery__item { margin: 0; }
.gallery__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

.figure { margin: 0; }
.figure--narrow { max-width: 34rem; margin-inline: auto; }
.figure__img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.figure--full .figure__img { border-radius: 0; }
.figure figcaption { margin-top: .6rem; font-size: .88rem; color: var(--muted); text-align: center; }
.figure__link { display: block; text-decoration: none; }

.embed, .map { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--c-50); }
.embed { aspect-ratio: 16 / 9; }
.embed iframe, .map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map--short { height: 260px; }
.map--medium { height: 390px; }
.map--tall { height: 520px; }
.map__caption {
  display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1.2rem;
  padding: .55rem 1.1rem; border-radius: var(--radius-pill); background: var(--c-100);
  font-weight: 600; color: var(--c-900); font-size: .95rem;
}
.map__caption svg { flex: none; color: var(--c-600); }

/* ---------------- Llamados a la acción ---------------- */
.cta {
  position: relative; overflow: hidden;
  display: grid; gap: 1.5rem; align-items: center; padding: clamp(1.9rem, 4vw, 3.25rem);
  border-radius: var(--radius-lg); color: #fff;
  background: linear-gradient(120deg, var(--c-900), var(--c-700));
  box-shadow: var(--shadow-lg);
}
/* Franja diagonal clara al fondo. */
.cta::after {
  content: ''; position: absolute; right: -14%; top: -40%; width: 48%; height: 190%;
  background: #fff; opacity: .1; transform: skewX(-14deg); z-index: 0;
}
.cta--dark { background: var(--c-900); }
.cta--brand { background: linear-gradient(120deg, var(--c-700), var(--c-500)); }
.cta--tint { background: var(--c-50) var(--dots); background-size: auto, 22px 22px; color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.cta--tint::after { display: none; }
.cta--media { grid-template-columns: minmax(0, 1fr) minmax(0, 260px); }
.cta > * { position: relative; z-index: 1; }
.cta .h2 { color: inherit; margin-bottom: .3rem; }
.cta--tint .h2 { color: var(--ink); }
.cta__lead { margin: 0; opacity: .9; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.cta__img { width: 100%; max-width: 215px; margin-inline: auto; }
.cta--media .cta__img { filter: drop-shadow(0 26px 40px rgba(0, 57, 74, .3)); }
.cta--tint .btn--white { background: linear-gradient(135deg, var(--c-500), var(--c-700)); color: #fff; }
.cta--tint .btn--ghost-light { --btn-fg: var(--c-800); --btn-bd: var(--c-200); }

.app-dl { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(1.5rem, 4vw, 3.25rem); }
.app-dl__text { max-width: 30rem; }
.app-dl__text .h2 { margin-bottom: .4rem; }
.app-dl__text .btn { margin-top: 1.3rem; }
.app-dl__qr { padding: 12px; border: 2px solid var(--c-100); border-radius: var(--radius-lg); background: #fff; }
.app-dl__qrimg { width: 140px; height: 140px; border-radius: 8px; }

.info-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .25rem;
  padding: 1.6rem 1.4rem; border-radius: var(--radius-lg); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-300); color: inherit; }
.info-card__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px;
  margin-bottom: .8rem; border-radius: var(--radius);
  background: linear-gradient(140deg, var(--c-500), var(--c-800)); color: #fff;
  box-shadow: 0 10px 22px rgba(0, 113, 143, .26);
}
.info-card h3 { font-family: var(--font-body); font-size: .8rem; margin: 0 0 .3rem; color: var(--muted); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.info-card p { margin: 0; font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.05rem; overflow-wrap: anywhere; }

/* ---------------- Tablas con buscador ---------------- */
.section--table .datatable { margin-top: 1.5rem; }
.datatable__tools { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.field { position: relative; display: flex; align-items: center; flex: 1 1 200px; }
.field--search { flex: 2 1 320px; }
.field > svg { position: absolute; left: .95rem; color: var(--c-500); pointer-events: none; }
.field--search input { padding-left: 2.8rem; }
.field input, .field select, .field textarea, .form input, .form select, .form textarea {
  width: 100%; padding: .85rem 1rem; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; padding-right: 2.4rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300a1c6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 18px; }
.field input:focus, .field select:focus, .form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--c-500); box-shadow: var(--ring);
}
.datatable__count { margin: 0 0 .75rem; font-size: .86rem; color: var(--muted); }
.datatable__scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
.table th {
  position: sticky; top: 0; z-index: 1; text-align: left; padding: .95rem 1rem;
  background: linear-gradient(120deg, var(--c-800), var(--c-600)); color: #fff; font-family: var(--font-body);
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.table th:first-child { box-shadow: inset 3px 0 0 #fff; }
.table td { padding: .75rem 1rem; border-top: 1px solid var(--line); vertical-align: top; }
.table tbody tr:nth-child(even) { background: #f8fdfe; }
.table tbody tr:hover { background: var(--c-50); }
.table td:first-child { font-weight: 600; color: var(--ink); }
.datatable__more { display: flex; justify-content: center; margin-top: 1.25rem; }
.datatable__more[hidden] { display: none; }
.datatable__empty { margin: 1.5rem 0 0; text-align: center; color: var(--muted); }

/* ---------------- Formularios ---------------- */
.form { max-width: 44rem; margin-inline: auto; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.form .field { margin-bottom: 1rem; }
.form textarea { resize: vertical; min-height: 130px; }
.form__status { margin: .5rem 0 0; font-weight: 600; min-height: 1.4em; }
.form__status.is-error { color: var(--alert); }
.form__status.is-ok { color: var(--ok); }
.form__legal { margin-top: 1rem; font-size: .82rem; color: var(--muted); }
.form .btn-row { margin-top: .5rem; }

/* ---------------- Pie ---------------- */
.site-footer { position: relative; background: var(--c-900); color: #b4d9e5; padding-top: clamp(3rem, 6vw, 4.5rem); font-size: .93rem; }
.site-footer__edge { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--c-200), var(--c-500) 40%, var(--c-700)); }
.footer__grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: clamp(1.75rem, 4vw, 3rem); padding-bottom: 2.5rem; }
.footer__brand img { width: auto; height: 70px; object-fit: contain; }
.footer__follow { margin: 1.35rem 0 .7rem; font-family: var(--font-head); font-weight: 700; color: #fff; }
.footer__social { display: flex; gap: .55rem; list-style: none; margin: 0; padding: 0; }
.footer__social a {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius); color: #fff;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.footer__social a:hover { background: #fff; border-color: #fff; color: var(--c-800); transform: translateY(-3px); }
.footer__title {
  font-family: var(--font-body); font-size: .74rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--c-200); margin-bottom: 1.1rem;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer__list a { display: flex; align-items: center; gap: .55rem; color: #b4d9e5; text-decoration: none; transition: color .2s, gap .2s; }
.footer__list a:hover { color: #fff; gap: .8rem; }
.footer__list svg { flex: none; color: rgba(255, 255, 255, .5); }
.footer__list a:hover svg { color: #fff; }
.footer__qr { border-radius: 10px; background: #fff; padding: 6px; margin-bottom: .9rem; }
.footer__legal { padding: 1.3rem 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .78rem; color: #7fb2c3; }
.footer__legal p { margin: 0; }
.footer__legal a { color: var(--c-200); }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem;
  padding: 1rem 0 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .79rem; color: #7fb2c3;
}
.footer__bottom p { margin: 0; }

/* ---------------- Flotantes ---------------- */
.wa-bubble {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 80;
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
  border-radius: 50%; background: var(--wa); color: #fff; box-shadow: 0 12px 30px rgba(37, 211, 102, .4);
  transition: transform .2s;
}
.wa-bubble:hover { transform: scale(1.07); color: #fff; }
.to-top {
  position: fixed; right: 1.35rem; bottom: 5.2rem; z-index: 80; width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius);
  background: var(--c-900); color: #fff; cursor: pointer; opacity: 0; pointer-events: none;
  transform: translateY(8px) rotate(180deg); transition: opacity .25s, transform .25s;
}
.to-top.is-on { opacity: 1; pointer-events: auto; transform: translateY(0) rotate(180deg); }

/* ---------------- 404 ---------------- */
.error404 { font-family: var(--font-head); font-size: clamp(4rem, 14vw, 9rem); font-weight: 800; line-height: 1; color: var(--c-100); margin: 0; }

/* ---------------- Animación de entrada ---------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .photo-card:hover, .info-card:hover { transform: none; }
  .emergency__pulse { animation: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .cols--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1040px) {
  .portal-btn__text small { display: none; }
  .portal-btn__text strong { font-size: .9rem; }
}

@media (max-width: 980px) {
  .burger { display: inline-flex; }
  .header__cta { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 auto; width: min(340px, 86vw); margin: 0;
    padding: 1.25rem var(--gutter) 2.5rem; background: #fff; border-left: 1px solid var(--line);
    box-shadow: -20px 0 50px rgba(0, 57, 74, .16); overflow-y: auto;
    transform: translateX(105%); transition: transform .3s ease; visibility: hidden; z-index: 95;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item + .nav__item { border-top: 1px solid var(--line); }
  .nav__link { padding: .95rem .2rem; font-size: 1rem; }
  .nav__link span { padding-bottom: 2px; }
  .nav__cta { display: inline-flex; width: 100%; margin-top: 1.5rem; justify-content: flex-start; }
  .nav__cta .portal-btn__text small { display: block; }
  .nav__cta .portal-btn__go { margin-left: auto; }
  body.nav-open { overflow: hidden; }
  /* El encabezado es sticky: crea su propio contexto de apilado, así que para que el panel
     quede por encima de la capa oscura hay que subir el encabezado, no el panel. */
  body.nav-open .site-header { z-index: 95; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; z-index: 92; background: rgba(0, 45, 58, .5); }
  .cols--4, .cols--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .split--right .split__media { order: 0; }
  .cta--media { grid-template-columns: 1fr; }
  .emergency__inner { justify-content: center; text-align: center; }
  .emergency__text { flex: 1 1 100%; justify-content: center; }
  .emergency__title { justify-content: center; }
}

@media (max-width: 760px) {
  :root { --header-h: 72px; }
  .brand img { height: 46px; }
  .cols--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .footer__grid { grid-template-columns: 1fr; text-align: center; }
  .footer__social { justify-content: center; }
  .footer__list a { justify-content: center; }
  .footer__col--app { display: flex; flex-direction: column; align-items: center; }
  .page-hero__head { flex-direction: column; align-items: flex-start; gap: .7rem; }
  .emergency__sub { display: none; }
  .hero__counter { display: none; }
  .split__img--device { max-width: min(100%, 270px); }
}

@media (max-width: 560px) {
  .cols--2, .cols--3, .cols--4, .cols--5 { grid-template-columns: 1fr; }
  .list-cols { grid-template-columns: 1fr !important; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
  .hero__arrows { display: none; }
  .hero__bars { max-width: none; }
  .wa-bubble { width: 52px; height: 52px; }
}

@media print {
  .site-header, .site-footer, .wa-bubble, .to-top, .emergency, .datatable__tools, .datatable__more { display: none !important; }
  .reveal { opacity: 1; transform: none; }
  .table { min-width: 0; font-size: .75rem; }
  .table th { background: none; color: #000; border-bottom: 2px solid #000; }
  .page-hero { clip-path: none; color: #000; background: none; }
  .page-hero__title { color: #000; }
}
