/* 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%; }
}
