/* ==========================================================================
   blog.css — module bài viết: Giải pháp & Công nghệ, Tin tức, Luật (app/posts/)
   Chỉ nạp trên các trang này (app/posts/*.php qua $pageHead)
   ========================================================================== */
.nh-blog-hero { background: linear-gradient(180deg, #f3f9f5, #fff); padding: 18px 0 34px; }
.nh-blog-hero h1 { font-size: clamp(26px, 3.2vw, 40px); font-weight: 800; color: var(--g-deep); margin-bottom: 10px; }
.nh-blog-hero__lead { max-width: 760px; color: var(--muted); font-size: 16px; }
.nh-blog-note { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px !important; padding: 8px 14px; border-radius: 8px; background: #fff7ef; color: #8a4513; font-size: 13.5px; }
.nh-tabs { display: flex; gap: 8px; margin-top: 24px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.nh-tabs::-webkit-scrollbar { display: none; }
.nh-tabs a { flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink); transition: .2s; }
.nh-tabs a:hover { border-color: var(--g); color: var(--g); }
.nh-tabs a.is-current { background: var(--g); border-color: var(--g); color: #fff; }

.nh-blog-group { padding-top: 10px; padding-bottom: 46px; }
.nh-blog-group__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.nh-blog-group__lead { color: var(--muted); max-width: 760px; }
.nh-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--g) !important; white-space: nowrap; }
.nh-more:hover { color: var(--g-dark) !important; }
.nh-more .ico { transition: transform .2s; }
.nh-more:hover .ico { transform: translateX(3px); }

.nh-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.nh-post a { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.nh-post a:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cfe3d5; }
.nh-post__img { display: block; aspect-ratio: 16 / 9; background: var(--g-soft); overflow: hidden; }
.nh-post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.nh-post a:hover .nh-post__img img { transform: scale(1.05); }
.nh-post__noimg { display: grid; place-items: center; height: 100%; color: var(--g); font-size: 40px; }
.nh-post__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 20px; }
.nh-post__body small { font-size: 12.5px; color: var(--g); font-weight: 600; }
.nh-post__body b { font-size: 16.5px; line-height: 1.4; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nh-post a:hover .nh-post__body b { color: var(--g-dark); }
.nh-post__desc { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nh-empty { color: var(--muted); padding: 30px 0; }

/* ---------- Trang bài viết ---------- */
.nh-article__head { background: linear-gradient(180deg, #f3f9f5, #fff); padding: 18px 0 26px; }
.nh-article__head .nh-crumb { margin-bottom: 18px; }
.nh-article__head h1 { font-size: clamp(25px, 3vw, 38px); font-weight: 800; color: var(--g-deep); line-height: 1.3; }
.nh-article__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px !important; color: var(--muted); font-size: 13.5px; }
.nh-article__meta span { display: inline-flex; align-items: center; gap: 6px; }
.nh-article__meta .ico { color: var(--g); }
.nh-article__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; padding-bottom: 56px; }
.nh-article__cover { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; background: var(--g-soft); }
.nh-article__cover img { width: 100%; height: auto; }
.nh-article__notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; background: #fff7ef; border: 1px solid #fde0c6; color: #7a3d10; font-size: 14px; margin-bottom: 22px !important; }
.nh-article__notice .ico { flex: none; margin-top: 3px; color: var(--o); }
.nh-article__notice a { color: var(--o-dark); font-weight: 700; text-decoration: underline; }

.nh-prose { font-size: 16.5px; line-height: 1.8; color: #24332b; overflow-wrap: anywhere; }
.nh-prose > * + * { margin-top: 1em; }
.nh-prose h2 { font-size: 24px; color: var(--g-deep); margin-top: 1.8em; line-height: 1.35; scroll-margin-top: 110px; }
.nh-prose h3 { font-size: 19.5px; color: var(--g-dark); margin-top: 1.5em; line-height: 1.4; }
.nh-prose h4 { font-size: 17px; margin-top: 1.3em; }
.nh-prose ul, .nh-prose ol { padding-left: 1.4em; }
.nh-prose li + li { margin-top: .35em; }
.nh-prose li::marker { color: var(--g); }
.nh-prose a { color: var(--g); text-decoration: underline; text-underline-offset: 2px; }
.nh-prose img { height: auto; border-radius: 10px; margin: 0 auto; }
.nh-prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--g); background: var(--g-tint); border-radius: 0 10px 10px 0; }
.nh-prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.nh-prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; display: block; overflow-x: auto; }
.nh-prose th, .nh-prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.nh-prose th { background: var(--g-tint); color: var(--g-deep); }
.nh-prose tr:nth-child(even) td { background: #fafcfb; }

.nh-article__cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 40px; padding: 22px 24px; border-radius: var(--radius); background: var(--g-deep); color: #fff; }
.nh-article__cta b { display: block; font-size: 18px; }
.nh-article__cta span { color: #cfe6d6; font-size: 14px; }
.nh-article__cta .nh-btn { flex: none; }

.nh-article__side { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 20px; }
.nh-toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: #fff; }
.nh-toc > b, .nh-toc summary { font-weight: 800; color: var(--g-deep); font-size: 15px; }
.nh-toc ol { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: toc; max-height: 52vh; overflow: auto; }
.nh-toc li { counter-increment: toc; font-size: 13.5px; line-height: 1.45; }
.nh-toc li + li { margin-top: 9px; }
.nh-toc a { display: flex; gap: 8px; color: var(--muted); }
.nh-toc a::before { content: counter(toc); flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--g-soft); color: var(--g-dark); font-size: 11px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.nh-toc a:hover { color: var(--g-dark); }
.nh-toc--inline { display: none; margin-bottom: 22px; }
.nh-toc--inline summary { cursor: pointer; }
.nh-side-box { border-radius: var(--radius); padding: 20px; background: var(--g-tint); border: 1px solid #d7eadc; }
.nh-side-box > b { display: block; font-weight: 800; color: var(--g-deep); margin-bottom: 10px; }
.nh-side-box ul { list-style: none; margin: 0 0 16px; padding: 0; }
.nh-side-box li a { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14px; font-weight: 600; border-bottom: 1px dashed #cfe3d5; }
.nh-side-box li a:hover { color: var(--g); }
.nh-side-box li .ico { color: var(--g); }
.nh-side-box .nh-btn { width: 100%; }

/* ---------- Hỏi đáp ---------- */
.nh-faq-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.nh-faq-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; background: var(--g-tint); border: 1px solid #d7eadc; font-size: 14px; font-weight: 600; color: var(--g-dark); }
.nh-faq-jump a:hover { background: var(--g); color: #fff; }
.nh-faq-group { scroll-margin-top: 110px; }
.nh-faq-group + .nh-faq-group { margin-top: 44px; }
.nh-faq-group .nh-title-left { margin-bottom: 16px; }
.nh-faq-group > .nh-more { margin-top: 14px; }

@media (max-width: 1024px) {
  .nh-posts { grid-template-columns: repeat(2, 1fr); }
  .nh-article__grid { grid-template-columns: 1fr; gap: 0; }
  .nh-article__side { position: static; }
  .nh-article__side .nh-toc { display: none; }
  .nh-toc--inline { display: block; }
}
@media (max-width: 640px) {
  .nh-posts { grid-template-columns: 1fr; gap: 14px; }
  .nh-post a { flex-direction: row; }
  .nh-post__img { flex: 0 0 116px; aspect-ratio: auto; }
  .nh-post__body { padding: 12px 14px; gap: 5px; }
  .nh-post__body b { font-size: 15px; }
  .nh-post__desc { display: none; }
  .nh-blog-group__head { align-items: center; }
  .nh-prose { font-size: 16px; }
  .nh-prose h2 { font-size: 21px; }
  .nh-article__cta { flex-direction: column; align-items: stretch; text-align: center; }
}
.nh-article__head h1, .nh-article__meta { max-width: 900px; }

/* ---------- Trang Dự án (/du-an/) và trang tổng nhóm dịch vụ ---------- */
.nh-pj-stats { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 24px 0 0; padding: 0; }
.nh-pj-stats li { flex: 1 1 160px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.nh-pj-stats b { display: block; font-size: 30px; font-weight: 800; color: var(--g); line-height: 1.1; }
.nh-pj-stats span { font-size: 13.5px; color: var(--muted); }
.nh-pj-h2 { margin-bottom: 20px; }
.nh-pj-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; position: sticky; top: 74px; z-index: 5; background: var(--g-tint); padding: 10px 0; }
.nh-pj-cats { margin-top: 0; }
.nh-pj-cats a { display: inline-flex; align-items: center; gap: 6px; }
.nh-pj-cats a .ico { width: 16px; height: 16px; color: var(--g); }
.nh-pj-cats small { font-size: 12px; color: var(--muted); font-weight: 600; }
.nh-pj-region { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.nh-pj-region button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.nh-pj-region button.is-current { background: var(--g); color: #fff; }
.nh-pj-group { scroll-margin-top: 150px; }
.nh-pj-group + .nh-pj-group { margin-top: 40px; }
.nh-pj-group .nh-title-left { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.nh-pj-group__ico { width: 40px; height: 40px; border-radius: 10px; background: var(--g); color: #fff; display: grid; place-items: center; flex: none; }
.nh-pj-group__ico .ico { width: 20px; height: 20px; }
.nh-pj-type { font-size: 16px; color: var(--g-dark); margin: 22px 0 10px !important; }
.nh-pj-type small { color: var(--muted); font-weight: 500; }
.nh-pj-list { list-style: none; counter-reset: pj; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.nh-pj-list li { counter-increment: pj; display: flex; align-items: flex-start; gap: 14px; padding: 12px 18px; font-size: 14.5px; line-height: 1.5; }
.nh-pj-list li + li { border-top: 1px solid var(--line); }
.nh-pj-list li::before { content: counter(pj); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--g-soft); color: var(--g-dark); font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.nh-pj-list__title { flex: 1; }
.nh-pj-list__meta { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--g-dark); font-weight: 600; background: var(--g-tint); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.nh-pj-list__meta .ico { width: 13px; height: 13px; }
.nh-pj-count { font-size: .6em; color: var(--muted); font-weight: 600; }
.nh-svc-card { color: inherit; }
.nh-svc-card__name { display: block; font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.nh-svc-card:hover .nh-svc-card__name { color: var(--g); }
.nh-svc-card__desc { display: block; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.nh-svc-card .nh-link { margin-top: auto; }
.nh-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1023px) { .nh-pj-bar { top: 64px; } }
@media (max-width: 767px) {
  .nh-grid--2 { grid-template-columns: 1fr; }
  .nh-pj-bar { position: static; }
  .nh-pj-list li { flex-wrap: wrap; padding: 12px 14px; gap: 8px 12px; }
  .nh-pj-list__meta { margin-left: 36px; }
  .nh-pj-stats b { font-size: 24px; }
}

/* Danh sách dự án: dấu chấm thay số thứ tự (không hiển thị số lượng) */
.nh-pj-list li::before { content: ""; width: 8px; height: 8px; margin-top: 8px; background: var(--g); }

/* ---------- Trang Dự án: thẻ có ảnh, không tên chủ đầu tư ---------- */
.nh-pj-industries { margin-top: 18px !important; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.nh-pj-industries b { color: var(--g-deep); margin-right: 4px; }
.nh-pj-industries span { padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.nh-pj-cats button { font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink); }
.nh-pj-cats button .ico { width: 16px; height: 16px; color: var(--g); }
.nh-pj-cats button.is-current { background: var(--g); border-color: var(--g); color: #fff; }
.nh-pj-cats button.is-current .ico { color: #fff; }
.nh-projects-page .nh-pj-bar { background: #fff; }
.nh-pj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.nh-pj-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.nh-pj-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(16, 60, 34, .12); }
.nh-pj-card__img { position: relative; aspect-ratio: 4 / 3; background: var(--g-soft); overflow: hidden; }
.nh-pj-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.nh-pj-card:hover .nh-pj-card__img img { transform: scale(1.05); }
.nh-pj-card--noimg .nh-pj-card__img { aspect-ratio: 16 / 6; background: linear-gradient(135deg, var(--g-deep), #1a8a46); }
.nh-pj-card__ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.85); }
.nh-pj-card__ph .ico { width: 44px; height: 44px; }
.nh-pj-card__tag { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.95); color: var(--g-dark); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.nh-pj-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.nh-pj-card__body h2 { font-size: 16px; line-height: 1.45; color: var(--g-deep); margin: 0; }
.nh-pj-card__meta { list-style: none; margin: auto 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.nh-pj-card__meta li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.nh-pj-card__meta .ico { width: 15px; height: 15px; color: var(--g); flex: none; }
@media (max-width: 1023px) { .nh-pj-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .nh-pj-grid { grid-template-columns: 1fr; gap: 16px; } }
