/* Revisión 4. Reglas específicas, cargadas después del tema legacy.
   La cabecera se mantiene en el mismo contenedor que el resto del sitio. */
@media (min-width:1200px) {
  body.portal26-active .portal26-header #cab > .col-12 > .container > .row > .col-8 {
    display:flex !important; align-items:center !important; flex:1 1 0 !important;
    min-width:0 !important; width:auto !important; max-width:calc(100% - 205px) !important;
    gap:0; padding-block:9px !important;
  }
  body.portal26-active .portal26-header #cab-center {
    flex:0 1 440px !important; width:440px !important; max-width:440px !important;
    min-width:0 !important; margin:0 !important; padding:0 !important;
  }
  body.portal26-active .portal26-header #cab-center .desktop-search {
    width:100% !important; margin:0 !important; padding:0 !important;
  }
  body.portal26-active .portal26-header .portal26-search-field {
    display:flex !important; min-width:0 !important; max-width:100% !important;
    width:100% !important; margin:0 !important;
  }
  body.portal26-active .portal26-header #form_buscador {display:block !important; width:100% !important;}
  body.portal26-active .portal26-header .portal26-context-slot {
    flex:0 1 226px !important; width:226px !important; max-width:226px !important;
    min-width:180px !important; padding:0 !important; margin:0 0 0 14px !important;
  }
}
body.portal26-active .portal26-header .portal26-search-field #buscador {
  display:block; box-sizing:border-box !important; flex:1 1 auto !important;
  width:1% !important; min-width:0 !important; max-width:100% !important;
  margin:0 !important; background-image:none !important;
}
body.portal26-active .portal26-header .portal26-search-field .input-group-btn {
  position:static !important; display:flex !important; flex:0 0 46px !important;
  min-width:46px !important; margin:0 !important;
}
body.portal26-active .portal26-header .portal26-search-field #btn_ir_buscador {
  flex:0 0 46px !important; width:46px !important; min-width:46px !important;
  margin:0 !important; padding:0 !important; font-size:17px !important;
}
/* La clase Bootstrap .text-dark existe en el <a> y en el <li>;
   el hover se aplica al enlace real, no al li como ocurría antes. */
