/* ============================================================
   IMAX Radiología — Prototipo web
   Sistema de diseño extraído del Figma (PROPUESTA-FINAL web-3)
   ============================================================ */

:root {
  /* Color */
  --blue:        #1F4E79;   /* primario  rgb(31,78,121)  */
  --blue-600:    #1A4369;
  --blue-700:    #163a5b;
  --blue-mid:    #6BA9C9;   /* azul medio rgb(107,169,201) */
  --blue-soft:   #A9D6E8;   /* glow       rgb(169,214,232) */
  --tint:        #EEF7FB;   /* chip bg    rgb(238,247,251) */
  --tint-2:      #F6FAFC;   /* page bg    rgb(246,250,252) */
  --border:      #D7E7EF;   /* rgb(215,231,239) */
  --border-2:    #D7E6EE;   /* rgb(215,230,238) */
  --ink:         #101820;   /* títulos    rgb(16,24,32) */
  --body:        #34414B;   /* cuerpo     rgb(52,65,75) */
  --muted:       #6B7B88;   /* apagado    rgb(107,123,136) */
  --on-blue:     #DDECF3;   /* texto sobre azul rgb(221,236,243) */
  --teal:        #128C7E;   /* WhatsApp   rgb(18,140,126) */
  --teal-600:    #0F7A6D;
  --white:       #FFFFFF;

  --shadow-card: 0 18px 38px rgba(31,78,121,.075);
  --shadow-soft: 0 16px 36px rgba(31,78,121,.08);
  --shadow-faq:  0 14px 30px rgba(31,78,121,.07);
  --shadow-nav:  0 8px 26px rgba(31,78,121,.06);
  --ring:        inset 0 0 0 1px var(--border);

  --maxw: 1280px;
  --r-lg: 34px;
  --r-md: 24px;
  --r-pill: 999px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding-top: 98px;   /* deja espacio para el menú fijo */
  font-family: var(--font);
  color: var(--body);
  background: var(--tint-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 18px;
  background: var(--tint);
  box-shadow: var(--ring);
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; letter-spacing: .2px;
  color: var(--blue);
}
.h1 {
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -1.4px;
  color: var(--ink);
  margin: 18px 0 0;
  text-wrap: balance;
}
.lead {
  font-size: 20px; line-height: 1.52; color: var(--body);
  margin: 22px 0 0; max-width: 640px;
}
.section-title {
  font-size: clamp(30px, 3.4vw, 38px);
  line-height: 1.08; font-weight: 800; letter-spacing: -.8px;
  color: var(--ink); margin: 0;
}
.section-copy {
  font-size: 18px; line-height: 1.5; color: var(--muted);
  margin: 14px 0 0; max-width: 620px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; padding: 0 26px;
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 700; letter-spacing: .2px;
  cursor: pointer; border: 0; white-space: nowrap;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 22px rgba(31,78,121,.22); }
.btn-primary:hover { background: var(--blue-600); box-shadow: 0 14px 28px rgba(31,78,121,.30); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--blue); box-shadow: var(--ring); }
.btn-ghost:hover { background: var(--tint); transform: translateY(-1px); }
.btn-wa { background: var(--teal); color: #fff; box-shadow: 0 10px 22px rgba(18,140,126,.22); }
.btn-wa:hover { background: var(--teal-600); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(18,140,126,.30); }
.btn-sm { height: 42px; padding: 0 20px; }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.nav-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 24px 0 0; }
.mobile-menu { display: none; }
.nav {
  display: flex; align-items: center; gap: 16px;
  height: 74px; padding: 0 14px 0 22px;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(140%) blur(12px);
  box-shadow: var(--ring), var(--shadow-nav);
  border-radius: 26px;
}
.nav .brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.nav .brand img { height: 52px; width: auto; }
.nav-links {
  display: flex; align-items: center; gap: 2px;
  margin: 0 auto; padding: 0; list-style: none;
}
.nav-links a {
  display: inline-block; padding: 10px 13px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; color: var(--body);
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--tint); color: var(--blue); }
.nav-links a.active { color: var(--blue); background: var(--tint); font-weight: 700; }
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a { color: var(--blue); background: var(--tint); font-weight: 700; }
.nav .nav-cta { flex: 0 0 auto; }
/* Toggle Pacientes / Profesionales */
.nav .seg { display: inline-flex; flex: 0 0 auto; gap: 2px; background: var(--tint); border-radius: 999px; padding: 4px; box-shadow: inset 0 0 0 1px var(--border); }
.nav .seg-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--body); white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.nav .seg-btn:hover { color: var(--blue); }
.nav .seg-btn.active { background: #fff; color: var(--blue); box-shadow: 0 4px 10px rgba(31,78,121,.12); }
/* Inicia sesión (futuro) */
.nav .nav-login { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--body); transition: background .15s, color .15s; }
.nav .nav-login:hover { background: var(--tint); color: var(--blue); }
.nav .nav-login .soon { font-size: 9.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--blue); background: var(--tint); padding: 3px 7px; border-radius: 999px; }
@media (max-width: 1100px) { .nav .seg, .nav .nav-login { display: none; } }
.mm-seg { display: flex; gap: 4px; margin-bottom: 6px; }
.mm-login { display: inline-flex !important; align-items: center; gap: 8px; }
.mm-login span { font-size: 9.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--blue); background: var(--tint); padding: 3px 7px; border-radius: 999px; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; background: #fff; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 380px; height: 380px; right: -40px; top: 10px; background: rgba(169,214,232,.18); }
.hero::after  { width: 230px; height: 230px; right: 70px; top: 210px; background: rgba(31,78,121,.07); }
.hero .shell { position: relative; z-index: 1; padding-top: 56px; padding-bottom: 64px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* Hero diagnostic card */
.diag-card {
  position: relative; background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--ring), var(--shadow-card);
  padding: 30px 34px 28px; min-height: 360px;
  display: flex; flex-direction: column;
}
.diag-card .row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.diag-card h3 { margin: 0; font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.2; max-width: 240px; letter-spacing: -.4px; }
.chip-solid {
  display: inline-flex; align-items: center; height: 34px; padding: 0 16px;
  background: var(--blue); color: #fff; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; flex: 0 0 auto;
}
.scan {
  margin: auto; width: 220px; height: 220px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 50%, rgba(169,214,232,.10), rgba(169,214,232,.16));
  box-shadow: inset 0 0 0 1px var(--border);
}
.scan i { display: grid; place-items: center; border-radius: 50%; }
.scan .ring1 { width: 168px; height: 168px; box-shadow: inset 0 0 0 1px var(--blue-mid); background: rgba(238,247,251,.6); }
.scan .ring2 { width: 96px; height: 96px; box-shadow: inset 0 0 0 1px var(--blue-mid); }
.scan .dot   { width: 54px; height: 54px; background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue-mid); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%,100%{ transform: scale(1); opacity:.9 } 50%{ transform: scale(1.08); opacity:1 } }
@media (prefers-reduced-motion: reduce){ .scan .dot { animation: none; } }
.diag-card .micro { margin-top: 6px; font-size: 15px; font-weight: 500; color: var(--muted); }

