/* Dr. Gerardo Flores-Lima — rediseño.
   Mantiene la identidad del sitio original (tema oscuro, fondo zen, cian + azul petróleo, Open Sans)
   con un layout más ordenado. */

:root {
  --bg: #05070d;
  --bg-deep: #090a10;
  --panel: rgba(8, 11, 20, .78);
  --panel-solid: #0b0f1a;
  --line: #253b68;
  --line-soft: rgba(37, 59, 104, .55);
  --primary: #4f8a99;
  --primary-hi: #67a7b7;
  --cyan: #27cbf4;
  --text: #92a0af;
  --text-hi: #e6ebf0;
  --white: #fff;
  --wrap: 1180px;
  --gutter: 24px;
  --radius: 4px;
  --hdr: 84px;
  --hdr-stuck: 68px;
  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-stuck) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.7 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
svg { width: 1em; height: 1em; flex: none; }
a { color: var(--cyan); text-decoration: none; transition: color .2s; }
a:hover { color: var(--white); }
p { margin: 0 0 1.1em; }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--white); font-weight: 700; line-height: 1.25; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--white); color: #000; padding: 8px 14px; }
.skip-link:focus { left: 8px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 600px) { :root { --gutter: 18px; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: 0 22px; border-radius: var(--radius);
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background-color .25s, border-color .25s, color .25s;
}
.btn svg { font-size: 1.15em; }
.btn-solid { background: var(--primary); color: var(--white); }
.btn-solid:hover { background: var(--primary-hi); color: var(--white); }
.btn-outline { border-color: var(--primary); color: var(--white); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); color: var(--white); }

/* ---------- Encabezados de sección ---------- */
.eyebrow {
  margin: 0 0 .9em; color: var(--primary-hi); font-size: .72rem; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--primary); }
.sec-head { margin-bottom: 44px; max-width: 760px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head.center .eyebrow::after { content: ""; width: 28px; height: 2px; background: var(--primary); }
.sec-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 300; letter-spacing: .06em; text-transform: uppercase; color: var(--white); }
.sec-intro { margin: 0; }

