/* =========================================================================
   MEDITEK · Capa "cinematográfica" (rediseño visual, 100% aditiva)
   -------------------------------------------------------------------------
   Se carga AL FINAL, después de styles.css, premium.css, promo-specialties.css
   y team.css. No cambia contenido, enlaces, IDs ni datos: solo la presentación.
   Identidad conservada: negro, grafito, plata y turquesa. Logotipo oficial intacto.
   Idea central: una sala a oscuras con tres "ventanas" de luz, una por
   especialidad. Es lo único espectacular de la página; el resto es sobrio.
   ========================================================================= */

:root{
  --display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.16);
  --pad-x: clamp(20px, 4vw, 64px);
  --wide: 1320px;
}

/* ---------- Tipografía: serifa de gran formato, ligera ---------- */
h1, h2, .section-title{
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: -.022em;
  line-height: 1.04;
  text-wrap: balance;
}
.section-title{
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  margin-top: 18px;
}
.section-text{ font-size: 1.06rem; line-height: 1.75; }
.eyebrow{
  text-transform: none;
  letter-spacing: .06em;
  font-size: .85rem;
  font-weight: 500;
  color: var(--c-turquoise);
}
.eyebrow::before{ width: 34px; background: linear-gradient(90deg, var(--c-turquoise), transparent); }
.section{ padding: clamp(88px, 11vw, 150px) 0; }

/* Línea de luz entre secciones */
.section + .section::before{
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: min(880px, 82%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

/* ---------- Barra de progreso de lectura ---------- */
.scroll-progress{
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  z-index: 300;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--c-turquoise-muted), var(--c-turquoise));
  pointer-events: none;
}

/* ---------- Encabezado: transparente arriba, cristal al desplazarse ---------- */
.site-header{
  background: linear-gradient(180deg, rgba(6,7,8,0.78), rgba(6,7,8,0));
  border-bottom-color: transparent;
  backdrop-filter: none;
}
.site-header.is-scrolled{
  background: rgba(6,7,8,0.82);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: rgba(94,234,212,0.12);
}
.main-nav a{ font-size: .88rem; letter-spacing: .01em; }
.header-actions .btn--primary{ padding: 12px 22px; }

/* ---------- Botones: pastilla con luz ---------- */
.btn{ border-radius: 999px; letter-spacing: .01em; }
.btn--outline{
  border-color: var(--line-strong);
  background: rgba(255,255,255,0.02);
}
.btn--outline:hover{ border-color: rgba(94,234,212,0.55); background: rgba(94,234,212,0.07); }

/* =========================================================================
   PORTADA: tríptico de especialidades
   ========================================================================= */