/* ---------- Stats strip ---------- */
.stats { padding: 56px 0 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat {
  background: #fff; border-radius: var(--r-md); padding: 26px 26px 24px;
  box-shadow: var(--ring), var(--shadow-card);
}
.stat .n { font-size: 28px; font-weight: 800; color: var(--blue); letter-spacing: -.6px; }
.stat .l { margin-top: 4px; font-size: 15px; color: var(--muted); }

/* ---------- Section spacing ---------- */
.section { padding: 64px 0; }
.section-head { margin-bottom: 36px; }

/* ---------- Attribute / feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: #fff; border-radius: var(--r-md); padding: 26px;
  box-shadow: var(--ring), var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--ring), 0 22px 44px rgba(31,78,121,.12); }
.feature .mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--tint); box-shadow: inset 0 0 0 1px var(--border);
  color: var(--blue); font-size: 14px; font-weight: 800; margin-bottom: 16px;
}
.feature h4 { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.feature p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }

/* feature variant: number on top (nosotros pillars) */
.pillar .mark { background: var(--tint); color: var(--blue); }

/* iconos dentro de los marcadores (reemplazan números) */
.feature .mark svg, .pillar .mark svg { width: 21px; height: 21px; }
.bullets .mark svg { width: 18px; height: 18px; }
.feature:hover .mark svg { transform: scale(1.08); }
.feature .mark svg, .pillar .mark svg, .bullets .mark svg { transition: transform .25s ease; }

/* animación: el icono se dibuja al entrar en pantalla (line-draw).
   Estado por defecto = VISIBLE (a prueba de fallos); el dibujo va de oculto→visible solo al activarse. */
.mark svg path, .mark svg rect, .mark svg circle {
  stroke-dasharray: 130; stroke-dashoffset: 0;
}
.in .mark svg path, .in .mark svg rect, .in .mark svg circle {
  animation: imxMarkDraw 1.05s cubic-bezier(.55,.1,.25,1) both;
}
.in .feature:nth-child(2) .mark svg * { animation-delay: .08s; }
.in .feature:nth-child(3) .mark svg * { animation-delay: .16s; }
.in .feature:nth-child(4) .mark svg * { animation-delay: .24s; }
.in .feature:nth-child(5) .mark svg * { animation-delay: .32s; }
.in .feature:nth-child(6) .mark svg * { animation-delay: .40s; }
@keyframes imxMarkDraw { from { stroke-dashoffset: 130; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .in .mark svg path, .in .mark svg rect, .in .mark svg circle { animation: none; }
}

/* Iconos del acceso de pacientes: visibles incluso si otro plugin redefine SVG. */
.access .panel-r .pt .n svg {
  display: block;
  width: 21px;
  height: 21px;
  color: #1F4E79;
  opacity: 1;
  visibility: visible;
}
.access .panel-r .pt .n svg path,
.access .panel-r .pt .n svg rect,
.access .panel-r .pt .n svg circle {
  fill: none;
  stroke: #1F4E79;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  opacity: 1;
  visibility: visible;
}

/* ---------- Exams widget (home) ---------- */
.exam-widget {
  position: relative; overflow: hidden;
  background: #fafdfe; border-radius: var(--r-lg);
  box-shadow: var(--ring), var(--shadow-soft);
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: stretch;
}
.exam-widget .copy { padding: 56px 48px; }
.exam-widget .copy h2 { font-size: clamp(34px, 4vw, 48px); line-height: 1.04; font-weight: 800; letter-spacing: -1px; color: var(--ink); margin: 0; }
.exam-widget .copy p { font-size: 17px; line-height: 1.5; color: var(--body); margin: 18px 0 28px; max-width: 460px; }
.exam-widget .media {
  background-image: url("../images/photos/equipo-veraview-detalle.jpg");
  background-color: #f3f4f6;
  background-size: cover; background-position: center right;
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  min-height: 410px;
}
.note { font-size: 15px; font-weight: 700; color: var(--blue); margin: 18px 0 0; }

/* ---------- Sede cards ---------- */
.sedes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.sede {
  background: #fff; border-radius: var(--r-lg); padding: 34px 36px 32px;
  box-shadow: var(--ring), var(--shadow-card);
}
.sede h3 { margin: 0; font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -.6px; }
.sede .addr { margin: 14px 0 2px; font-size: 18px; font-weight: 700; color: var(--body); }
.sede .ref { font-size: 15px; color: var(--muted); }
.map {
  position: relative; overflow: hidden; margin: 22px 0 22px;
  height: 190px; border-radius: 28px;
  background: var(--tint); box-shadow: inset 0 0 0 1px var(--border);
  display: grid; place-items: center;
}
.map .streets { position: absolute; inset: 0; opacity: .5; }
.map .streets span { position: absolute; background: rgba(107,169,201,.30); }
.map .glow { position: absolute; right: 10px; top: 10px; width: 150px; height: 150px; border-radius: 50%; background: rgba(169,214,232,.22); }
.map .pin {
  position: relative; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(31,78,121,.30);
}
.map .pin::after { content: ""; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.map .map-label { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-size: 14px; font-weight: 700; color: var(--blue); }

/* ---------- Mapa real de Google (embed) ---------- */
.sede-map {
  position: relative; margin: 22px 0; height: 210px; border-radius: 24px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border), 0 12px 28px rgba(31,78,121,.10);
  background: #e9eff1;
}
.sede-map iframe { width: 100%; height: 100%; border: 0; display: block; filter: saturate(1.02); }
.sede-map .map-cta {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
  background: #fff; border-radius: 999px; box-shadow: 0 4px 14px rgba(16,24,32,.18);
  font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; white-space: nowrap;
}
.sede-map .map-cta:hover { background: var(--tint); }
.sede-map .map-cta svg { width: 15px; height: 15px; }
.sede .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sede .contact { font-size: 16px; font-weight: 500; color: var(--body); line-height: 1.7; }
.sede .actions { display: flex; flex-direction: column; gap: 10px; }
.sede .hours { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 15px; font-weight: 600; color: var(--blue); }
.sede .hours svg { width: 18px; height: 18px; flex: 0 0 auto; }
.hero-solo { max-width: 760px; }
.form-wrap { max-width: 720px; margin: 0 auto; }
.field input[type="file"] { padding: 11px 14px; cursor: pointer; }
.field .hint { display: block; margin-top: 7px; font-size: 13px; color: var(--muted); }
.form-wa-note { margin: 14px 0 0; font-size: 14px; color: var(--body); text-align: center; }
.form-wa-note a { color: var(--blue); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq {
  background: #fff; border-radius: 30px; padding: 14px 36px 8px;
  box-shadow: inset 0 0 0 1px var(--border-2), var(--shadow-faq);
}
.faq > h2 { font-size: 32px; font-weight: 800; color: var(--ink); letter-spacing: -.6px; margin: 22px 0 6px; }
.faq-item { border-top: 1px solid var(--border-2); }
.faq-item:first-of-type { border-top: 1px solid var(--border-2); }
.faq-q {
  width: 100%; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0; text-align: left;
  font-family: var(--font); font-size: 17px; font-weight: 700; color: var(--body);
}
.faq-q .ico {
  flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center;
  color: var(--blue); font-size: 24px; font-weight: 400; line-height: 1;
  transition: transform .25s ease;
}
.faq-item.open .faq-q .ico { transform: rotate(45deg); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .3s ease; }
.faq-a p { margin: 0; padding: 0 50px 24px 0; font-size: 16px; line-height: 1.6; color: var(--muted); }

/* ---------- CTA banner ---------- */
.cta {
  position: relative; overflow: hidden;
  background: var(--blue); border-radius: 36px;
  padding: 60px 64px; color: #fff;
}
.cta::after { content: ""; position: absolute; right: -30px; top: -40px; width: 340px; height: 340px; border-radius: 50%; background: rgba(169,214,232,.15); }
.cta h2 { position: relative; z-index: 1; font-size: clamp(30px, 3.6vw, 40px); line-height: 1.08; font-weight: 800; letter-spacing: -.8px; margin: 0; max-width: 560px; }
.cta p { position: relative; z-index: 1; font-size: 18px; line-height: 1.5; color: var(--on-blue); margin: 18px 0 28px; max-width: 520px; }
.cta .row { position: relative; z-index: 1; display: flex; gap: 14px; flex-wrap: wrap; }
.cta .btn-ghost { box-shadow: none; }

/* ---------- Two-column cards (nosotros) ---------- */
.two-col { display: grid; grid-template-columns: 1.25fr 1fr; gap: 30px; }
.panel { background: #fff; border-radius: var(--r-lg); padding: 40px; box-shadow: var(--ring), var(--shadow-card); }
.panel h3 { margin: 0 0 24px; font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
.bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.bullets li { display: flex; align-items: center; gap: 16px; font-size: 17px; font-weight: 700; color: var(--body); }
.bullets .mark {
  flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--tint); box-shadow: inset 0 0 0 1px var(--border); color: var(--blue); font-size: 14px; font-weight: 800;
}
.panel p { margin: 0 0 22px; font-size: 17px; line-height: 1.6; color: var(--body); }

/* ---------- Exam list (examenes page) ---------- */
.exam-hero-media {
  border-radius: var(--r-lg); min-height: 360px;
  box-shadow: var(--ring); overflow: hidden;
}
.exam-list { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.exam-card {
  background: #fff; border-radius: var(--r-md); padding: 24px 26px;
  box-shadow: var(--ring), var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
}
.exam-card:hover { transform: translateY(-3px); box-shadow: var(--ring), 0 22px 44px rgba(31,78,121,.12); }
.exam-card .top { display: flex; gap: 18px; align-items: flex-start; }
.exam-badge {
  flex: 0 0 auto; width: 58px; height: 58px; border-radius: 18px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #ffffff, #E9F4FB);
  box-shadow: inset 0 0 0 1px var(--border), 0 10px 22px rgba(31,78,121,.10);
  color: var(--blue); font-size: 13px; font-weight: 800;
  transition: transform .28s ease, box-shadow .28s ease;
}
.exam-badge.is-3d { background: linear-gradient(150deg, #ffffff, #E9F4FB); color: var(--blue); box-shadow: inset 0 0 0 1px var(--border), 0 10px 22px rgba(31,78,121,.10); }
.exam-badge { position: relative; }
.exam-badge svg { width: 32px; height: 32px; transition: transform .3s ease; }
/* etiqueta 2D/3D */
.exam-badge .kind {
  position: absolute; right: -7px; bottom: -7px;
  font-size: 10px; line-height: 1; font-weight: 800; letter-spacing: .2px;
  background: var(--blue); color: #fff; border-radius: 999px; padding: 3px 7px;
  box-shadow: 0 4px 10px rgba(31,78,121,.25);
}
/* realce elegante al pasar el mouse */
.exam-card:hover .exam-badge { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(62,143,196,.55), 0 16px 30px rgba(31,78,121,.18); }
.exam-card:hover .exam-badge svg { transform: scale(1.08); }
/* animación: el icono se dibuja solo al aparecer (line-draw) */
.exam-badge svg path, .exam-badge svg rect, .exam-badge svg circle {
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.exam-card.in .exam-badge svg path,
.exam-card.in .exam-badge svg rect,
.exam-card.in .exam-badge svg circle {
  animation: imxDraw 1.1s cubic-bezier(.55,.1,.25,1) forwards;
}
@keyframes imxDraw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .exam-badge svg path, .exam-badge svg rect, .exam-badge svg circle { stroke-dashoffset: 0; animation: none; }
}
.exam-card .body { flex: 1; min-width: 0; }
.exam-card h4 { margin: 2px 0 6px; font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.3px; }
.exam-card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.exam-card .more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  font-size: 14px; font-weight: 700; color: var(--blue); cursor: pointer;
  background: none; border: 0; font-family: var(--font); padding: 0;
}
.exam-card .more .chev { transition: transform .25s ease; }
.exam-card.open .more .chev { transform: rotate(90deg); }
.exam-detail { overflow: hidden; max-height: 0; transition: max-height .3s ease; }
.exam-detail p { padding-top: 14px; color: var(--body); border-top: 1px solid var(--border-2); margin-top: 14px; }
/* Tarjeta CBCT: mismo tamaño que las demás, con leve realce de fondo */
.exam-card.featured { background: linear-gradient(160deg, #FFFFFF 0%, #EFF7FC 100%); }

/* ---------- Contact form ---------- */
.form-card { background: #fff; border-radius: var(--r-lg); padding: 38px 40px; box-shadow: var(--ring), var(--shadow-soft); }
.form-card h3 { margin: 0 0 22px; font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--body); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font); font-size: 15px; color: var(--ink);
  background: var(--tint-2); border: 0; box-shadow: inset 0 0 0 1px var(--border);
  border-radius: 14px; padding: 14px 16px; transition: box-shadow .15s, background .15s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--blue);
}
.field.err input, .field.err select, .field.err textarea { box-shadow: inset 0 0 0 2px #d4584f; }
.field .msg { display: none; margin-top: 6px; font-size: 13px; color: #d4584f; }
.field.err .msg { display: block; }
.form-ok {
  display: none; margin-top: 16px; padding: 16px 18px; border-radius: 14px;
  background: rgba(18,140,126,.10); box-shadow: inset 0 0 0 1px rgba(18,140,126,.35);
  color: var(--teal-600); font-size: 15px; font-weight: 600;
}
.form-ok.show { display: block; }

/* ---------- Footer ---------- */
/* ---------- Footer (oscuro, igual en todas las páginas) ---------- */
.footer { padding: 64px 0 48px; background: #0a1828; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 32px; padding-top: 40px; border-top: 1px solid rgba(255,255,255,.10); }
.footer img { height: 60px; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: .92; }
.footer .blurb { font-size: 14px; color: rgba(199,212,223,.62); line-height: 1.6; max-width: 260px; }
.footer h5 { margin: 0 0 14px; font-size: 13px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #7FD4F5; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a, .footer li { font-size: 14px; color: rgba(199,212,223,.74); }
.footer a:hover { color: #7FD4F5; }
.footer .legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.10); font-size: 13px; color: rgba(199,212,223,.5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity: 1; transform: none; } }

/* ---------- WhatsApp icon ---------- */
.wa-ico { width: 17px; height: 17px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .diag-card { max-width: 480px; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .feature-grid { grid-template-columns: 1fr 1fr !important; }
  .exam-widget { grid-template-columns: 1fr; }
  .exam-widget .media { border-radius: 0 0 var(--r-lg) var(--r-lg); min-height: 280px; }
  .sedes-grid, .exam-list, .two-col { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .shell { padding: 0 20px; }
  .nav { gap: 10px; padding: 0 10px 0 14px; }
  .nav-links { display: none; }
  .nav .seg, .nav .nav-login { display: none !important; }
  .nav .nav-cta { display: none !important; }
  .nav .brand img { height: 40px; }
  .nav-toggle {
    display: grid !important; place-items: center; width: 46px; height: 46px; margin-left: auto;
    background: var(--tint); border: 0; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--border);
    cursor: pointer;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 18px; height: 2px; background: var(--blue); border-radius: 2px; position: relative;
  }
  .nav-toggle span::before { position: absolute; top: -6px; }
  .nav-toggle span::after { position: absolute; top: 6px; }
  .mobile-menu {
    display: none; margin-top: 12px; background: #fff; border-radius: 22px;
    box-shadow: var(--ring), var(--shadow-nav); padding: 10px;
  }
  .mobile-menu.open { display: block; }
  .mobile-menu a { display: block; padding: 14px 16px; border-radius: 14px; font-size: 16px; font-weight: 600; color: var(--body); }
  .mobile-menu a.active, .mobile-menu a:hover { background: var(--tint); color: var(--blue); }
  .mobile-nav-links { list-style: none; margin: 0; padding: 0; }
  .mobile-nav-links .current-menu-item > a,
  .mobile-nav-links .current_page_item > a { background: var(--tint); color: var(--blue); }
  .mm-seg { display: flex; gap: 8px; padding: 4px 4px 8px; }
  .mm-seg .seg-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; height: 42px; border-radius: 14px; background: var(--tint); font-size: 15px; font-weight: 700; color: var(--body); }
  .mm-seg .seg-btn.active { background: var(--blue); color: #fff; }
  .mm-login { justify-content: space-between; }
  .mobile-menu .mm-cta { display: block; margin-top: 8px; padding: 15px 16px; border-radius: 14px; background: var(--blue); color: #fff; font-size: 16px; font-weight: 800; text-align: center; }
  .mobile-menu .mm-cta:hover { background: var(--blue-mid); color: #fff; }

  .stats-grid, .feature-grid { grid-template-columns: 1fr !important; }
  .section { padding: 48px 0; }
  .cta { padding: 40px 28px; }
  .exam-widget .copy { padding: 36px 28px; }
  .panel, .form-card, .sede { padding: 28px 24px; }
  .sede .foot { flex-direction: column; align-items: stretch; }
  .sede .actions { flex-direction: row; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .lead { font-size: 18px; }
}

/* ---------- Integración WordPress ---------- */
.admin-bar .nav-wrap { top: 32px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: fixed !important; z-index: 100000; top: 10px; left: 10px; width: auto; height: auto;
  padding: 12px 18px; clip: auto; background: #fff; color: var(--blue); border-radius: 8px;
}
.custom-logo-link { display: inline-flex; }
.footer .custom-logo-link img { width: auto; }
.imax-wp-content { min-height: 55vh; background: #fff; }
.imax-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.imax-post-card { background: #fff; border-radius: var(--r-md); padding: 24px; box-shadow: var(--ring), var(--shadow-card); }
.imax-post-card > a img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; margin-bottom: 18px; }
.imax-post-card h2 { margin: 8px 0 12px; color: var(--ink); font-size: 23px; line-height: 1.2; }
.imax-post-card p { line-height: 1.65; }
.imax-post-meta { color: var(--muted); font-size: 13px; }
.imax-reading-width { max-width: 900px; }
.imax-featured img { width: 100%; border-radius: var(--r-lg); margin-bottom: 34px; }
.entry-content { font-size: 18px; line-height: 1.75; color: var(--body); }
.entry-content h2, .entry-content h3 { color: var(--ink); }
.entry-content a { color: var(--blue); text-decoration: underline; }
.imax-comments { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); }
.imax-error { min-height: 62vh; display: grid; align-items: center; }
.imax-form-plugin { background: #fff; border-radius: var(--r-md); padding: 32px; box-shadow: var(--ring), var(--shadow-card); }
.imax-form-pending h2 { margin: 0 0 12px; color: var(--ink); }
.imax-form-pending p { margin: 0 0 22px; line-height: 1.6; }
@media (max-width: 782px) { .admin-bar .nav-wrap { top: 46px; } }
@media (max-width: 760px) { .imax-post-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Escena animada del hero (equipo CBCT + tarjetas flotantes)
   ============================================================ */
.stage{
  --accent:#1F4E79; --accent-soft:#A9D6E8; --float-mult:0.1; --conn-dur:4s;
  position:relative; width:100%; max-width:560px; margin:0 auto; aspect-ratio:469/402;
}
.stage .glow{ position:absolute; inset:8% 6% 10% 8%; border-radius:50%;
  background:radial-gradient(circle at 52% 46%, rgba(169,214,232,.30), rgba(169,214,232,0) 65%); filter:blur(4px); }
.stage .conn-svg{ position:absolute; inset:0; width:100%; height:100%; overflow:visible; z-index:2; pointer-events:none; }
.stage .conn{ fill:none; stroke:var(--accent); stroke-width:1.6; stroke-linecap:round;
  stroke-dasharray:2 8; opacity:.6; animation:imxDash var(--conn-dur) linear infinite; }
@keyframes imxDash{ to{ stroke-dashoffset:-100; } }
.stage .layer{ position:absolute; will-change:transform; transition:transform .25s ease-out; }
.stage .layer img{ width:100%; height:auto; filter:drop-shadow(0 14px 26px rgba(31,78,121,.10)); }
.stage .layer.device{ z-index:1; }
.stage .layer.card{ z-index:3; }
.stage .floff{ animation:imxFloat 7s ease-in-out infinite; }
@keyframes imxFloat{ 50%{ transform:translateY(calc(var(--amp,7px) * var(--float-mult) * -1)); } }

.stage .l-device{ left:31.98%; top:0;       width:36.25%; }
.stage .l-tl{ left:0.85%;  top:9.45%;  width:30.28%; }
.stage .l-ml{ left:0;      top:38.81%; width:23.45%; }
.stage .l-bl{ left:6.82%;  top:58.21%; width:28.57%; }
.stage .l-tr{ left:68.23%; top:20.90%; width:31.77%; }
.stage .l-br{ left:66.52%; top:54.73%; width:33.48%; }

.stage .node-ring{ fill:none; stroke:var(--accent); stroke-width:1.4; }
.stage .node-dot{ fill:var(--accent); }
.stage .pulse-dot{ fill:#fff; stroke:var(--accent); stroke-width:1.4; filter:drop-shadow(0 0 4px var(--accent)); }

.stage .scan-band{ position:absolute; left:31%; top:0; width:38%; height:64px; z-index:2; pointer-events:none; opacity:0;
  background:linear-gradient(180deg, rgba(143,210,245,0) 0%, rgba(143,210,245,.55) 48%, rgba(255,255,255,.85) 50%, rgba(143,210,245,.55) 52%, rgba(143,210,245,0) 100%);
  mix-blend-mode:screen; animation:imxScan 4.2s ease-in-out infinite; }
.stage.scan-on .scan-band{ opacity:1; }
@keyframes imxScan{ 0%{ top:6%; } 50%{ top:78%; } 100%{ top:6%; } }

/* intro de carga */
.stage .boot-ring{ position:absolute; left:50.3%; top:51%; width:16px; height:16px; margin:-8px 0 0 -8px;
  border-radius:50%; border:2px solid var(--accent); opacity:0; z-index:2; pointer-events:none; }
.stage .boot-ring.r2{ border-color:var(--accent-soft); }
.stage.play .boot-ring{ animation:imxBoot 1.2s cubic-bezier(.2,.7,.3,1) .1s 1 forwards; }
.stage.play .boot-ring.r2{ animation-delay:.35s; }
@keyframes imxBoot{ 0%{opacity:.9; transform:scale(.15);} 65%{opacity:.4;} 100%{opacity:0; transform:scale(10);} }
.stage.intro .layer{ opacity:0; }
.stage.intro .l-device{ transform:translateY(30px) scale(.93); }
.stage.intro .card{ transform:scale(.5); }
.stage.intro .pulse-dot,.stage.intro .node-ring,.stage.intro .node-dot{ opacity:0; }
.stage.intro .scan-band{ opacity:0 !important; }
.stage.play .layer{ opacity:1; transform:none;
  transition:opacity .6s ease, transform .8s cubic-bezier(.18,.85,.22,1); }
.stage.play .l-device{ transition-delay:0s; }
.stage.play .l-tr{ transition-delay:.75s; }
.stage.play .l-tl{ transition-delay:.9s; }
.stage.play .l-br{ transition-delay:1.05s; }
.stage.play .l-bl{ transition-delay:1.2s; }
.stage.play .l-ml{ transition-delay:1.35s; }

@media (prefers-reduced-motion: reduce){
  .stage .conn,.stage .floff,.stage .scan-band,.stage .pulse-dot,.stage .node-ring,.stage .boot-ring{ animation:none !important; }
}
@media (max-width: 1040px){
  .hero .stage{ margin:0 auto; max-width:480px; }
}

/* ============================================================
   Hero: foto de clínica animada
   ============================================================ */
.hero .clinic{ position:relative; width:100%; max-width:740px; margin-left:auto;
  aspect-ratio:903/719; overflow:hidden; }
.clinic .ph-wrap{ position:absolute; inset:0; transition:transform .35s ease-out; will-change:transform; }
.clinic .ph{ width:100%; height:100%; object-fit:cover; transform:scale(1.06);
  animation:imxKen 22s ease-in-out infinite; }
@keyframes imxKen{ 0%,100%{ transform:scale(1.06); } 50%{ transform:scale(1.11); } }

.clinic .sheen{ position:absolute; inset:0; pointer-events:none; mix-blend-mode:screen;
  background:linear-gradient(115deg, transparent 32%, rgba(255,255,255,.30) 47%, rgba(190,225,245,.45) 50%, rgba(255,255,255,.30) 53%, transparent 68%);
  background-size:250% 100%; background-position:210% 0; animation:imxSheen 8s ease-in-out infinite; }
@keyframes imxSheen{ 0%{ background-position:210% 0; } 55%,100%{ background-position:-70% 0; } }

.clinic .mon{ position:absolute; left:68%; top:37%; width:28%; height:26%; pointer-events:none;
  border-radius:5px; mix-blend-mode:screen;
  background:radial-gradient(circle at 50% 45%, rgba(150,200,240,.30), rgba(150,200,240,0) 72%);
  animation:imxMon 3.6s ease-in-out infinite; }
@keyframes imxMon{ 0%,100%{ opacity:.25; } 50%{ opacity:.9; } }

.clinic .dscan{ position:absolute; left:15%; top:0; width:44%; height:54px; pointer-events:none; mix-blend-mode:screen;
  background:linear-gradient(180deg, rgba(150,205,245,0), rgba(150,205,245,.40) 48%, rgba(255,255,255,.7) 50%, rgba(150,205,245,.40) 52%, rgba(150,205,245,0));
  animation:imxDScan 6s ease-in-out infinite; }
@keyframes imxDScan{ 0%{ top:6%; opacity:0; } 12%{ opacity:1; } 50%{ top:62%; opacity:1; } 66%{ opacity:0; } 100%{ top:6%; opacity:0; } }

@media (prefers-reduced-motion: reduce){
  .clinic .ph,.clinic .sheen,.clinic .mon,.clinic .dscan{ animation:none !important; }
}
@media (max-width: 1040px){
  .hero .clinic{ margin:0 auto; max-width:620px; }
}

/* Escena de tarjetas dentro del bloque "Exámenes que realizamos" */
.exam-widget .exam-stage{ display:flex; align-items:center; justify-content:center; padding:24px 30px; }
.exam-widget .exam-stage .stage{ max-width:440px; margin:0 auto; }
@media (max-width: 1040px){
  .exam-widget .exam-stage{ padding:8px 16px 28px; }
}

/* ---------- Carrusel de imágenes ---------- */
.carousel { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--ring), var(--shadow-soft); background: #0c1014; }
.car-viewport { overflow: hidden; }
.car-track { display: flex; transition: transform .6s cubic-bezier(.4,.01,.2,1); }
.car-slide { position: relative; flex: 0 0 100%; aspect-ratio: 16 / 9; }
.car-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Fotos cuadradas/verticales: mostrar completas sobre fondo claro, sin recorte */
.car-slide.fit-contain { background: #f3f4f6; }
.car-slide.fit-contain img { object-fit: contain; }
.car-slide.fit-contain figcaption { color: var(--ink); background: linear-gradient(to top, rgba(243,244,246,.96), rgba(243,244,246,0)); text-shadow: none; }
.car-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 60px 28px 22px; color: #fff; font-size: 16px; font-weight: 600; letter-spacing: -.1px;
  background: linear-gradient(to top, rgba(8,12,16,.82), rgba(8,12,16,0));
}
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: var(--blue); cursor: pointer;
  box-shadow: 0 6px 18px rgba(8,12,16,.28); transition: background .15s, transform .15s;
}
.car-btn:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.car-btn svg { width: 22px; height: 22px; }
.car-prev { left: 18px; }
.car-next { right: 18px; }
.car-dots { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 3; display: flex; gap: 8px; justify-content: center; }
.car-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.42); cursor: pointer; transition: background .2s, width .2s; }
.car-dot.active { background: #fff; width: 26px; border-radius: 999px; }
/* Variante negatoscopio: radiografías completas sobre fondo oscuro */
.exam-carousel { background: radial-gradient(120% 90% at 50% 0%, #16242E 0%, #0A1016 70%); box-shadow: var(--ring), 0 26px 54px rgba(6,18,31,.28); }
.exam-carousel .car-slide { aspect-ratio: 51 / 50; background: #05090D; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.exam-carousel .car-slide .rx-bg { display: none; }
.exam-carousel .car-slide .rx-main { position: static; z-index: 1; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; object-position: center center; padding: 0; margin: 0; }
.exam-carousel .rx-label { position: absolute; left: 16px; top: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 15px; border-radius: 999px; background: rgba(10,20,30,.62); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(127,212,245,.4); color: #EAF8FF; font-size: 12.5px; font-weight: 700; letter-spacing: .2px; }
.exam-carousel .rx-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7FD4F5; box-shadow: 0 0 8px #7FD4F5; }
@media (max-width: 760px) { .exam-carousel .car-slide { aspect-ratio: 51 / 50; } }
@media (max-width: 760px){
  .car-slide { aspect-ratio: 4 / 3; }
  .car-btn { width: 40px; height: 40px; }
  .car-prev { left: 10px; } .car-next { right: 10px; }
  .car-slide figcaption { font-size: 14px; padding: 48px 18px 18px; }
}
