/*
Theme Name: Nhà Xã Hội Hải Phòng
Description: Giao diện gọn, ưu tiên điện thoại cho trang thông tin nhà ở xã hội Hải Phòng. Màu và logo đổi ở khối :root.
Version: 0.1.0
Requires PHP: 8.1
Text Domain: nxh
*/

/* ---------- Màu và cỡ: đổi nhận diện thương hiệu ở đây ---------- */
:root {
	--c-brand: #1560e8;
	--c-brand-dark: #0a3f9e;
	--c-brand-soft: #eaf1ff;
	--c-accent: #c2410c;
	--c-accent-soft: #fff1e7;
	--c-ink: #101a2e;
	--c-muted: #56617a;
	--c-line: #d8e0ee;
	--c-bg: #ffffff;
	--c-bg-alt: #f4f7fc;
	--c-ok: #0f7a3d;
	--c-warn: #a16207;
	--radius: 12px;
	--wrap: 1120px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--c-ink); background: var(--c-bg); padding-bottom: 64px; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--c-brand); text-underline-offset: 3px; }
a:hover { color: var(--c-brand-dark); }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3.6vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nxh-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.nxh-muted { color: var(--c-muted); font-size: .9rem; }
.nxh-empty { color: var(--c-muted); padding: 16px; background: var(--c-bg-alt); border-radius: var(--radius); }

