/* Estilos compartidos de la web pública ZooDX (multipágina) */
:root {
  --tinta: #0d2c40;
  --petroleo: #1673ae;
  --petroleo-osc: #0e4f7e;
  --ambar: #e0a437;
  --crema: #f5f6f4;
  --crema-osc: #eceeea;
  --blanco: #ffffff;
  --gris: #5b6a74;
  --linea: #d9dcd6;
  --serif: 'DM Sans', 'Segoe UI', sans-serif;
  --sans: 'Inter', 'Segoe UI', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--tinta); background: var(--crema); line-height: 1.6; }
img { max-width: 100%; }
.cont { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Cabecera ---------- */
header.principal {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--crema) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linea);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.marca { font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: -0.5px; text-decoration: none; color: var(--petroleo); }
.marca b { color: #8b949b; font-weight: 600; }
.marca small { display: block; font-family: var(--sans); font-size: 9.5px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--gris); font-weight: 600; margin-top: -4px; }
nav.enlaces { display: flex; gap: 26px; align-items: center; }
nav.enlaces a { text-decoration: none; color: var(--tinta); font-size: 14.5px; font-weight: 500; padding-bottom: 3px; border-bottom: 2px solid transparent; }
nav.enlaces a:hover { color: var(--petroleo); }
nav.enlaces a.activa { color: var(--petroleo); border-bottom-color: var(--petroleo); font-weight: 600; }
.boton {
  display: inline-block; background: var(--petroleo); color: #fff; text-decoration: none;
  padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  transition: transform .15s ease, background .15s ease; border: 0; cursor: pointer;
}
.boton:hover { background: var(--petroleo-osc); transform: translateY(-1px); }
.boton.ambar { background: var(--ambar); color: var(--tinta); }
.boton.ambar:hover { background: #caa33f; }
.boton.borde { background: transparent; color: var(--petroleo); box-shadow: inset 0 0 0 1.5px var(--petroleo); }
.boton.borde:hover { background: var(--petroleo); color: #fff; }
.menu-movil { display: none; }
.acciones-movil { display: none; align-items: center; gap: 12px; }
.hamburguesa {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; background: none; border: 1.5px solid var(--linea);
  border-radius: 10px; cursor: pointer;
}
.hamburguesa span { display: block; height: 2.5px; background: var(--tinta); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
header.principal.abierto .hamburguesa span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
header.principal.abierto .hamburguesa span:nth-child(2) { opacity: 0; }
header.principal.abierto .hamburguesa span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.menu-panel { display: none; }
header.principal.abierto .menu-panel {
  display: grid; background: var(--blanco); border-top: 1px solid var(--linea);
  padding: 8px 24px 18px;
  position: absolute; left: 0; right: 0; top: 100%;
  box-shadow: 0 24px 40px rgba(13,44,64,.18); border-radius: 0 0 16px 16px;
}
header.principal { position: sticky; }
.menu-panel a {
  text-decoration: none; color: var(--tinta); font-size: 16px; font-weight: 600;
  padding: 13px 4px; border-bottom: 1px solid #eef0ec;
}
.menu-panel a.activa { color: var(--petroleo); }
.menu-panel a.destacado { color: var(--petroleo); border-bottom: none; }

/* ---------- Héroe (inicio) ---------- */
.heroe { position: relative; overflow: hidden; padding: 72px 0 0; }
.heroe .cont { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.heroe .foto-heroe { border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px rgba(13,44,64,.22); border: 4px solid #fff; }
.heroe .foto-heroe img { display: block; width: 100%; height: 100%; object-fit: cover; }
.etiqueta {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--petroleo);
  border: 1px solid var(--petroleo); border-radius: 999px; padding: 6px 16px; margin-bottom: 26px;
}
h1.titulo {
  font-family: var(--serif); font-weight: 700; font-size: clamp(38px, 5.6vw, 66px);
  line-height: 1.04; letter-spacing: -1.5px; max-width: 15ch;
}
h1.titulo em { font-style: italic; color: var(--petroleo); }
.heroe p.baja { max-width: 54ch; margin: 26px 0 34px; font-size: 18px; color: var(--gris); }
.heroe .acciones { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 70px; }

/* Línea de electrocardiograma */
.ecg { display: block; width: 100%; height: 90px; }
.ecg path { fill: none; stroke: var(--petroleo); stroke-width: 2; opacity: .5;
  stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: latido 3.2s ease-out forwards; }
@keyframes latido { to { stroke-dashoffset: 0; } }

/* Franja de datos */
.franja { background: var(--tinta); color: var(--crema); }
.franja .cont { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 34px 24px; }
.dato span { display: block; font-family: var(--serif); font-size: 30px; color: var(--ambar); }
.dato small { font-size: 13px; color: #b3c2cd; letter-spacing: .3px; }

/* ---------- Secciones ---------- */
section { padding: 88px 0; }
.encabezado-seccion { max-width: 640px; margin-bottom: 50px; }
.miga { font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--ambar); display: block; margin-bottom: 14px; }
h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 4vw, 44px); letter-spacing: -1px; line-height: 1.12; }
.encabezado-seccion p { margin-top: 16px; color: var(--gris); font-size: 16.5px; }

/* Cabecera de subpágina */
.pag-hero { background: var(--blanco); border-bottom: 1px solid var(--linea); padding: 64px 0 56px; }
.pag-hero h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 4.6vw, 54px); letter-spacing: -1px; line-height: 1.1; }
.pag-hero p { margin-top: 14px; color: var(--gris); font-size: 17px; max-width: 60ch; }