/* ---------- Secciones y fondos ---------- */
.sec { position: relative; padding: clamp(64px, 9vw, 112px) 0; }
.zen { background: linear-gradient(rgba(5, 7, 13, .55), rgba(5, 7, 13, .7)), url("/assets/img/Fondo-Zen-Dr-Gerardo-Flores-Lima.jpg") center / cover fixed #000; }
@media (hover: none), (max-width: 900px) { .zen { background-attachment: scroll; } }
.deep { background: var(--bg-deep); border-top: 1px solid rgba(9, 31, 47, .9); border-bottom: 1px solid rgba(9, 31, 47, .9); }
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--hdr);
  background: linear-gradient(rgba(0, 0, 0, .65), rgba(0, 0, 0, 0));
  transition: height .3s var(--ease), background-color .3s, box-shadow .3s;
}
.is-stuck .site-header { height: var(--hdr-stuck); background: rgba(3, 4, 8, .92); box-shadow: 0 1px 0 var(--line-soft); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hdr-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.logo { flex: none; display: block; }
.logo img { height: calc(var(--hdr) - 14px); width: auto; transition: height .3s var(--ease); }
.is-stuck .logo img { height: calc(var(--hdr-stuck) - 10px); }
.main-nav { margin: 0 auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.nav-list a {
  position: relative; display: block; padding: 10px 14px; color: rgba(255, 255, 255, .82);
  font-size: .76rem; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.nav-list a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-list a:hover { color: var(--white); }
.nav-list a:hover::after, .nav-list a[aria-current]::after { transform: scaleX(1); }
.nav-list a[aria-current] { color: var(--white); font-weight: 600; }
.hdr-actions { display: flex; align-items: center; gap: 18px; }
.hdr-social { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.hdr-social a { display: grid; place-items: center; width: 32px; height: 32px; color: rgba(255, 255, 255, .7); font-size: 15px; }
.hdr-social a:hover { color: var(--cyan); }
.hdr-cta { min-height: 40px; padding: 0 16px; }
.menu-btn { display: none; background: none; border: 0; color: var(--white); font-size: 28px; padding: 8px; margin-right: -8px; cursor: pointer; }
@media (max-width: 1240px) { .hdr-social { display: none; } }
@media (max-width: 1080px) { .nav-list a { padding: 10px 10px; letter-spacing: .1em; } .nav-list a::after { left: 10px; right: 10px; } }
@media (max-width: 960px) {
  .main-nav, .hdr-cta { display: none; }
  .menu-btn { display: block; }
  .hdr-actions { margin-left: auto; }
  :root { --hdr: 72px; --hdr-stuck: 62px; }
}

/* Menú móvil */
.drawer { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .6); }
.drawer[hidden] { display: none; }
.drawer-panel {
  position: absolute; inset: 0 0 0 auto; width: min(380px, 100%); overflow-y: auto;
  background: linear-gradient(rgba(5, 7, 13, .92), rgba(5, 7, 13, .97)), url("/assets/img/Fondo-Zen-Dr-Gerardo-Flores-Lima.jpg") center / cover;
  border-left: 1px solid var(--line-soft); padding: 18px 24px 32px; display: flex; flex-direction: column;
  animation: drawer-in .35s var(--ease);
}
@keyframes drawer-in { from { transform: translateX(100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer-head img { height: 54px; width: auto; }
.drawer-close { background: none; border: 0; color: var(--white); font-size: 28px; padding: 8px; cursor: pointer; }
.drawer-nav { list-style: none; margin: 0 0 28px; padding: 0; }
.drawer-nav a {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 0;
  border-bottom: 1px solid var(--line-soft); color: var(--text-hi); font-size: 1rem; letter-spacing: .08em; text-transform: uppercase;
}
.drawer-nav a[aria-current] { color: var(--cyan); }
.drawer-nav a[aria-current]::after { content: ""; width: 22px; height: 2px; background: var(--primary); }
.drawer-contact { margin-top: auto; font-size: .88rem; }
.drawer-contact .btn { width: 100%; margin-bottom: 18px; }

/* Redes en círculo */
.social-round { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.social-round a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35); color: var(--white); font-size: 17px; transition: .25s;
}
.social-round a:hover { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* ---------- Hero (slideshow) ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 600px; max-height: 1100px; overflow: hidden; background: #000; color: var(--white); }
.h-slides, .h-slide, .h-shade { position: absolute; inset: 0; }
.h-slide {
  background: var(--img) var(--pos, 50% 50%) / cover no-repeat;
  opacity: 0; transform: scale(1.1); transition: opacity 1s var(--ease), transform 6s linear;
}
.h-slide.is-active { opacity: 1; transform: scale(1); }
.h-shade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .45) 45%, rgba(0, 0, 0, .1) 75%),
    linear-gradient(0deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, 0) 40%);
}
.h-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 150px; }
.h-msgs { position: relative; min-height: 2.6em; max-width: 720px; font-size: clamp(1.9rem, 4.4vw, 3.4rem); margin-bottom: 36px; }
.h-msg { position: absolute; left: 0; bottom: 0; margin: 0; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.h-msg.is-active { position: relative; opacity: 1; pointer-events: auto; }
.h-msg .w { display: inline-block; opacity: 0; }
.h-msg.is-active .w { animation: word-in .9s var(--ease) both; animation-delay: calc(.25s + var(--i) * 90ms); }
.h-msg cite { opacity: 0; }
.h-msg.is-active cite { animation: cite-in .8s var(--ease) both; animation-delay: calc(.35s + var(--i) * 90ms); }
@keyframes word-in {
  from { opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(8px); letter-spacing: .08em; }
  to { opacity: 1; transform: none; filter: blur(0); letter-spacing: .01em; }
}
@keyframes cite-in { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.h-eyebrow { animation: cite-in 1s var(--ease) .1s both; }
.h-msg p { margin: 0; font-weight: 300; line-height: 1.15; letter-spacing: .01em; text-shadow: 0 2px 20px rgba(0, 0, 0, .4); }
.h-msg cite { display: block; margin-top: .6em; font-size: .38em; font-style: italic; letter-spacing: .12em; color: var(--cyan); }
.h-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.h-badge { position: absolute; z-index: 2; top: calc(var(--hdr) + 26px); right: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); width: clamp(84px, 9vw, 120px); opacity: .9; }
.h-bar { position: absolute; z-index: 3; left: 0; right: 0; bottom: 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.h-dots { display: flex; gap: 18px; flex: 1; max-width: 560px; }
.h-dot { flex: 1; background: none; border: 0; padding: 8px 0; color: rgba(255, 255, 255, .55); cursor: pointer; text-align: left; font-size: .72rem; letter-spacing: .15em; }
.h-dot span { display: block; margin-bottom: 8px; }
.h-dot i { display: block; height: 2px; background: rgba(255, 255, 255, .25); position: relative; overflow: hidden; }
.h-dot i::after { content: ""; position: absolute; inset: 0; background: var(--cyan); transform: scaleX(0); transform-origin: left; }
.h-dot.is-done i::after { transform: scaleX(1); }
.h-dot.is-active { color: var(--white); }
.h-dot.is-active i::after { animation: h-progress var(--dur, 6.5s) linear forwards; }
.hero.is-paused .h-dot.is-active i::after { animation-play-state: paused; }
@keyframes h-progress { to { transform: scaleX(1); } }
.h-arrows { display: flex; gap: 10px; }
.h-arrows button {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); background: transparent;
  color: var(--white); font-size: 18px; display: grid; place-items: center; cursor: pointer; transition: .25s;
}
.h-arrows button:hover { background: var(--primary); border-color: var(--primary); }
@media (max-width: 700px) {
  .h-content { padding-bottom: 120px; }
  .h-arrows { display: none; }
  .h-dots { gap: 10px; max-width: none; }
  .h-dot span { display: none; }
  .h-badge { top: auto; bottom: auto; top: calc(var(--hdr) + 14px); }
  .h-shade { background: linear-gradient(0deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .35) 60%, rgba(0, 0, 0, .25) 100%); }
}

/* ---------- Doctor ---------- */
.doc-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.doc-photo { margin: 0; position: sticky; top: calc(var(--hdr-stuck) + 24px); }
.doc-photo img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; border-radius: var(--radius); }
.doc-photo::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--line); border-radius: var(--radius); z-index: -1; }
.doc-photo figcaption { margin-top: 26px; color: var(--white); font-weight: 600; letter-spacing: .04em; }
.doc-photo figcaption span { display: block; color: var(--text); font-weight: 400; font-size: .9rem; }
.doc-logo { width: 230px; margin-bottom: 26px; opacity: .9; }
.doc-text h1 { margin-bottom: .8em; }
.doc-text h1 span { display: block; color: var(--cyan); font-size: .62em; font-weight: 600; letter-spacing: .14em; margin-top: .5em; }
.lead { font-size: 1.08rem; font-weight: 300; color: var(--text-hi); }
.lead a { color: var(--cyan); }
.cred-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 18px; margin-top: 36px; }
.cred { padding: 26px; }
.cred h3 { color: var(--cyan); font-size: 1rem; letter-spacing: .06em; }
.cred p { margin: 0; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); line-height: 1.5; }
.checks li:last-child { border-bottom: 0; padding-bottom: 0; }
.checks svg { color: var(--cyan); margin-top: .3em; }
@media (max-width: 900px) {
  .doc-grid { grid-template-columns: 1fr; }
  .doc-photo { position: relative; top: 0; max-width: 460px; }
  .cred-grid { grid-template-columns: 1fr; }
}