.hero--triptych{
  display: grid;
  grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr);
  align-items: center;
  gap: clamp(28px, 4.5vw, 72px);
  min-height: 100svh;
  padding: calc(var(--header-h) + 28px) max(var(--pad-x), calc((100vw - var(--wide)) / 2)) 56px;
}
.hero--triptych .hero-inner{
  text-align: left;
  margin: 0;
  max-width: 600px;
  padding: 0;
  position: relative;
  z-index: 2;
}
.hero--triptych .hero-logo{ display: none; } /* el logotipo oficial sigue en el encabezado y el pie; sin repetirlo aquí */
.hero--triptych .hero-tagline{
  text-transform: none;
  letter-spacing: .04em;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 20px;
}
.hero--triptych h1{
  font-size: clamp(2.2rem, 3.9vw, 3.9rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -.026em;
}
.hero--triptych p.hero-desc{
  margin: 26px 0 0;
  max-width: 46ch;
  font-size: 1.1rem;
  line-height: 1.7;
}
.hero--triptych .hero-actions{ justify-content: flex-start; margin-top: 38px; }
.hero--triptych .hero-scroll{ align-items: flex-start; margin-top: 44px; }

/* Tres ventanas verticales; la que recibe el cursor o el foco se abre */
.hero-panels{
  display: flex;
  gap: 12px;
  height: min(74svh, 700px);
  min-height: 460px;
  position: relative;
  z-index: 2;
}
.hero-panel{
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  background: var(--c-graphite);
  transition: flex-grow .9s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
  display: block;
}
.hero-panels:hover .hero-panel,
.hero-panels:focus-within .hero-panel{ flex-grow: .8; }
.hero-panels .hero-panel:hover,
.hero-panels .hero-panel:focus-visible{
  flex-grow: 3;
  border-color: rgba(94,234,212,0.45);
  box-shadow: 0 30px 80px -30px rgba(94,234,212,0.28);
}
.hero-panel > img{
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center right;
  transform: scale(1.12);
  filter: saturate(.92) brightness(.88);
  transition: transform 1.6s var(--ease), filter .8s var(--ease);
}
.hero-panel:nth-child(1) > img{ object-position: 60% 40%; }
.hero-panel:nth-child(2) > img{ object-position: 68% 50%; }
.hero-panel:nth-child(3) > img{ object-position: 72% 38%; }
.hero-panel:hover > img,
.hero-panel:focus-visible > img{ transform: scale(1.02); filter: saturate(1) brightness(1); }
.hero-panel::after{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(6,7,8,0.05) 28%, rgba(6,7,8,0.88) 100%);
  pointer-events: none;
}
.hero-panel-label{
  position: absolute;
  left: 22px; right: 22px; bottom: 22px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-panel-name{
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.15rem, 1.7vw, 1.6rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--c-white);
}
.hero-panel-cta{
  font-size: .82rem;
  color: var(--c-turquoise);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.hero-panel:hover .hero-panel-cta,
.hero-panel:focus-visible .hero-panel-cta{ opacity: 1; transform: none; }
.hero-panel .img-caption{
  position: absolute;
  top: 14px; left: 16px; bottom: auto;
  z-index: 2;
  font-size: .62rem;
  color: rgba(255,255,255,0.6);
}

/* Secuencia de entrada única (una sola vez, al cargar) */
@keyframes panelRise{
  from{ opacity: 0; transform: translateY(46px); clip-path: inset(18% 0 0 0 round 22px); }
  to{ opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 22px); }
}
@keyframes heroFade{
  from{ opacity: 0; transform: translateY(22px); }
  to{ opacity: 1; transform: none; }
}
.hero-panel{ animation: panelRise 1.3s var(--ease) both; }
.hero-panel:nth-child(1){ animation-delay: .25s; }
.hero-panel:nth-child(2){ animation-delay: .42s; }
.hero-panel:nth-child(3){ animation-delay: .59s; }
.hero--triptych .hero-tagline,
.hero--triptych h1,
.hero--triptych p.hero-desc,
.hero--triptych .hero-actions{ animation: heroFade 1.1s var(--ease) both; }
.hero--triptych .hero-tagline{ animation-delay: .35s; }
.hero--triptych h1{ animation-delay: .5s; }
.hero--triptych p.hero-desc{ animation-delay: .68s; }
.hero--triptych .hero-actions{ animation-delay: .82s; }

/* Luz de proyector sobre el fondo de la portada */
.hero--triptych .hero-bg{
  background:
    radial-gradient(700px 520px at 72% 46%, rgba(94,234,212,0.11), transparent 62%),
    radial-gradient(520px 360px at 8% 96%, rgba(94,234,212,0.06), transparent 60%),
    linear-gradient(160deg, #060708 0%, #0b0e11 50%, #060708 100%);
}

/* =========================================================================
   ESPECIALIDADES: filas editoriales a gran formato
   ========================================================================= */
.specialties-grid{
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 56px);
  max-width: var(--wide);
  margin: 0 auto;
}
.spec-card{
  flex-direction: row;
  align-items: stretch;
  min-height: 380px;
  border-radius: 28px;
  background: linear-gradient(120deg, var(--c-graphite) 0%, var(--c-black-deep) 100%);
}
.spec-card:nth-child(even){ flex-direction: row-reverse; }
.spec-card:hover{ transform: none; box-shadow: 0 40px 90px -40px rgba(94,234,212,0.2); }
.spec-card .img-frame{
  flex: 1.25 1 0;
  aspect-ratio: auto;
  min-height: 320px;
  border: none;
  border-radius: 0;
}
.spec-card .img-frame img{ object-position: center right; transform: scale(1.04); transition: transform 1.4s var(--ease); }
.spec-card:hover .img-frame img{ transform: scale(1.1); }
.spec-card .img-frame::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 55%, rgba(11,13,16,0.9) 100%);
  pointer-events: none;
}
.spec-card:nth-child(even) .img-frame::after{ background: linear-gradient(270deg, transparent 55%, rgba(11,13,16,0.9) 100%); }
.spec-card .img-caption{ z-index: 2; }
.spec-card-body{
  flex: 1 1 0;
  justify-content: center;
  padding: clamp(28px, 4vw, 64px);
  gap: 18px;
}
.spec-card-body h3{
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -.02em;
  line-height: 1.08;
}
.spec-card-body p{ font-size: 1.02rem; line-height: 1.75; flex: 0 1 auto; max-width: 44ch; }
.spec-card-body .btn{ margin-top: 10px; }

