/* ═══════════════════════════════════════════════════════
   index.css — Trang public news
   Import sau theme.css
═══════════════════════════════════════════════════════ */

/* ── Header ─────────────────────────────────────────── */
.nh {
  background: var(--sur);
  border-bottom: 1px solid var(--bd);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}
.ntb {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 22px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nlogo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--fd);
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.nlm {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fd);
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

/* ── Navigation ─────────────────────────────────────── */
.nnav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: visible;
}
.nni {
  padding: 7px 12px;
  border-radius: var(--rs);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--tx2);
  cursor: pointer;
  transition: all var(--ease);
  position: relative;
  white-space: nowrap;
}
.nni:hover,
.nni.on {
  color: var(--tx);
  background: var(--sur2);
}
.nni.on {
  color: var(--accent);
}
.ndrop {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 8px;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    visibility 0.15s;
  z-index: 500;
  min-width: 180px;
}
.ndrop-inner {
  background: var(--sur);
  border: 1px solid var(--bd2);
  border-radius: var(--r);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transform: translateY(-4px);
  transition: transform 0.15s ease;
  overflow: hidden;
}
.nni.has-drop {
  padding-right: 8px;
}
.ndrop-arrow {
  font-size: 9px;
  margin-left: 3px;
  opacity: 0.6;
  transition: transform 0.15s;
  display: inline-block;
  vertical-align: middle;
}
.nni.has-drop:hover .ndrop-arrow {
  transform: rotate(180deg);
}
.nni.has-drop:hover .ndrop,
.nni.has-drop:focus-within .ndrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nni.has-drop:hover .ndrop-inner,
.nni.has-drop:focus-within .ndrop-inner {
  transform: translateY(0);
}
.ndi {
  display: block;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--tx2);
  transition: all var(--ease);
  cursor: pointer;
}
.ndi:hover {
  background: var(--sur2);
  color: var(--tx);
}

/* hero section removed */

/* ── Main layout ─────────────────────────────────────── */
.nmain {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 22px 80px;
}
.ngrid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
.ngrid > div:first-child {
  min-width: 0;
}
#sidebarWidgets:empty {
  display: none;
}
.ngrid:has(#sidebarWidgets:empty) {
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
}

/* ── News cards ──────────────────────────────────────── */
.nc {
  background: var(--sur);
  border: 1px solid var(--bd);
  border-radius: var(--rl);
  overflow: hidden;
  transition: all var(--ease);
  cursor: pointer;
  margin-bottom: 12px;
  display: flex;
}
.nc:hover {
  border-color: var(--bd2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
.nci {
  width: 120px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  overflow: hidden;
}
.nci img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ncb {
  padding: 14px 16px;
  flex: 1;
  min-width: 0;
}
.ncc {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.nct {
  font-family: var(--fd);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.4;
}
.nct.pinned::before {
  content: "📌 ";
  font-size: 11px;
}
.nce {
  font-size: 12px;
  color: var(--tx2);
  line-height: 1.6;
}
.ncm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--tx3);
}

/* ── Post detail overlay ─────────────────────────────── */
.npost-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.npost-box {
  background: var(--sur);
  border: 1px solid var(--bd2);
  border-radius: var(--rl);
  width: min(720px, 100%);
  padding: 32px;
  position: relative;
  animation: npostIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes npostIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.npost-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sur2);
  border: 1px solid var(--bd2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  color: var(--tx2);
  transition: all var(--ease);
}
.npost-close:hover {
  background: var(--bg2);
  color: var(--tx);
}
.npost-cat {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.npost-title {
  font-family: var(--fd);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}
.npost-meta {
  font-size: 11px;
  color: var(--tx3);
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
}
.npost-thumb {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--r);
  margin-bottom: 20px;
}
.npost-body {
  font-size: 14px;
  line-height: 1.85;
  color: var(--tx);
}
.npost-body h1,
.npost-body h2,
.npost-body h3 {
  font-weight: 700;
  margin: 14px 0 6px;
}
.npost-body h2 {
  font-size: 1.2em;
}
.npost-body h3 {
  font-size: 1.05em;
}
.npost-body p {
  margin-bottom: 10px;
}
.npost-body ul,
.npost-body ol {
  margin: 6px 0 10px 22px;
}
.npost-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 12px 0;
  padding: 6px 14px;
  color: var(--tx2);
  font-style: italic;
  background: var(--sur2);
  border-radius: 0 var(--rs) var(--rs) 0;
}
.npost-body img {
  max-width: 100%;
  border-radius: var(--rs);
}
.npost-body a {
  color: var(--accent);
  text-decoration: underline;
}
.npost-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.npost-tag {
  padding: 3px 10px;
  border-radius: 50px;
  background: var(--sur2);
  font-size: 11px;
  color: var(--tx2);
  cursor: pointer;
  transition: all var(--ease);
}
.npost-tag:hover {
  background: var(--glow);
  color: var(--accent);
}

