/* Trang con: đầu trang, bài viết, bảng giá */
.nh-dau-trang { color: #d6e0ea; padding: 40px 0 44px;
  background:
    linear-gradient(115deg, rgba(11, 46, 79, .97), rgba(19, 82, 133, .93)),
    repeating-linear-gradient(-32deg, transparent 0 46px, rgba(200, 108, 43, .22) 46px 52px),
    var(--nh-navy-dam); }
.nh-duong-dan { --bs-breadcrumb-divider-color: #8fa4b8; --bs-breadcrumb-item-active-color: #c3d0dd; font-size: .88rem; margin-bottom: 14px; }
.nh-duong-dan a { color: #fff; text-decoration: none; }
.nh-duong-dan a:hover { color: var(--nh-cam-sang); }
.nh-dau-trang-h1 { color: #fff; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem); margin-bottom: .6rem; max-width: 52rem; }
.nh-dau-trang-dan { font-size: 1.1rem; color: #c3d0dd; max-width: 46rem; margin-bottom: 0; }
.nh-cap-nhat { margin: 12px 0 0; font-size: .85rem; color: var(--nh-cam-sang); font-weight: 600; }

.nh-hep { max-width: 860px; }

/* Câu trả lời ngắn đầu trang (cho người đọc nhanh, và cho Google/AI trích) */
.nh-tra-loi { border-left: 4px solid var(--nh-cam); background: var(--nh-be); border-radius: 0 12px 12px 0; padding: 18px 22px; font-size: 1.08rem; }
.nh-tra-loi p:last-child { margin-bottom: 0; }

/* Nội dung bài viết */
.nh-bai-viet h2 { font-size: 1.55rem; margin: 2.4rem 0 .9rem; }
.nh-bai-viet h3 { font-size: 1.2rem; margin: 1.6rem 0 .6rem; }
.nh-bai-viet p, .nh-bai-viet li { font-size: 1.04rem; }
.nh-bai-viet ul, .nh-bai-viet ol { padding-left: 1.3rem; }
.nh-bai-viet li { margin-bottom: .35rem; }

/* Bảng */
.nh-bang { --bs-table-striped-bg: var(--nh-be); border-color: var(--nh-vien); font-size: .97rem; }
.nh-bang thead th { background: var(--nh-navy); color: #fff; font-weight: 700; border-color: var(--nh-navy); vertical-align: middle; }
.nh-bang th[scope="row"] { font-weight: 600; color: var(--nh-navy-dam); }
.nh-bang .nh-so { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nh-bang tfoot th, .nh-bang tfoot td { font-weight: 800; color: var(--nh-navy-dam); background: var(--nh-cam-nhat); }
.nh-bang caption { caption-side: top; font-weight: 700; color: var(--nh-navy-dam); }

/* Thẻ giá lớn */
.nh-gia-lon { background: #fff; border: 2px solid var(--nh-cam); border-radius: 18px; padding: 24px; box-shadow: var(--nh-bong); }
.nh-gia-lon .nh-gia-so { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem); font-weight: 800; color: var(--nh-cam-chu); line-height: 1.1; }
.nh-gia-lon .nh-gia-dv { font-weight: 700; color: var(--nh-chu-phu); }

/* Danh sách có dấu */
.nh-ds-tick { list-style: none; padding-left: 0 !important; }
.nh-ds-tick li { position: relative; padding-left: 28px; }
.nh-ds-tick li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 1px; color: #1E8E3E; font-weight: 700; }
.nh-ds-x li::before { content: "\F62A"; color: #B42318; }

/* Ô ghi chú */
.nh-luu-y { background: var(--nh-navy-nhat); border-radius: 12px; padding: 16px 18px; }
.nh-luu-y strong { color: var(--nh-navy-dam); }

/* Thanh tiến độ thanh toán */
.nh-dot { counter-reset: dot; list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.nh-dot li { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--nh-vien); border-radius: 12px; padding: 10px 14px; margin: 0 !important; }
.nh-dot .nh-dot-so { font-weight: 800; color: var(--nh-navy); font-size: .9rem; }
.nh-dot .nh-dot-pt { font-weight: 800; color: var(--nh-cam-chu); white-space: nowrap; }
@media (max-width: 575.98px) { .nh-dot li { grid-template-columns: 1fr auto; } .nh-dot .nh-dot-so { grid-column: 1 / -1; } }

/* Dòng thời gian quy trình */
.nh-dong-tg { list-style: none; padding: 0 !important; position: relative; }
.nh-dong-tg::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px; background: var(--nh-vien); }
.nh-dong-tg > li { position: relative; padding: 0 0 28px 64px; margin: 0 !important; }
.nh-dong-tg .nh-buoc-so { position: absolute; left: 0; top: 0; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--nh-navy); color: #fff; font-weight: 800; }
.nh-dong-tg h2 { margin-top: 6px !important; }

/* Thẻ liên kết sang trang khác */
.nh-the-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.nh-the-link:hover { border-color: var(--nh-navy); box-shadow: var(--nh-bong); transform: translateY(-2px); color: inherit; }

/* Ảnh chờ */
.nh-anh-cho { aspect-ratio: 4 / 5; border-radius: 18px; display: grid; place-items: center; text-align: center; color: #8d97a3; font-weight: 600; padding: 20px;
  background: repeating-linear-gradient(-32deg, transparent 0 22px, rgba(200, 108, 43, .10) 22px 26px), linear-gradient(160deg, #EEF2F6, #E3E9F0); }

/* Liên hệ */
.nh-lh-dong { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px dashed var(--nh-vien); }
.nh-lh-dong .nh-the-icon { flex: none; margin: 0; }
.nh-lh-dong small { display: block; color: var(--nh-chu-phu); font-weight: 600; }
.nh-lh-dong a, .nh-lh-dong strong { font-weight: 700; color: var(--nh-navy-dam); font-size: 1.05rem; }
.nh-ban-do { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: 16px; background: var(--nh-be); }
/* Bản đồ: nếu Google Maps không tải được thì vẫn thấy địa chỉ và nút mở bản đồ nằm bên dưới khung */
.nh-ban-do-khung { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; background: var(--nh-be); border: 1px solid var(--nh-vien); overflow: hidden; }
.nh-ban-do-khung .nh-ban-do { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; background: transparent; }
.nh-ban-do-du-phong { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; color: var(--nh-chu-phu); }
.nh-ban-do-du-phong i { font-size: 2.2rem; color: var(--nh-cam); }
.nh-form-loi li { margin-bottom: 6px; font-weight: 500; }
.nh-form-loi i { color: #1E8E3E; margin-right: 6px; }

/* Trang tính chi phí */
.nh-dt-form { position: sticky; top: 96px; }
@media (max-width: 991.98px) { .nh-dt-form { position: static; } }
.nh-dt-goi { display: grid; gap: 10px; }
.nh-dt-goi-chon { display: flex; gap: 12px; align-items: center; border: 2px solid var(--nh-vien); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.nh-dt-goi-chon:has(input:checked) { border-color: var(--nh-cam); background: var(--nh-cam-nhat); }
.nh-dt-goi-chon input { accent-color: var(--nh-cam-nut); width: 18px; height: 18px; flex: none; }
.nh-dt-goi-chon small { display: block; color: var(--nh-chu-phu); font-weight: 600; }
.nh-dt-kq { background: var(--nh-navy-dam); color: #d6e0ea; border-radius: 18px; padding: 24px; }
.nh-dt-kq .nh-nhan { color: var(--nh-cam-sang); }
.nh-dt-tien { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); font-weight: 800; color: #fff; line-height: 1.15; margin: 4px 0 8px; }
.nh-dt-phu strong { color: #fff; }
.nh-dt-nho { padding: 18px; }
.nh-dt-dong { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--nh-vien); }
.nh-dt-dong:last-child { border-bottom: 0; }
.nh-dt-dong strong { white-space: nowrap; color: var(--nh-navy-dam); }
.nh-dt-chon strong { color: var(--nh-cam-chu); }
.nh-lh-dong a.small { font-size: .85rem; font-weight: 600; color: var(--nh-cam-chu); }

/* Bài cẩm nang */
.nh-tac-gia { display: flex; gap: 14px; align-items: flex-start; background: var(--nh-navy-nhat); border-radius: 14px; padding: 16px 18px; }
.nh-tac-gia > i { font-size: 1.6rem; color: var(--nh-navy); }
.nh-tac-gia p { font-size: .95rem !important; }
.nh-bai-lq { display: block; padding: 12px 16px; border: 1px solid var(--nh-vien); border-radius: 12px; text-decoration: none; font-weight: 600; color: var(--nh-navy-dam); background: #fff; }
.nh-bai-lq:hover { border-color: var(--nh-navy); color: var(--nh-navy); }
.nh-bai-lq i { color: var(--nh-cam-chu); margin-right: 6px; }
.nh-bai-lq[aria-current="page"] { display: none; }
.nh-anh-bai { margin: 1.4rem 0; }
.nh-anh-bai img { width: 100%; height: auto; border-radius: 14px; }
.nh-anh-bai figcaption { font-size: .9rem; color: var(--nh-chu-phu); margin-top: 6px; }

/* Trang hỏi đáp */
.nh-muc-luc { background: var(--nh-be); border-radius: 14px; padding: 16px 20px; }
.nh-muc-luc ul { columns: 2 240px; margin-top: 8px; }
.nh-hd-nhom, .nh-hd-chu-de { padding-top: 8px; scroll-margin-top: 90px; }
/* Trang Hỏi đáp: mỗi câu bấm để mở/đóng (thẻ details, không cần JS, Google vẫn đọc được trả lời) */
.nh-hd-cau { border: 1px solid var(--nh-vien); border-radius: 12px; background: #fff; margin: 0 0 10px; }
.nh-hd-cau summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.nh-hd-cau summary::-webkit-details-marker { display: none; }
.nh-hd-cau summary::after { content: "+"; margin-left: auto; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--nh-navy-nhat); color: var(--nh-navy); font-weight: 700; font-size: 1.2rem; line-height: 1; }
.nh-hd-cau[open] summary::after { content: "−"; background: var(--nh-navy); color: #fff; }
.nh-hd-cau summary:focus-visible { outline: 3px solid rgba(19, 82, 133, .35); border-radius: 12px; }
.nh-hd-cau h3, .nh-hd-cau h4 { font-size: 1.05rem !important; margin: 0 !important; }
.nh-hd-cau p { margin: 0; padding: 0 16px 16px; }

/* Biểu đồ cột ngang trong bảng giá theo năm */
.nh-bang-nam .nh-cot-td { width: 40%; min-width: 90px; }
.nh-cot { display: block; height: 14px; border-radius: 0 7px 7px 0; background: var(--nh-cam); }
@media (max-width: 575.98px) { .nh-bang-nam .nh-cot-td { display: none; } }

/* Bảng xem tuổi xây nhà: tuổi làm nhà được */
.nh-bang-tuoi td, .nh-bang-tuoi th { white-space: nowrap; }
.nh-bang-tuoi .nh-tuoi-tot > *, .nh-bang-tuoi .nh-tuoi-tot > th[scope] { background: #e8f5ec; font-weight: 700; color: #146c2e; }
.nh-bang-tuoi caption { white-space: normal; }

/* Hai ảnh công trình thật đặt cạnh nhau trong bài (khung 4:3, ảnh dọc cắt giữa) */
.nh-anh-doi { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 1.2rem 0 1.6rem; }
.nh-anh-doi figure { margin: 0; }
.nh-anh-doi img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; }
.nh-anh-doi figcaption { font-size: .85rem; color: var(--nh-chu-phu); margin-top: 6px; line-height: 1.4; }
@media (max-width: 340px) { .nh-anh-doi { grid-template-columns: 1fr; } }

/* Bảng tính sẵn: chữ không xuống dòng, điện thoại vuốt ngang để xem */
.nh-bang-gon th, .nh-bang-gon td { white-space: nowrap; }

/* Giải thưởng (trang Giới thiệu): dải nhỏ dưới khung ảnh */
.nh-giai-thuong { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; text-decoration: none;
  background: var(--nh-be); border: 1px solid var(--nh-vien); color: var(--nh-chu); transition: border-color .15s; }
.nh-giai-thuong:hover { border-color: var(--nh-cam); color: var(--nh-chu); }
.nh-giai-thuong-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem;
  background: linear-gradient(145deg, #F3C66B, #D9982F); color: var(--nh-navy-dam); }
.nh-giai-thuong strong { display: block; font-size: .95rem; color: var(--nh-navy-dam); line-height: 1.35; }
.nh-giai-thuong small { color: var(--nh-chu-phu); }
.nh-anh-giai { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 1rem 0 1.6rem; }
.nh-anh-giai figure { margin: 0; }
.nh-anh-giai a { display: block; cursor: zoom-in; }
.nh-anh-giai img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.nh-anh-giai figcaption { font-size: .8rem; color: var(--nh-chu-phu); margin-top: 5px; line-height: 1.35; }
@media (max-width: 480px) { .nh-anh-giai { grid-template-columns: 1fr 1fr; } .nh-anh-giai figure:first-child { grid-column: 1 / -1; } }

/* Dòng tiêu đề nhóm trong bảng đơn giá (trang Sửa chữa nhà) */
.nh-bang th.nh-bang-nhom { background: var(--nh-cam-nhat); color: var(--nh-cam-chu); font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; }
.nh-gia-lon .nh-gia-so.nh-gia-chu { font-size: 1.6rem; }
/* Bảng các ca sửa chữa: cột việc đủ rộng, cột giá trị được xuống dòng */
.nh-bang-ca th:first-child { white-space: nowrap; }
.nh-bang-ca td:nth-child(2) { min-width: 15rem; }
.nh-bang-ca td:last-child, .nh-bang-ca th:last-child { text-align: right; min-width: 9.5rem; }