/* =========================================================================
   PROMOCIONES: tarjetas tipo cartel
   ========================================================================= */
.promo-cat-grid{ gap: 24px; max-width: var(--wide); margin-left: auto; margin-right: auto; }
/* Los carteles de promoción ya traen su propio texto: se muestran completos
   en la parte superior y el nombre/botón van debajo, sin superponerse. */
.promo-cat-card{
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, var(--c-graphite) 0%, var(--c-black-deep) 100%);
}
.promo-cat-card .img-frame{
  aspect-ratio: 4 / 5 !important;
  border: none !important;
  border-radius: 0;
}
.promo-cat-card .img-frame img{ object-fit: cover; object-position: center top; transition: transform 1.4s var(--ease); }
.promo-cat-card:hover .img-frame img{ transform: scale(1.04); }
.promo-cat-body{ padding: 24px 26px 28px; position: relative; flex: 1 1 auto; }
.promo-cat-body h3{
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.6rem, 2.3vw, 2.15rem);
  letter-spacing: -.015em;
}
.promo-cat-body p{ flex: 0 1 auto; }

/* Panel de promociones: el cartel se ve completo, sin recortes */
.promo-spec-item .img-frame{ aspect-ratio: auto; background: var(--c-black-deep); }
.promo-spec-item .img-frame img{ width: 100%; height: auto; object-fit: contain; }
.promo-spec-item .btn--wa{ text-align: center; justify-content: center; }
.promo-spec-item-body h4{ font-family: var(--display); font-weight: 400; font-size: 1.25rem; }

/* =========================================================================
   EQUIPO
   ========================================================================= */
.team-grid{ gap: clamp(20px, 2.6vw, 36px); max-width: var(--wide); margin: 0 auto; }
.team-card{
  max-width: none;
  border-radius: 26px;
  background: linear-gradient(180deg, var(--c-graphite) 0%, var(--c-black-deep) 100%);
  text-align: left;
}
.team-card:hover{ transform: translateY(-4px); }
.team-card .img-frame{ margin-bottom: 0; position: relative; }
.team-card .img-frame::after{
  content: "";
  position: absolute; inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, #12151a);
  pointer-events: none;
}
.team-card h3, .team-card .role{ padding: 0; }
.team-fiche{ padding: 0 24px 26px; text-align: left; }
.team-fiche-name{
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.15;
  letter-spacing: -.01em;
}

/* =========================================================================
   Tarjetas de servicio y portadas de las páginas de especialidad
   ========================================================================= */
