/* Premium Medical Editorial UI — final layer. Approved palette only. */
:root{--hd-ink:#133A51;--hd-institutional:#1C4F67;--hd-aqua:#66CAD8;--hd-copper:#98603C;--hd-paper:#F7F9FC;--hd-sand:#F6EEE6;--hd-frost:#E5EDF6;--hd-line:#C9D6E5;--hd-copy:#34465C;--hd-success:#15803D;--hd-motion:cubic-bezier(.22,.72,.25,1);--hd-spring:cubic-bezier(.2,.8,.28,1.15);--hd-space:8px;--hd-radius:24px;--hd-reading:72ch;--hd-scroll-y:0px}
html{scroll-padding-top:104px}body.cx-site{font-optical-sizing:auto;--hd-mesh:radial-gradient(ellipse at 93% 5%,#66cad826,transparent 55%),radial-gradient(ellipse at 0% 100%,#66cad812,transparent 56%),linear-gradient(125deg,#133A51,#1C4F67);--hd-light-mesh:radial-gradient(ellipse at 98% 0%,#66cad833,transparent 45%),radial-gradient(ellipse at 0% 100%,#F6EEE6,transparent 48%),linear-gradient(135deg,#fff,#E5EDF6)}
/* Glass is limited to the header; opaque fallback ensures readability. */
html body.cx-site header.hd-top{background:#133A51!important;border-bottom:1px solid #66cad847!important;box-shadow:0 8px 28px -10px #133a5152!important;isolation:isolate;view-transition-name:hd-navigation}
@supports(backdrop-filter:blur(12px)){html body.cx-site header.hd-top{background:#133a51f5!important;backdrop-filter:blur(16px) saturate(115%)}}
.hd-top .hd-desktop>a:not(.hd-cta),.hd-top .hd-dropdown>summary{position:relative}.hd-top .hd-desktop>a:not(.hd-cta)::after,.hd-top .hd-dropdown>summary::after{content:"";position:absolute;bottom:5px;left:9px;right:9px;height:2px;border-radius:2px;background:#66CAD8;transform:scaleX(0);transform-origin:left;transition:transform .28s var(--hd-motion)}.hd-top .hd-desktop>a:hover::after,.hd-top .hd-desktop>a:focus-visible::after,.hd-top .hd-dropdown>summary:hover::after,.hd-top .hd-dropdown[open]>summary::after{transform:scaleX(1)}
.hd-reading-progress{position:absolute;left:0;right:0;bottom:-2px;height:3px;pointer-events:none;overflow:hidden;background:#66cad820;z-index:2}.hd-reading-progress span{display:block;width:100%;height:100%;background:#66CAD8;transform:scaleX(var(--hd-progress,0));transform-origin:left;transition:transform .08s linear}
/* Fluid typography, optical alignment, editorial overlines. */
html body.cx-site main :is(.cx-hero,.hs-hero,.en-hero) h1{font-size:clamp(2.2rem,4.1vw,4rem)!important;line-height:1.08!important;letter-spacing:-.042em!important;text-wrap:balance;max-width:23ch}
html body.cx-site main .hd-home-hero h1{font-size:clamp(2.35rem,5vw,4.55rem)!important;max-width:18ch}
html body.cx-site main :is(.hd-module,.cx-guide,.hs-section,.sec,.cx-chapter,.hpb-catalog,.hc-section,.bp-full-chapter) h2{letter-spacing:-.026em;line-height:1.2;text-wrap:balance}
html body.cx-site main :is(.hd-kicker,.cx-tag,.hs-eyebrow,.kicker,.lum-kicker,.en-kicker){font-weight:700;letter-spacing:.09em;text-transform:uppercase;font-size:clamp(.68rem,.85vw,.78rem);line-height:1.5}
html body.cx-site main :is(.prose,.cx-chapter,.bp-full-chapter) p{line-height:1.7;text-wrap:pretty}
html body.cx-site main :is(.cx-hero,.hs-hero) p:not([class*="kicker"]):not(.hs-eyebrow){max-width:var(--hd-reading)}
/* Mesh lighting / ambient glow. Keep the existing foreground theme; no image substitutes. */
html body.cx-site[data-hd-editorial-theme=dark] :is(#contenido#contenido,main:not([id])) :is(.cx-hero,.hs-hero,.en-hero):first-of-type{background:var(--hd-mesh)!important;color:#fff;position:relative;isolation:isolate}
html body.cx-site[data-hd-editorial-theme=light] :is(#contenido#contenido,main:not([id])) :is(.cx-hero,.hs-hero,.en-hero):first-of-type{background:var(--hd-light-mesh)!important;position:relative;isolation:isolate}
html body.cx-site main :is(.cx-hero,.hs-hero,.en-hero):first-of-type::after{content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;background-image:radial-gradient(circle at calc(100% - 32px) calc(0px + var(--hd-scroll-y)),transparent 0 104px,#66cad825 105px 106px,transparent 107px 144px,#66cad81c 145px 146px,transparent 147px),radial-gradient(circle,#1c4f6710 .65px,transparent .8px);background-size:auto,6px 6px;mask-image:linear-gradient(110deg,transparent 20%,#000 100%)}
body[data-hd-editorial=pancreas]{--hd-light-mesh:radial-gradient(ellipse at 98% 0%,#66cad830,transparent 46%),linear-gradient(125deg,#fff,#E5EDF6)}
body[data-hd-editorial=biliar]{--hd-light-mesh:radial-gradient(ellipse at 90% 0%,#66cad820,transparent 40%),linear-gradient(135deg,#fff,#F6EEE6)}
body[data-hd-editorial=esofago]{--hd-light-mesh:radial-gradient(ellipse at 95% 30%,#66cad83b,transparent 55%),linear-gradient(125deg,#fff,#E5EDF6)}
body[data-hd-editorial=bariatrica]{--hd-mesh:radial-gradient(ellipse at 85% 8%,#66cad826,transparent 47%),linear-gradient(125deg,#133A51,#1C4F67)}
body[data-hd-editorial=perfil]{--hd-mesh:radial-gradient(ellipse at 92% 0%,#98603c38,transparent 45%),linear-gradient(125deg,#133A51,#1C4F67)}
body[data-hd-editorial=finanzas]{--hd-mesh:radial-gradient(ellipse at 80% 6%,#66cad83b,transparent 47%),linear-gradient(125deg,#133A51,#1C4F67)}
body[data-hd-editorial=hernia]{--hd-mesh:radial-gradient(ellipse at 90% 0%,#66cad821,transparent 50%),linear-gradient(125deg,#133A51,#1C4F67)}
/* Layered photography and concentric radius. Only supplied imagery. */
html body.cx-site :is(#contenido#contenido,main:not([id])) :is(.lum-portrait,.phero__fig,.proc-fig,.hp-clinical-figure,.hs-hero-aside){border-radius:var(--hd-radius)!important;box-shadow:var(--hd-elev-high)!important;position:relative}
html body.cx-site main :is(.lum-portrait,.phero__fig,.proc-fig,.hp-clinical-figure) img{border-radius:18px;max-width:100%;object-position:center}
html body.cx-site main :is(.hd-card,.new-link,.bp-guide,.hd-organ-directory-card,.hs-payment-card,.sede,.photo-card,.pcard2) img{border-radius:14px}
/* Avoid cropping diagnostic illustrations; photo zoom only on selected nonclinical imagery. */
html body.cx-site main :is(.lum-portrait,.hp-clinical-figure,.bp-room,.hpm-room,.bp-punta-card,.bp-team-card) img{transition:scale .42s var(--hd-motion);transform-origin:center}
@media(hover:hover) and (pointer:fine){html body.cx-site main :is(.lum-portrait,.hp-clinical-figure,.bp-room,.hpm-room,.bp-punta-card,.bp-team-card):hover img{scale:1.018}}
/* Refined surfaces and gradient borders, not excessive shadows. */
html body.cx-site :is(#contenido#contenido,main:not([id])) :is(.hd-card,.new-link,.cx-option,.bp-guide,.hd-organ-directory-card,.hs-payment-card,.hd-cost-card,.sede,.bp-rev-card,.bp-health-card,.bp-team-card,.hp-test-copy,.hs-contact-note){border:1px solid #C9D6E5!important;border-radius:20px!important;min-width:0;transition:border-color .28s var(--hd-motion),box-shadow .28s var(--hd-motion),translate .28s var(--hd-motion)!important}
html body.cx-site :is(#contenido#contenido,main:not([id])) :is(.hd-card,.new-link,.cx-option,.bp-guide,.hd-organ-directory-card,.hs-payment-card,.hd-cost-card,.sede):hover{border-color:#1c4f6780!important}
html body.cx-site :is(#contenido#contenido,main:not([id])) :is(.hd-card,.new-link,.cx-option,.bp-guide,.hd-organ-directory-card,.hs-payment-card,.hd-cost-card,.sede):focus-within{outline:2px solid #1C4F67;outline-offset:3px}
/* Border with a light edge on signature cards, without replacing their original background. */
html body.cx-site :is(#contenido#contenido,main:not([id])) :is(.hs-hero-aside,.hs-payment-card#tema-1,.hd-home-complex .hd-card:first-child,.hd-home-trust .hd-card:first-child){border-color:transparent!important;background-clip:padding-box!important;outline:1px solid #1c4f6733;box-shadow:inset 0 1px 0 #ffffffb3,var(--hd-elev-high)!important}
html body.cx-site main .hs-payment-card#tema-1{background-image:radial-gradient(ellipse at 100% 0%,#ffffff78,transparent 52%),linear-gradient(155deg,#E5EDF6,#66CAD8 65%,#66CAD8)!important}
/* Gradient edge as a real decorative pseudo-element, no changes to hit targets. */
html body.cx-site main :is(.hs-hero-aside,.hd-home-complex .hd-card:first-child,.hs-payment-card#tema-1){position:relative}
html body.cx-site main :is(.hs-hero-aside,.hd-home-complex .hd-card:first-child,.hs-payment-card#tema-1)::before{content:"";position:absolute;inset:-1px;border-radius:inherit;padding:1px;background:linear-gradient(145deg,#66CAD8,#fff,#1c4f6780);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude;pointer-events:none}
/* Context-specific editorial compositions, only grids with known structure. */
@media(min-width:960px){html body.cx-site #contenido#contenido .hd-home-complex .hd-home-paths,html body.cx-site #contenido#contenido .hd-home-trust .hd-home-paths{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)!important;grid-template-rows:auto auto;gap:18px!important;align-items:stretch!important}html body.cx-site #contenido#contenido :is(.hd-home-complex,.hd-home-trust) .hd-home-paths>.hd-card:first-child{grid-row:span 2;display:flex;align-items:center;background:var(--hd-light-mesh)!important}html body.cx-site #contenido#contenido :is(.hd-home-complex,.hd-home-trust) .hd-home-paths>.hd-card:first-child>div{justify-content:center;padding:clamp(22px,3vw,42px)!important}html body.cx-site #contenido#contenido :is(.hd-home-complex,.hd-home-trust) .hd-home-paths>.hd-card:first-child h3{font-size:clamp(24px,2.5vw,34px)!important;line-height:1.17!important}html body.cx-site #contenido#contenido .hd-home-paths>.hd-card:first-child b{margin-top:12px!important}html body.cx-site #contenido#contenido .hd-organ-directory-card:nth-of-type(even){grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)!important}html body.cx-site #contenido#contenido .hd-organ-directory-card:nth-of-type(even) .hd-organ-directory-intro{grid-column:2;grid-row:1}html body.cx-site #contenido#contenido .hd-organ-directory-card:nth-of-type(even) .hd-organ-directory-links{grid-column:1;grid-row:1}html body.cx-site #contenido#contenido .hd-organ-directory-card{padding:clamp(22px,3vw,36px)!important;gap:clamp(20px,3vw,40px)!important}}
html body.cx-site #contenido#contenido .hd-organ-directory-card:nth-of-type(odd){background:linear-gradient(145deg,#fff,#F7F9FC)!important}html body.cx-site #contenido#contenido .hd-organ-directory-card:nth-of-type(even){background:linear-gradient(145deg,#fff,#F6EEE6)!important}
html body.cx-site main .hd-organ-directory-links a{background:#fff!important;border-radius:12px;transition:background .22s,border-color .22s,color .22s}
html body.cx-site main .hd-organ-directory-links a:hover{background:#E5EDF6!important}
/* Local clinical differentiation, preserving original contrast. */
html body.cx-site[data-hd-editorial=pancreas] #contenido#contenido .hd-decision .hd-wrap{border-left:4px solid #1C4F67;padding-inline-start:clamp(16px,2.3vw,32px)}
html body.cx-site[data-hd-editorial=biliar] #contenido#contenido .hd-decision .hd-wrap{border-left:4px solid #98603C;padding-inline-start:clamp(16px,2.3vw,32px)}
html body.cx-site[data-hd-editorial=esofago] #contenido#contenido .hd-anatomy-grid{border:1px solid #C9D6E5;border-radius:24px;padding:clamp(10px,2vw,22px);background:#fff;box-shadow:var(--hd-elev-low)}
html body.cx-site[data-hd-editorial=perfil] #contenido#contenido .bp-full-chapter{border-top:1px solid #C9D6E5;margin-block:20px;padding-block:24px}
html body.cx-site[data-hd-editorial=hernia] #contenido#contenido .cx-guide{border-top:3px solid #66CAD8}
html body.cx-site[data-hd-editorial=bariatrica] #contenido#contenido :is(.bp-story-empathy,.bp-story-team){border-block:1px solid #C9D6E5}
/* Tinted icon containers; existing icons only. */
html body.cx-site main :is(.cx-option,.hd-cost-card,.hs-contact-note,.hs-step) :is(.cx-num,.hs-icon,.hd-icon,.cx-icon){display:inline-grid;place-items:center;border-radius:12px;background:#E5EDF6!important;color:#133A51!important;min-width:38px;min-height:38px;padding:6px}
/* Form fields, inner shadow and clear text. Exact turquoise retained. */
html body.cx-site :is(#contenido#contenido,main:not([id])) form.hs-consult-form[data-wa-form]{background:#66CAD8!important;background-image:none!important;border-radius:24px!important;box-shadow:var(--hd-elev-high)!important}
html body.cx-site :is(#contenido#contenido,main:not([id])) form.hs-consult-form[data-wa-form] :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){background:#fff!important;color:#133A51!important;box-shadow:inset 0 2px 5px #133a510d,0 2px 5px #133a510e!important;min-height:44px}
html body.cx-site :is(#contenido#contenido,main:not([id])) form.hs-consult-form[data-wa-form] :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea):focus{box-shadow:inset 0 1px 3px #133a510d,0 0 0 4px #133a5128!important}
/* CTA microinteractions: discrete shine, arrow movement, physical feedback. */
html body.cx-site :is(.hd-cta,.hs-button,.btn,.form button[type=submit],.hs-consult-form button[type=submit]){transition:translate .25s var(--hd-motion),box-shadow .25s var(--hd-motion),border-radius .28s var(--hd-motion),background-color .2s,color .2s!important}
html body.cx-site :is(.hd-cta,.hs-button,.btn,.hs-consult-form button[type=submit]):active{translate:0 1px;scale:.985}
html body.cx-site .hd-cta:not(.hd-top *),html body.cx-site .hs-consult-form button[type=submit]{background-image:linear-gradient(110deg,transparent 38%,#ffffff1c 48%,transparent 60%)!important;background-size:260% 100%!important;background-position:120% 0!important;transition:background-position .65s var(--hd-motion),translate .2s,box-shadow .2s!important}
@media(hover:hover) and (pointer:fine){html body.cx-site .hd-cta:not(.hd-top *):hover,html body.cx-site .hs-consult-form button[type=submit]:hover{background-position:-30% 0!important;translate:0 -2px}}
html body.cx-site main :is(.hd-filter,.hd-choice,.hd-organ-jump) :is(button,a){transition:background .22s,color .22s,border-radius .28s var(--hd-spring),box-shadow .22s!important}
html body.cx-site main :is(.hd-filter,.hd-choice) button[aria-pressed=true]{border-radius:12px!important;box-shadow:0 4px 14px -5px #133a515c!important}
html body.cx-site main :is(.hd-card,.new-link,.bp-guide) :is(b,.arrow,.link-arrow){transition:translate .25s var(--hd-motion)}
@media(hover:hover) and (pointer:fine){html body.cx-site main :is(.hd-card,.new-link,.bp-guide):hover :is(b,.arrow,.link-arrow){translate:3px 0}}
html body.cx-site main :is(.hd-organ-directory-links,.cx-jump,.hpb-toc,.bp-procedure-jump) a{text-underline-offset:4px;text-decoration-thickness:1px}
html body.cx-site main :is(.cx-jump,.hpb-toc,.bp-procedure-jump) a[aria-current=location]{background:#E5EDF6!important;color:#133A51!important;box-shadow:inset 3px 0 #1C4F67;border-radius:8px}
/* Existing scrollable catalogues only, not tables or form rows. */
html body.cx-site main :is(.hd-filter,.hd-organ-jump,.bp-procedure-jump,.lum-carousel,.hpb-cards){scroll-snap-type:x proximity;scrollbar-color:#1C4F67 #E5EDF6;scrollbar-width:thin}
html body.cx-site main :is(.hd-filter,.hd-organ-jump,.bp-procedure-jump,.lum-carousel,.hpb-cards)>*{scroll-snap-align:start}
/* Compact contextual jump control uses existing anchors and stays out of the form. */
.hd-local-nav{position:fixed;left:clamp(12px,2vw,26px);bottom:16px;z-index:90;max-width:min(340px,calc(100vw - 32px));border:1px solid #C9D6E5;border-radius:16px;background:#fff;color:#133A51;box-shadow:var(--hd-elev-mid);font-size:14px;display:none}.hd-local-nav.is-visible{display:block}.hd-local-nav summary{cursor:pointer;list-style:none;min-height:44px;padding:12px 16px;font-weight:700;color:#133A51}.hd-local-nav summary::after{content:" +"}.hd-local-nav[open] summary::after{content:" −"}.hd-local-nav nav{display:grid;max-height:min(46vh,350px);overflow:auto;padding:0 8px 8px;overscroll-behavior:contain}.hd-local-nav a{display:block;padding:10px 12px;color:#133A51!important;border-radius:9px;text-decoration:none!important;line-height:1.35}.hd-local-nav a:hover,.hd-local-nav a[aria-current=location]{background:#E5EDF6;color:#133A51!important}.hd-local-nav :focus-visible{outline:2px solid #1C4F67;outline-offset:2px}body.hs-form-visible .hd-local-nav,body.hd-dialog-open .hd-local-nav{display:none!important}
/* Focus never depends on hover. */
html body.cx-site :is(main,header,footer) :is(a,button,summary,input,select,textarea):focus-visible{outline:2px solid #1C4F67;outline-offset:3px}html body.cx-site .hd-top :focus-visible{outline-color:#66CAD8}
/* Cross-page shared navigation transition when the browser supports it. */
@view-transition{navigation:auto}::view-transition-old(root){animation:hd-old .18s ease-out both}::view-transition-new(root){animation:hd-new .24s var(--hd-motion) both}::view-transition-group(hd-navigation){animation-duration:.24s}@keyframes hd-old{to{opacity:0}}@keyframes hd-new{from{opacity:.7}}
@media(max-width:700px){html{scroll-padding-top:84px}html body.cx-site main :is(.cx-hero,.hs-hero,.en-hero) h1{font-size:clamp(2rem,8.2vw,2.75rem)!important;letter-spacing:-.035em!important;max-width:none}html body.cx-site main .hd-home-hero h1{font-size:clamp(2.3rem,9vw,3.2rem)!important}html body.cx-site main :is(.cx-hero,.hs-hero,.en-hero):first-of-type::after{opacity:.5}html body.cx-site .hd-top{backdrop-filter:none!important;background:#133A51!important}.hd-local-nav{bottom:12px;left:12px;max-width:calc(100vw - 90px)}.hd-local-nav summary{font-size:12px;padding:11px 12px}.hd-local-nav nav{max-height:40vh}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}html body.cx-site *,html body.cx-site *::before,html body.cx-site *::after{animation-duration:.001ms!important;transition-duration:.001ms!important;scroll-behavior:auto!important}html body.cx-site main :is(.lum-portrait,.hp-clinical-figure,.bp-room,.hpm-room,.bp-punta-card,.bp-team-card):hover img{scale:none}html body.cx-site :is(.hd-cta,.hs-button,.btn,.hs-consult-form button[type=submit]):active{scale:none;translate:none}::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}}
/* Mobile containment of the advanced bariatric page, including original branding. */
@media(max-width:850px){html body[data-bp-page=otros-procedimientos] #contenido#contenido :is(.bp-tech-hero,.bpx-tech,.bpx-hero-photo,.bp-revision-mark,.bp-story-grid,.bp-advanced-card){min-width:0!important;max-width:100%!important}html body[data-bp-page=otros-procedimientos] #contenido#contenido img{max-width:100%!important;height:auto!important}html body[data-bp-page=otros-procedimientos] #contenido#contenido .phero__in{grid-template-columns:minmax(0,1fr)!important}html body[data-bp-page=otros-procedimientos] #contenido#contenido .bp-revision-mark{width:min(100%,360px)!important}}
@media(min-width:960px){html body.cx-site #contenido#contenido :is(.hd-home-complex,.hd-home-trust) .hd-home-paths>.hd-card:first-child{align-self:stretch!important;height:100%!important;max-height:none!important;min-height:0!important}html body.cx-site #contenido#contenido :is(.hd-home-complex,.hd-home-trust) .hd-home-paths>.hd-card:first-child>div{height:100%!important;width:100%!important}}
html body.cx-site #contenido#contenido .hpb-links>a{border:1px solid #C9D6E5!important;border-top:3px solid #1C4F67!important;border-radius:18px!important;box-shadow:var(--hd-elev-low)!important;transition:translate .25s var(--hd-motion),box-shadow .25s var(--hd-motion),border-color .25s var(--hd-motion)!important}
@media(hover:hover) and (pointer:fine){html body.cx-site #contenido#contenido .hpb-links>a:hover{translate:0 -3px;box-shadow:var(--hd-elev-mid)!important;border-color:#1C4F67!important}}
/* One progress bar, not several competing historical indicators. */
body.cx-site:has(.hd-reading-progress) :is(.hd-progress,.hp-reading-progress){display:none!important}
/* Legible consent alignment and a visible keyboard focus ring. */
html body.cx-site :is(#contenido#contenido,main:not([id])) form.hs-consult-form[data-wa-form] label.form__chk{display:grid!important;grid-template-columns:20px minmax(0,1fr)!important;align-items:start!important;gap:10px!important}
html body.cx-site :is(#contenido#contenido,main:not([id])) form.hs-consult-form[data-wa-form] label.form__chk input[type=checkbox]{margin:3px 0 0!important;width:20px!important;height:20px!important;min-width:20px!important;accent-color:#15803D}
html body.cx-site :is(#contenido#contenido,main:not([id])) form.hs-consult-form[data-wa-form] label.form__chk span{line-height:1.55!important}
html body.cx-site main > :is(.hd-home-catalog,.hd-home-complex,.hd-home-special,.hd-home-trust,.hs-payment-section,.hs-process,.hs-locations,.hs-book-location){border-block-start:1px solid #1c4f671c}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){html body.cx-site main :is(.hd-home-catalog-end,.hd-acalasia-inline) a:not(.hd-cta){transition:transform .25s var(--hd-spring),scale .25s var(--hd-spring)}html body.cx-site main :is(.hd-home-catalog-end,.hd-acalasia-inline) a:not(.hd-cta):hover{scale:1.015}}
