/* =====================================================================
   BioSud · Modo oscuro (html[data-theme="dark"])
   Se activa desde el botón del footer; se recuerda en el navegador.
   ===================================================================== */
[data-theme="dark"]{
  --navy:#e3ecff; --royal:#0a3aa8; --blue:#7fb2ff; --ink:#d7e2f7; --muted:#9db0cf;
  --line:rgba(160,190,240,.16); --paper:#060d1f; --mist:#0a142c; --wash:#0b1733; --steel:#2c4a7a;
  --gl-bg:linear-gradient(150deg,rgba(26,44,92,.62) 0%,rgba(12,24,54,.42) 100%);
  --gl-bg-soft:linear-gradient(150deg,rgba(26,44,92,.5) 0%,rgba(12,24,54,.3) 100%);
  --gl-line:rgba(140,180,255,.24);
  --gl-sh:inset 0 1px 0 rgba(160,200,255,.18),inset 0 0 22px rgba(80,130,230,.10),0 12px 30px rgba(0,0,0,.35),0 0 0 4px rgba(60,110,220,.08);
  --gl-sh-hover:inset 0 1px 0 rgba(170,210,255,.28),inset 0 0 26px rgba(80,140,240,.16),0 18px 40px rgba(0,0,0,.45),0 0 0 5px rgba(60,120,230,.16);
  color-scheme:dark;
}
[data-theme="dark"] body{background:#060d1f;color:var(--ink)}
[data-theme="dark"] h1,[data-theme="dark"] h2,[data-theme="dark"] h3,[data-theme="dark"] h4,[data-theme="dark"] .h2{color:#eef3ff}
[data-theme="dark"] .h2 b,[data-theme="dark"] h2 b,[data-theme="dark"] h1 b{color:#7fb6ff}
[data-theme="dark"] .eyebrow,[data-theme="dark"] .cx-eyebrow{color:#7fd0ff}
[data-theme="dark"] p,[data-theme="dark"] li{color:inherit}
[data-theme="dark"] a{color:inherit}

/* header */
[data-theme="dark"] .site-header{background:rgba(7,14,32,.82);box-shadow:0 1px 0 var(--line)}
[data-theme="dark"] .site-header.scrolled{background:rgba(7,14,32,.6)}
[data-theme="dark"] .topbar,[data-theme="dark"] .site-header .topbar{background:#0a142c}
[data-theme="dark"] .topbar a,[data-theme="dark"] .topbar span,[data-theme="dark"] .topbar button{color:#cfdcf5}
[data-theme="dark"] .site-header .brand img{content:url("../media/biosud-neg.svg")}
[data-theme="dark"] .nav .lnk{color:#dbe6ff}
[data-theme="dark"] .nav .lnk:hover,[data-theme="dark"] .nav .lnk[aria-current="page"]{color:#7fb6ff}
[data-theme="dark"] .burger{color:#dbe6ff}
[data-theme="dark"] .etica-btn{background:#1f4fd1}
[data-theme="dark"] .etica-btn:hover,[data-theme="dark"] .etica-btn[aria-current="page"]{background:#3a6cf0}
[data-theme="dark"] .login-btn{color:#e3ecff;border-color:rgba(140,180,255,.35)}
[data-theme="dark"] .region-menu,[data-theme="dark"] .site-header .nav ul.open{background:rgba(10,20,44,.96)!important;color:#dbe6ff}

/* fondo de partículas y secciones */
[data-theme="dark"] .ethics{background:linear-gradient(180deg,rgba(12,24,54,.55),rgba(8,16,38,.35));border-top-color:var(--line)}
[data-theme="dark"] .band{background:radial-gradient(50% 70% at 8% 10%,rgba(90,70,170,.28),transparent 70%),radial-gradient(50% 70% at 92% 90%,rgba(30,140,170,.25),transparent 70%),linear-gradient(170deg,rgba(10,20,46,.7) 0%,rgba(8,18,42,.85) 100%)}
[data-theme="dark"] .hcontact,[data-theme="dark"] .news,[data-theme="dark"] .section{border-color:var(--line)}
[data-theme="dark"] .cx{background:rgba(6,13,31,.55);--navy:#e3ecff;--ink:#d7e2f7;--ink-2:#a9bad8;--ink-3:#8496b8;--cx-bg:#0e1a38;--cx-line:rgba(160,190,240,.16);--card:#0f1c3c}
[data-theme="dark"] .cx-card,[data-theme="dark"] .cx-row{--navy:#e3ecff;--ink:#d7e2f7;--ink-2:#a9bad8;--ink-3:#8496b8;--cx-bg:#0e1a38;--cx-line:rgba(160,190,240,.16)}

/* banners interiores (encabezados celestes) */
[data-theme="dark"] .phead,[data-theme="dark"] .hdr-app,[data-theme="dark"] .cx-hero,[data-theme="dark"] .cx-phead{
  background:radial-gradient(70% 140% at 100% 0%,rgba(0,170,230,.45) 0%,rgba(0,170,230,0) 60%),radial-gradient(55% 120% at 78% 100%,rgba(30,110,230,.35) 0%,transparent 65%),linear-gradient(112deg,#081430 0%,#0a1b44 45%,#0c2a63 75%,#0d3f86 100%)!important}
[data-theme="dark"] .phead::after,[data-theme="dark"] .hdr-app::after,[data-theme="dark"] .cx-hero::after,[data-theme="dark"] .cx-phead::after{opacity:.25}
[data-theme="dark"] .phead h1,[data-theme="dark"] .cx-hero h1,[data-theme="dark"] .cx-phead h1{color:#fff}
[data-theme="dark"] .phead p,[data-theme="dark"] .cx-hero p,[data-theme="dark"] .cx-phead p{color:#c4d4f0}
[data-theme="dark"] .crumbs,[data-theme="dark"] .crumbs a,[data-theme="dark"] .crumbs span{color:#a9c4ee}

/* hero: banners de producto y corazón en versión oscura */
[data-theme="dark"] .slide-prod .tint{background:linear-gradient(90deg,rgba(6,14,36,.92) 0%,rgba(8,20,50,.78) 34%,rgba(10,26,64,.35) 58%,rgba(10,26,64,0) 74%)}
[data-theme="dark"] .bgv{filter:saturate(.7) brightness(.55)}
[data-theme="dark"] .ptitle{color:#fff}
[data-theme="dark"] .psub{color:#8fc0ff}
[data-theme="dark"] .pdesc2{color:#c9d7ef}
[data-theme="dark"] .pbrand{filter:brightness(0) invert(1)}
[data-theme="dark"] .slide-heart{background:#071028}
[data-theme="dark"] .heart-v{filter:invert(1) contrast(1.25) brightness(1.15);opacity:.95}
[data-theme="dark"] .heart-frame::after{background:linear-gradient(135deg,#2a7bff 0%,#1d5fe0 50%,#38b6ff 100%);mix-blend-mode:color;opacity:.9}
[data-theme="dark"] .tint-heart{background:linear-gradient(90deg,rgba(4,10,28,.92) 0%,rgba(6,16,40,.62) 38%,rgba(6,16,40,.08) 72%,rgba(6,16,40,0) 100%)}
[data-theme="dark"] .slide-heart .kick{color:#bfe3ff}
[data-theme="dark"] .slide-heart .claim{color:#fff}
[data-theme="dark"] .slide-heart .sub{color:#8fc0ff}
@media (max-width:760px){
  [data-theme="dark"] .slide-prod .tint{background:linear-gradient(180deg,rgba(6,14,36,0) 0%,rgba(6,14,36,.55) 38%,rgba(6,14,36,.92) 62%)}
  [data-theme="dark"] .tint-heart{background:linear-gradient(180deg,rgba(6,14,36,.88) 0%,rgba(6,14,36,.55) 50%,rgba(6,14,36,.85) 100%)}
}

/* tarjetas, cápsulas y textos */
[data-theme="dark"] .eblock p,[data-theme="dark"] .ethics .intro p,[data-theme="dark"] .hc-lead,[data-theme="dark"] .cinfo span{color:#b9c8e3}
[data-theme="dark"] .ethics .seal,[data-theme="dark"] .eblock .num{color:#9cc6ff}
[data-theme="dark"] .pcard .im,[data-theme="dark"] .cx-card .im,[data-theme="dark"] .cx-row .th,[data-theme="dark"] .cx-cat .th,[data-theme="dark"] .ncard2 .im,[data-theme="dark"] .gal .main,[data-theme="dark"] .thumbs button,[data-theme="dark"] .cx-gthumbs button{background:rgba(255,255,255,.92)!important}
/* logos de marcas: sin recuadro, fondo transparente y en blanco para leerse sobre el fondo oscuro */
[data-theme="dark"] .cx-brand .lg{background:transparent!important}
[data-theme="dark"] .reps .rail img,[data-theme="dark"] .cx-brand .lg img,[data-theme="dark"] .cx-logo-chip img{background:transparent!important;filter:brightness(0) invert(1)!important;opacity:.88;transition:opacity .25s}
[data-theme="dark"] .reps .rail a:hover img,[data-theme="dark"] .reps .rail img:hover,[data-theme="dark"] .cx-brand:hover .lg img{opacity:1}
[data-theme="dark"] .cx-logo-chip{background:transparent!important;border:1px solid rgba(255,255,255,.35)}
[data-theme="dark"] .chip,[data-theme="dark"] .tag,[data-theme="dark"] .cx-chips button,[data-theme="dark"] .cx-btn,[data-theme="dark"] .btn.ghost,[data-theme="dark"] .btn.light,[data-theme="dark"] .circ,[data-theme="dark"] .map span,[data-theme="dark"] .cx-back,[data-theme="dark"] .cx-pbtn{color:#e3ecff}
[data-theme="dark"] .cx-badge{background:rgba(255,255,255,.85)!important;color:#0b2a6b}
[data-theme="dark"] .field label{color:#cfdcf5}
[data-theme="dark"] .field input,[data-theme="dark"] .field select,[data-theme="dark"] .field textarea{background:rgba(14,26,58,.7)!important;border-color:rgba(140,180,255,.25)!important;color:#e6eeff;box-shadow:inset 0 1px 3px rgba(0,0,0,.3)}
[data-theme="dark"] .field input:focus,[data-theme="dark"] .field select:focus,[data-theme="dark"] .field textarea:focus{background:rgba(18,34,74,.9)!important;border-color:#5aa0ff!important}
[data-theme="dark"] .field select option{background:#0b1733;color:#e6eeff}
[data-theme="dark"] .search input,[data-theme="dark"] .cx-search input{color:#e6eeff}
[data-theme="dark"] .search input::placeholder,[data-theme="dark"] .cx-search input::placeholder,[data-theme="dark"] .field textarea::placeholder{color:#8296ba}
[data-theme="dark"] .notice{color:#dbe6ff}
[data-theme="dark"] .cx-tbl,[data-theme="dark"] .cx-tbl th,[data-theme="dark"] .cx-tbl td{border-color:var(--cx-line);color:#d7e2f7}
[data-theme="dark"] .cx-tbl thead th,[data-theme="dark"] .cx-tbl tbody th{background:rgba(30,50,100,.5);color:#e3ecff}
[data-theme="dark"] .cx-acc summary,[data-theme="dark"] .cx-info h1,[data-theme="dark"] .cx-sech h2,[data-theme="dark"] .cx-group{color:#eef3ff}
[data-theme="dark"] .code h3,[data-theme="dark"] .code p,[data-theme="dark"] .code li,[data-theme="dark"] .toc a{color:#d7e2f7}
[data-theme="dark"] .gmap iframe{filter:invert(.9) hue-rotate(180deg) brightness(.95)}

/* footer */
[data-theme="dark"] .site-footer{background:#050b1c;border-top:1px solid var(--line)}

/* botón de modo oscuro (footer) */
.theme-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;cursor:pointer;
  font:700 12.5px/1 var(--f-head);color:#fff;background:rgba(255,255,255,.12);border:1.5px solid rgba(255,255,255,.45);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:background .25s}
.theme-btn:hover{background:rgba(255,255,255,.22)}
.theme-btn svg{width:16px;height:16px}
.theme-btn .ico-sun,[data-theme="dark"] .theme-btn .ico-moon{display:none}
[data-theme="dark"] .theme-btn .ico-sun{display:inline-flex}
.theme-btn .ico-moon,.theme-btn .ico-sun{line-height:0}
.fbottom{align-items:center}
.fbottom .theme-btn{opacity:1}

/* transición suave al cambiar */
html.theme-anim body,html.theme-anim .site-header,html.theme-anim section,html.theme-anim .site-footer{transition:background-color .35s ease,color .35s ease}

/* catálogo · ajustes puntuales */
[data-theme="dark"] .cx-feats li{background:rgba(40,64,120,.38)}
[data-theme="dark"] .cx-tag{background:color-mix(in srgb,var(--c,#2F55A3) 38%,#0e1a38);color:#e6eeff}
[data-theme="dark"] .cx-tag svg.ico{color:#bcd6ff}
[data-theme="dark"] .cx-tag.neutral{background:rgba(255,255,255,.1);color:#c9d7ef}
[data-theme="dark"] .cx-fcard .go,[data-theme="dark"] .cx-badge{background:rgba(255,255,255,.92)!important;color:#0b2a6b!important}
[data-theme="dark"] .cx-chips button[aria-pressed="true"],[data-theme="dark"] .cx-gdots button.on,[data-theme="dark"] .chip[aria-pressed="true"],[data-theme="dark"] .chip.on{background:#1f4fd1!important;border-color:#1f4fd1!important;color:#fff!important}
[data-theme="dark"] .btn:hover,[data-theme="dark"] .esp-actions a:hover{background:#3a6cf0}
[data-theme="dark"] .cx-esp .th,[data-theme="dark"] .cx-search button,[data-theme="dark"] .cx-seg .n{background:rgba(255,255,255,.9)}
[data-theme="dark"] .cx-seg .n{color:#0b2a6b}
[data-theme="dark"] .cx-mo{color:#eef3ff}
[data-theme="dark"] .cx-view button[aria-pressed="true"]{background:rgba(255,255,255,.14)!important;color:#fff}
[data-theme="dark"] .cx-ev,[data-theme="dark"] .cx-evg>b,[data-theme="dark"] .cx-ev h5{color:#d7e2f7}
[data-theme="dark"] .catalog .bk,[data-theme="dark"] .video{background:#1f4fd1}
[data-theme="dark"] .cx-brand .lg img[src*="biosud-logo"],[data-theme="dark"] .reps .rail img[src*="biosud-logo"]{content:url("../media/biosud-neg.svg");filter:none!important}