/* Adelantos en el inicio */
.teasers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.teaser {
  display: block; background: var(--blanco); border: 1px solid var(--linea); border-radius: 18px;
  overflow: hidden; text-decoration: none; color: var(--tinta);
  transition: transform .18s ease, box-shadow .18s ease;
}
.teaser:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(13,44,64,.10); }
.teaser .cuadro-foto { aspect-ratio: 16 / 10; overflow: hidden; }
.teaser .cuadro-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.teaser .texto { padding: 20px 22px 24px; }
.teaser h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin-bottom: 6px; }
.teaser p { font-size: 14px; color: var(--gris); margin-bottom: 10px; }
.teaser .ver { color: var(--petroleo); font-weight: 700; font-size: 14px; }

/* Quiénes somos */
.somos .rejilla { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: start; }
.somos .grande { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.35; font-weight: 400; }
.somos .grande em { color: var(--petroleo); font-style: italic; }
.nota-clinica {
  background: var(--blanco); border: 1px solid var(--linea); border-left: 3px solid var(--ambar);
  padding: 22px 26px; border-radius: 0 12px 12px 0; margin-top: 30px;
}
.nota-clinica strong { display: block; margin-bottom: 6px; font-size: 15px; }
.nota-clinica p { font-size: 14.5px; color: var(--gris); }
.foto-seccion { border-radius: 18px; overflow: hidden; box-shadow: 0 18px 44px rgba(13,44,64,.14); margin-top: 30px; }
.foto-seccion img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lista-mision { display: grid; gap: 18px; }
.lista-mision div { padding: 22px 24px; background: var(--blanco); border-radius: 14px; border: 1px solid var(--linea); }
.lista-mision strong { font-family: var(--serif); font-size: 18px; font-weight: 600; display: block; margin-bottom: 6px; }
.lista-mision p { font-size: 14.5px; color: var(--gris); }

/* Servicios */
.tarjetas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.servicio {
  background: var(--blanco); border: 1px solid var(--linea); border-radius: 18px;
  padding: 20px 20px 26px; position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.servicio:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(13, 44, 64, .10); }
.servicio .num { font-family: var(--serif); font-style: italic; color: var(--ambar); font-size: 15px; }
.servicio h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; margin: 10px 0 10px; line-height: 1.2; }
.servicio p { font-size: 14px; color: var(--gris); }
.servicio .cuadro-foto { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; margin-bottom: 16px; background: var(--crema); }
.servicio .cuadro-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.servicio:hover .cuadro-foto img { transform: scale(1.04); }

