/* ============================================================
   Dr. Antonio García — site.css
   Componentes del sitio multipágina ES/EN. Se carga después de
   styles.css y reutiliza sus tokens (--black, --yellow, --bronze…).
   ============================================================ */

/* ── Accesibilidad ─────────────────────────────────────────── */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--black); color: #fff; padding: 10px 16px; border-radius: 6px;
  font-weight: 700; font-size: .85rem; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, video:focus-visible {
  outline: 3px solid var(--yellow); outline-offset: 3px;
}
main { display: block; }
/* Los atributos width/height evitan saltos de layout; la altura real la decide el CSS */
:where(img, video) { height: auto; }
#contenido { scroll-margin-top: calc(var(--nav-h) + 12px); }
section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

/* ── Vista previa: pendientes ──────────────────────────────── */
.preview-flag {
  position: fixed; left: 12px; bottom: 12px; z-index: 950; max-width: 340px;
  background: #fff3b0; color: #5a4700; border: 1px solid #e0c200; border-radius: 8px;
  padding: 8px 12px; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
}
mark.todo { background: #fff3b0; color: inherit; outline: 2px dashed #d4b100; outline-offset: 2px; border-radius: 3px; }
mark.todo-note { display: inline-block; font-size: .72rem; font-weight: 700; color: #5a4700; padding: 2px 8px; margin: 4px 0; font-style: normal; letter-spacing: 0; text-transform: none; }

/* ── Navegación ────────────────────────────────────────────── */
.nav-links { gap: 26px; }
.nav-links a[aria-current="page"] { color: var(--black); }
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-dd { position: relative; }
.nav-dd-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gray); padding: 8px 0;
}
.nav-dd-btn svg { transition: transform .2s ease; }
.nav-dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: calc(100% + 10px); left: -18px; min-width: 290px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(10,58,90,.08); padding: 8px;
  display: none; flex-direction: column;
}
.nav-dd.open .nav-dd-menu { display: flex; }
.nav-dd-menu a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
  font-size: .86rem; font-weight: 600; color: var(--black); letter-spacing: 0; text-transform: none;
}
.nav-dd-menu a::after { display: none !important; }
.nav-dd-menu a:hover, .nav-dd-menu a[aria-current="page"] { background: var(--off-white); }
.nav-dd-menu svg { color: #1a8c8c; flex-shrink: 0; }
.lang-switch {
  font-size: .78rem; font-weight: 800; letter-spacing: .08em; color: var(--black);
  border: 1.5px solid rgba(10,58,90,.25); border-radius: 6px; padding: 6px 10px; line-height: 1;
}
.lang-switch:hover { background: var(--off-white); }
#navMobile { max-height: calc(100vh - var(--nav-h)); overflow-y: auto; }
#navMobile .m-group {
  font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bronze); padding: 16px 0 4px;
}
#navMobile .m-sub a { padding: 10px 0 10px 14px; font-size: .84rem; text-transform: none; letter-spacing: 0; }
#nav .wrap { max-width: 1320px; }
.nav-right { gap: 12px; }
.nav-right .nav-cta { padding: 12px 20px; }
@media (min-width: 901px) { #nav .brand-tag { display: none; } }
@media (min-width: 901px) and (max-width: 1100px) {
  .nav-links, .nav-right .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}
@media (min-width: 1101px) and (max-width: 1260px) {
  .nav-links { gap: 16px; }
  .nav-links a, .nav-dd-btn { font-size: .72rem; letter-spacing: .04em; }
}
@media (max-width: 900px) {
  .nav-right .nav-cta { display: none; }
}

/* ── Hero de inicio ────────────────────────────────────────── */
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.82); font-size: .86rem; }
.hero-facts svg { color: var(--yellow); flex-shrink: 0; }
.hero-facts a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.hero-portrait picture { display: block; position: relative; z-index: 1; }
.intro-text { font-size: 1.02rem; line-height: 1.75; color: var(--gray); margin-bottom: 26px; }
.benefit-text h3 { font-size: .95rem; font-weight: 700; color: var(--black); margin-bottom: 4px; line-height: 1.35; }
.why-media picture, .why-media img { width: 100%; height: 100%; object-fit: cover; }

