/* EPQA: header accesible para superadmin y pantallas de cualquier tamaño.
   Bootstrap xl expande a 1200px aunque hay más vínculos de los que caben;
   conservamos el collapse en todas las resoluciones. */
body.stem-playground .site-header { z-index: 1100; }
body.stem-playground .site-header .navbar-expand-xl > .container {
  display: flex; align-items: center; flex-wrap: wrap !important;
  max-width: 1480px; width: 100%; gap: 8px 14px; min-width: 0;
}
body.stem-playground .site-header .epqa-brand-link {
  flex: 0 1 205px; min-width: 0 !important; max-width: 205px;
  margin: 0 auto 0 0; display: flex !important; grid-template-columns: none !important;
}
body.stem-playground .site-header .epqa-brand-link .epqa-logo {
  display: block; width: 100%; height: auto; max-height: 70px; object-fit: contain;
}
body.stem-playground .site-header .nav-community-spotlight {
  display: none !important;
}
.epqa-header-shortcuts { display: flex; align-items: center; flex-wrap: nowrap; gap: 5px; }
.epqa-header-shortcut {
  display: inline-flex; align-items: center; justify-content: center; padding: 8px 11px;
  color: #194376 !important; font-size: .84rem; font-weight: 900;
  border-radius: 10px; text-decoration: none; white-space: nowrap; min-height: 44px;
  border: 1px solid transparent;
}
.epqa-header-shortcut:hover,
.epqa-header-shortcut.active,
.epqa-header-shortcut:focus-visible {
  color: #1955c3 !important; background: #eaf3ff; border-color: #bcd5ff;
}
body.stem-playground .site-header .navbar-expand-xl .epqa-nav-mobile-search,
body.stem-playground .site-header .navbar-expand-xl .navbar-toggler {
  display: inline-flex !important; align-items: center; justify-content: center;
  gap: 7px; flex: 0 0 auto; min-height: 44px; min-width: 44px;
  width: auto; height: 44px; border-radius: 11px;
  background: #eef5ff; border: 1px solid #c9ddfa; color: #1c4a92;
  padding: 7px 12px; margin: 0; font-size: .84rem; font-weight: 850; box-shadow: none;
}
body.stem-playground .site-header .navbar-expand-xl .epqa-nav-mobile-search {
  margin-left: 0; text-decoration: none;
}
body.stem-playground .site-header .navbar-expand-xl .navbar-toggler[aria-expanded="true"] {
  background: #dce9ff; border-color: #8cb6ff;
}
.epqa-menu-label { font-weight: 900; font-size: .82rem; }
body.stem-playground .site-header .navbar-expand-xl #mainNav {
  flex: 0 0 100%; order: 5; min-width: 0; width: 100%;
  margin: 0 !important; border-radius: 0 0 16px 16px;
  background: #fff; max-height: min(75dvh, 680px);
}
body.stem-playground .site-header .navbar-expand-xl #mainNav.collapse:not(.show) {
  display: none !important;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav.show {
  display: block !important; padding: 14px; margin: 4px 0 0 !important;
  border: 1px solid #d6e5fb; box-shadow: 0 18px 44px rgba(14, 43, 88, .15);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav.collapsing {
  display: block !important; overflow: hidden; padding: 0 14px;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .navbar-nav {
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px !important; margin: 0 !important; padding: 0 !important;
  width: 100%; align-items: stretch !important;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-item {
  min-width: 0; width: 100%;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-item[hidden],
body.stem-playground .site-header .navbar-expand-xl #mainNav .epqa-nav-admin-item {
  display: none !important;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .epqa-mobile-admin-group {
  display: block !important; grid-column: 1 / -1; width: 100%;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-link {
  display: flex !important; align-items: center !important; justify-content: flex-start !important;
  flex-direction: row !important; min-width: 0 !important; min-height: 46px !important;
  width: 100% !important; white-space: normal; text-align: left !important;
  padding: 8px 11px !important; gap: 10px !important; margin: 0;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-link-label {
  white-space: normal; overflow-wrap: anywhere; font-size: .86rem;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-link-icon,
body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-link-icon img,
body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-link-icon svg {
  width: 26px !important; height: 26px !important; max-width: 26px !important;
  max-height: 26px !important; flex-basis: 26px !important;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .epqa-language-item {
  display: flex !important; align-items: center; width: 100%;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .epqa-language-toggle {
  width: 100%; min-height: 44px; justify-content: flex-start;
  border-radius: 11px; box-shadow: none;
}
#mainNav .epqa-nav-filter { display: flex; flex-wrap: wrap; gap: 7px 12px; align-items: center; margin: 0 0 13px; }
#mainNav .epqa-nav-filter label { color: #284c78; font-size: .84rem; font-weight: 850; }
#mainNav #epqa-menu-search {
  flex: 1 1 240px; min-width: 0; min-height: 44px; padding: 10px 12px;
  border: 1px solid #bdd4f5; background: white; color: #183b6a;
  border-radius: 10px; font-size: 16px;
}
#epqa-menu-results { font-size: .78rem; font-weight: 750; color: #48678e; }
body.stem-playground .site-header .navbar-expand-xl #mainNav .epqa-mobile-admin-group details {
  background: #f5f9ff; border: 1px solid #d4e5fb; border-radius: 12px; overflow: hidden;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .epqa-mobile-admin-group summary {
  display: flex; align-items: center; gap: 10px; list-style: none;
  cursor: pointer; padding: 12px; min-height: 44px; color: #174477; font-weight: 900;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .epqa-mobile-admin-group summary::-webkit-details-marker { display: none; }
body.stem-playground .site-header .navbar-expand-xl #mainNav .epqa-mobile-admin-links {
  padding: 0 12px 12px 38px; margin: 0; list-style: none;
  display: grid; gap: 4px; grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .epqa-mobile-admin-links a {
  display: flex; align-items: center; padding: 10px 11px; color: #24518c;
  font-size: .88rem; text-decoration: none; border-radius: 10px; min-height: 44px;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .epqa-mobile-admin-links a:hover,
body.stem-playground .site-header .navbar-expand-xl #mainNav .epqa-mobile-admin-links a:focus-visible {
  background: #ddebff; color: #134aa7;
}
body.stem-playground .site-header #mainNav :focus-visible,
body.stem-playground .site-header .epqa-header-shortcut:focus-visible,
body.stem-playground .site-header .epqa-nav-mobile-search:focus-visible,
body.stem-playground .site-header .navbar-toggler:focus-visible {
  outline: 3px solid #2865eb; outline-offset: 2px;
}
@media (min-width: 1550px) {
  body.stem-playground .site-header .nav-community-spotlight { display: flex !important; }
}
@media (max-width: 1199.98px) {
  body.stem-playground .site-header .navbar-expand-xl #mainNav .navbar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) { .epqa-header-shortcuts { display: none; } }
@media (max-width: 719.98px) {
  body.stem-playground .site-header .epqa-brand-link { flex: 1 1 auto; max-width: calc(100% - 112px); }
  body.stem-playground .site-header .epqa-brand-link .epqa-logo { max-width: 170px; max-height: 47px; }
  body.stem-playground .site-header .navbar-expand-xl #mainNav .navbar-nav { grid-template-columns: 1fr; }
  body.stem-playground .site-header .navbar-expand-xl #mainNav .epqa-mobile-admin-links { grid-template-columns: 1fr; }
  body.stem-playground .site-header .navbar-expand-xl .epqa-nav-mobile-search,
  body.stem-playground .site-header .navbar-expand-xl .navbar-toggler { padding: 8px 10px; width: 44px; min-width: 44px; }
  .epqa-menu-label { display: none; }
  #mainNav .epqa-nav-filter label { flex-basis: 100%; }
}


/* EPQA Header compact 2026-10-19 · Bootstrap 5 components with stacked labels.
   Icons are retained; only the visible theme text is omitted (ARIA remains). */
body.stem-playground .site-header .navbar-expand-xl > .container {
  gap:6px 10px !important;
  align-items:center!important;
}
body.stem-playground .site-header .epqa-header-shortcuts {
  display:flex;
  align-items:stretch;
  gap:5px;
  margin-left:auto;
  flex-wrap:nowrap;
}
body.stem-playground .site-header .epqa-header-shortcut.btn {
  display:inline-flex!important;
  flex-direction:column;
  gap:3px;
  justify-content:center;
  align-items:center;
  padding:6px 9px!important;
  min-width:75px;
  max-width:105px;
  min-height:60px;
  line-height:1.18;
  font-size:.72rem;
  white-space:normal!important;
  text-align:center!important;
  border-radius:12px;
  border:1px solid transparent;
  background:transparent;
  text-decoration:none;
  box-shadow:none;
}
body.stem-playground .site-header .epqa-shortcut-icon {
  display:grid;place-items:center;flex:0 0 23px;
  width:23px;height:23px;
}
body.stem-playground .site-header .epqa-shortcut-icon :is(svg,img) {
  display:block;width:23px!important;height:23px!important;
  max-width:23px!important;max-height:23px!important;
  object-fit:contain;
}
body.stem-playground .site-header .epqa-shortcut-label {
  font-size:.72rem;line-height:1.16;font-weight:850;
  max-width:100%;overflow-wrap:break-word;
}
body.stem-playground .site-header .navbar-expand-xl .epqa-nav-mobile-search.btn,
body.stem-playground .site-header .epqa-theme-switch.btn {
  display:grid!important;
  place-items:center!important;
  flex:0 0 46px!important;
  width:46px!important;
  min-width:46px!important;
  max-width:46px!important;
  min-height:46px!important;
  height:46px!important;
  padding:0!important;
  border-radius:13px!important;
  gap:0!important;
  line-height:1!important;
  box-shadow:none!important;
}
body.stem-playground .site-header .epqa-theme-switch .epqa-theme-label {
  display:none!important;
}
body.stem-playground .site-header .epqa-theme-switch i,
body.stem-playground .site-header .epqa-nav-mobile-search i {
  font-size:1.3rem!important;line-height:1!important;
}
body.stem-playground .site-header .navbar-expand-xl .navbar-toggler.btn {
  display:inline-flex!important;
  flex:0 0 65px!important;
  width:65px!important;
  min-width:65px!important;
  min-height:60px!important;
  padding:6px 7px!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:center!important;
  gap:4px!important;
  border-radius:13px!important;
  line-height:1!important;
  box-shadow:none!important;
}
body.stem-playground .site-header .navbar-toggler .epqa-menu-svg {
  display:block;width:23px;height:23px;flex:none;
}
body.stem-playground .site-header .navbar-toggler .epqa-menu-label {
  display:block!important;
  margin:0!important;
  font-size:.69rem!important;
  line-height:1.05!important;
  white-space:nowrap!important;
  font-weight:800;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav.show {
  padding:12px!important;
  max-height:calc(100dvh - 100px);
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-link:not(.nav-user-identity) {
  display:flex!important;
  flex-direction:column!important;
  text-align:center!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  min-height:67px!important;
  padding:9px 6px!important;
  border-radius:12px!important;
  line-height:1.16;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-link-icon {
  display:grid!important;place-items:center!important;
  flex:0 0 24px!important;
  width:24px!important;height:24px!important;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-link-icon :is(img,svg) {
  width:24px!important;height:24px!important;
  max-width:24px!important;max-height:24px!important;object-fit:contain;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-link-label {
  display:block!important;text-align:center!important;
  font-size:.75rem!important;line-height:1.2!important;
  overflow-wrap:break-word!important;
}
body.stem-playground .site-header #mainNav .nav-item[data-nav="login"] {
  min-width:0;
}
body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-link[data-nav="login"] {
  background:#dceaff!important;color:#042066!important;
  border:1px solid #a7c9fd!important;
}
html[data-theme="dark"] body.stem-playground .site-header .epqa-header-shortcut.btn {
  color:#eff5ff!important;
}
html[data-theme="dark"] body.stem-playground .site-header .epqa-header-shortcut.btn:is(:hover,.active,:focus-visible) {
  background:#445575!important;color:#fff!important;border-color:#829ac0!important;
}
html[data-theme="dark"] body.stem-playground .site-header .navbar-expand-xl #mainNav .nav-link[data-nav="login"] {
  background:#435e85!important;color:#f3f7ff!important;border-color:#8faed4!important;
}
@media(max-width:991.98px) {
  body.stem-playground .site-header .epqa-header-shortcuts {display:none!important;}
}
@media(max-width:719.98px) {
  body.stem-playground .site-header .navbar-expand-xl > .container {
    flex-wrap:wrap!important;gap:5px!important;
    padding-inline:10px!important;
  }
  body.stem-playground .site-header .epqa-brand-link {
    flex:1 1 0!important;
    width:auto!important;
    min-width:0!important;
    max-width:calc(100% - 175px)!important;
    margin-right:auto!important;
  }
  body.stem-playground .site-header .epqa-brand-link .epqa-logo {
    max-width:100%!important;max-height:60px!important;
  }
  body.stem-playground .site-header .navbar-expand-xl .epqa-nav-mobile-search.btn,
  body.stem-playground .site-header .epqa-theme-switch.btn {
    flex-basis:44px!important;
    width:44px!important;
    min-width:44px!important;
  }
  body.stem-playground .site-header .navbar-expand-xl .navbar-toggler.btn {
    flex-basis:60px!important;width:60px!important;min-width:60px!important;
    min-height:54px!important;
  }
  body.stem-playground .site-header .navbar-expand-xl #mainNav .navbar-nav {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:350px) {
  body.stem-playground .site-header .navbar-expand-xl .navbar-toggler.btn {
    flex-basis:52px!important;width:52px!important;min-width:52px!important;
  }
  body.stem-playground .site-header .epqa-brand-link {max-width:calc(100% - 163px)!important;}
}
@media(prefers-reduced-motion:reduce){
 body.stem-playground .site-header :is(.epqa-header-shortcut,.epqa-theme-switch,.navbar-toggler) {transition:none!important;}
}


/* EPQA SmartNav · KLIC + accesos exclusivos (sin menú duplicado).
   El script mide el ancho real y alterna estas dos modalidades. */
body.stem-playground .site-header .navbar[data-epqa-responsive-nav].epqa-nav-fit .epqa-header-shortcuts {
  display:flex!important;
  position:relative!important;
  visibility:visible!important;
  pointer-events:auto!important;
  flex-wrap:nowrap!important;
  flex:0 0 auto!important;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav].epqa-nav-fit .navbar-toggler,
body.stem-playground .site-header .navbar[data-epqa-responsive-nav].epqa-nav-fit #mainNav {
  display:none!important;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav].epqa-nav-compact .epqa-header-shortcuts {
  display:none!important;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav].epqa-nav-compact .navbar-toggler {
  display:inline-flex!important;
  flex-direction:column!important;
  flex:0 0 65px!important;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav].epqa-nav-compact #mainNav.collapse:not(.show) {
  display:none!important;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav].epqa-nav-compact #mainNav.collapse.show {
  display:block!important;
  flex:0 0 100%!important;
  width:100%!important;
  max-width:100%!important;
  order:20!important;
  max-height:calc(100dvh - 115px)!important;
  overflow-y:auto!important;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav].epqa-nav-compact > .container {
  flex-wrap:wrap!important;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav] .epqa-header-shortcuts {
  min-width:0;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav] .epqa-header-shortcut.btn {
  min-width:68px!important;
  max-width:92px!important;
  padding:5px 7px!important;
  min-height:58px!important;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav] .epqa-shortcut-label {
  font-size:.69rem!important;
  line-height:1.12!important;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav] .epqa-brand-link {
  flex:0 1 auto!important;
  min-width:0!important;
  max-width:235px!important;
  margin-right:auto!important;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav].epqa-nav-fit .epqa-brand-link {
  margin-right:0!important;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav] .epqa-nav-mobile-search {
  margin-left:auto!important;
}
body.stem-playground .site-header .navbar[data-epqa-responsive-nav].epqa-nav-fit .epqa-nav-mobile-search {
  margin-left:0!important;
}
@media(max-width:719.98px){
  body.stem-playground .site-header .navbar[data-epqa-responsive-nav] .epqa-brand-link {
    max-width:calc(100% - 172px)!important;
  }
}
/* Sprite brand assets: 5 imágenes originales optimizadas en una textura WebP.
   Orden: flecha derecha, izquierda, expandir, luna, sol. */
.epqa-brand-icon {
  --epqa-icon-size:24px;
  display:inline-block!important;
  width:var(--epqa-icon-size)!important;
  height:var(--epqa-icon-size)!important;
  flex:0 0 var(--epqa-icon-size)!important;
  background-image:url("../img/epqa/ui/webp/icons/epqa-control-sprite.webp");
  background-repeat:no-repeat;
  background-size:500% 100%;
  background-position:0% 50%;
  vertical-align:middle;
}
.epqa-brand-icon--arrow-right {background-position:0% 50%}
.epqa-brand-icon--arrow-left {background-position:25% 50%}
.epqa-brand-icon--chevron-down {background-position:50% 50%}
.epqa-brand-icon--moon {background-position:75% 50%}
.epqa-brand-icon--sun {background-position:100% 50%}
body.stem-playground .site-header .epqa-theme-switch .epqa-brand-icon {
  --epqa-icon-size:28px;
}
body.stem-playground .site-header .epqa-mobile-admin-chevron {
  --epqa-icon-size:15px;
}
body.stem-playground .site-header .epqa-theme-switch .epqa-brand-icon--sun,
body.stem-playground .site-header .epqa-theme-switch .epqa-brand-icon--moon {
  filter:none!important;
}

/* Administración compacta exclusiva de superadmin en el encabezado.
 * Las tres rutas siguen en el menú colapsable para pantallas pequeñas. */
body.stem-playground .site-header .epqa-header-shortcuts .epqa-admin-shortcut{
  position:relative;display:flex;align-items:stretch;flex:none;
}
body.stem-playground .site-header .epqa-admin-shortcut__toggle.btn{
  height:100%;min-width:91px!important;max-width:114px!important;
  color:inherit;position:relative;
}
body.stem-playground .site-header .epqa-admin-shortcut__toggle .epqa-shortcut-icon i{
  font-size:22px;line-height:1;
}
body.stem-playground .site-header .epqa-admin-shortcut__toggle::after{
  position:absolute;right:4px;bottom:8px;margin:0;
  border-top-width:4px;opacity:.85;
}
body.stem-playground .site-header .epqa-admin-shortcut__menu{
  z-index:1200;min-width:220px;padding:7px;
  background:#f8fbff;color:#123565;
  border:1px solid #b3cff3;border-radius:14px;
  box-shadow:0 14px 36px #071f4a4b;
}
body.stem-playground .site-header .epqa-admin-shortcut__menu .dropdown-item{
  display:flex;align-items:center;gap:9px;min-height:44px;
  padding:8px 10px;border-radius:9px;white-space:nowrap;
  font-size:.83rem;font-weight:850;color:#13376b;
}
body.stem-playground .site-header .epqa-admin-shortcut__menu .dropdown-item:is(:hover,:focus-visible,.active){
  background:#dbeaff;color:#094b9c;
}
body.stem-playground .site-header .epqa-admin-shortcut__item-icon{
  display:grid;place-items:center;flex:none;width:27px;height:27px;
}
body.stem-playground .site-header .epqa-admin-shortcut__item-icon :is(img,svg){
  object-fit:contain;width:24px;height:24px;max-width:24px;max-height:24px;
}
html[data-theme="dark"] body.stem-playground .site-header .epqa-admin-shortcut__menu{
  background:#182945;color:#e6f2ff;border-color:#617da8;
}
html[data-theme="dark"] body.stem-playground .site-header .epqa-admin-shortcut__menu .dropdown-item{
  color:#e6f2ff;
}
html[data-theme="dark"] body.stem-playground .site-header .epqa-admin-shortcut__menu .dropdown-item:is(:hover,:focus-visible,.active){
  background:#365377;color:#fff;
}
@media(max-width:719.98px){
  body.stem-playground .site-header .epqa-admin-shortcut{display:none!important}
}
