/* NCERT Help — modern site-wide header */
.nh-site-header {
  --nh-ink: #0f172a;
  --nh-muted: #475569;
  --nh-blue: #2563eb;
  --nh-blue-dark: #1d4ed8;
  --nh-line: #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--nh-line);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}
.nh-site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nh-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--nh-ink);
  flex-shrink: 0;
}
.nh-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
}
.nh-brand-text {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nh-primary-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.nh-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--nh-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.nh-nav-link:hover,
.nh-nav-link:focus-visible {
  color: var(--nh-blue-dark);
  background: #eff6ff;
  outline: none;
}
.nh-nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--nh-blue), var(--nh-blue-dark));
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.nh-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--nh-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nh-nav-toggle span {
  display: block;
  height: 2px;
  background: var(--nh-ink);
  border-radius: 2px;
}
/* Hide legacy float logo/topnav leftovers if both exist */
body > .logo + .topnav,
.logo:has(+ .topnav) { /* no-op for older browsers */ }
@media (max-width: 920px) {
  .nh-nav-toggle { display: inline-flex; }
  .nh-primary-nav {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 6px);
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--nh-line);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  }
  .nh-primary-nav.is-open { display: flex; }
  .nh-nav-link { width: 100%; justify-content: flex-start; border-radius: 10px; }
  .nh-site-header { position: sticky; }
  .nh-site-header-inner { position: relative; }
}
