/* ==========================================================================
   Trang chủ đề (hub) VI — N1, 04/11/2026. Nạp bởi _includes/hub.html.
   Tiền tố .np-hub-. Dùng biến màu của theme (--color-*).
   ========================================================================== */
.content-wrapper:has(.np-hub) { max-width: 1120px; }
/* Hub đã có hàng nhảy nhóm ở đầu trang → bỏ khung "On this page" bên phải, nhường chỗ cho thẻ */
body:has(.np-hub) #tableOfContents { display: none !important; }
@media (min-width: 1366px) { main.col-lg-10:has(.np-hub) { padding-right: 1.5rem !important; } }

.np-hub-head { display: flex; gap: 16px; align-items: flex-start; margin: 4px 0 18px; }
.np-hub-head__icon {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--color-primary-bg); color: var(--color-primary); font-size: 26px;
}
.content-wrapper .np-hub-head h1 { margin: 0 0 6px !important; font-size: 30px; line-height: 1.2; border: 0 !important; padding: 0 !important; }
.np-hub-intro { margin: 0 !important; font-size: 16px; line-height: 1.6; color: var(--color-text-secondary); max-width: 760px; }

.np-hub-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.np-hub-jump a {
  font-size: 13.5px; line-height: 1; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--color-border);
  color: var(--color-text-secondary); text-decoration: none; background: var(--color-bg);
}
.np-hub-jump a:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }

.np-hub-group { margin: 0 0 28px; scroll-margin-top: 80px; }
.content-wrapper .np-hub-group__title, .content-wrapper .np-hub-refs__title {
  display: flex; align-items: center; gap: 8px; font-size: 18px !important; font-weight: 700; margin: 0 0 12px !important;
  padding: 0 !important; border: 0 !important; color: var(--color-text);
}
.np-hub-group__title i, .np-hub-refs__title i { color: var(--color-primary); font-size: 19px; font-weight: 400; }

.np-hub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.content-wrapper a.np-hub-card {
  display: grid; grid-template-columns: 38px 1fr 14px; gap: 12px; align-items: start; padding: 14px 14px 14px 14px;
  border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-bg); color: inherit;
  text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.content-wrapper a.np-hub-card:hover {
  border-color: var(--color-primary); box-shadow: 0 6px 18px rgba(16, 24, 20, .08); transform: translateY(-1px); text-decoration: none;
}
.np-hub-card__icon {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--color-bg-subtle); color: var(--color-primary); font-size: 19px;
}
.np-hub-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.np-hub-card__t { font-size: 15.5px; font-weight: 650; line-height: 1.35; color: var(--color-text); }
.np-hub-card__w { font-size: 13.5px; line-height: 1.45; color: var(--color-text-secondary); }
.np-hub-card__w b { font-weight: 650; color: var(--color-primary); }
.np-hub-card__go { color: var(--color-text-muted); font-size: 14px; padding-top: 2px; }
.np-hub-card:hover .np-hub-card__go, .np-hub-card:hover .np-hub-card__t { color: var(--color-primary); }
.np-hub-card.is-also { background: var(--color-bg-subtle); border-style: dashed; }

/* Câu hỏi nhanh (FAQ) */
.np-hub-faq__cols { columns: 2 320px; column-gap: 28px; }
.np-hub-faq__grp { break-inside: avoid; margin: 0 0 16px; }
.content-wrapper .np-hub-faq__grp h3 { font-size: 13px !important; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); margin: 0 0 6px !important; }
.np-hub-faq__grp ul { list-style: none; padding: 0 !important; margin: 0 !important; }
.np-hub-faq__grp li { margin: 0 !important; padding: 0 !important; }
.np-hub-faq__grp li::before { content: none !important; }
.content-wrapper .np-hub-faq__grp a { display: block; padding: 6px 0; font-size: 14.5px; line-height: 1.45; color: var(--color-text); border-bottom: 1px solid var(--color-border-light); text-decoration: none; }
.content-wrapper .np-hub-faq__grp a:hover { color: var(--color-primary); }

/* Tham chiếu cài đặt — danh sách gọn ở cuối hub */
.np-hub-refs { margin: 8px 0 24px; padding: 18px 20px; border-radius: 12px; background: var(--color-bg-subtle); border: 1px solid var(--color-border); scroll-margin-top: 80px; }
.np-hub-refs__lead { font-size: 14px; color: var(--color-text-secondary); margin: -4px 0 10px !important; }
.np-hub-refs__list { list-style: none; padding: 0 !important; margin: 0 !important; columns: 3 220px; column-gap: 24px; }
.np-hub-refs__list li { break-inside: avoid; margin: 0 !important; padding: 0 !important; }
.np-hub-refs__list li::before { content: none !important; }
.content-wrapper .np-hub-refs__list a { display: block; padding: 5px 0; font-size: 14px; line-height: 1.4; color: var(--color-text); text-decoration: none; }
.content-wrapper .np-hub-refs__list a::before { content: "›"; color: var(--color-text-muted); margin-right: 7px; }
.content-wrapper .np-hub-refs__list a:hover { color: var(--color-primary); }

/* Ô lọc (hub FAQ) */
.np-hub-filter { position: relative; max-width: 620px; margin: 0 0 22px; }
.np-hub-filter i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); font-size: 18px; }
.np-hub-filter input {
  width: 100%; height: 48px; padding: 0 14px 0 42px; font-size: 16px; border: 1.5px solid var(--color-border);
  border-radius: 12px; background: var(--color-bg); color: var(--color-text); outline: none;
}
.np-hub-filter input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-subtle); }
.np-hub-empty { font-size: 15px; color: var(--color-text-secondary); }
.np-hub [hidden] { display: none !important; }

/* Hub "Chọn loại menu": dùng lại ô loại menu của trang chủ + ma trận so sánh */
.np-hub-showcase { margin: 0 0 30px; }
.np-hub-showcase .hs { max-width: none; padding: 0; }
.np-hub-showcase .hs-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.np-hub-showcase .ch-matrix { margin-top: 18px; }
.np-hub-showcase__note { font-size: 14px; color: var(--color-text-secondary); margin: 12px 0 26px !important; }

/* Đầu bài: ← chủ đề */
.np-crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--color-primary); text-decoration: none; margin: 0 0 6px; }
.np-crumb:hover { text-decoration: underline; }

@media (max-width: 767.98px) {
  .np-hub-head { gap: 12px; }
  .np-hub-head__icon { width: 42px; height: 42px; font-size: 21px; border-radius: 11px; }
  .content-wrapper .np-hub-head h1 { font-size: 24px; }
  .np-hub-intro { font-size: 15px; }
  .np-hub-cards { grid-template-columns: 1fr; }
  .np-hub-jump { flex-wrap: nowrap; overflow-x: auto; margin-right: -12px; padding-bottom: 4px; }
  .np-hub-jump a { white-space: nowrap; }
  .np-hub-refs { padding: 14px 14px; }
}
