/* ============================================================
   NEWS INDIA TV — Premium Navigation System (nav.css)
   Mobile-first • Glassmorphism • 8px grid • WCAG AA
   ============================================================ */

/* ── Design Tokens ── */
:root {
  --nav-radius: 12px;
  --nav-radius-sm: 8px;
  --nav-radius-pill: 999px;
  --nav-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --nav-shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --nav-shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --nav-shadow-xl: 0 16px 48px rgba(0,0,0,0.16);
  --nav-glass-bg: rgba(255,255,255,0.72);
  --nav-glass-border: rgba(255,255,255,0.18);
  --nav-glass-blur: 20px;
  --nav-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-z-topbar: 100;
  --nav-z-header: 200;
  --nav-z-nav: 150;
  --nav-z-mega: 250;
  --nav-z-drawer: 300;
  --nav-z-backdrop: 290;
  --nav-z-search: 400;
  --nav-z-bottom: 350;
  --nav-z-ticker: 110;
  --nav-header-h: 72px;
  --nav-bottom-h: 64px;
}

[data-theme="dark"] {
  --nav-glass-bg: rgba(18,18,18,0.82);
  --nav-glass-border: rgba(255,255,255,0.08);
  --nav-shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --nav-shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --nav-shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}

/* ── Top Bar ── */
.ni-topbar {
  background: #0a0a0a;
  color: #d4d4d4;
  font-size: 0.75rem;
  line-height: 1;
  position: relative;
  z-index: var(--nav-z-topbar);
}
.ni-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  gap: 12px;
}
.ni-topbar-date { white-space: nowrap; }
.ni-topbar-links {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ni-topbar-links a {
  color: #a0a0a0;
  text-decoration: none;
  font-size: 0.75rem;
  padding: 4px 0;
  transition: color var(--nav-transition-fast);
  min-height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
}
.ni-topbar-links a:hover,
.ni-topbar-links a:focus-visible { color: #fff; }
.ni-topbar-social {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ni-topbar-social a {
  color: #888;
  transition: color var(--nav-transition-fast);
  min-height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ni-topbar-social a:hover { color: var(--nitv-accent); }

/* ── Breaking News Ticker ── */
.ni-ticker {
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, var(--nitv-accent-dark), var(--nitv-accent));
  color: #fff;
  overflow: hidden;
  gap: 0;
  position: relative;
  z-index: var(--nav-z-ticker);
  min-height: 40px;
}
.ni-ticker-label {
  flex-shrink: 0;
  background: #fff;
  color: var(--nitv-accent);
  font-weight: 800;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  position: relative;
  z-index: 1;
}
.ni-ticker-label::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 0;
  width: 12px;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.15), transparent);
}
.ni-ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nitv-accent);
  animation: niPulse 1.5s ease-in-out infinite;
}
.ni-ticker-track-wrap {
  flex: 1;
  overflow: hidden;
  padding: 0 16px;
}
.ni-ticker-track {
  display: flex;
  animation: niTicker 30s linear infinite;
  white-space: nowrap;
}
.ni-ticker-item {
  display: inline-flex;
  align-items: center;
  padding: 0 24px;
  font-size: 0.85rem;
  font-weight: 600;
  gap: 8px;
}
.ni-ticker-item::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  flex-shrink: 0;
}
@keyframes niTicker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Header — Glassmorphism ── */
.ni-header {
  position: sticky;
  top: 0;
  z-index: var(--nav-z-header);
  background: var(--nav-glass-bg);
  backdrop-filter: blur(var(--nav-glass-blur));
  -webkit-backdrop-filter: blur(var(--nav-glass-blur));
  border-bottom: 1px solid var(--nav-glass-border);
  transition: background var(--nav-transition), box-shadow var(--nav-transition);
}
.ni-header.scrolled {
  box-shadow: var(--nav-shadow-md);
}
.ni-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 12px;
  min-height: var(--nav-header-h);
}