/* Portal (banda azul) */
.portal { background: var(--petroleo); color: var(--crema); position: relative; overflow: hidden; }
.portal::before {
  content: ''; position: absolute; inset: 0; opacity: .07;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0); background-size: 26px 26px;
}
.portal .cont { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: center; }
.portal .miga { color: var(--ambar); }
.portal h2 { color: #fff; }
.portal p { color: #c9dcea; margin-top: 16px; max-width: 48ch; }
.portal .pasos { margin-top: 28px; display: grid; gap: 12px; }
.portal .paso { display: flex; gap: 14px; align-items: baseline; font-size: 15.5px; }
.portal .paso b { font-family: var(--serif); font-style: italic; color: var(--ambar); min-width: 22px; }
.caja-portal {
  background: #fff; color: var(--tinta); border-radius: 20px; padding: 34px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .25); text-align: center;
}
.caja-portal .cerrojo { font-size: 34px; }
.caja-portal h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 10px 0 6px; }
.caja-portal p { color: var(--gris) !important; font-size: 14px; margin: 0 0 20px !important; }
.caja-portal .boton { width: 100%; padding: 14px; font-size: 16px; }
.caja-portal small { display: block; margin-top: 14px; font-size: 12.5px; color: var(--gris); }

/* Tecnología */
.equipos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.equipo {
  background: var(--blanco); border: 1px solid var(--linea); border-radius: 18px; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.equipo:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(13, 44, 64, .10); }
.equipo .cuadro-foto { aspect-ratio: 1 / 1; overflow: hidden; background: var(--crema); border-bottom: 1px solid var(--linea); }
.equipo .cuadro-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.equipo .texto { padding: 20px 22px 24px; }
.equipo .area { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ambar); }
.equipo h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 6px 0 6px; }
.equipo p { font-size: 13.5px; color: var(--gris); }
.sello {
  margin-top: 34px; display: flex; gap: 18px; align-items: flex-start;
  background: var(--blanco); border: 1px solid var(--linea); border-radius: 16px; padding: 26px 28px;
}
.sello .icono { font-size: 28px; }
.sello strong { display: block; font-family: var(--serif); font-size: 18px; margin-bottom: 4px; }
.sello p { font-size: 14.5px; color: var(--gris); }

/* Contacto */
.contacto .rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.dato-contacto { padding: 18px 0; border-bottom: 1px solid var(--linea); display: flex; gap: 16px; align-items: baseline; }
.dato-contacto .tipo { min-width: 110px; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gris); }
.dato-contacto a { color: var(--petroleo); font-weight: 600; text-decoration: none; }
.dato-contacto strong { font-weight: 600; }
.trabaja { background: var(--blanco); border: 1px dashed var(--petroleo); border-radius: 18px; padding: 30px; }
.trabaja h3 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.trabaja p { font-size: 14.5px; color: var(--gris); margin-bottom: 18px; }

/* Staff médico */
.seccion-staff { background: var(--blanco); border-top: 1px solid var(--linea); }
.staff { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ficha { background: var(--crema); border: 1px solid var(--linea); border-radius: 14px; overflow: hidden; }
.ficha summary {
  list-style: none; cursor: pointer; padding: 16px 20px; display: grid;
  grid-template-columns: auto 1fr auto; grid-template-areas: "avatar nombre mas" "avatar meta mas"; gap: 2px 16px; align-items: center;
}
.ficha summary::-webkit-details-marker { display: none; }
.avatar {
  grid-area: avatar; width: 52px; height: 52px; border-radius: 50%; color: #fff;
  font-family: var(--serif); font-weight: 700; font-size: 18px; letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.avatar-foto { overflow: hidden; border: 2px solid var(--blanco); box-shadow: 0 2px 8px rgba(13,44,64,.18); }
.avatar-foto img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.ficha-nombre { grid-area: nombre; font-family: var(--serif); font-weight: 700; font-size: 16.5px; }
.ficha-meta { grid-area: meta; font-size: 12.5px; color: var(--gris); }
.ficha-mas { grid-area: mas; font-size: 12.5px; font-weight: 700; color: var(--petroleo); white-space: nowrap; }
.ficha[open] .ficha-mas { color: var(--gris); }
.ficha[open] summary { border-bottom: 1px solid var(--linea); }
.ficha-cuerpo { padding: 18px 20px 20px; display: flex; gap: 18px; align-items: flex-start; }
.ficha-foto-grande { width: 165px; height: 220px; object-fit: cover; object-position: top center; border-radius: 14px; border: 3px solid var(--blanco); box-shadow: 0 10px 24px rgba(13,44,64,.18); flex: none; }
.ficha-cuerpo p { font-size: 13.5px; color: var(--gris); line-height: 1.7; }
.ficha[open] summary .avatar { display: none; }
.ficha[open] summary { grid-template-columns: 1fr auto; grid-template-areas: "nombre mas" "meta mas"; }
@media (max-width: 540px) { .ficha-cuerpo { flex-direction: column; } .ficha-foto-grande { width: 100%; height: 260px; } }

/* Preguntas frecuentes */
.faq-grupo { margin-bottom: 46px; }
.faq-titulo { font-size: 24px; margin-bottom: 16px; }
.faq-cuenta { font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--gris); background: var(--crema-osc); border-radius: 999px; padding: 4px 12px; vertical-align: middle; margin-left: 10px; }
.faq-item { background: var(--blanco); border: 1px solid var(--linea); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 600; font-size: 15px; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--petroleo); font-weight: 400; }
.faq-item[open] summary::after { content: '–'; }
.faq-item[open] summary { color: var(--petroleo); }
.faq-item > p { padding: 0 20px 18px; font-size: 14px; color: var(--gris); line-height: 1.7; }