/* ── Sidebar widgets ─────────────────────────────────── */
.sw2 {
  background: var(--sur);
  border: 1px solid var(--bd);
  border-radius: var(--rl);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.swt {
  font-family: var(--fd);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.swi {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--bd);
  font-size: 12px;
  cursor: pointer;
  transition: color var(--ease);
}
.swi:hover {
  color: var(--accent);
}
.swi:last-child {
  border-bottom: none;
}
.swn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--tx2);
  flex-shrink: 0;
}

/* ── Pagination ──────────────────────────────────────── */
.npagi {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 20px 0 4px;
}
.npagi-btn {
  min-width: 34px;
  height: 34px;
  border-radius: var(--rs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--bd2);
  background: var(--sur2);
  color: var(--tx2);
  transition: all var(--ease);
}
.npagi-btn:hover {
  background: var(--sur);
  color: var(--tx);
}
.npagi-btn.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.npagi-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ── Empty state ─────────────────────────────────────── */
.n-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--tx3);
}
.n-empty-icon {
  font-size: 40px;
  opacity: 0.4;
  margin-bottom: 12px;
}
.n-empty-text {
  font-size: 13px;
}

/* ── Footer ──────────────────────────────────────────── */
.nfooter {
  background: var(--sur);
  border-top: 1px solid var(--bd);
  padding: 28px 22px;
}
.nfi {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
}
.nfb {
  font-family: var(--fd);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 7px;
}
.nfd {
  font-size: 11.5px;
  color: var(--tx2);
  line-height: 1.7;
}
.nfh {
  font-size: 10px;
  font-weight: 700;
  color: var(--tx2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.nfl {
  display: block;
  font-size: 12px;
  color: var(--tx2);
  margin-bottom: 6px;
  cursor: pointer;
  transition: color var(--ease);
}
.nfl:hover {
  color: var(--accent);
}
.nfbot {
  max-width: 1160px;
  margin: 20px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--bd);
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--tx3);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .ngrid {
    grid-template-columns: 1fr;
  }
  .nfi {
    grid-template-columns: 1fr 1fr;
  }
  .nc {
    flex-direction: column;
  }
  .nci {
    width: 100%;
    height: 100px;
  }
  .nhero h1 {
    font-size: 26px;
  }
}
@media (max-width: 480px) {
  .nfi {
    grid-template-columns: 1fr;
  }
}

/* ── Article view inline (menu click) ───────────────── */
.narticle {
  background: var(--sur);
  border: 1px solid var(--bd);
  border-radius: var(--rl);
  padding: 28px 32px 32px;
}
.narticle-cat {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.narticle-title {
  font-family: var(--fd);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.narticle-meta {
  font-size: 11.5px;
  color: var(--tx3);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nsep {
  opacity: 0.4;
}
.narticle-body {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--tx);
}
.narticle-body h1,
.narticle-body h2,
.narticle-body h3 {
  font-weight: 700;
  margin: 18px 0 8px;
}
.narticle-body h2 {
  font-size: 1.2em;
}
.narticle-body h3 {
  font-size: 1.05em;
}
.narticle-body p {
  margin-bottom: 12px;
}
.narticle-body ul,
.narticle-body ol {
  margin: 8px 0 12px 22px;
}
.narticle-body li {
  margin-bottom: 4px;
}
.narticle-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 14px 0;
  padding: 8px 16px;
  color: var(--tx2);
  font-style: italic;
  background: var(--sur2);
  border-radius: 0 var(--rs) var(--rs) 0;
}
.narticle-body img {
  max-width: 100%;
  border-radius: var(--r);
  margin: 10px 0;
}
.narticle-body a {
  color: var(--accent);
  text-decoration: underline;
}

/* Sidebar bài khác hover effect */
.narticle-swi {
  cursor: pointer;
  transition: background var(--ease);
}
.narticle-swi:hover {
  background: var(--sur2) !important;
}

/* Full-width article mode (no sidebar) */
.narticle-fullwidth {
  max-width: 780px;
  margin: 0 auto;
}

/* "Other articles" navigation below the article */
.narticle-others {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--bd);
}
.narticle-others-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--tx3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.narticle-others-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.narticle-other-item {
  font-size: 12.5px;
  padding: 6px 12px;
  background: var(--sur2);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  cursor: pointer;
  color: var(--tx2);
  transition: all var(--ease);
  line-height: 1.4;
}
.narticle-other-item:hover {
  background: var(--glow);
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 768px) {
  .narticle {
    padding: 18px 16px 24px;
  }
  .narticle-title {
    font-size: 19px;
  }
  .narticle-others-list {
    flex-direction: column;
  }
}