/* Branding */
.ni-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.ni-brand-logo {
  display: block;
  max-height: 48px;
  max-width: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform var(--nav-transition);
}
.ni-brand:hover .ni-brand-logo { transform: scale(1.04); }
.ni-brand-text {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 800;
  color: var(--nitv-accent);
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.ni-brand-tagline {
  font-size: 0.65rem;
  color: var(--nitv-muted, #888);
  font-weight: 400;
  letter-spacing: 0.3px;
  display: none;
}
@media (min-width: 769px) {
  .ni-brand-tagline { display: block; }
}

/* Header Actions */
.ni-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Icon buttons (search, theme, lang) */
.ni-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: var(--nav-radius);
  background: transparent;
  color: var(--nitv-text, #333);
  cursor: pointer;
  transition: background var(--nav-transition-fast), color var(--nav-transition-fast), transform var(--nav-transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.ni-icon-btn:hover {
  background: rgba(0,0,0,0.06);
}
.ni-icon-btn:active { transform: scale(0.92); }
.ni-icon-btn:focus-visible {
  outline: 2px solid var(--nitv-accent);
  outline-offset: 2px;
}
.ni-icon-btn svg {
  width: 22px;
  height: 22px;
  pointer-events: none;
}
[data-theme="dark"] .ni-icon-btn:hover { background: rgba(255,255,255,0.08); }

/* Live TV Button */
.ni-live-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: none;
  border-radius: var(--nav-radius-pill);
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(255,0,0,0.35);
  transition: transform var(--nav-transition-fast), box-shadow var(--nav-transition-fast);
  min-height: 48px;
  min-width: 48px;
  -webkit-tap-highlight-color: transparent;
}
.ni-live-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 24px rgba(255,0,0,0.5);
}
.ni-live-btn:active { transform: scale(0.97); }
.ni-live-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.ni-live-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.ni-live-icon svg {
  width: 18px;
  height: 18px;
}
/* Pulse ring */
.ni-live-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(255,0,0,0.5);
  animation: niLivePulseRing 2s ease-out infinite;
}
@keyframes niLivePulseRing {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.15); }
}
.ni-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: -2px;
  right: -2px;
  animation: niLiveDotBlink 1.5s ease-in-out infinite;
}
@keyframes niLiveDotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}
@keyframes niPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
/* Live button label */
.ni-live-label { pointer-events: none; }

/* Language Switcher */
.ni-lang-switch {
  display: inline-flex;
  border-radius: var(--nav-radius-pill);
  background: rgba(0,0,0,0.06);
  padding: 2px;
  gap: 0;
}
[data-theme="dark"] .ni-lang-switch { background: rgba(255,255,255,0.08); }
.ni-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border: none;
  border-radius: var(--nav-radius-pill);
  background: transparent;
  color: var(--nitv-muted, #888);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--nav-transition-fast), color var(--nav-transition-fast);
  min-height: 32px;
  min-width: 40px;
  -webkit-tap-highlight-color: transparent;
}
.ni-lang-btn.active {
  background: var(--nitv-accent);
  color: #fff;
  box-shadow: var(--nav-shadow-sm);
}
.ni-lang-btn:hover:not(.active) {
  background: rgba(0,0,0,0.04);
}
[data-theme="dark"] .ni-lang-btn:hover:not(.active) { background: rgba(255,255,255,0.06); }
.ni-lang-btn:focus-visible {
  outline: 2px solid var(--nitv-accent);
  outline-offset: 1px;
}

/* Hamburger */
.ni-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  z-index: calc(var(--nav-z-drawer) + 2);
}
.ni-hamburger-bar {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--nitv-text, #333);
  border-radius: 2px;
  transition: transform var(--nav-transition), opacity var(--nav-transition);
  transform-origin: center;
}
[data-theme="dark"] .ni-hamburger-bar { background: #eee; }
.ni-hamburger.open .ni-hamburger-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.ni-hamburger.open .ni-hamburger-bar:nth-child(2) { opacity: 0; }
.ni-hamburger.open .ni-hamburger-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}
.ni-hamburger:focus-visible {
  outline: 2px solid var(--nitv-accent);
  outline-offset: 2px;
  border-radius: var(--nav-radius);
}

