/* Thanh điều hướng dùng chung cho mọi trang của newbieneuro.com.
   Mọi selector có tiền tố nn- và tự mang token màu, để không phụ thuộc CSS của từng ứng dụng. */

.nn-topbar, .nn-header {
  --nnh-bg:#E7EAE7; --nnh-panel:#F1F3F0; --nnh-sunk:#DBE0DC;
  --nnh-ink:#12191A; --nnh-ink2:#3C4745; --nnh-hair:#BFC7C1; --nnh-strong:#12191A;
  --nnh-core:#A8114F; --nnh-inv:#12191A; --nnh-invInk:#E7EAE7;
  --nnh-shadow:rgba(12,18,20,0.16);
  --nnh-pad:72px;
}
:root[data-theme="dark"] .nn-topbar, :root[data-theme="dark"] .nn-header {
  --nnh-bg:#12191B; --nnh-panel:#1B2326; --nnh-sunk:#283236;
  --nnh-ink:#E3E9E5; --nnh-ink2:#B2BDB8; --nnh-hair:#2F3A3D; --nnh-strong:#5A686D;
  --nnh-core:#FF74A8; --nnh-inv:#28343A; --nnh-invInk:#EDF2EF;
  --nnh-shadow:rgba(0,0,0,0.55);
}

.nn-topbar { height: 4px; background: var(--nnh-core); }
.nn-header, .nn-header * { box-sizing: border-box; }
.nn-header {
  position: relative; z-index: 50; height: 74px; margin: 0; padding: 0 var(--nnh-pad);
  display: flex; align-items: center; gap: 36px;
  border-bottom: 1px solid var(--nnh-hair); background: var(--nnh-bg); color: var(--nnh-ink);
  font-family: 'Be Vietnam Pro', system-ui, sans-serif; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.nn-header a { text-decoration: none; }
.nn-header a:hover { text-decoration: none; }
.nn-header button { font: inherit; cursor: pointer; margin: 0; }
.nn-header svg { display: block; flex-shrink: 0; }
.nn-header *:focus-visible { outline: 2px solid var(--nnh-core); outline-offset: 3px; }

.nn-header .nn-brand {
  font-family: 'Archivo', system-ui, sans-serif; font-variation-settings: 'wdth' 118, 'wght' 750; font-weight: 750;
  font-size: 22px; letter-spacing: -0.015em; color: var(--nnh-ink); flex-shrink: 0;
}
.nn-header .nn-brand:hover { color: var(--nnh-ink); }
.nn-nav { display: flex; align-items: center; gap: 24px; flex-grow: 1; min-width: 0; }
.nn-header .nn-nav a { font-size: 14.5px; font-weight: 500; color: var(--nnh-ink2); white-space: nowrap; }
.nn-header .nn-nav a:hover { color: var(--nnh-core); }

.nn-seg { display: flex; border: 1px solid var(--nnh-hair); border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.nn-header .nn-seg button {
  min-height: 44px; padding: 0 13px; display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 500; border: 0; border-radius: 0; background: transparent; color: var(--nnh-ink);
}
.nn-header .nn-seg button + button { border-left: 1px solid var(--nnh-hair); }
.nn-header .nn-seg button[aria-pressed="true"] { background: var(--nnh-inv); color: var(--nnh-invInk); }

.nn-cta { display: flex; align-items: center; gap: 10px; padding-left: 22px; border-left: 1px solid var(--nnh-hair); flex-shrink: 0; }
.nn-header .nn-btn { font-size: 14.5px; font-weight: 500; border-radius: 2px; padding: 9px 14px; border: 1px solid var(--nnh-hair); white-space: nowrap; line-height: 1.5; }
.nn-header .nn-btn--ghost { color: var(--nnh-ink); background: var(--nnh-panel); }
.nn-header .nn-btn--ghost:hover { color: var(--nnh-ink); background: var(--nnh-sunk); }
.nn-header .nn-btn--solid { color: var(--nnh-invInk); background: var(--nnh-inv); border-color: var(--nnh-inv); }
.nn-header .nn-btn--solid:hover { color: var(--nnh-invInk); background: var(--nnh-ink2); border-color: var(--nnh-ink2); }
.nn-header .nn-btn[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--nnh-core); }

.nn-mbar { display: none; align-items: center; gap: 8px; margin-left: auto; }
.nn-header .nn-iconbtn {
  width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--nnh-hair); border-radius: 2px; color: var(--nnh-ink);
}
.nn-header .nn-iconbtn:hover { background: var(--nnh-sunk); }
.nn-i-sun { display: none !important; }
:root[data-theme="dark"] .nn-i-sun { display: block !important; }
:root[data-theme="dark"] .nn-i-moon { display: none !important; }
.nn-header .nn-burger { flex-direction: column; gap: 5px; padding: 0 10px; align-items: stretch; }
.nn-burger span { display: block; height: 1.5px; background: var(--nnh-ink); }
.nn-mmenu {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
  background: var(--nnh-panel); border-bottom: 1.5px solid var(--nnh-strong); box-shadow: 0 14px 30px var(--nnh-shadow);
  display: flex; flex-direction: column; padding: 6px 18px 14px;
}
.nn-mmenu[hidden] { display: none; }
.nn-header .nn-mmenu a { padding: 13px 0; border-bottom: 1px solid var(--nnh-hair); font-size: 15px; font-weight: 500; color: var(--nnh-ink); }
.nn-header .nn-mmenu a:last-child { border-bottom: 0; }
.nn-header .nn-mmenu a[aria-current="page"] { color: var(--nnh-core); }

@media (max-width: 1480px) {
  .nn-header { --nnh-pad: 40px; gap: 22px; }
  .nn-nav { gap: 18px; }
}
@media (max-width: 1380px) {
  .nn-cta .nn-btn--ghost { display: none; }
}
@media (max-width: 1320px) {
  .nn-header { --nnh-pad: 48px; }
}
@media (max-width: 1180px) {
  .nn-nav, .nn-seg, .nn-cta { display: none; }
  .nn-mbar { display: flex; }
}
@media (max-width: 720px) {
  .nn-topbar { height: 3px; }
  .nn-header { height: 58px; --nnh-pad: 18px; }
  .nn-header .nn-brand { font-size: 18px; }
}
@media print {
  .nn-topbar, .nn-header { display: none; }
}

/* Mục đang xem (trang mục và bài trong mục) */
.nn-header .nn-nav a[aria-current="page"] { color: var(--nnh-core); box-shadow: inset 0 -2px 0 var(--nnh-core); padding-bottom: 3px; }
