/* Landing Dr. Omar Arriaga Zavala — dromararriaga.org (v2) */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #171c4f;
  --navy-2: #2b3380;
  --blue: #48519c;
  --cyan: #6f8fe6;
  --sky: #eceefb;
  --sky-2: #f5f6fd;
  --ink: #0d1b2f;
  --muted: #56677d;
  --line: #e2e5f3;
  --white: #ffffff;
  --wa: #25d366;
  --wa-ink: #04301b;
  --amber: #ffb020;

  --grad: linear-gradient(135deg, #48519c 0%, #6f8fe6 100%);
  --grad-navy: linear-gradient(140deg, #10143a 0%, #171c4f 45%, #2b3380 100%);
  --shadow-sm: 0 2px 10px rgba(23, 28, 79, 0.06);
  --shadow: 0 14px 36px rgba(23, 28, 79, 0.1);
  --shadow-lg: 0 28px 64px rgba(23, 28, 79, 0.2);

  --r: 20px;
  --r-lg: 28px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ancho: 75rem;
  --margen: clamp(1.25rem, 4vw, 2rem);
  --aire: clamp(4rem, 9vw, 7rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 6rem; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue); }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.ic {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contenedor { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: var(--margen); }

.saltar { position: absolute; left: 0.75rem; top: -5rem; z-index: 60; padding: 0.6rem 1rem; border-radius: 10px; background: var(--navy); color: #fff; }
.saltar:focus { top: 0.75rem; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.4rem;
  padding: 0.8rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-wa { background: var(--wa); color: var(--wa-ink); box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35); }
.btn-wa:hover { box-shadow: 0 16px 32px rgba(37, 211, 102, 0.45); }
.btn-claro { background: var(--white); border-color: var(--line); color: var(--navy); box-shadow: var(--shadow-sm); }
.btn-claro:hover { border-color: var(--blue); color: var(--blue); }
.btn-azul { background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(72, 81, 156, 0.3); }
.btn-borde { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn-borde:hover { background: #fff; color: var(--navy); }
.btn-chico { min-height: 2.9rem; padding: 0.55rem 1.2rem; font-size: 0.97rem; }

/* ---------- Barra superior y cabecera ---------- */

.aviso-top { display: none; background: var(--navy); color: #d5daf4; font-size: 0.875rem; }
.aviso-top .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 2.6rem; }
.aviso-top ul { display: flex; gap: 1.75rem; }
.aviso-top li, .aviso-top a { display: inline-flex; align-items: center; gap: 0.45rem; color: inherit; text-decoration: none; }
.aviso-top a:hover { color: #fff; }
.aviso-top .ic { color: var(--cyan); }

.cabecera {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.cabecera.fija { border-color: var(--line); box-shadow: 0 8px 28px rgba(23, 28, 79, 0.08); }
.js .cabecera-portada:not(.fija) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.js .cabecera-portada:not(.fija) .marca, .js .cabecera-portada:not(.fija) .menu a { color: #fff; }
.js .cabecera-portada:not(.fija) .marca-oficio { color: #d5daf4; }
.cabecera .marca, .cabecera .menu a, .cabecera .marca-oficio { transition: color 0.25s ease; }
.cabecera-fila { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.75rem; }

.marca { display: inline-flex; align-items: center; gap: 0.8rem; color: var(--navy); text-decoration: none; }
.marca-logo { width: auto; height: 3.15rem; border-radius: 9px; box-shadow: 0 6px 16px rgba(16, 20, 58, 0.28); }
.marca-texto { display: flex; flex-direction: column; line-height: 1.15; }
.marca-nombre { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.marca-oficio { color: var(--muted); font-size: 0.85rem; font-weight: 500; }

.menu { display: none; }
.menu a { position: relative; padding-block: 0.4rem; white-space: nowrap; color: var(--navy); font-size: 0.97rem; font-weight: 600; text-decoration: none; }
.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.menu a:hover::after { transform: scaleX(1); }
.cabecera .btn { display: none; white-space: nowrap; }
.cabecera-acciones { display: flex; align-items: center; gap: 0.6rem; }
.btn-icono {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.9rem;
  height: 2.9rem;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.btn-icono:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn-icono .ic { width: 1.3rem; height: 1.3rem; }
.js .cabecera-portada:not(.fija) .btn-icono { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.1); box-shadow: none; color: #fff; }
.js .cabecera-portada:not(.fija) .btn-icono:hover { background: #fff; color: var(--navy); }

/* ---------- Portada con carrusel ---------- */

.portada {
  position: relative;
  overflow: hidden;
  margin-top: -4.75rem;
  padding-block: calc(4.75rem + clamp(2.5rem, 6vw, 4.5rem)) clamp(8rem, 13vw, 11rem);
  background: var(--navy);
  color: #fff;
}
.portada-fondo, .fondo-capa { position: absolute; inset: 0; }
.fondo-capa {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.15);
  transition: opacity 1.4s ease;
}
.fondo-capa.activa { opacity: 1; }
.fondo-oido { background-image: url("../img/fondo-oido.jpg"); }
.fondo-nariz { background-image: url("../img/fondo-nariz.jpg"); }
.fondo-garganta { background-image: url("../img/fondo-garganta.jpg"); }
.fondo-cirugia { background-image: url("../img/fondo-cirugia.jpg"); }
.fondo-otorrino { background-image: url("../img/fondo-otorrino.jpg"); }
.portada-velo {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40rem 26rem at 88% 12%, rgba(111, 143, 230, 0.35), transparent 65%),
    linear-gradient(100deg, rgba(16, 20, 58, 0.96) 0%, rgba(23, 28, 79, 0.88) 42%, rgba(23, 28, 79, 0.62) 100%);
}
.portada-ondas { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(3rem, 7vw, 6rem); color: #fff; }
.portada-rejilla { position: relative; display: grid; gap: 3.5rem; align-items: center; }

.pastilla {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 700;
}
.pastilla .ic { color: var(--cyan); }
.pastilla-tinte { border-color: transparent; background: var(--sky); box-shadow: none; color: var(--blue); }
.pastilla-tinte .ic { color: var(--blue); }
.pastilla-noche { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.1); box-shadow: none; color: #e8ebff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

.titular {
  margin-top: 1.4rem;
  color: #fff;
  font-size: clamp(2.5rem, 5.6vw, 4.3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.degradado { background: linear-gradient(95deg, #b6c4ff 0%, #e6ebff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.entrada { margin-top: 1.4rem; max-width: 34rem; color: var(--muted); font-size: 1.16rem; line-height: 1.6; }
.portada .entrada { color: #d5daf4; }
.acciones { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.1rem; }

.sellos { display: flex; flex-wrap: wrap; gap: 0.65rem 1.5rem; margin-top: 2.1rem; color: #e8ebff; font-size: 0.95rem; font-weight: 600; }
.sellos li { display: inline-flex; align-items: center; gap: 0.45rem; }
.sellos .ic { color: #4be08a; }

.carrusel { position: relative; width: 100%; max-width: 36rem; margin-inline: auto; }
.carrusel::before {
  content: "";
  position: absolute;
  inset: -12% -10% -4% -10%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(111, 143, 230, 0.55), transparent 72%);
  filter: blur(18px);
}
.carrusel-marco {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 2rem;
  background: var(--navy-2);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.08), 0 40px 80px rgba(10, 12, 40, 0.55);
}
.lamina { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.lamina.activa { opacity: 1; z-index: 1; }
.lamina img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.14);
  transition: transform 7.5s cubic-bezier(0.2, 0.5, 0.3, 1);
}
.lamina.activa img { transform: scale(1); }
.lamina::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 20, 58, 0) 52%, rgba(16, 20, 58, 0.78) 100%); }
.lamina figcaption {
  position: absolute;
  left: 1.4rem;
  right: 4.5rem;
  bottom: 1.3rem;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease 0.35s, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s;
}
.lamina.activa figcaption { opacity: 1; transform: none; }
.lamina-icono { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 14px; background: var(--grad); }
.lamina-icono .ic { width: 1.4rem; height: 1.4rem; }

.carrusel-flecha {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  box-shadow: 0 8px 20px rgba(10, 12, 40, 0.3);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.carrusel-flecha:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.carrusel-flecha .ic { width: 1.4rem; height: 1.4rem; }
.flecha-anterior { left: 0.9rem; }
.flecha-siguiente { right: 0.9rem; }

.carrusel-controles { position: relative; display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1.4rem; }
.punto {
  position: relative;
  width: 2.1rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: width 0.4s ease;
}
.punto::before, .punto span { content: ""; position: absolute; left: 0; top: 50%; height: 5px; border-radius: 3px; transform: translateY(-50%); }
.punto::before { right: 0; background: rgba(255, 255, 255, 0.32); }
.punto span { width: 0; background: #fff; }
.punto.activa { width: 3.6rem; }
.punto.activa span { width: 100%; }
.carrusel-pausa {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-left: 0.4rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}
.carrusel-pausa .ic { width: 1rem; height: 1rem; }
.carrusel-pausa .ic-reanudar, .carrusel-pausa[aria-pressed="true"] .ic-pausar { display: none; }
.carrusel-pausa[aria-pressed="true"] .ic-reanudar { display: block; }

.flota {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1.1rem 0.75rem 0.8rem;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 18px 40px rgba(10, 12, 40, 0.35);
  line-height: 1.2;
}
.flota-icono { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 12px; background: var(--sky); color: var(--blue); }
.flota-icono .ic { width: 1.4rem; height: 1.4rem; }
.flota-icono-ambar { background: #fff4dc; color: #e08a00; }
.flota strong { display: block; color: var(--navy); font-size: 1.2rem; font-weight: 800; }
.flota span { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.flota-1 { top: 1.4rem; left: -0.6rem; }
.flota-2 { right: -0.9rem; top: 61%; }

@media (prefers-reduced-motion: no-preference) {
  .flota-1 { animation: flotar 5s ease-in-out infinite alternate; }
  .flota-2 { animation: flotar 6s ease-in-out -2s infinite alternate; }
  .wa-flotante::before { animation: pulso 2.4s ease-out infinite; }
  .carrusel.andando .punto.activa span { width: 0; animation: llenar var(--pausa-lamina, 5.5s) linear forwards; }
  .carrusel.andando.detenido .punto.activa span { animation-play-state: paused; }
  .portada-texto > * { opacity: 0; animation: entrar 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
  .portada-texto > :nth-child(2) { animation-delay: 0.12s; }
  .portada-texto > :nth-child(3) { animation-delay: 0.24s; }
  .portada-texto > :nth-child(4) { animation-delay: 0.36s; }
  .portada-texto > :nth-child(5) { animation-delay: 0.48s; }
  .carrusel { opacity: 0; animation: entrar-lado 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s forwards; }
}
@keyframes flotar { from { transform: translateY(-6px); } to { transform: translateY(8px); } }
@keyframes pulso { from { transform: scale(1); opacity: 0.55; } to { transform: scale(1.75); opacity: 0; } }
@keyframes llenar { from { width: 0; } to { width: 100%; } }
@keyframes entrar { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes entrar-lado { from { opacity: 0; transform: translateX(40px) scale(0.97); } to { opacity: 1; transform: none; } }

/* Cifras */
.cifras {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1rem;
  margin-top: clamp(-5.5rem, -7vw, -4rem);
  padding: clamp(1.4rem, 3vw, 2.1rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}
.cifra { display: flex; align-items: center; gap: 0.9rem; }
.cifra-icono { display: grid; place-items: center; flex: none; width: 3.25rem; height: 3.25rem; border-radius: 16px; background: var(--sky); color: var(--blue); }
.cifra-icono .ic { width: 1.6rem; height: 1.6rem; }
.cifra strong { display: block; color: var(--navy); font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.cifra .cifra-texto { font-size: clamp(1.05rem, 1.7vw, 1.25rem); }
.cifra span { color: var(--muted); font-size: 0.92rem; font-weight: 500; line-height: 1.3; }

/* ---------- Secciones ---------- */

.seccion { padding-block: var(--aire); }
.seccion-cielo { background: var(--sky-2); }
.cabeza { max-width: 42rem; }
.cabeza-centro { margin-inline: auto; text-align: center; }
.titulo {
  margin-top: 1rem;
  color: var(--navy);
  font-size: clamp(1.95rem, 4vw, 2.85rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.cabeza > p:not(.pastilla) { margin-top: 1rem; color: var(--muted); font-size: 1.1rem; }

/* Padecimientos */
.zonas { display: grid; gap: 1.75rem; margin-top: clamp(2.5rem, 5vw, 3.75rem); }
.zona {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.zona:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.zona-foto { position: relative; overflow: hidden; aspect-ratio: 16 / 10; }
.zona-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.zona:hover .zona-foto img { transform: scale(1.07); }
.zona-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23, 28, 79, 0) 45%, rgba(23, 28, 79, 0.55) 100%); }
.zona-cuerpo { position: relative; display: flex; flex: 1; flex-direction: column; padding: 2.6rem 1.75rem 1.75rem; }
.zona-icono {
  position: absolute;
  top: -1.9rem;
  left: 1.75rem;
  display: grid;
  place-items: center;
  width: 3.8rem;
  height: 3.8rem;
  border: 4px solid var(--white);
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 22px rgba(72, 81, 156, 0.35);
}
.zona-icono .ic { width: 1.75rem; height: 1.75rem; }
.zona h3 { color: var(--navy); font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.lista-check { margin-top: 1.1rem; }
.lista-check li { display: flex; align-items: flex-start; gap: 0.65rem; padding-block: 0.4rem; }
.lista-check .ic { margin-top: 0.22rem; color: var(--cyan); }
.zona-enlace {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1.4rem;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
.zona-enlace .ic { transition: transform 0.2s ease; }
.zona-enlace:hover .ic { transform: translateX(5px); }

/* Cirugía */
.partida { display: grid; gap: 3rem; align-items: center; }
.panel {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: var(--r-lg);
  background: var(--grad-navy);
  color: #e9ecfb;
  box-shadow: var(--shadow-lg);
}
.panel::before {
  content: "";
  position: absolute;
  right: -6rem;
  top: -6rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 143, 230, 0.5), transparent 68%);
}
.panel-foto { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r); object-fit: cover; object-position: 70% center; box-shadow: 0 18px 40px rgba(10, 12, 40, 0.4); }
.partida .panel { margin-top: 2.25rem; }
.panel h3 { position: relative; margin-top: 1.6rem; color: #fff; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.panel p { position: relative; margin-top: 0.7rem; color: #c9cfee; }
.pasos-lista { margin-top: 2rem; }
.rasgo { display: flex; gap: 1.1rem; padding-block: 1.15rem; border-bottom: 1px solid var(--line); }
.rasgo:last-child { border-bottom: 0; }
.rasgo-icono { display: grid; place-items: center; flex: none; width: 3.25rem; height: 3.25rem; border-radius: 16px; background: var(--white); color: var(--blue); box-shadow: var(--shadow-sm); }
.rasgo-icono .ic { width: 1.5rem; height: 1.5rem; }
.rasgo h3 { color: var(--navy); font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.rasgo p { margin-top: 0.3rem; color: var(--muted); font-size: 1rem; }

/* Apnea */
.noche { position: relative; overflow: hidden; background: var(--grad-navy); color: #dfe3f7; }
.noche::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(34rem 22rem at 88% 8%, rgba(111, 143, 230, 0.28), transparent 65%),
    radial-gradient(28rem 20rem at 6% 96%, rgba(72, 81, 156, 0.35), transparent 65%),
    radial-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1.4px);
  background-size: auto, auto, 46px 46px;
  opacity: 0.9;
}
.noche .contenedor { position: relative; }
.noche .titulo { color: #fff; }
.noche .cabeza > p:not(.pastilla) { color: #c9cfee; }
.vidrios { display: grid; gap: 1.5rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.vidrio {
  padding: 1.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.vidrio-icono { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 16px; background: var(--grad); color: #fff; }
.vidrio-icono .ic { width: 1.55rem; height: 1.55rem; }
.vidrio h3 { margin-top: 1.2rem; color: #fff; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.vidrio p { margin-top: 0.8rem; }
.vidrio .lista-check { margin-top: 0.7rem; }
.noche-cierre { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2.5rem; }
.noche-cierre p { color: #aeb5dc; font-size: 0.95rem; }

/* El doctor */
.doctor {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: var(--white);
  box-shadow: var(--shadow);
}
.retrato {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 19rem;
  overflow: hidden;
  background: var(--grad);
  color: #fff;
}
.retrato::before, .retrato::after { content: ""; position: absolute; border: 1.5px solid rgba(255, 255, 255, 0.28); border-radius: 50%; }
.retrato::before { width: 19rem; height: 19rem; }
.retrato::after { width: 27rem; height: 27rem; }
.retrato-foto { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.retrato-logo { position: relative; z-index: 1; width: min(56%, 15rem); border-radius: 13%; box-shadow: 0 26px 54px rgba(16, 20, 58, 0.5); }
.doctor-texto { padding: clamp(1.75rem, 4vw, 3.25rem); }
.doctor-texto .entrada { max-width: 38rem; margin-top: 1rem; font-size: 1.1rem; }
.fichas { display: grid; gap: 0.9rem; margin-top: 1.9rem; }
.ficha { display: flex; align-items: center; gap: 0.9rem; padding: 0.95rem 1.1rem; border-radius: 16px; background: var(--sky-2); }
.ficha-icono { display: grid; place-items: center; flex: none; width: 2.7rem; height: 2.7rem; border-radius: 12px; background: var(--white); color: var(--blue); box-shadow: var(--shadow-sm); }
.ficha dt { color: var(--muted); font-size: 0.85rem; font-weight: 600; line-height: 1.3; }
.ficha dd { color: var(--navy); font-weight: 800; line-height: 1.3; }

/* Cómo agendar */
.pasos { display: grid; gap: 1.5rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); counter-reset: paso; }
.paso {
  position: relative;
  padding: 2.4rem 1.75rem 1.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  text-align: center;
  counter-increment: paso;
}
.paso::before {
  content: counter(paso);
  position: absolute;
  top: -1.1rem;
  left: 50%;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 3px solid var(--sky-2);
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  transform: translateX(-50%);
}
.paso-icono { display: grid; place-items: center; width: 4.25rem; height: 4.25rem; margin-inline: auto; border-radius: 22px; background: var(--grad); color: #fff; box-shadow: 0 12px 26px rgba(72, 81, 156, 0.3); }
.paso-icono .ic { width: 1.9rem; height: 1.9rem; }
.paso h3 { margin-top: 1.25rem; color: var(--navy); font-size: 1.2rem; font-weight: 800; }
.paso p { margin-top: 0.5rem; color: var(--muted); font-size: 1rem; }

/* Consultorios */
.sedes { display: grid; gap: 1.75rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.sede { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow); }
.sede iframe { width: 100%; height: 15rem; border: 0; background: var(--sky); }
.sede-cuerpo { padding: 1.75rem; }
.sede h3 { color: var(--navy); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.dato { display: flex; align-items: flex-start; gap: 0.75rem; margin-top: 0.95rem; }
.dato .ic { margin-top: 0.25rem; color: var(--blue); }
.dato a { color: var(--navy); font-weight: 700; text-decoration: none; white-space: nowrap; }
.dato a:hover { color: var(--blue); }
.sede .btn { margin-top: 1.4rem; }

.horario {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  margin-top: 1.75rem;
  padding: 1.6rem 1.75rem;
  border-radius: var(--r-lg);
  background: var(--grad-navy);
  color: #dfe3f7;
  box-shadow: var(--shadow);
}
.horario-titulo { display: flex; align-items: center; gap: 0.9rem; color: #fff; font-size: 1.2rem; font-weight: 800; }
.horario-titulo .ic { width: 1.7rem; height: 1.7rem; color: var(--cyan); }
.horario dl { display: grid; grid-template-columns: repeat(3, auto); gap: 0.5rem 1.5rem; justify-content: start; }
.horario dt { color: #aeb5dc; font-size: 0.88rem; font-weight: 600; }
.horario dd { color: #fff; font-weight: 800; }

/* Llamado final */
.final {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  border-radius: 2.25rem;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 30px 70px rgba(72, 81, 156, 0.35);
  text-align: center;
}
.final::before, .final::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.final::before { left: -5rem; top: -5rem; width: 16rem; height: 16rem; }
.final::after { right: -7rem; bottom: -9rem; width: 24rem; height: 24rem; }
.final > * { position: relative; }
.final .titulo { margin-top: 0; color: #fff; }
.final p { max-width: 34rem; margin: 1rem auto 0; color: #eceffd; font-size: 1.12rem; }
.final .acciones { justify-content: center; }

/* Pie */
.pie { margin-top: var(--aire); padding-block: 3.5rem 2rem; background: #10143a; color: #aeb5dc; font-size: 0.97rem; }
.pie-rejilla { display: grid; gap: 2.25rem; }
.pie .marca { color: #fff; }
.pie .marca-oficio { color: #aeb5dc; }
.pie-resumen { max-width: 22rem; margin-top: 1.1rem; }
.pie h3 { color: #fff; font-size: 1rem; font-weight: 800; }
.pie ul { margin-top: 0.9rem; }
.pie li { padding-block: 0.28rem; }
.pie a { color: #dfe4ff; text-decoration: none; }
.pie a:hover { color: #fff; text-decoration: underline; }
.pie-legal { margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.88rem; }

/* WhatsApp flotante y barra en teléfonos */
.wa-flotante {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 45;
  display: none;
  place-items: center;
  width: 3.9rem;
  height: 3.9rem;
  border-radius: 50%;
  background: var(--wa);
  color: var(--wa-ink);
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.5);
}
.wa-flotante::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: var(--wa); opacity: 0; }
.wa-flotante .ic { width: 1.9rem; height: 1.9rem; }

.barra {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 45;
  display: flex;
  gap: 0.6rem;
  padding: 0.65rem var(--margen) calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(23, 28, 79, 0.08);
}
.barra .btn { min-height: 3.1rem; padding-inline: 1.1rem; white-space: nowrap; }
.barra .btn-wa { flex: 1; }
.barra-texto { display: none; }
body { padding-bottom: 4.6rem; }

/* Aparición al hacer scroll (solo con JS y sin reducción de movimiento) */
@media (prefers-reduced-motion: no-preference) {
  .js .aparece { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .aparece.visible { opacity: 1; transform: none; }
  .js .retraso-1 { transition-delay: 0.1s; }
  .js .retraso-2 { transition-delay: 0.2s; }
}

/* Página de aviso de privacidad */
.documento-fondo { background: var(--sky-2); }
.documento {
  max-width: 50rem;
  margin: clamp(2rem, 5vw, 3.5rem) auto;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}
.documento h1 { color: var(--navy); font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; }
.documento h2 { margin-top: 2.25rem; color: var(--navy); font-size: 1.2rem; font-weight: 800; line-height: 1.3; }
.documento p, .documento ul, .documento ol { margin-top: 1rem; }
.documento ol { padding-left: 1.4rem; list-style: decimal; }
.documento ul { padding-left: 1.4rem; list-style: disc; }
.documento li { padding-block: 0.2rem; }
.documento .volver { margin-top: 2.5rem; }
.pie-simple { margin-top: 0; }

/* ---------- Pantallas medianas y grandes ---------- */

@media (min-width: 26rem) {
  .barra-texto { display: inline; }
}

@media (min-width: 40rem) {
  .zonas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fichas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sedes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pie-rejilla { grid-template-columns: 1.5fr 1fr 1fr; }
}

@media (min-width: 48rem) {
  body { padding-bottom: 0; }
  .barra { display: none; }
  .wa-flotante { display: grid; }
  .cabecera .btn { display: inline-flex; }
  .cifras { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
  .vidrios, .pasos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .horario { grid-template-columns: auto 1fr; gap: 2.5rem; }
  .horario dl { justify-content: end; gap: 0.2rem 2.5rem; grid-auto-flow: column; grid-template-rows: auto auto; grid-template-columns: none; }
}

@media (max-width: 39.99rem) {
  .cifra { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .cifra-icono { width: 2.75rem; height: 2.75rem; border-radius: 14px; }
  .flota { padding: 0.55rem 0.8rem 0.55rem 0.6rem; gap: 0.6rem; }
  .flota-icono { width: 2.2rem; height: 2.2rem; }
  .flota strong { font-size: 1rem; }
  .flota span { font-size: 0.78rem; }
  .flota-1 { left: 0.6rem; top: -1.1rem; }
  .flota-2 { right: 0.6rem; top: auto; bottom: 8.6rem; }
  .carrusel-flecha { width: 2.4rem; height: 2.4rem; }
  .lamina figcaption { right: 1.2rem; }
}

@media (min-width: 62rem) {
  .aviso-top { display: block; }
  .portada-rejilla { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 4rem; }
  .carrusel { margin-inline: 0; justify-self: end; }
  .zonas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .partida { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4.5rem; }
  .doctor { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
  .retrato { min-height: 100%; }
  .pie-rejilla { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
}

@media (min-width: 72rem) {
  .menu { display: flex; gap: 1.5rem; margin-left: auto; }
}

@media (min-width: 80rem) {
  .menu { gap: 1.9rem; }
}

@media print {
  .cabecera { position: static; }
  .barra, .wa-flotante, .saltar, .aviso-top { display: none; }
  body { padding-bottom: 0; }
}

/* Página sin barra inferior */
.sin-barra { padding-bottom: 0; }
.sin-barra .cabecera .btn { display: inline-flex; }