/* ---------- Pestañas ---------- */
.tab-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin: 0 auto 40px; border-bottom: 1px solid var(--line-soft); max-width: 760px; }
.tab-list button {
  position: relative; background: none; border: 0; padding: 14px 22px; cursor: pointer;
  color: var(--text); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
}
.tab-list button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--primary); transform: scaleX(0); transition: transform .3s var(--ease); }
.tab-list button:hover { color: var(--white); }
.tab-list button[aria-selected="true"] { color: var(--white); font-weight: 600; }
.tab-list button[aria-selected="true"]::after { transform: scaleX(1); }
.tab-panel[hidden] { display: none; }
.tab-panel { animation: fade-in .45s var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 600px) { .tab-list { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .tab-list button { padding: 12px 14px; white-space: nowrap; } }

.pub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pub { display: flex; gap: 22px; padding: 22px; align-items: flex-start; }
.pub img { width: 92px; flex: none; box-shadow: 0 8px 22px rgba(0, 0, 0, .5); }
.pub h3 { font-size: 1.02rem; }
.pub-links { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.pub-links li + li { margin-top: .6em; }
.pub-links a { color: var(--text); border-bottom: 1px solid var(--line); }
.pub-links a:hover { color: var(--white); border-color: var(--cyan); }
.press { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 18px; }
.press figure { margin: 0; padding: 18px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.press img { width: 100%; }
.press figure:last-child img { max-width: 344px; margin: auto; }
.press figcaption { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text); text-align: center; }
.exp { display: grid; grid-template-columns: 180px 1fr; gap: 40px; max-width: 980px; margin: 0 auto; align-items: start; }
.exp-img { width: 100%; }
.exp-text p { text-align: left; }
.exp-text p:first-child { font-size: 1.08rem; color: var(--text-hi); font-weight: 300; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play { position: absolute; inset: 0; border: 0; padding: 0; background: #000; cursor: pointer; }
.yt-thumb { position: absolute; inset: 0; background: center / cover; opacity: .75; transition: opacity .3s, transform .5s var(--ease); }
.yt-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: rgba(79, 138, 153, .9); color: var(--white); font-size: 24px; transition: background-color .25s; }
.yt-play:hover .yt-thumb { opacity: 1; transform: scale(1.04); }
.yt-play:hover .yt-btn { background: var(--primary-hi); }
.assoc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 980px; margin: 0 auto; }
.assoc { display: flex; align-items: center; gap: 20px; padding: 20px 22px; color: var(--text-hi); transition: border-color .25s, background-color .25s; }
.assoc:hover { border-color: var(--primary); color: var(--white); }
.assoc-logo { flex: none; width: 84px; height: 84px; display: grid; place-items: center; background: rgba(255, 255, 255, .04); border-radius: var(--radius); padding: 8px; }
.assoc-logo img { max-height: 68px; width: auto; }
.assoc small { display: block; color: var(--text); }
@media (max-width: 900px) {
  .pub-grid, .assoc-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .press { grid-template-columns: 1fr; }
  .exp { grid-template-columns: 1fr; gap: 24px; } .exp-img { width: 140px; }
}
@media (max-width: 600px) { .video-grid { grid-template-columns: 1fr; } .pub { padding: 18px; gap: 16px; } .pub img { width: 70px; } }

/* ---------- Servicios ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.svc { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: border-color .3s, transform .3s var(--ease); }
.svc:hover { border-color: var(--primary); transform: translateY(-4px); color: var(--text); }
.svc-img { overflow: hidden; display: block; }
.svc-img img { width: 100%; aspect-ratio: 8 / 3.4; object-fit: cover; transition: transform .6s var(--ease); }
.svc:hover .svc-img img { transform: scale(1.06); }
.svc-body { padding: 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.svc-title { color: var(--white); font-size: 1.05rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.svc-text { flex: 1; }
.svc-more { display: inline-flex; align-items: center; gap: 8px; color: var(--cyan); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.svc:hover .svc-more svg { transform: translateX(4px); }
.svc-more svg { transition: transform .3s; }
@media (max-width: 900px) { .svc-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }

/* ---------- Instalaciones ---------- */
.fac-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fac-item { aspect-ratio: 4 / 3; }
.fac-item, .g-item { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: #000; }
.fac-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; }
.zoom-ic { position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: var(--white); opacity: 0; transform: translateY(6px); transition: .3s; }
.fac-item:hover img, .g-item:hover img { transform: scale(1.05); }
.fac-item:hover .zoom-ic, .g-item:hover .zoom-ic, .fac-item:focus-visible .zoom-ic, .g-item:focus-visible .zoom-ic { opacity: 1; transform: none; }
@media (max-width: 900px) { .fac-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ---------- Franja de contacto ---------- */
.cta-band {
  position: relative; padding: 64px 0;
  background: linear-gradient(90deg, rgba(19, 52, 97, .82), rgba(5, 7, 13, .9)), url("/assets/img/Fondo-Zen-Dr-Gerardo-Flores-Lima.jpg") center / cover;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(1.25rem, 2.2vw, 1.7rem); font-weight: 300; margin-bottom: .3em; }
.cta-inner p:last-child { margin: 0; color: var(--text-hi); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Encabezado de página interna ---------- */
.page-hero {
  position: relative; min-height: 440px; display: flex; align-items: flex-end;
  padding: calc(var(--hdr) + 60px) 0 56px; color: var(--white);
  background: linear-gradient(0deg, rgba(5, 7, 13, 1) 0%, rgba(19, 52, 97, .55) 55%, rgba(0, 0, 0, .55) 100%), var(--img) var(--pos, 50% 50%) / cover no-repeat;
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 300; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .3em; }
.page-hero p { max-width: 620px; color: var(--text-hi); font-size: 1.05rem; margin: 0; }
.page-hero .count { margin-top: 16px; color: var(--cyan); font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; font-weight: 600; }
.crumbs { display: flex; gap: 10px; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; color: var(--text); }
.crumbs a { color: var(--text); }
.crumbs a:hover { color: var(--white); }
.crumbs [aria-current] { color: var(--cyan); }
@media (max-width: 600px) { .page-hero { min-height: 340px; padding-bottom: 40px; } }

/* ---------- Procedimientos ---------- */
.proc-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.toc { position: sticky; top: calc(var(--hdr-stuck) + 24px); }
.toc-box { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.toc-box summary {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 18px 22px; cursor: default;
  color: var(--white); font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; border-bottom: 1px solid var(--line-soft);
}
.toc-box summary::-webkit-details-marker { display: none; }
.toc-box summary span { margin-left: auto; color: var(--cyan); }
.toc-box summary svg { display: none; }
.toc-list { list-style: none; margin: 0; padding: 10px 0 14px; max-height: calc(100vh - var(--hdr-stuck) - 140px); overflow-y: auto; }
.toc-group > a { display: block; padding: 12px 22px 6px; color: var(--cyan); font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.toc-group ul { list-style: none; margin: 0; padding: 0; }
.toc-group li a {
  display: block; padding: 6px 22px 6px 20px; border-left: 2px solid transparent; color: var(--text); font-size: .88rem; line-height: 1.4;
  transition: color .2s, border-color .2s, background-color .2s;
}
.toc-group li a:hover { color: var(--white); }
.toc-group li a.is-current { color: var(--white); border-left-color: var(--primary); background: rgba(79, 138, 153, .12); }
.toc-art { margin-top: 26px; display: flex; justify-content: center; }
.toc-art img { width: 75%; opacity: .85; }
.proc-group + .proc-group { margin-top: 56px; }
.group-title { display: flex; align-items: center; gap: 18px; margin: 0 0 22px; font-size: .82rem; letter-spacing: .26em; text-transform: uppercase; color: var(--cyan); font-weight: 600; }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.group-title small { order: 2; color: var(--text); font-size: .72rem; letter-spacing: .14em; font-weight: 400; }
.proc { padding: clamp(24px, 3vw, 36px); }
.proc + .proc { margin-top: 18px; }
.proc header { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.proc-num { color: var(--primary-hi); font-size: .8rem; font-weight: 600; letter-spacing: .12em; }
.proc h3 { margin: 0; font-size: clamp(1.1rem, 1.8vw, 1.3rem); font-weight: 600; color: var(--white); }
.proc-body p:last-child { margin-bottom: 0; }
.proc-body strong { color: var(--text-hi); }
@media (max-width: 960px) {
  .proc-layout { grid-template-columns: 1fr; }
  .toc { position: relative; top: 0; }
  .toc-box summary { cursor: pointer; }
  .toc-box summary svg { display: block; transition: transform .3s; }
  .toc-box[open] summary svg { transform: rotate(180deg); }
  .toc-box summary span { margin-left: auto; }
  .toc-list { max-height: none; columns: 2; column-gap: 0; }
  .toc-group { break-inside: avoid; }
  .toc-art { display: none; }
}
@media (max-width: 600px) { .toc-list { columns: 1; } }

/* ---------- Galería ---------- */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 48px; position: sticky; top: calc(var(--hdr-stuck) + 10px); z-index: 10; padding: 12px; background: rgba(5, 7, 13, .85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--line-soft); border-radius: 40px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 30px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--text-hi);
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; transition: .25s;
}
.chip span { color: var(--cyan); font-weight: 600; }
.chip:hover { border-color: var(--primary); color: var(--white); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--white); }
.chip[aria-pressed="true"] span { color: var(--white); }
@media (max-width: 700px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; border-radius: var(--radius); scrollbar-width: none; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); border-left: 0; border-right: 0; border-radius: 0; }
  .chip { white-space: nowrap; }
}
.g-block + .g-block { margin-top: 56px; }
.g-block[hidden] { display: none; }
.g-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.g-item { border: 1px solid var(--line-soft); }
.g-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s var(--ease); }
@media (max-width: 1000px) { .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(2, 3, 6, .95); display: flex; align-items: center; justify-content: center; padding: 60px 70px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.lightbox figcaption { color: var(--text-hi); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .2); color: var(--white); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; cursor: pointer; transition: .25s; }
.lightbox button:hover { background: var(--primary); border-color: var(--primary); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox { padding: 70px 10px; } .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; } .lb-prev { left: calc(50% - 58px); } .lb-next { right: calc(50% - 58px); } }