/* ── Desktop Navigation Bar ── */
.ni-nav {
  background: var(--nav-glass-bg);
  backdrop-filter: blur(var(--nav-glass-blur));
  -webkit-backdrop-filter: blur(var(--nav-glass-blur));
  border-bottom: 1px solid var(--nav-glass-border);
  position: sticky;
  top: var(--nav-header-h);
  z-index: var(--nav-z-nav);
  transition: box-shadow var(--nav-transition);
}
.ni-nav.scrolled { box-shadow: var(--nav-shadow-sm); }
.ni-nav-inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0;
}
.ni-nav-inner::-webkit-scrollbar { display: none; }

/* Nav Items */
.ni-nav-item {
  position: relative;
  list-style: none;
}
.ni-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  color: var(--nitv-text, #333);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  min-height: 48px;
  transition: color var(--nav-transition-fast);
}
.ni-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  background: var(--nitv-accent);
  border-radius: 3px 3px 0 0;
  transform: scaleX(0);
  transition: transform var(--nav-transition-fast);
}
.ni-nav-link:hover { color: var(--nitv-accent); }
.ni-nav-link:hover::after,
.ni-nav-link.active::after { transform: scaleX(1); }
.ni-nav-link.active { color: var(--nitv-accent); }
.ni-nav-link:focus-visible {
  outline: 2px solid var(--nitv-accent);
  outline-offset: -2px;
  border-radius: var(--nav-radius-sm);
}
.ni-nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
/* Live nav item special */
.ni-nav-item.is-live .ni-nav-link {
  color: #ff0000;
  font-weight: 800;
}
.ni-nav-item.is-live .ni-nav-link::after { background: #ff0000; }
/* Dropdown arrow */
.ni-nav-arrow {
  width: 12px;
  height: 12px;
  transition: transform var(--nav-transition-fast);
  flex-shrink: 0;
  opacity: 0.5;
}
.ni-nav-item:hover > .ni-nav-link .ni-nav-arrow,
.ni-nav-item.open > .ni-nav-link .ni-nav-arrow {
  transform: rotate(180deg);
}

/* ── Mega Menu Panel ── */
.ni-mega {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 720px;
  max-width: 960px;
  background: var(--nav-glass-bg);
  backdrop-filter: blur(var(--nav-glass-blur));
  -webkit-backdrop-filter: blur(var(--nav-glass-blur));
  border: 1px solid var(--nav-glass-border);
  border-top: 3px solid var(--nitv-accent);
  border-radius: 0 0 var(--nav-radius) var(--nav-radius);
  box-shadow: var(--nav-shadow-xl);
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--nav-transition-fast), transform var(--nav-transition-fast), visibility var(--nav-transition-fast);
  z-index: var(--nav-z-mega);
  pointer-events: none;
}
.ni-nav-item:hover > .ni-mega,
.ni-nav-item.open > .ni-mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.ni-mega-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
/* Mega: Category group */
.ni-mega-cat {
  padding: 12px;
  border-radius: var(--nav-radius-sm);
  background: rgba(0,0,0,0.02);
  transition: background var(--nav-transition-fast);
}
[data-theme="dark"] .ni-mega-cat { background: rgba(255,255,255,0.03); }
.ni-mega-cat:hover { background: rgba(0,0,0,0.05); }
[data-theme="dark"] .ni-mega-cat:hover { background: rgba(255,255,255,0.06); }
.ni-mega-cat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--nitv-accent);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.ni-mega-cat-title svg { width: 16px; height: 16px; flex-shrink: 0; }
.ni-mega-article {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  border-radius: var(--nav-radius-sm);
  text-decoration: none;
  color: var(--nitv-text, #333);
  transition: background var(--nav-transition-fast);
  min-height: 48px;
}
.ni-mega-article:hover { background: rgba(0,0,0,0.04); }
[data-theme="dark"] .ni-mega-article:hover { background: rgba(255,255,255,0.05); }
.ni-mega-article:focus-visible {
  outline: 2px solid var(--nitv-accent);
  outline-offset: -2px;
}
.ni-mega-article-img {
  width: 64px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e5e5e5;
}
[data-theme="dark"] .ni-mega-article-img { background: #333; }
.ni-mega-article-title {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Mobile Drawer ── */
.ni-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--nav-z-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--nav-transition), visibility var(--nav-transition);
  -webkit-tap-highlight-color: transparent;
}
.ni-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.ni-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(320px, 85vw);
  height: 100dvh;
  background: var(--nav-glass-bg);
  backdrop-filter: blur(var(--nav-glass-blur));
  -webkit-backdrop-filter: blur(var(--nav-glass-blur));
  z-index: var(--nav-z-drawer);
  transform: translateX(-100%);
  transition: transform var(--nav-transition);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}