/* ── Tarjetas de servicio ──────────────────────────────────── */
.svc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.svc-card {
  display: flex; flex-direction: column; background: #fff; border-radius: 14px; padding: 26px 24px;
  border: 1px solid rgba(10,58,90,.08); border-top: 3px solid var(--yellow);
  box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition);
}
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.svc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.svc-tag {
  font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--bronze); border: 1px solid rgba(201,168,76,.5); border-radius: 99px; padding: 4px 10px;
}
.svc-card h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.25rem; color: var(--black); margin-bottom: 10px; line-height: 1.25; }
.svc-card p { font-size: .88rem; color: var(--gray); line-height: 1.65; flex: 1; }
.svc-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: .8rem; font-weight: 800; letter-spacing: .04em; color: #12707a; }
.svc-card:hover .svc-more svg { transform: translateX(3px); }
.svc-more svg { transition: transform var(--transition); }
@media (max-width: 960px) { .svc-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .svc-cards { grid-template-columns: 1fr; } }

/* ── Doctor + video ────────────────────────────────────────── */
.doc-video { margin: 0 auto; max-width: 340px; }
.doc-video video {
  display: block; width: 100%; aspect-ratio: 9 / 16; height: auto; border-radius: 18px; background: #0a2b42;
  box-shadow: var(--shadow-lg); object-fit: cover;
}
.doc-video figcaption { font-size: .76rem; color: var(--gray-lt); margin-top: 10px; line-height: 1.5; text-align: center; }
.home-doctor .doctorbio-grid { grid-template-columns: 0.7fr 1.3fr; }
.doctorbio-quote p + p { margin-top: 12px; }
.video-split { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 52px; align-items: center; }
@media (max-width: 900px) {
  .home-doctor .doctorbio-grid, .video-split { grid-template-columns: 1fr; gap: 32px; }
}

