/* nh-bds content: bai viet, trang tinh, danh muc bai. */

.nh-article { min-width: 0; max-width: 680px; padding-top: 14px; }
.nh-article--wide { max-width: none; }
.nh-page__side { padding-top: 56px; }
.nh-page__side .nh-panel { margin-top: 0; }
.nh-page__side > :first-child { margin-top: 0; }
.nh-page__side > :last-child { position: sticky; top: calc(var(--nh-stick, 0px) + 16px); } /* Khoi cuoi cot phai dinh. */
.nh-links { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: var(--lh-head); }
ol.nh-links { list-style: decimal; padding-left: 20px; }
.nh-links li { padding: 7px 0; border-top: 1px solid var(--nh-line); }
.nh-links li:first-child { border-top: 0; }
.nh-links a { color: var(--nh-text); }
.nh-links a[aria-current] { font-weight: 700; }
.nh-links small { color: var(--nh-text-3); }
.nh-side-box__actions { display: grid; gap: 8px; margin: 12px 0 0; }
.nh-article__h1 { font-size: var(--fs-3xl); line-height: var(--lh-tight); margin: 8px 0 6px; overflow-wrap: anywhere; }
.nh-article__meta { color: var(--nh-text-3); font-size: var(--fs-sm); margin: 0 0 16px; }
.nh-article__meta a { color: var(--nh-text-2); }
.nh-article__body { font-size: var(--fs-lg); line-height: var(--lh-read); color: var(--nh-text); overflow-wrap: anywhere; }
.nh-article__body h1 { font-size: var(--fs-3xl); line-height: var(--lh-tight); margin: 8px 0 12px; }
.nh-article__body h2 { font-size: 22px; line-height: var(--lh-head); margin: 32px 0 8px; color: var(--nh-brand); scroll-margin-top: 16px; }
.nh-article__body h3 { font-size: var(--fs-lg); line-height: var(--lh-head); margin: 24px 0 8px; scroll-margin-top: 16px; }
.nh-article__body p, .nh-article__body ul, .nh-article__body ol { margin: 0 0 14px; }
.nh-article__body ul, .nh-article__body ol { padding-left: 22px; }
.nh-article__body a { overflow-wrap: anywhere; }
.nh-article__body img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.nh-article__body iframe { max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.nh-article__body table { border-collapse: collapse; width: 100%; font-size: var(--fs-base); }
.nh-article__body th, .nh-article__body td { border: 1px solid var(--nh-line); padding: 8px 10px; vertical-align: top; overflow-wrap: break-word; }
.nh-article__body :is(th, td):first-child { min-width: 7.5em; }
.nh-article__body blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--nh-line); color: var(--nh-text-2); }
.noi-dung-bai-viet { font-family: inherit !important; font-size: inherit !important; line-height: inherit !important; }
.noi-dung-bai-viet p, .noi-dung-bai-viet li, .noi-dung-bai-viet td { text-align: left !important; }
.noi-dung-bai-viet a[style*="background"] { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 44px; text-decoration: none; }
.nh-article__lead { margin: 32px 0 0; padding: 16px; border: 1px solid var(--nh-line); border-radius: var(--r-md); }
.nh-article__lead .nh-lead { border-top: 0; margin-top: 0; padding-top: 0; }
.nh-article__intro { margin-bottom: 16px; }
.nh-article__body > .nh-cta { margin: 24px 0; }

.nh-breadcrumbs p { margin: 0; }
.nh-breadcrumbs .separator { margin: 0 6px; }