/* ---------- Đầu trang ---------- */
.nxh-skip { position: absolute; left: -999px; }
.nxh-skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.nxh-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--c-line); }
.nxh-header__in { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.nxh-logo { white-space: nowrap; font-weight: 800; font-size: 1.05rem; color: var(--c-brand-dark); text-decoration: none; margin-right: auto; display: flex; align-items: center; gap: 8px; }
.nxh-logo img { display: block; height: 40px; width: auto; }
.nxh-nav { display: none; }
.nxh-nav a { white-space: nowrap; text-decoration: none; color: var(--c-ink); font-weight: 600; font-size: .95rem; padding: 8px 10px; border-radius: 8px; }
.nxh-nav a:hover, .nxh-nav a[aria-current="page"] { background: var(--c-brand-soft); color: var(--c-brand-dark); }
.nxh-menu-btn { border: 1px solid var(--c-line); background: #fff; border-radius: 8px; padding: 8px 12px; font: inherit; font-weight: 600; }
.nxh-header .nxh-btn { display: none; }
.nxh-nav.is-open { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--c-line); padding: 8px 16px 16px; }
.nxh-pledge { margin: 0; background: var(--c-brand-dark); color: #fff; font-size: .8rem; text-align: center; padding: 6px 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; }
.nxh-pledge span::before { content: "✓ "; opacity: .8; }

@media (min-width: 1100px) {
	body { padding-bottom: 0; }
	.nxh-nav { display: flex; gap: 2px; }
	.nxh-menu-btn { display: none; }
	.nxh-header .nxh-btn { display: inline-flex; }
}

/* ---------- Nút ---------- */
.nxh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--c-accent); color: #fff; border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; min-height: 46px; }
.nxh-btn:hover { background: #9a3412; color: #fff; }
.nxh-btn--ghost { background: #fff; color: var(--c-brand-dark); border: 2px solid var(--c-brand); }
.nxh-btn--ghost:hover { background: var(--c-brand-soft); color: var(--c-brand-dark); }
.nxh-btn--sm { padding: 8px 14px; min-height: 38px; font-size: .9rem; }

/* ---------- Khối trang ---------- */
.nxh-sec { padding: 36px 0; }
.nxh-sec--alt { background: var(--c-bg-alt); }
.nxh-sec__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; }
.nxh-sec__head h2 { margin: 0; }
.nxh-sec__head a { font-weight: 600; }
.nxh-lead { font-size: 1.05rem; color: var(--c-muted); max-width: 62ch; }

.nxh-hero { background: linear-gradient(180deg, var(--c-brand-soft), #fff); padding: 32px 0 28px; }
.nxh-hero p { font-size: 1.05rem; max-width: 60ch; }
.nxh-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.nxh-hero__meta { margin-top: 14px; font-size: .88rem; color: var(--c-muted); }

/* ---------- Thẻ dự án ---------- */
.nxh-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.nxh-card { position: relative; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.nxh-card:hover { border-color: var(--c-brand); box-shadow: 0 4px 16px rgba(21, 96, 232, .12); }
.nxh-card__top { display: flex; flex-wrap: wrap; gap: 6px; }
.nxh-card__title { margin: 4px 0 0; font-size: 1.08rem; }
.nxh-card__title a { color: var(--c-ink); text-decoration: none; }
.nxh-card__title a::after { content: ""; position: absolute; inset: 0; }
.nxh-card__loc { margin: 0; color: var(--c-muted); font-size: .9rem; }
.nxh-card__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 0; }
.nxh-card__facts dt { font-size: .78rem; color: var(--c-muted); }
.nxh-card__facts dd { margin: 0; font-weight: 700; font-size: 1.05rem; }
.nxh-card__facts small { font-weight: 400; color: var(--c-muted); font-size: .8rem; }
.nxh-card__dl { margin: 6px 0 0; font-size: .9rem; font-weight: 600; color: var(--c-accent); }
.nxh-card__more { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: .9rem; text-decoration: none; }
.nxh-card[hidden] { display: none; }

.nxh-badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #eef1f0; color: #3d4a46; }
.nxh-badge--dang-nhan { background: #dcfce7; color: #14532d; }
.nxh-badge--sap-mo { background: #fef3c7; color: #713f12; }
.nxh-badge--thue { background: #e0ecff; color: #1e3a8a; }

/* ---------- Bộ lọc ---------- */
.nxh-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.nxh-filter button, .nxh-map__tabs button, .nxh-tabs button { border: 1px solid var(--c-line); background: #fff; border-radius: 99px; padding: 8px 14px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.nxh-filter button.is-on, .nxh-map__tabs button.is-on, .nxh-tabs button.is-on { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }

/* ---------- Bảng ---------- */
.nxh-table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--radius); margin-bottom: 10px; }
.nxh-table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
.nxh-table th, .nxh-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.nxh-table thead th { background: var(--c-bg-alt); font-size: .82rem; }
.nxh-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Lịch nhận hồ sơ ---------- */
.nxh-lich { margin-bottom: 28px; }
.nxh-lich__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.nxh-lich__list li { display: grid; gap: 8px; border: 1px solid var(--c-line); border-left: 5px solid var(--c-line); border-radius: var(--radius); padding: 14px 16px; }
.nxh-lich--dang-nhan li { border-left-color: var(--c-ok); }
.nxh-lich--sap-mo li { border-left-color: var(--c-warn); }
.nxh-lich__left { display: inline-block; margin-left: 10px; background: var(--c-accent-soft); color: var(--c-accent); font-weight: 700; font-size: .82rem; padding: 2px 9px; border-radius: 99px; }
.nxh-lich__what a { font-weight: 700; font-size: 1.05rem; }
.nxh-lich__what p { margin: 2px 0 0; }
@media (min-width: 720px) { .nxh-lich__list li { grid-template-columns: 250px 1fr; } }

/* ---------- Sơ đồ ---------- */
.nxh-map__tabs, .nxh-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.nxh-map__canvas { position: relative; height: 320px; border-radius: var(--radius); border: 1px solid var(--c-line); background:
	linear-gradient(90deg, transparent 49.7%, var(--c-line) 49.7%, var(--c-line) 50.3%, transparent 50.3%),
	radial-gradient(circle at 78% 68%, #d6ebf5 0, #d6ebf5 14%, transparent 15%), var(--c-brand-soft); overflow: hidden; }
.nxh-map__lbl { position: absolute; top: 10px; font-weight: 700; font-size: .85rem; color: var(--c-brand-dark); line-height: 1.2; opacity: .75; }
.nxh-map__lbl small { font-weight: 400; }
.nxh-map__lbl--tay { left: 12px; }
.nxh-map__lbl--dong { right: 12px; text-align: right; }
.nxh-pin { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #64748b; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.nxh-pin--dang-nhan { background: var(--c-ok); width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.nxh-pin--sap-mo { background: #d97706; }
.nxh-pin span { position: absolute; left: 50%; bottom: 135%; transform: translateX(-50%); background: var(--c-ink); color: #fff; font-size: .75rem; padding: 3px 8px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; }
.nxh-pin:hover span, .nxh-pin:focus span { opacity: 1; }
.nxh-pin.is-off { opacity: .15; }
.nxh-map__legend { font-size: .85rem; margin: 10px 0 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.nxh-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #64748b; margin-right: 5px; vertical-align: -1px; }
.nxh-dot--dang-nhan { background: var(--c-ok); }
.nxh-dot--sap-mo { background: #d97706; }

/* ---------- Ô công cụ, bước, hỏi đáp ---------- */
.nxh-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.nxh-tile { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px; background: #fff; text-decoration: none; color: var(--c-ink); display: block; }
.nxh-tile:hover { border-color: var(--c-brand); color: var(--c-ink); }
.nxh-tile strong { display: block; font-size: 1.08rem; margin-bottom: 4px; color: var(--c-brand-dark); }
.nxh-tile span { color: var(--c-muted); font-size: .93rem; }
.nxh-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.nxh-steps li { counter-increment: s; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 14px 14px 14px 56px; position: relative; background: #fff; }
.nxh-steps li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--c-brand); color: #fff; font-weight: 700; display: grid; place-items: center; }
.nxh-steps strong { display: block; }
.nxh-faq details { border-bottom: 1px solid var(--c-line); padding: 12px 0; }
.nxh-faq summary { font-weight: 700; cursor: pointer; }
.nxh-faq details p { margin: 8px 0 0; }
.nxh-note { background: var(--c-accent-soft); border-left: 4px solid var(--c-accent); padding: 12px 14px; border-radius: 0 var(--radius) var(--radius) 0; font-size: .93rem; }
.nxh-draft { background: #fef9c3; border: 1px dashed #a16207; padding: 10px 14px; border-radius: var(--radius); font-size: .9rem; }
.nxh-posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.nxh-posts li { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 14px; background: #fff; }
.nxh-posts a { font-weight: 700; text-decoration: none; }
.nxh-posts time { display: block; font-size: .8rem; color: var(--c-muted); margin-top: 6px; }
.nxh-split { display: grid; gap: 20px; }
@media (min-width: 860px) { .nxh-split { grid-template-columns: 1.2fr 1fr; align-items: start; } }

/* ---------- Công cụ ---------- */
.nxh-tool { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px; background: #fff; max-width: 720px; }
.nxh-tool__privacy { font-size: .88rem; background: var(--c-brand-soft); border-radius: 8px; padding: 8px 12px; }
.nxh-tool fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.nxh-tool legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.nxh-tool fieldset > label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--c-line); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.nxh-tool fieldset > label:has(input:checked) { border-color: var(--c-brand); background: var(--c-brand-soft); }
.nxh-tool input[type="radio"] { margin-top: 5px; flex: none; }
.nxh-tool__field { display: block !important; border: 0 !important; padding: 0 !important; font-weight: 600; margin-bottom: 12px; }
.nxh-tool__field input, .nxh-tool__field select, .nxh-form input[type="text"], .nxh-form input[type="tel"], .nxh-form select { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; border: 1px solid #94a0b8; border-radius: 8px; font: inherit; background: #fff; }
.nxh-tool__result { margin: 16px 0 8px; }
.nxh-result { border-radius: var(--radius); padding: 14px 16px; border: 2px solid var(--c-line); }
.nxh-result--ok { border-color: var(--c-ok); background: #f0fdf4; }
.nxh-result--mid { border-color: #d97706; background: #fffbeb; }
.nxh-result--no { border-color: #b91c1c; background: #fef2f2; }
.nxh-result h3 { margin-bottom: 6px; }
.nxh-result ul { margin: 6px 0 10px; padding-left: 20px; }
.nxh-result .nxh-btn { margin: 4px 6px 0 0; }
.nxh-big { font-size: 1.6rem; font-weight: 800; color: var(--c-brand-dark); }

/* ---------- Form ---------- */
.nxh-form { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px; background: #fff; display: grid; gap: 12px; max-width: 520px; }
.nxh-form__title { margin: 0; font-size: 1.2rem; }
.nxh-form label { font-weight: 600; font-size: .95rem; }
.nxh-req { font-weight: 400; color: var(--c-muted); font-size: .82rem; }
.nxh-hp { position: absolute; left: -9999px; }
.nxh-consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .88rem !important; }
.nxh-consent input { margin-top: 4px; flex: none; width: 18px; height: 18px; }
.nxh-form-msg { margin: 0; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.nxh-form-msg.is-ok { background: #dcfce7; color: #14532d; }
.nxh-form-msg.is-err { background: #fee2e2; color: #7f1d1d; }
.nxh-form .nxh-muted { margin: 0; }

/* ---------- Trang nội dung ---------- */
.nxh-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 14px 0 6px; font-size: .85rem; color: var(--c-muted); }
.nxh-crumbs li + li::before { content: "›"; margin-right: 4px; }
.nxh-page { padding: 8px 0 40px; }
.nxh-content { max-width: 760px; }
.nxh-content--wide { max-width: none; }
.nxh-content h2 { margin-top: 1.6em; }
.nxh-content ul, .nxh-content ol { padding-left: 22px; }
.nxh-content li { margin-bottom: 4px; }
.nxh-meta { font-size: .85rem; color: var(--c-muted); margin-bottom: 16px; }

/* ---------- Chi tiết dự án ---------- */
.nxh-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.nxh-facts div { background: var(--c-bg-alt); border-radius: var(--radius); padding: 12px; }
.nxh-facts dt { font-size: .78rem; color: var(--c-muted); }
.nxh-facts dd { margin: 0; font-weight: 700; font-size: 1.1rem; }
.nxh-facts small { font-weight: 400; font-size: .8rem; color: var(--c-muted); }
.nxh-check { font-size: .88rem; padding: 8px 12px; border-radius: 8px; background: #fef9c3; display: inline-block; }
.nxh-check.is-ok { background: #dcfce7; }
.nxh-log { list-style: none; padding: 0; margin: 0; }
.nxh-log li { border-left: 3px solid var(--c-line); padding: 2px 0 12px 14px; }
.nxh-log time { font-weight: 700; font-size: .88rem; display: block; }

/* ---------- Chân trang và thanh đáy ---------- */
.nxh-footer { background: var(--c-brand-dark); color: #dbe6fb; padding: 32px 0 24px; font-size: .92rem; margin-top: 24px; }
.nxh-footer a { color: #fff; }
.nxh-footer__grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.nxh-footer h2 { font-size: 1rem; color: #fff; }
.nxh-footer ul { list-style: none; padding: 0; margin: 0; }
.nxh-footer li { margin-bottom: 6px; }
.nxh-footer__legal { border-top: 1px solid rgba(255, 255, 255, .2); margin-top: 22px; padding-top: 14px; font-size: .82rem; opacity: .9; }
.nxh-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid var(--c-line); box-shadow: 0 -2px 10px rgba(0, 0, 0, .06); }
.nxh-bar a { text-align: center; padding: 9px 2px 8px; font-size: .74rem; font-weight: 700; text-decoration: none; color: var(--c-ink); display: grid; gap: 2px; justify-items: center; }
.nxh-bar a svg { width: 22px; height: 22px; }
.nxh-bar a.is-main { color: var(--c-accent); }
@media (min-width: 1100px) { .nxh-bar { display: none; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .nxh-header, .nxh-bar, .nxh-footer, .nxh-pledge, .nxh-form { display: none !important; } body { padding: 0; } }

/* ---------- Góc thông tin đơn vị vận hành ---------- */
.nxh-footer__op { font-size: .8rem; opacity: .9; margin: 10px 0 0; }

/* ---------- Nút nổi: gọi, Zalo, về đầu trang ---------- */
.nxh-float { position: fixed; right: 12px; bottom: 76px; z-index: 55; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.nxh-float a, .nxh-float button { width: 50px; height: 50px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; text-decoration: none; font: 800 .8rem var(--font); box-shadow: 0 3px 12px rgba(16, 26, 46, .28); cursor: pointer; }
.nxh-float svg { width: 24px; height: 24px; }
.nxh-float__call { background: #15803d; }
.nxh-float__call span { display: none; }
.nxh-float__zalo { background: #0068ff; }
.nxh-float .nxh-float__top { background: #fff; color: var(--c-brand-dark); border: 1px solid var(--c-line); width: 44px; height: 44px; margin-right: 3px; }
.nxh-float [hidden] { display: none; }
@media (min-width: 1100px) {
	.nxh-float { bottom: 20px; right: 20px; }
	.nxh-float .nxh-float__call { width: auto; border-radius: 99px; padding: 0 18px 0 14px; display: flex; gap: 8px; font-size: .95rem; }
	.nxh-float__call span { display: inline; }
}
@media print { .nxh-float { display: none !important; } }

.nxh-card__rent { margin: 4px 0 0; font-size: .88rem; color: #1e3a8a; font-weight: 600; }

/* ===== v2 ===== Hero có ảnh, thẻ dự án dải màu, bản đồ thật */
.nxh-hero { padding: 0 0 26px; background: linear-gradient(180deg, var(--c-brand-soft), #fff 70%); }
.nxh-hero__in { display: grid; gap: 0; padding: 0; }
.nxh-hero__img { display: block; margin: 0; }
.nxh-hero__img img { display: block; width: 100%; height: 190px; object-fit: cover; object-position: center 35%; }
.nxh-hero__txt { padding: 18px 16px 0; }
.nxh-hero__kicker { display: inline-block; margin: 0 0 8px; background: var(--c-accent); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 11px; border-radius: 99px; }
.nxh-hero h1 { color: var(--c-brand-dark); }
.nxh-hero__stats { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nxh-hero__stats li { background: #fff; border: 1px solid var(--c-line); border-radius: 10px; padding: 9px 4px; text-align: center; min-width: 0; }
.nxh-hero__stats b { display: block; font-size: 1.08rem; line-height: 1.25; color: var(--c-brand); white-space: nowrap; }
.nxh-hero__stats span { display: block; font-size: .72rem; line-height: 1.3; color: var(--c-muted); margin-top: 2px; }
@media (min-width: 860px) {
	.nxh-hero { padding: 34px 0; }
	.nxh-hero__in { grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: center; padding: 0 16px; }
	.nxh-hero__img { order: 2; }
	.nxh-hero__img img { height: 440px; border-radius: 18px; box-shadow: 0 14px 40px rgba(10, 63, 158, .2); }
	.nxh-hero__txt { padding: 0; }
	.nxh-hero__stats b { font-size: 1.5rem; }
	.nxh-hero__stats span { font-size: .8rem; }
}
.nxh-round { display: block; width: 100%; height: auto; max-height: 230px; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; }

.nxh-card { padding: 0; overflow: hidden; gap: 0; border-width: 1px; }
.nxh-card__band { margin: 0; padding: 7px 14px; font-size: .8rem; font-weight: 700; color: #fff; background: #64748b; letter-spacing: .01em; }
.nxh-card--dang-nhan .nxh-card__band { background: #15803d; }
.nxh-card--sap-mo .nxh-card__band { background: #b45309; }
.nxh-card--da-dong .nxh-card__band, .nxh-card--cho-lich .nxh-card__band { background: #475569; }
.nxh-card--dang-xay .nxh-card__band, .nxh-card--chuan-bi .nxh-card__band { background: #5b6b8c; }
.nxh-card--hoan-thanh .nxh-card__band { background: var(--c-brand-dark); }
.nxh-card--dang-nhan { border-color: #86c79c; }
.nxh-card--sap-mo { border-color: #e7c07a; }
.nxh-card__body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nxh-card__title { margin: 0; font-size: 1.06rem; }
.nxh-card__loc { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.nxh-card__nums { display: grid; grid-template-columns: 1.25fr .9fr 1fr; gap: 0; margin: 8px 0 2px; border: 1px solid var(--c-line); border-radius: 10px; overflow: hidden; }
.nxh-card__nums div { padding: 8px 8px 9px; background: var(--c-bg-alt); }
.nxh-card__nums div + div { border-left: 1px solid var(--c-line); }
.nxh-card__nums dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); white-space: nowrap; }
.nxh-card__nums dd { margin: 2px 0 0; font-weight: 800; font-size: 1.02rem; line-height: 1.25; color: var(--c-brand-dark); }
.nxh-card__nums dd small { display: block; font-weight: 500; font-size: .7rem; color: var(--c-muted); }
.nxh-card__nums .nxh-na { font-size: .78rem; font-weight: 500; }
.nxh-card__dl { margin: 6px 0 0; }
.nxh-card__btn { margin-top: auto; align-self: stretch; text-align: center; background: var(--c-brand); color: #fff; font-weight: 700; font-size: .92rem; border-radius: 9px; padding: 9px 12px; }
.nxh-card__body > .nxh-card__btn { margin-top: 10px; }
.nxh-card:hover .nxh-card__btn { background: var(--c-brand-dark); }
.nxh-card--dang-nhan .nxh-card__btn { background: var(--c-accent); }

.nxh-map__canvas { height: 360px; background: var(--c-brand-soft); z-index: 0; }
.nxh-map__wait { margin: 0; padding: 150px 16px 0; text-align: center; color: var(--c-muted); }
.nxh-map__legend span { display: inline-flex; align-items: center; }
.nxh-map .leaflet-popup-content { font: 14px/1.5 var(--font); margin: 10px 12px; }
.nxh-map .leaflet-popup-content a { font-weight: 700; }
@media (min-width: 860px) { .nxh-map__canvas { height: 460px; } }

/* ===== v3 ===== Cân chữ, thẻ thẳng hàng, khối cẩm nang */
.nxh-nb { display: inline-block; }
.nxh-hero h1 { font-size: clamp(1.45rem, 5.6vw, 1.9rem); }
@media (min-width: 860px) { .nxh-hero h1 { font-size: clamp(1.7rem, 2.75vw, 2.15rem); } .nxh-hero__in { grid-template-columns: 1.3fr 1fr; } }
h1, h2, h3, .nxh-card__title, .nxh-tile strong { text-wrap: balance; }
p, li, dd, summary, .nxh-lead { text-wrap: pretty; }

.nxh-grid { align-items: stretch; }
.nxh-card { display: flex; flex-direction: column; }
.nxh-card__body { flex: 1; }
.nxh-card__title { min-height: 2.5em; display: flex; align-items: flex-start; line-height: 1.25; }
.nxh-card__loc { min-height: 1.5em; }
.nxh-card__nums { grid-template-columns: 1.45fr .85fr 1fr; }
.nxh-card__nums div { display: flex; flex-direction: column; }
.nxh-card__nums dd { display: flex; flex-direction: column; font-size: .98rem; }
.nxh-card__nums dd span { white-space: nowrap; }
.nxh-card__nums dd small { margin-top: 1px; }
.nxh-card__nums .nxh-na { color: var(--c-muted); font-weight: 600; font-size: .98rem; }
.nxh-card__notes { min-height: 3.1em; display: flex; flex-direction: column; justify-content: center; gap: 2px; margin-top: 6px; }
.nxh-card__notes p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nxh-card__none { color: var(--c-muted); font-size: .88rem; }
.nxh-card__body > .nxh-card__btn { margin-top: auto; }

.nxh-ebook { background: linear-gradient(135deg, #0a3f9e, #1560e8); color: #fff; }
.nxh-ebook__in { display: grid; gap: 22px; }
.nxh-ebook__info { display: grid; gap: 16px; justify-items: center; text-align: left; }
.nxh-ebook__cover { display: block; width: 190px; flex: none; transform: rotate(-3deg); transition: transform .2s; }
.nxh-ebook__cover:hover { transform: rotate(0); }
.nxh-ebook__cover img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 14px 34px rgba(0, 0, 0, .38), 0 0 0 1px rgba(255, 255, 255, .25); }
.nxh-ebook h2 { color: #fff; font-size: clamp(1.25rem, 3.4vw, 1.6rem); }
.nxh-ebook .nxh-muted { color: #dbe6fb; }
.nxh-ebook .nxh-hero__kicker { background: #fff; color: var(--c-brand-dark); }
.nxh-ticks { list-style: none; margin: 10px 0 12px; padding: 0; }
.nxh-ticks li { position: relative; padding-left: 26px; margin-bottom: 7px; }
.nxh-ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--c-brand); font-weight: 800; font-size: .75rem; display: grid; place-items: center; margin-top: 3px; }
.nxh-ebook .nxh-form { color: var(--c-ink); max-width: none; box-shadow: 0 14px 34px rgba(0, 0, 0, .22); border: 0; }
@media (min-width: 860px) {
	.nxh-ebook__in { grid-template-columns: 1.25fr 1fr; align-items: center; gap: 36px; }
	.nxh-ebook__info { grid-template-columns: 250px 1fr; justify-items: start; align-items: center; gap: 28px; }
	.nxh-ebook__cover { width: 250px; }
}

/* v3.1 */
.nxh-ebook .nxh-form h2, .nxh-ebook .nxh-form .nxh-form__title { color: var(--c-brand-dark); font-size: 1.2rem; }
.nxh-ebook .nxh-form .nxh-muted { color: var(--c-muted); }
@media (max-width: 599px) { .nxh-card__title { min-height: 0; } .nxh-card__notes { min-height: 0; } }

/* v3.2 */
h1 { font-size: clamp(1.5rem, 4.6vw, 2.05rem); }
.nxh-content .nxh-form__title, .nxh-form .nxh-form__title { margin: 0; }
.nxh-posts .nxh-badge { margin-bottom: 6px; background: var(--c-brand-soft); color: var(--c-brand-dark); }
.nxh-related { margin: 8px 0 20px; }

/* v3.3 */
.nxh-card__loc { min-height: 28px; }
.nxh-card__loc .nxh-badge { padding-top: 2px; padding-bottom: 2px; }

/* ===== v4 ===== Trang dự án mở rộng: ảnh bìa, mục lục nhanh, tòa, căn hộ, mốc pháp lý */
.nxh-pj-cover { margin: 14px 0 4px; }
.nxh-pj-cover img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: 16px; }
.nxh-figure { margin: 14px 0; }
.nxh-figure img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--c-line); background: #fff; }
.nxh-figure figcaption { font-size: .85rem; color: var(--c-muted); margin-top: 6px; }
.nxh-pj-body { max-width: 980px; }
.nxh-pj-body h2 { margin-top: 2em; padding-top: .2em; scroll-margin-top: 110px; }
.nxh-jump { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; margin: 18px 0 0; scrollbar-width: thin; }
.nxh-jump a { flex: none; text-decoration: none; font-weight: 600; font-size: .9rem; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--c-line); color: var(--c-brand-dark); background: #fff; white-space: nowrap; }
.nxh-jump a:hover { background: var(--c-brand-soft); border-color: var(--c-brand); }
.nxh-table--kv { min-width: 0; }
.nxh-table--kv th { width: 34%; background: var(--c-bg-alt); font-size: .9rem; font-weight: 700; color: var(--c-brand-dark); }
.nxh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.nxh-chips span { background: var(--c-brand-soft); border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.nxh-chips b { color: var(--c-brand-dark); margin-right: 4px; }
.nxh-towers, .nxh-units { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin: 14px 0; }
.nxh-towers article, .nxh-units article { border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.nxh-towers img { display: block; width: 100%; height: 210px; object-fit: cover; object-position: center 20%; }
.nxh-units img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; border-bottom: 1px solid var(--c-line); }
.nxh-towers h3, .nxh-units h3 { margin: 12px 14px 0; }
.nxh-units h3 { font-size: 1.5rem; color: var(--c-brand-dark); margin-top: 2px; }
.nxh-towers p, .nxh-units p { margin: 4px 14px 12px; font-size: .9rem; color: var(--c-muted); }
.nxh-towers .nxh-towers__n { color: var(--c-accent); font-weight: 800; font-size: 1.1rem; margin-bottom: 0; }
.nxh-units .nxh-units__type { margin: 12px 14px 0; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--c-accent); }
.nxh-two { display: grid; gap: 14px; margin: 14px 0; }
.nxh-two .nxh-figure { margin: 0; }
.nxh-two--cards > div { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 4px 16px 8px; background: var(--c-bg-alt); }
.nxh-two--cards h3 { margin-top: 12px; color: var(--c-brand-dark); }
.nxh-timeline { list-style: none; margin: 14px 0; padding: 0 0 0 22px; border-left: 3px solid var(--c-brand); }
.nxh-timeline li { position: relative; padding: 0 0 16px 16px; }
.nxh-timeline li::before { content: ""; position: absolute; left: -31px; top: 4px; width: 15px; height: 15px; border-radius: 50%; background: var(--c-brand); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--c-brand); }
.nxh-timeline li.is-next::before { background: #fff; }
.nxh-timeline li.is-next { color: var(--c-muted); }
.nxh-timeline time { display: block; font-size: .82rem; font-weight: 700; color: var(--c-accent); }
.nxh-timeline strong { display: block; }
@media (min-width: 720px) {
	.nxh-towers, .nxh-units { grid-template-columns: repeat(4, 1fr); }
	.nxh-towers img { height: 280px; }
	.nxh-two { grid-template-columns: 1fr 1fr; }
}

/* v4.1 */
.nxh-timeline li::before { left: -34px; }
.nxh-units .nxh-units__type { min-height: 2.5em; display: flex; align-items: flex-end; }
.nxh-two > br, .nxh-two > p:empty, .nxh-towers > br, .nxh-units > br, .nxh-towers > p, .nxh-units > p { display: none; }