.ni-drawer.open { transform: translateX(0); }

/* Drawer header */
.ni-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--nav-glass-border);
  flex-shrink: 0;
}
.ni-drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.ni-drawer-brand-logo {
  max-height: 36px;
  max-width: 140px;
}
.ni-drawer-close {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--nav-radius);
  background: transparent;
  color: var(--nitv-text, #333);
  cursor: pointer;
  transition: background var(--nav-transition-fast);
}
.ni-drawer-close:hover { background: rgba(0,0,0,0.06); }
[data-theme="dark"] .ni-drawer-close:hover { background: rgba(255,255,255,0.08); }
.ni-drawer-close:focus-visible {
  outline: 2px solid var(--nitv-accent);
  outline-offset: 2px;
}
.ni-drawer-close svg { width: 22px; height: 22px; }

/* Drawer search */
.ni-drawer-search {
  padding: 12px 20px;
  border-bottom: 1px solid var(--nav-glass-border);
  flex-shrink: 0;
}
.ni-drawer-search-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid var(--nav-glass-border);
  border-radius: var(--nav-radius);
  background: rgba(0,0,0,0.04);
  color: var(--nitv-text, #333);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--nav-transition-fast), background var(--nav-transition-fast);
  min-height: 48px;
}
[data-theme="dark"] .ni-drawer-search-input { background: rgba(255,255,255,0.06); }
.ni-drawer-search-input:focus {
  border-color: var(--nitv-accent);
  background: transparent;
}
.ni-drawer-search-wrap {
  position: relative;
}
.ni-drawer-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--nitv-muted, #888);
  pointer-events: none;
}