.nh-table-wrap { overflow-x: auto; margin: 16px 0 8px; border: 1px solid var(--nh-line); border-radius: var(--r-md); }
.nh-table-wrap table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: var(--fs-base); margin: 0; }
.nh-table-wrap th, .nh-table-wrap td { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--nh-line); vertical-align: top; line-height: var(--lh-ui); text-align: left; }
.nh-table-wrap thead th { background: var(--nh-surface); color: var(--nh-text-2); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.nh-table-wrap tbody tr:hover { background: var(--nh-surface); }
.nh-table-wrap .nh-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.nh-table-wrap .nh-col-ten { position: sticky; left: 0; background: var(--nh-bg); min-width: 170px; box-shadow: 1px 0 0 var(--nh-line); }
.nh-table-wrap .nh-col-luu_y { min-width: 220px; color: var(--nh-text-2); }
.nh-table-wrap .nh-col-khu { white-space: nowrap; }
.nh-grid--posts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.nh-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.nh-grid__full { grid-column: 1 / -1; }
.nh-grid__full .nh-cta { margin: 0; }
.nh-card--post .nh-card__img { aspect-ratio: 16 / 9; }
.nh-card--post .nh-card__title { font-size: var(--fs-md); font-weight: 700; }
.nh-card__sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nh-page__more { grid-column: 1 / -1; }
.nh-sticky { display: none; }

.nh-related { margin: 32px 0 0; }
.nh-related__title { font-size: var(--fs-lg); color: var(--nh-text); margin: 0 0 8px; }
.nh-related__list { list-style: none; margin: 0; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.nh-related__list a { display: block; height: 100%; padding: 12px 14px; border: 1px solid var(--nh-line); border-radius: var(--r-md); color: var(--nh-text) !important; }
.nh-related__list a:hover { background: var(--nh-surface); text-decoration: none !important; }
.nh-related__list strong { display: block; font-size: var(--fs-base); line-height: var(--lh-head); color: var(--nh-link); }
.nh-related__list span { display: block; font-size: var(--fs-sm); color: var(--nh-text-3); margin-top: 4px; line-height: var(--lh-ui); }

.nh-unverified { background: var(--nh-warn-bg); border: 1px dashed var(--nh-warn-line); border-radius: var(--r-md); padding: 10px 14px; font-size: var(--fs-base); margin-bottom: 16px; }

.nh-promo__actions { display: grid; gap: 8px; margin: 12px 0 8px; }

@media (max-width: 960px) {
	.nh-article { max-width: none; }
	.nh-page__side { padding-top: 0; }
	.nh-page__side .nh-panel { margin-top: 24px; }
	.nh-page__side > :last-child { position: static; }
	.nh-side-box--toc { display: none; }
	.nh-links a { display: inline-flex; align-items: center; min-height: 44px; }
	.nh-links li { padding: 0; }
	.nh-grid--posts, .nh-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.nh-sticky { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; gap: 8px; padding: 8px 12px; background: var(--nh-bg); box-shadow: var(--sh-1); }
	.nh-sticky .nh-btn { flex: 1; padding: 0 12px; }
	body.single-post { padding-bottom: 68px; }
	.nh-sticky .nh-btn:not(.nh-btn--primary, .nh-btn--zalo) { border-color: var(--nh-line); }
	/* Bài viết: khối 4 tin mini ở cột phải lặp với "Nhà đất đang bán" dưới bài → ẩn (blog.php không có .nh-page__more). */
	.nh-page:has(.nh-page__more) .nh-page__side > .nh-side-box:first-child { display: none; }
}
@media (max-width: 767px) {
	.nh-table-wrap { overflow: visible; border: 0; }
	.nh-table-wrap table, .nh-table-wrap tbody, .nh-table-wrap tr, .nh-table-wrap td { display: block; min-width: 0; }
	.nh-table-wrap thead { display: none; }
	.nh-table-wrap tr { border: 1px solid var(--nh-line); border-radius: var(--r-md); padding: 6px 14px 10px; margin-bottom: 12px; }
	.nh-table-wrap td { border: 0; padding: 6px 0; display: flex; gap: 12px; justify-content: space-between; }
	.nh-table-wrap td::before { content: attr(data-label); flex: 0 0 42%; color: var(--nh-text-3); font-size: var(--fs-xs); text-align: left; }
	.nh-table-wrap td.nh-col-ten { position: static; display: block; font-size: 17px; border-bottom: 1px solid var(--nh-line); margin-bottom: 4px; box-shadow: none; min-width: 0; }
	.nh-table-wrap td.nh-col-ten::before { display: none; }
	.nh-table-wrap .nh-num, .nh-table-wrap .nh-col-luu_y { white-space: normal; text-align: right; min-width: 0; }
}
@media (max-width: 640px) {
	.nh-article__h1, .nh-article__body h1 { font-size: var(--fs-2xl); }
	.nh-article__body { font-size: 17px; }
	.nh-article__body h2 { font-size: 20px; }
	.nh-article__body table { display: block; max-width: 100%; overflow-x: auto; }
	/* Breadcrumb Rank Math trong bài: bỏ crumb cuối (tiêu đề bài ngay dưới); trang chuyên mục giữ nguyên. */
	.nh-breadcrumbs a { padding: 12px 0; }
	.single-post .nh-breadcrumbs .last, .single-post .nh-breadcrumbs .separator:nth-last-child(2) { display: none; }
	/* Đè style inline h2/h3 trong nguồn bài (24px, margin 40px) tới khi sửa prompt sinh bài. */
	.noi-dung-bai-viet h2 { font-size: 20px !important; margin: 28px 0 12px !important; padding-left: 12px !important; border-left-width: 4px !important; }
	.noi-dung-bai-viet h3 { font-size: 18px !important; margin-top: 22px !important; }
	/* Thẻ bài 1 cột, ảnh vuông 88px bên trái: ảnh bìa có chữ không đọc được ở 160px; 20 bài 7 màn → 3 màn. */
	.nh-grid--posts { grid-template-columns: 1fr; gap: 8px; }
	.nh-card--post { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 10px; align-items: start; padding: 8px; }
	.nh-card--post .nh-card__img { grid-row: 1 / 4; aspect-ratio: 1; margin: 0; }
	.nh-card--post > :not(.nh-card__img) { margin: 0; }
	.nh-card--post .nh-card__sum { -webkit-line-clamp: 2; }
}