/* ---------- Footer ---------- */
.site-footer { background: rgb(9, 9, 15); color: var(--text); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.5fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.f-logo img { width: 210px; margin-bottom: 16px; }
.f-badge { display: flex; align-items: center; gap: 12px; margin-top: 18px; color: var(--text-hi); font-size: .82rem; line-height: 1.3; }
.f-badge img { width: 56px; }
.f-badge small { color: var(--text); }
.f-title { color: var(--white); font-size: .74rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 18px; }
.f-nav { list-style: none; margin: 0; padding: 0; }
.f-nav li + li { margin-top: 10px; }
.f-nav a { color: var(--text); }
.f-nav a:hover, .f-nav a[aria-current] { color: var(--white); }
.f-contact { list-style: none; margin: 0; padding: 0; }
.f-contact li { display: flex; gap: 12px; line-height: 1.55; }
.f-contact li + li { margin-top: 14px; }
.f-contact svg { color: var(--cyan); margin-top: .3em; }
.f-contact a { color: var(--text-hi); }
.f-contact a:hover { color: var(--cyan); }
.f-bottom { border-top: 1px solid rgba(255, 255, 255, .06); background: #000; padding: 18px 0; font-size: .8rem; color: rgba(255, 255, 255, .45); }
.f-bottom p { margin: 0; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(5, 7, 13, .85); border: 1px solid var(--line); color: var(--white);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: .3s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* ---------- Animación de entrada ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