/* Drawer nav list */
.ni-drawer-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}
.ni-drawer-item {
  list-style: none;
}
.ni-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--nitv-text, #333);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 48px;
  transition: background var(--nav-transition-fast), color var(--nav-transition-fast);
  position: relative;
}
.ni-drawer-item > a.ni-drawer-link {
  flex: 1;
}
.ni-drawer-link:hover,
.ni-drawer-link:focus-visible {
  background: rgba(0,0,0,0.04);
  color: var(--nitv-accent);
}
[data-theme="dark"] .ni-drawer-link:hover { background: rgba(255,255,255,0.05); }
.ni-drawer-link.active {
  color: var(--nitv-accent);
  background: rgba(var(--nitv-accent-rgb, 196,30,58), 0.08);
}
.ni-drawer-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--nitv-accent);
  border-radius: 0 3px 3px 0;
}
.ni-drawer-link svg { width: 20px; height: 20px; flex-shrink: 0; }
/* Live item */
.ni-drawer-item.is-live .ni-drawer-link {
  color: #ff0000;
}
/* Accordion toggle */
.ni-drawer-accordion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: var(--nav-radius-sm);
  background: transparent;
  color: var(--nitv-muted, #888);
  cursor: pointer;
  transition: background var(--nav-transition-fast), transform var(--nav-transition-fast);
  flex-shrink: 0;
  margin: 0;
  align-self: center;
}
.ni-drawer-accordion:hover { background: rgba(0,0,0,0.06); }
[data-theme="dark"] .ni-drawer-accordion:hover { background: rgba(255,255,255,0.08); }
.ni-drawer-accordion:focus-visible {
  outline: 2px solid var(--nitv-accent);
  outline-offset: 1px;
}
.ni-drawer-accordion svg {
  width: 16px;
  height: 16px;
  transition: transform var(--nav-transition);
}
.ni-drawer-item.open > .ni-drawer-link .ni-drawer-accordion svg {
  transform: rotate(180deg);
}
/* Submenu */
.ni-drawer-sub {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.ni-drawer-item.open > .ni-drawer-sub {
  max-height: 600px;
}
.ni-drawer-sub-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 52px;
  color: var(--nitv-muted, #666);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  min-height: 44px;
  transition: background var(--nav-transition-fast), color var(--nav-transition-fast);
}
.ni-drawer-sub-link:hover,
.ni-drawer-sub-link:focus-visible {
  background: rgba(0,0,0,0.03);
  color: var(--nitv-accent);
}
[data-theme="dark"] .ni-drawer-sub-link:hover { background: rgba(255,255,255,0.04); }
.ni-drawer-sub-link.active { color: var(--nitv-accent); font-weight: 700; }

/* Drawer footer */
.ni-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--nav-glass-border);
  flex-shrink: 0;
}
.ni-drawer-live-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--nav-radius);
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  min-height: 48px;
  box-shadow: 0 4px 16px rgba(255,0,0,0.3);
  transition: transform var(--nav-transition-fast), box-shadow var(--nav-transition-fast);
  animation: niLivePulseRing 2.5s ease-out infinite;
}
.ni-drawer-live-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(255,0,0,0.45);
}
.ni-drawer-live-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ── Bottom Navigation (Mobile) ── */
.ni-bottom {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--nav-glass-bg);
  backdrop-filter: blur(var(--nav-glass-blur));
  -webkit-backdrop-filter: blur(var(--nav-glass-blur));
  border-top: 1px solid var(--nav-glass-border);
  z-index: var(--nav-z-bottom);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.ni-bottom-inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: var(--nav-bottom-h);
}
.ni-bottom-item {
  list-style: none;
}
.ni-bottom-counter {
  flex: 0 0 auto;
}
.ni-bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--nitv-muted, #888);
  font-size: 0.62rem;
  font-weight: 600;
  min-height: 48px;
  padding: 6px 16px;
  transition: color var(--nav-transition-fast);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.ni-bottom-link svg { width: 22px; height: 22px; }
.ni-bottom-link:focus-visible {
  outline: 2px solid var(--nitv-accent);
  outline-offset: -2px;
}
/* Visitor counter in bottom nav */
.ni-bottom-counter .ni-bottom-link {
  cursor: default;
}
.ni-counter-num {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--nitv-accent, #c41e3a);
  letter-spacing: -0.02em;
}