/* Ubicación / mapa */
.ubicacion { background: var(--blanco); border-top: 1px solid var(--linea); padding: 64px 0; }
.rejilla-mapa { display: grid; grid-template-columns: 1fr 460px; gap: 48px; align-items: center; }
.titulo-mapa { font-size: clamp(24px, 3vw, 32px); }
.texto-mapa { margin-top: 12px; color: var(--gris); font-size: 15px; line-height: 1.7; }
.mapa-acciones { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.mapa-marco { display: block; position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--linea); box-shadow: 0 14px 34px rgba(13,44,64,.12); transition: transform .18s ease, box-shadow .18s ease; }
.mapa-marco:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(13,44,64,.18); }
.mapa-marco img { display: block; width: 100%; height: 280px; object-fit: cover; object-position: 42% 54%; }
.mapa-pista {
  position: absolute; bottom: 12px; left: 12px; background: var(--tinta); color: #fff;
  font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(13,44,64,.3);
}

/* CTA final de subpáginas */
.cta-final { background: var(--tinta); color: var(--crema); text-align: center; }
.cta-final h2 { color: #fff; margin-bottom: 10px; }
.cta-final p { color: #b3c2cd; margin-bottom: 28px; }

/* Pie */
footer.principal { background: var(--tinta); color: #b3c2cd; }
footer.principal .cont { display: flex; justify-content: space-between; align-items: center; padding: 30px 24px; flex-wrap: wrap; gap: 14px; }
footer.principal .marca { color: #fff; font-size: 22px; }
footer.principal .marca b { color: var(--ambar); }
footer.principal p { font-size: 13px; }
footer.principal a { color: #c9dcea; display: inline-block; padding: 8px 2px; margin: -8px -2px; }

/* Aparición al hacer scroll */
.aparece { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.aparece.visible { opacity: 1; transform: none; }

/* Respeto a la preferencia de menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .ecg path { animation: none; stroke-dashoffset: 0; }
  .aparece { opacity: 1; transform: none; transition: none; }
  .boton, .teaser, .servicio, .equipo, .servicio .cuadro-foto img { transition: none; }
}

/* Titulares balanceados */
h1.titulo, h2, .pag-hero h1 { text-wrap: balance; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  nav.enlaces { display: none; }
  .menu-movil { display: block; }
  .acciones-movil { display: flex; }
  .heroe .cont { grid-template-columns: 1fr; }
  .franja .cont { grid-template-columns: repeat(2, 1fr); }
  .somos .rejilla, .portal .cont, .contacto .rejilla { grid-template-columns: 1fr; }
  .tarjetas, .equipos, .teasers { grid-template-columns: repeat(2, 1fr); }
  .staff { grid-template-columns: 1fr; }
  .rejilla-mapa { grid-template-columns: 1fr; gap: 24px; }
  section { padding: 60px 0; }
  .pag-hero { padding: 48px 0 40px; }
}
@media (max-width: 540px) {
  .tarjetas, .equipos, .teasers { grid-template-columns: 1fr; }
  .heroe { padding-top: 52px; }
}