/* ── Proceso (4 pasos) ─────────────────────────────────────── */
.journey-steps.journey-4 { grid-template-columns: repeat(4, 1fr); list-style: none; }
.journey-step h3 { font-size: .98rem; font-weight: 700; color: #fff; margin-bottom: 8px; line-height: 1.3; }
.journey-step p { font-size: .84rem; }
@media (max-width: 900px) { .journey-steps.journey-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .journey-steps.journey-4 { grid-template-columns: 1fr; } }

/* ── Obesity Makeover ──────────────────────────────────────── */
.om-band { background: linear-gradient(135deg, #f4fbfb 0%, #fff 60%); padding: 72px 0; border-top: 1px solid rgba(10,58,90,.06); border-bottom: 1px solid rgba(10,58,90,.06); }
.om-inner { display: grid; grid-template-columns: 0.6fr 1.4fr; gap: 44px; align-items: center; }
.om-logo { background: #fff; border-radius: 16px; padding: 22px; box-shadow: var(--shadow-sm); }
.om-logo img { width: 100%; height: auto; }
.om-band p { color: var(--gray); line-height: 1.7; }
.om-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.om-compact { padding: 26px 0; }
.om-compact .om-inner { grid-template-columns: 180px 1fr; gap: 28px; }
.om-compact .om-logo { padding: 12px; }
.om-compact p { font-size: .92rem; }
@media (max-width: 760px) {
  .om-inner, .om-compact .om-inner { grid-template-columns: 1fr; gap: 20px; }
  .om-logo { max-width: 260px; }
  .om-compact .om-logo { max-width: 180px; }
}

/* ── Páginas internas ──────────────────────────────────────── */
.page-hero {
  background:
    radial-gradient(circle at 85% 10%, rgba(77,212,212,.16), transparent 45%),
    linear-gradient(120deg, #08283f 0%, #0A3A5A 60%, #0d4a72 100%);
  color: #fff; padding: calc(var(--nav-h) + 36px) 0 64px;
}
.page-hero-slim { padding-bottom: 52px; }
.page-hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 48px; align-items: center; }
.page-title {
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700; color: #fff;
  font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.15; margin-bottom: 18px;
}
.h1-sub { display: block; font-size: .5em; color: rgba(255,255,255,.7); margin-top: 6px; }
.page-intro p, .page-intro-line { color: rgba(255,255,255,.85); font-size: 1.04rem; line-height: 1.7; max-width: 640px; }
.page-intro p + p { margin-top: 12px; }
.page-hero .hero-ctas { margin-top: 28px; }
.page-hero-media picture, .page-hero-media img {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%;
  border-radius: 18px; box-shadow: 0 30px 60px rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.14);
}
.page-hero-media { max-width: 380px; justify-self: end; width: 100%; }
.page-note { margin-top: 18px; font-size: .86rem; color: rgba(255,255,255,.75); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
@media (max-width: 900px) {
  .page-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .page-hero-media { justify-self: start; max-width: 300px; }
}

.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin-bottom: 22px; font-size: .78rem; }
.crumbs li { color: rgba(255,255,255,.7); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: rgba(255,255,255,.4); }
.crumbs a { color: rgba(255,255,255,.85); text-decoration: underline; text-underline-offset: 3px; }
.crumbs li[aria-current] { color: #fff; font-weight: 600; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.content-side { position: sticky; top: calc(var(--nav-h) + 20px); display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 960px) {
  .content-grid { grid-template-columns: 1fr; gap: 36px; }
  .content-side { position: static; }
}
.narrow { max-width: 820px; }

.prose { color: var(--gray); font-size: 1rem; line-height: 1.78; }
.prose h2 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(1.35rem, 2.4vw, 1.7rem); color: var(--black); line-height: 1.3; margin: 0 0 14px; }
.prose-sec + .prose-sec, .prose .callout + .prose-sec, .prose-sec + .callout { margin-top: 40px; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 14px; }
.prose ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.prose ul li { position: relative; padding-left: 26px; }
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: .7em; width: 8px; height: 8px; border-radius: 50%;
  background: var(--yellow); box-shadow: 0 0 0 3px rgba(77,212,212,.2);
}
.prose a { color: #0f6c76; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--black); }
.legal-prose h2 { font-size: 1.2rem; margin-top: 32px; }
.legal-prose h2:first-child { margin-top: 0; }

.callout { display: flex; gap: 14px; border-radius: 12px; padding: 18px 20px; }
.callout svg { flex-shrink: 0; margin-top: 2px; }
.callout-title { font-weight: 800; color: var(--black); margin-bottom: 4px; }
.callout p { font-size: .92rem; line-height: 1.6; }
.callout-urgent { background: #fff4f2; border: 1px solid #f3c2b9; border-left: 5px solid #c0392b; }
.callout-urgent svg { color: #c0392b; }

.side-card {
  background: var(--black); color: #fff; border-radius: 16px; padding: 26px 24px; box-shadow: var(--shadow-md);
}
.side-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.side-card p { font-size: .88rem; color: rgba(255,255,255,.8); line-height: 1.6; margin-bottom: 18px; }
.side-card .btn { width: 100%; justify-content: center; }
.side-card .side-or { margin: 14px 0 0; text-align: center; font-size: .82rem; }
.side-card .side-or a { color: var(--yellow); font-weight: 700; }
.related { background: var(--off-white); border-radius: 16px; padding: 20px; }
.related-title { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze); margin-bottom: 10px; }
.related ul { list-style: none; }
.related a { display: flex; align-items: center; gap: 10px; padding: 9px 4px; font-size: .88rem; font-weight: 600; color: var(--black); border-bottom: 1px solid rgba(10,58,90,.07); }
.related li:last-child a { border-bottom: none; }
.related a:hover { color: #0f6c76; }
.related svg { color: #1a8c8c; }

.closing-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.closing-band p { font-style: normal; color: rgba(255,255,255,.82); }
.border-sec .intro-text { margin-bottom: 0; }

/* ── FAQ ───────────────────────────────────────────────────── */
.faq-sec .faq-wrap { max-width: 860px; margin: 0 auto; }
.faq-a-inner p + p { margin-top: 10px; }

/* ── Formulario de valoración ──────────────────────────────── */
.lead-sec { background: var(--off-white); }
.lead-media { background-image: url('../img/opt/band-operando.jpg'); }
.lf-urgent {
  display: flex; gap: 10px; align-items: flex-start; background: #fff4f2; border: 1px solid #f3c2b9;
  border-radius: 10px; padding: 12px 14px; font-size: .8rem; line-height: 1.55; color: #6b2018; margin-bottom: 22px;
}
.lf-urgent svg { color: #c0392b; flex-shrink: 0; margin-top: 2px; }
fieldset.msf-step { border: 0; padding: 0; margin: 0; min-width: 0; }
legend.msf-q { padding: 0; display: block; width: 100%; }
.lf-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msf-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.msf-field-full { grid-column: 1 / -1; }
.msf-fields input[type="email"] {
  width: 100%; padding: 13px 15px; border: 1.5px solid rgba(10,58,90,.16); border-radius: 10px;
  font-size: .92rem; font-family: 'Montserrat', sans-serif; color: var(--black); background: #fff; outline: none;
}
.msf-fields input[aria-invalid="true"] { border-color: #b3261e; }
.lf-pref-label { margin-top: 20px; }
.msf-inline { display: flex; flex-wrap: wrap; gap: 10px; }
.msf-opt-inline { margin-bottom: 0; padding: 10px 14px; }
.lf-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; font-size: .84rem; line-height: 1.55; color: var(--gray); cursor: pointer; }
.lf-consent input { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--yellow); }
.lf-consent a { color: #0f6c76; font-weight: 700; text-decoration: underline; }
.lf-net-error { margin-top: 14px; color: #b3261e; font-size: .85rem; font-weight: 600; }
.lf-net-error a { text-decoration: underline; }
.msf-submit[aria-busy="true"] { opacity: .75; cursor: progress; }
.lf-success { text-align: center; padding: 30px 10px; outline: none; }
.lf-success svg { color: #1a8c8c; margin: 0 auto 12px; }
.lf-success-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.6rem; font-weight: 700; color: var(--black); margin-bottom: 10px; }
.lf-success p { color: var(--gray); line-height: 1.65; max-width: 460px; margin: 0 auto 10px; }
.lf-success a { color: #0f6c76; font-weight: 700; }
[hidden] { display: none !important; }
/* Sin JavaScript: todos los pasos visibles y envío normal */
html:not(.js) .msf-step { display: block !important; margin-bottom: 26px; }
html:not(.js) .msf-progress, html:not(.js) [data-lf-next], html:not(.js) [data-lf-back] { display: none !important; }
html:not(.js) [data-lf-submit] { display: inline-flex !important; }
@media (max-width: 560px) { .msf-fields { grid-template-columns: 1fr; } }

/* ── Ubicación ─────────────────────────────────────────────── */
.loc-split { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 26px; align-items: stretch; margin-top: 28px; }
.loc-split .map-embed { margin: 0; min-height: 340px; }
.loc-card-main { display: flex; flex-direction: column; gap: 10px; }
.loc-note, .loc-hours { font-size: .85rem; color: var(--gray-lt); }
.loc-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 12px; }
.loc-actions .btn { justify-content: center; white-space: normal; text-align: center; }
@media (max-width: 860px) { .loc-split { grid-template-columns: 1fr; } }

/* ── Footer ────────────────────────────────────────────────── */
.footer-grid-4 { grid-template-columns: 1.4fr 1fr 0.8fr 1.1fr; gap: 40px; }
.footer-disclaimer { border-top: 1px solid rgba(10,10,10,.08); padding: 20px 0; font-size: .78rem; color: var(--gray-lt); line-height: 1.6; }
.footer-disclaimer p + p { margin-top: 6px; }
.footer-disclaimer strong { color: var(--gray); }
@media (max-width: 900px) { .footer-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid-4 { grid-template-columns: 1fr; } }

/* ── Movimiento reducido ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .svc-card, .svc-more svg, .nav-dd-btn svg, .skip-link { transition: none; }
  .svc-card:hover { transform: none; }
  html { scroll-behavior: auto; }
}

/* ── Contraste (WCAG AA) ───────────────────────────────────────
   El dorado de marca (#C9A84C) da 2.3:1 sobre blanco: se usa un tono
   más profundo para texto sobre fondos claros. Sobre azul marino se
   conserva el dorado original (5.2:1). */
:root { --bronze-text: #86671A; --gray-lt: #5B6872; }
.eyebrow, .doctorbio-eyebrow, .related-title, .svc-tag, .brand-tag, #navMobile .m-group,
.tx-label, .footer-col-title, .msf-progress-label, .footer-contact-value { color: var(--bronze-text); }
.svc-tag { border-color: rgba(134,103,26,.4); }

/* ── Encabezado en pantallas angostas ──────────────────────── */
@media (max-width: 560px) {
  #nav .brand-tag { display: none; }
  #nav .brand-name { font-size: 1.15rem; }
  .nav-right { gap: 10px; }
}
#navMobile .nav-mobile-cta { text-align: center; justify-content: center; padding: 14px 20px; color: var(--black); border-bottom: 0; }

/* ============================================================
   FASE 2 · MOVIMIENTO
   Todo lo animado vive bajo .motion-ok (lo añade motion.js solo si
   no hay prefers-reduced-motion). Sin JS: contenido estático visible.
   ============================================================ */

/* ── Portada: fondo de flujo ───────────────────────────────── */
#hero.hero-split { position: relative; isolation: isolate; }
.hero-flow {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  opacity: 0; transition: opacity 1.2s ease; pointer-events: none;
}
.hero-flow.is-ready { opacity: 1; }
#hero .wrap { position: relative; z-index: 2; }
/* velo de legibilidad detrás del texto */
#hero.hero-split::before {
  display: block !important; content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(8,40,63,.72) 0%, rgba(8,40,63,.38) 42%, rgba(8,40,63,0) 68%);
}
@media (max-width: 900px) {
  #hero.hero-split::before { background: linear-gradient(180deg, rgba(8,40,63,.55) 0%, rgba(8,40,63,.2) 70%, rgba(8,40,63,0) 100%); }
}

/* ── Secciones superpuestas ────────────────────────────────── */
main > * { position: relative; z-index: 1; }
#hero.hero-split.is-stacked, main > [data-stack].is-stacked { position: sticky; z-index: 0; }
main > [data-stack].is-stacked + * {
  position: relative; z-index: 3; border-radius: 28px 28px 0 0; margin-top: -28px;
  box-shadow: 0 -24px 60px rgba(8,40,63,.18);
}
.journey { overflow: hidden; }

/* ── Servicios: tarjetas con foto ──────────────────────────── */
.svc-card { position: relative; isolation: isolate; overflow: hidden; }
.svc-card.has-media { padding: 0; }
.svc-card.has-media > :not(.svc-media) { margin-left: 24px; margin-right: 24px; }
.svc-card.has-media .svc-head { margin-top: 18px; margin-bottom: 12px; }
.svc-card.has-media .svc-head .tx-ico { width: 40px; height: 40px; }
.svc-card.has-media .svc-more { margin-bottom: 24px; }
.svc-media { aspect-ratio: 16 / 9; overflow: hidden; background: #0a2b42; }
.svc-media picture, .svc-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
/* Encuadre por servicio para que se vea lo específico de cada imagen */
.svc-card[href*="laparosc"] .svc-media img { object-position: 40% 45%; }
.svc-card[href*="obesidad"] .svc-media img, .svc-card[href*="weight"] .svc-media img { object-position: 55% 40%; }
.svc-media img { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.svc-card:hover .svc-media img, .svc-card:focus-visible .svc-media img { transform: scale(1.06); }
.svc-card:hover { transform: translateY(-6px); box-shadow: 0 22px 48px rgba(10,58,90,.16); }
.svc-card .svc-tag { background: #fff; }
.motion-ok .svc-card { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1), box-shadow var(--transition); transition-delay: calc(var(--i, 0) * 90ms); }
.motion-ok .svc-card.is-in { opacity: 1; transform: none; }
.motion-ok .svc-card.is-in:hover { transform: translateY(-6px); transition-delay: 0s; }

.svc-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.svc-intro { text-align: left; }
.svc-intro .sec-sub { margin: 0; }
.svc-controls { display: none; align-items: center; gap: 10px; padding-bottom: 26px; }
.svc-progress { width: 140px; height: 3px; background: rgba(10,58,90,.12); border-radius: 3px; overflow: hidden; margin-right: 8px; }
.svc-progress span { display: block; height: 100%; background: var(--yellow); transform-origin: left; transform: scaleX(.06); }
.svc-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(10,58,90,.22); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; color: var(--black);
  transition: background var(--transition), color var(--transition), transform var(--transition), opacity var(--transition);
}
.svc-btn[data-rail-prev] svg { transform: rotate(180deg); }
.svc-btn:hover:not(:disabled) { background: var(--black); color: #fff; transform: translateY(-2px); }
.svc-btn:disabled { opacity: .35; cursor: default; }

/* Modo riel (solo escritorio, lo activa motion.js) */
.svc-section.is-rail { padding: 0; }
.svc-section.is-rail .svc-sticky { position: sticky; top: 60px; padding: 24px 0 28px; height: calc(100vh - 60px); display: flex; align-items: center; overflow: hidden; }
.svc-section.is-rail .svc-intro .sec-title { margin-bottom: 10px; }
.svc-section.is-rail .svc-media { aspect-ratio: 16 / 9; }
.svc-section.is-rail .svc-card p { font-size: .84rem; line-height: 1.6; }
.svc-section.is-rail .svc-sticky > .wrap { width: 100%; }
.svc-section.is-rail .svc-controls { display: flex; }
.svc-section.is-rail .svc-viewport { overflow: hidden; margin: 8px -12px 0; padding: 14px 12px 24px; }
.svc-section.is-rail .svc-track { display: flex; gap: 24px; margin-top: 0; will-change: transform; }
.svc-section.is-rail .svc-card { flex: 0 0 min(360px, 30vw); }

/* ── Doctor: máscara + parallax + texto escalonado ─────────── */
.doc-photo { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 5; position: relative; }
.doc-photo-inner { width: 100%; height: 100%; will-change: transform; }
.doc-photo-inner picture, .doc-photo-inner img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.home-doctor .doctorbio-grid { grid-template-columns: 0.85fr 1.15fr; gap: 56px; }
.motion-ok .mask-reveal { clip-path: inset(14% 10% 14% 10% round 18px); transition: clip-path 1.3s cubic-bezier(.65,0,.25,1); }
.motion-ok .mask-reveal.is-in { clip-path: inset(0 0 0 0 round 18px); }
.motion-ok .stagger > * { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 120ms + 250ms); }
.motion-ok .stagger.is-in > * { opacity: 1; transform: none; }
.doc-actions { display: flex; align-items: center; gap: 22px; margin-top: 8px; }
.doc-video-compact { margin: 0; max-width: 150px; flex-shrink: 0; }
.doc-video-compact video { border-radius: 14px; }
.doc-video-compact figcaption { display: none; }
.doc-video-label { font-size: .84rem; color: var(--gray-lt); margin-bottom: 14px; line-height: 1.5; }
.doc-video-label mark { display: block; margin-top: 6px; }
@media (max-width: 900px) {
  .home-doctor .doctorbio-grid { grid-template-columns: 1fr; gap: 32px; }
  .doc-photo { max-width: 420px; }
}
@media (max-width: 480px) { .doc-actions { flex-direction: column; align-items: flex-start; } }

/* ── Microinteracciones ───────────────────────────────────── */
.btn-yellow { position: relative; overflow: hidden; isolation: isolate; }
.btn-yellow::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%);
}
.motion-ok .btn-yellow:hover::after, .motion-ok .btn-yellow:focus-visible::after { transform: translateX(120%); transition: transform .8s ease; }
.btn:active { transform: translateY(0) scale(.98); }

.nav-dd-menu { display: flex; visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
.nav-dd.open .nav-dd-menu { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .2s ease, visibility 0s; }
.nav-dd-menu a { transition: background var(--transition), padding var(--transition); }
.nav-dd-menu a:hover { padding-left: 16px; }

.lang-switch {
  background: linear-gradient(var(--black), var(--black)) no-repeat left bottom / 100% 0;
  transition: background-size .25s ease, color .25s ease, border-color .25s ease;
}
.lang-switch:hover, .lang-switch:focus-visible { background-size: 100% 100%; color: #fff; border-color: var(--black); }

#navMobile.open a { animation: navIn .35s ease both; }
#navMobile.open a:nth-of-type(2) { animation-delay: .03s; }
#navMobile.open a:nth-of-type(3) { animation-delay: .06s; }
#navMobile.open a:nth-of-type(4) { animation-delay: .09s; }
#navMobile.open a:nth-of-type(5) { animation-delay: .12s; }
@keyframes navIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Formulario: progreso, carga, error, éxito */
.msf-progress-bar span { transition: width .55s cubic-bezier(.2,.7,.2,1); box-shadow: 0 0 12px rgba(77,212,212,.6); }
.msf-submit[aria-busy="true"]::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(10,58,90,.25); border-top-color: var(--black);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.motion-ok .msf-error:not([hidden]) { animation: nudge .35s ease; }
@keyframes nudge { 0%,100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.msf-opt { transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease; }
.msf-opt:active { transform: scale(.99); }
.motion-ok .lf-success:not([hidden]) svg path, .motion-ok .lf-success:not([hidden]) svg polyline {
  stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw .9s .15s ease forwards;
}
.motion-ok .lf-success:not([hidden]) { animation: navIn .5s ease both; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .hero-flow { display: none; }
  .btn-yellow::after { display: none; }
  .nav-dd-menu, .lang-switch, .svc-media img, .msf-progress-bar span { transition: none; }
  #navMobile.open a { animation: none; }
  .msf-submit[aria-busy="true"]::before { animation: none; }
}

.loc-legal { font-size: .78rem; color: var(--gray-lt); border-top: 1px solid rgba(10,58,90,.1); padding-top: 10px; }
.footer-brand-note { font-size: .74rem; line-height: 1.6; }

/* ============================================================
   PRIVACIDAD Y LEGALES
   ============================================================ */
/* Toda sección de contenido tiene fondo propio: evita que la portada fija
   (sticky) se vea por detrás de secciones sin color (p. ej. "Traveling from the U.S."). */
main > section { background-color: var(--white); }
.border-sec { background: var(--white); }

/* Mapa bajo demanda */
.map-consent { display: flex; align-items: stretch; background: var(--off-white); border: 1px solid rgba(10,58,90,.1); }
.map-placeholder { margin: auto; text-align: center; padding: 32px 24px; max-width: 460px; }
.map-placeholder svg { color: #1a8c8c; margin: 0 auto 10px; }
.map-ph-title { font-weight: 800; color: var(--black); margin-bottom: 8px; }
.map-ph-text { font-size: .86rem; color: var(--gray-lt); line-height: 1.6; margin-bottom: 18px; }
.map-ph-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.map-consent iframe { width: 100%; min-height: 340px; border: 0; display: block; }

/* Formulario: nota de herramienta orientativa */
.lf-tool-note { font-size: .78rem; color: var(--gray-lt); margin: -12px 0 18px; }

/* Footer legal */
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-link-btn { font: inherit; font-size: inherit; color: inherit; padding: 0; cursor: pointer; text-decoration: none; }
.footer-legal a, .footer-link-btn { font-size: .78rem; color: var(--gray-lt); }
.footer-legal a:hover, .footer-link-btn:hover { color: var(--black); text-decoration: underline; }

/* Páginas legales */
.legal-updated { margin-top: 32px; font-size: .84rem; color: var(--gray-lt); }
.table-wrap { overflow-x: auto; margin: 18px 0 8px; border: 1px solid rgba(10,58,90,.12); border-radius: 10px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 720px; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(10,58,90,.08); vertical-align: top; }
.legal-table th { background: var(--off-white); color: var(--black); font-weight: 700; }
.legal-table tr:last-child td { border-bottom: 0; }

/* Banner y panel de cookies (sin patrones oscuros: botones con el mismo peso) */
.cc-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 980; max-width: 760px; margin: 0 auto;
  background: #fff; border: 1px solid rgba(10,58,90,.14); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 20px 22px;
}
.cc-title { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1.15rem; color: var(--black); margin-bottom: 6px; }
.cc-text { font-size: .86rem; line-height: 1.6; color: var(--gray); }
.cc-text a { color: #0f6c76; font-weight: 700; text-decoration: underline; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.cc-actions .btn { padding: 11px 18px; font-size: .82rem; }
.cc-modal { position: fixed; inset: 0; z-index: 990; background: rgba(8,40,63,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cc-modal[hidden] { display: none !important; }
.cc-dialog { background: #fff; border-radius: 16px; max-width: 520px; width: 100%; padding: 24px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; }
.cc-cat { border: 1px solid rgba(10,58,90,.12); border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.cc-cat-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--black); gap: 10px; }
.cc-cat-head input { width: 20px; height: 20px; accent-color: var(--yellow); }
.cc-cat p { font-size: .82rem; color: var(--gray-lt); margin-top: 6px; line-height: 1.55; }
.cc-always { font-size: .72rem; font-weight: 700; color: #1a8c8c; }

/* Página del doctor sin video publicado */
.video-split:not(:has(.doc-video)) { grid-template-columns: 1fr; max-width: 820px; }