/* ── Full-Screen Search Overlay ── */
.ni-search-overlay {
  position: fixed;
  inset: 0;
  background: var(--nav-glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: var(--nav-z-search);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--nav-transition), visibility var(--nav-transition);
}
.ni-search-overlay.open {
  opacity: 1;
  visibility: visible;
}
.ni-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--nav-glass-border);
  flex-shrink: 0;
}
.ni-search-input-wrap {
  flex: 1;
  position: relative;
}
.ni-search-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 2px solid var(--nav-glass-border);
  border-radius: var(--nav-radius);
  background: rgba(0,0,0,0.04);
  color: var(--nitv-text, #333);
  font-size: 1.1rem;
  font-weight: 500;
  outline: none;
  transition: border-color var(--nav-transition-fast), background var(--nav-transition-fast);
  min-height: 56px;
}
[data-theme="dark"] .ni-search-input { background: rgba(255,255,255,0.06); }
.ni-search-input:focus { border-color: var(--nitv-accent); background: transparent; }
.ni-search-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: var(--nitv-muted, #888);
  pointer-events: none;
}
.ni-search-close {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--nav-radius);
  background: transparent;
  color: var(--nitv-text, #333);
  cursor: pointer;
  font-size: 1.5rem;
  transition: background var(--nav-transition-fast);
  flex-shrink: 0;
}
.ni-search-close:hover { background: rgba(0,0,0,0.06); }
[data-theme="dark"] .ni-search-close:hover { background: rgba(255,255,255,0.08); }
.ni-search-close:focus-visible {
  outline: 2px solid var(--nitv-accent);
  outline-offset: 2px;
}
/* Suggestions */
.ni-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}
.ni-search-hint {
  text-align: center;
  color: var(--nitv-muted, #888);
  font-size: 0.9rem;
  padding: 40px 0;
}
.ni-search-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--nav-radius);
  text-decoration: none;
  color: var(--nitv-text, #333);
  transition: background var(--nav-transition-fast);
  min-height: 48px;
}
.ni-search-result:hover { background: rgba(0,0,0,0.04); }
[data-theme="dark"] .ni-search-result:hover { background: rgba(255,255,255,0.05); }
.ni-search-result:focus-visible {
  outline: 2px solid var(--nitv-accent);
  outline-offset: -2px;
}
.ni-search-result-img {
  width: 56px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e5e5e5;
}
[data-theme="dark"] .ni-search-result-img { background: #333; }
.ni-search-result-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ni-search-result-meta {
  font-size: 0.75rem;
  color: var(--nitv-muted, #888);
  margin-top: 2px;
}
.ni-search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 8px;
  color: var(--nitv-muted, #888);
  font-size: 0.85rem;
}
.ni-search-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--nav-glass-border);
  border-top-color: var(--nitv-accent);
  border-radius: 50%;
  animation: niSpin 0.7s linear infinite;
}
@keyframes niSpin { to { transform: rotate(360deg); } }

/* ── Body adjustments ── */
body.ni-menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}
@media (max-width: 768px) {
  body { padding-bottom: var(--nav-bottom-h); }
}

/* ── Focus visible global ── */
*:focus-visible {
  outline: 2px solid var(--nitv-accent);
  outline-offset: 2px;
}

/* ── Responsive: Tablet ── */
@media (min-width: 769px) {
  .ni-hamburger { display: none !important; }
  .ni-drawer, .ni-drawer-backdrop { display: none !important; }
  .ni-bottom { display: none !important; }
}

/* ── Responsive: Mobile ── */
@media (max-width: 768px) {
  .ni-hamburger { display: flex; }
  .ni-nav { display: none; }
  .ni-topbar-links { display: none; }
  .ni-topbar-social { display: none; }
  .ni-live-label { display: none; }
  .ni-live-btn { padding: 8px 12px; }
  .ni-bottom { display: block; }
  .ni-header-inner { padding: 8px 0; min-height: 56px; }
  .ni-brand-text { font-size: 1.1rem; }
  .ni-brand-logo { max-height: 36px; max-width: 140px; }
  .ni-header-actions .ni-icon-btn:not(.ni-search-toggle):not(.ni-theme-toggle) { display: none; }
  .ni-lang-switch { display: none; }
  .ni-mega { display: none !important; }
}

/* ── Responsive: Small mobile ── */
@media (max-width: 380px) {
  .ni-brand-tagline { display: none; }
  .ni-header-actions { gap: 4px; }
}

/* ── Responsive: Large desktop ── */
@media (min-width: 1200px) {
  .ni-mega { min-width: 800px; }
  .ni-nav-link { padding: 12px 20px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
