/* Thanh điều hướng dùng chung cho mọi trang của newbieicu.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:#E6EAEE; --nnh-panel:#F0F3F6; --nnh-sunk:#D8DEE5;
  --nnh-ink:#10171E; --nnh-ink2:#38434E; --nnh-hair:#BCC5CE; --nnh-strong:#10171E;
  --nnh-core:#1450B8; --nnh-inv:#10171E; --nnh-invInk:#E6EAEE;
  --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:#10161C; --nnh-panel:#182028; --nnh-sunk:#252F39;
  --nnh-ink:#E2E8EE; --nnh-ink2:#B0BBC6; --nnh-hair:#2C3742; --nnh-strong:#586673;
  --nnh-core:#6FAEFF; --nnh-inv:#26323E; --nnh-invInk:#ECF1F5;
  --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: 28px;
  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; white-space: nowrap;
}
.nn-header .nn-brand:hover { color: var(--nnh-ink); }
.nn-nav { display: flex; align-items: center; gap: 22px; 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-cta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nn-header .nn-btn { font-size: 14px; font-weight: 500; border-radius: 2px; padding: 8px 13px; 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: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nn-header .nn-iconbtn.nn-burger { display: none; }
.nn-header .nn-iconbtn {
  width: 40px; height: 40px; 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: 1300px) {
  .nn-cta .nn-btn--ghost { display: none; }
}
@media (max-width: 1320px) {
  .nn-header { --nnh-pad: 48px; }
}
@media (max-width: 1180px) {
  .nn-nav, .nn-cta { display: none; }
  .nn-mbar { margin-left: auto; }
  .nn-header .nn-iconbtn { width: 44px; height: 44px; }
  .nn-header .nn-iconbtn.nn-burger { 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; }

/* ---------- Khối "Liên hệ" cuối mọi trang (shared/footer.html) ---------- */
.nn-contact { background: #0A1016; color: #DAE1E8; border-top: 1px solid #2B3742; font-family: 'Be Vietnam Pro', system-ui, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.nn-contact *, .nn-contact *::before, .nn-contact *::after { box-sizing: border-box; }
.nn-contact__in { max-width: 1400px; margin: 0 auto; padding: 26px 72px 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; }
.nn-contact__main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; }
.nn-contact__h { margin: 0; font-family: 'Archivo', system-ui, sans-serif; font-variation-settings: 'wdth' 112, 'wght' 700; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: #F0F3F6; }
.nn-contact a { color: #DAE1E8; text-decoration: none; }
.nn-contact a:hover { color: #6ED3B4; text-decoration: none; }
.nn-contact svg { display: block; flex-shrink: 0; }
.nn-contact__mail { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 15px; font-weight: 500; }
.nn-social { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.nn-social a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; font-size: 14px; font-weight: 500; border: 1px solid #2B3742; border-radius: 2px; }
.nn-social a:hover { border-color: #6ED3B4; }
.nn-contact a:focus-visible { outline: 2px solid #6ED3B4; outline-offset: 3px; }
@media (max-width: 1480px) { .nn-contact__in { padding-left: 40px; padding-right: 40px; } }
@media (max-width: 720px) {
  .nn-contact__in { padding: 22px 18px 26px; flex-direction: column; align-items: flex-start; }
  .nn-social a span { font-size: 13.5px; }
}
@media print { .nn-contact { display: none; } }
.nn-contact__legal { margin: 0; font-size: 13.5px; color: var(--nnh-meta, inherit); opacity: 0.85; }
.nn-contact__legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Nhãn "hot" đỏ trên mục App */
.nn-header .nn-nav a.nn-has-hot { position: relative; }
.nn-hot { display: inline-block; font-size: 9.5px; font-weight: 800; line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #e11d2e; border-radius: 4px; padding: 2px 4px 2px; box-shadow: 0 1px 3px rgba(225,29,46,.35); pointer-events: none; animation: nn-hot-pulse 2.4s ease-in-out infinite; }
.nn-has-hot .nn-hot { position: absolute; top: -11px; right: -20px; }
.nn-hot--inline { position: static; vertical-align: 2px; margin-left: 6px; animation: none; }
@keyframes nn-hot-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .nn-hot { animation: none; } }

/* DANG_NHAP_BAT = false (site.mjs): ẩn nút Tài khoản khi chưa có đăng nhập */
.nn-acc, .nn-mmenu a[href="/tai-khoan/"] { display: none !important; }