.page-hero{
  padding: calc(var(--header-h) + 96px) 0 110px;
  background:
    radial-gradient(760px 460px at 82% 8%, rgba(94,234,212,0.12), transparent 62%),
    radial-gradient(520px 320px at 4% 100%, rgba(94,234,212,0.05), transparent 60%),
    linear-gradient(160deg, #060708 0%, #0b0e11 55%, #060708 100%);
}
.page-hero h1{
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  font-weight: 300;
  line-height: 1.02;
  max-width: 18ch;
}
.page-hero p{ font-size: 1.1rem; line-height: 1.75; }
.img-frame--hero{
  border-radius: 28px;
  border-color: var(--line-strong);
  box-shadow: 0 50px 100px -50px rgba(94,234,212,0.3);
}
.service-block-head h2, .service-block-head .section-title{ font-size: clamp(1.8rem, 3.2vw, 2.7rem); }
.service-card{
  border-radius: 22px;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.service-card:hover{ border-color: rgba(94,234,212,0.32); box-shadow: 0 28px 60px -32px rgba(94,234,212,0.22); }
.cta-box{ border-radius: 28px; padding: clamp(32px, 5vw, 64px); }
.cta-box h2{ font-size: clamp(1.8rem, 3.4vw, 2.8rem); }

/* =========================================================================
   Contacto, pagos, pie
   ========================================================================= */
.contact-card{ border-radius: 26px; background: linear-gradient(180deg, var(--c-graphite) 0%, var(--c-black-deep) 100%); }
.map-wrap{ border-radius: 26px; }
.contact-card h3{ font-family: var(--display); font-weight: 400; font-size: 1.5rem; }

/* Foco de luz que sigue al cursor sobre las tarjetas (lo activa cinematic.js) */
.has-spot{ position: relative; }
.has-spot > .spot-layer{
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s var(--ease);
  background: radial-gradient(380px circle at var(--sx, 50%) var(--sy, 50%), rgba(94,234,212,0.12), transparent 65%);
  mix-blend-mode: screen;
}
.has-spot:hover > .spot-layer{ opacity: 1; }

/* =========================================================================
   Responsivo
   ========================================================================= */
@media (max-width: 1024px){
  .hero--triptych{
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: calc(var(--header-h) + 36px);
  }
  .hero--triptych .hero-inner{ max-width: 680px; }
  .hero-panels{ height: min(56svh, 520px); }
  .spec-card, .spec-card:nth-child(even){ flex-direction: column; min-height: 0; }
  .spec-card .img-frame{ flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .spec-card .img-frame::after,
  .spec-card:nth-child(even) .img-frame::after{ background: linear-gradient(180deg, transparent 55%, rgba(11,13,16,0.9) 100%); }
}
@media (max-width: 640px){
  .hero--triptych{ padding-left: 20px; padding-right: 20px; gap: 32px; padding-bottom: 40px; }
  .hero--triptych h1{ font-size: clamp(2.15rem, 9.6vw, 2.9rem); }
  /* En móvil las tres ventanas se apilan como bandas */
  .hero-panels{ flex-direction: column; height: auto; min-height: 0; gap: 10px; }
  .hero-panel, .hero-panels .hero-panel:hover, .hero-panels:hover .hero-panel{
    flex: none; height: 128px; border-radius: 18px;
  }
  .hero-panel .img-caption{ display: none; }
  .hero-panel-cta{ opacity: 1; transform: none; }
  .hero-panel-label{ left: 18px; bottom: 16px; }
  .section-title{ font-size: clamp(1.9rem, 8.6vw, 2.6rem); }
  .page-hero{ padding: calc(var(--header-h) + 56px) 0 72px; }
  .spec-card-body{ padding: 26px 22px 30px; }
}

@media (hover: none){
  .hero-panel-cta{ opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce){
  .hero-panel, .hero--triptych .hero-tagline, .hero--triptych h1,
  .hero--triptych p.hero-desc, .hero--triptych .hero-actions{ animation: none; }
  .hero-panel, .hero-panel > img, .spec-card .img-frame img, .promo-cat-card .img-frame img{ transition: none; }
  .scroll-progress{ display: none; }
}

/* Pagos para familiares en EE. UU.: texto alineado a la izquierda, sin sangría heredada */
#pago-eu p{ margin-left: 0; margin-right: 0; }
#pago-eu h3{ font-family: var(--display); font-weight: 400; font-size: 1.7rem !important; letter-spacing: -.01em; }

@media (max-width: 640px){
  .hero--triptych .hero-scroll{ display: none; }
}

/* Cartel cuadrado de Traumatología dentro de la tarjeta 4:5: conserva el logotipo completo */
.promo-cat-card:nth-child(3) .img-frame img{ object-position: 100% 50%; }