body.portal26-active .portal26-header #topnav > li.nav-link:hover > a.text-dark,
body.portal26-active .portal26-header #topnav > li.nav-link:focus-within > a.text-dark,
body.portal26-active .portal26-header #topnav > li.nav-link.seleccionado > a.text-dark,
body.portal26-active .portal26-header #topnav > li:hover > a,
body.portal26-active .portal26-header #topnav > li:hover > a.text-dark,
body.portal26-active .portal26-header #topnav > li > a.text-dark:hover {
  color:#ff7f00 !important; background:#fff1e4 !important;
}
/* Carrusel independiente: no se aplica la maqueta de bxSlider al hero. */
html body.portal-home .home-catalog { max-width:none !important; padding-top:0 !important; }
html body.portal-home .portal26-hero {
  position:relative !important; left:auto !important; right:auto !important;
  width:100% !important; max-width:none !important; height:clamp(210px,22vw,345px) !important;
  margin:0 !important; padding:0 !important; overflow:hidden !important;
  isolation:isolate; background:#f5f6f7;
}
html body.portal-home #home-banners-track {
  position:relative !important; width:100% !important; height:100% !important;
  margin:0 !important; padding:0 !important; transform:none !important;
}
html body.portal-home .portal26-hero-slide {
  position:absolute !important; inset:0 !important; width:100% !important;
  height:100% !important; margin:0 !important; padding:0 !important;
  opacity:0; visibility:hidden; pointer-events:none; transition:opacity .45s ease;
}
html body.portal-home .portal26-hero-slide.is-active {
  opacity:1; visibility:visible; pointer-events:auto; z-index:1;
}
html body.portal-home .portal26-hero-slide > img {
  position:absolute !important; inset:0 !important; width:100% !important; height:100% !important;
  max-height:none !important; max-width:none !important;
  object-fit:cover !important; object-position:center !important;
  display:block !important; transform:none !important;
}
html body.portal-home .portal26-hero-inner {
  position:relative !important; inset:auto !important; z-index:2;
  width:100%; max-width:var(--p26-width); height:100%; margin-inline:auto;
  display:flex; align-items:center; padding:20px var(--p26-pad);
}
html body.portal-home .portal26-hero-copy { background:transparent !important; box-shadow:none !important; }
html body.portal-home .portal26-hero-navigation {
  position:absolute; inset:0; z-index:5; pointer-events:none;
}
html body.portal-home .portal26-hero-arrow {
  position:absolute; top:50%; transform:translateY(-50%); width:40px; height:40px;
  border:1px solid #dce4ed; border-radius:50%; color:#13264a;
  background:rgba(255,255,255,.94); display:grid; place-items:center;
  padding:0; cursor:pointer; pointer-events:auto; box-shadow:0 2px 8px #13264a30;
  opacity:0; transition:opacity .2s ease;
}
html body.portal-home .portal26-hero-prev { left:16px; }
html body.portal-home .portal26-hero-next { right:16px; }
html body.portal-home .portal26-hero-dot:focus-visible,
html body.portal-home .portal26-hero-arrow:focus-visible { outline:2px solid #13264a; outline-offset:2px; }
@media(hover:hover) {
 html body.portal-home .portal26-hero:hover .portal26-hero-arrow,
 html body.portal-home .portal26-hero:focus-within .portal26-hero-arrow {opacity:1;}
}
@media(hover:none) { html body.portal-home .portal26-hero-arrow {opacity:1;} }
html body.portal-home .portal26-hero-dots {
  position:absolute; bottom:14px; left:0; right:0; height:20px; margin:0 !important;
  display:flex; gap:9px; justify-content:center; align-items:center;
  padding:0 !important; background:transparent !important; pointer-events:none;
}
html body.portal-home .portal26-hero-dot {
  display:block; width:10px; height:10px; min-width:10px;
  border-radius:50%; border:1px solid #5e6c7e; background:#fff;
  padding:0; margin:0; cursor:pointer; pointer-events:auto;
}
html body.portal-home .portal26-hero-dot.is-active {background:#ff7f00; border-color:#ff7f00;}
html body.portal-home #content-index {margin-top:0 !important; padding-top:12px !important;}
@media (max-width:650px) {
 html body.portal-home .portal26-hero {height:195px !important;}
 html body.portal-home .portal26-hero-arrow {width:30px; height:30px;}
}
@media(prefers-reduced-motion:reduce) {
 html body.portal-home .portal26-hero-slide {transition:none;}
}

/* REV 5: el enlace real del menú es <li class="nav-link text-dark"><a class="text-dark">.
   Resolver el conflicto de .text-dark de Bootstrap, sin alterar los submenús. */
@media (min-width:1200px) {
 body.portal26-active #header.portal26-header #topnav > li:not(.portal26-all-categories):hover > a.text-dark,
 body.portal26-active #header.portal26-header #topnav > li:not(.portal26-all-categories) > a.text-dark:hover,
 body.portal26-active #header.portal26-header #topnav > li:not(.portal26-all-categories):focus-within > a.text-dark,
 body.portal26-active #header.portal26-header #topnav > li:not(.portal26-all-categories).seleccionado > a.text-dark {
  color:#ff7f00 !important;
  -webkit-text-fill-color:#ff7f00 !important;
  background:#fff1e4 !important;
 }
 body.portal26-active #header.portal26-header #topnav > li:hover > a.text-dark > * {
  color:#ff7f00 !important;
  -webkit-text-fill-color:#ff7f00 !important;
 }
}
/* REV 5: la navegación del slider vive dentro del hero para que el JS la encuentre.
   Evitar que los controles se conviertan en un bloque de flujo debajo del banner. */
html body.portal-home .portal26-hero > .portal26-hero-navigation {
 position:absolute !important;
 inset:0 !important;
 z-index:6 !important;
 width:100% !important;
 height:100% !important;
 margin:0 !important;
 padding:0 !important;
 pointer-events:none;
}
html body.portal-home .portal26-hero > .portal26-hero-navigation .portal26-hero-arrow {
 pointer-events:auto;
 opacity:0;
}
@media(hover:hover) {
 html body.portal-home .portal26-hero:hover > .portal26-hero-navigation .portal26-hero-arrow,
 html body.portal-home .portal26-hero:focus-within > .portal26-hero-navigation .portal26-hero-arrow {
  opacity:1;
 }
}
@media(hover:none) {
 html body.portal-home .portal26-hero > .portal26-hero-navigation .portal26-hero-arrow {opacity:1;}
}
html body.portal-home .portal26-hero > .portal26-hero-navigation .portal26-hero-dots {
 position:absolute !important;
 left:0 !important;
 right:0 !important;
 bottom:12px !important;
 z-index:7 !important;
 width:100% !important;
 height:18px !important;
 margin:0 !important;
 background:transparent !important;
 pointer-events:none;
}
html body.portal-home .portal26-hero > .portal26-hero-navigation .portal26-hero-dot {pointer-events:auto;}
