/* Hoàng Gia Minh – thành phần dùng chung (chạy được với mọi giao diện) */
:root { --hgm-navy: #0b2447; --hgm-navy-2: #133a6b; --hgm-cam: #ea580c; --hgm-cam-2: #c2410c; --hgm-nen: #f3f6fa; --hgm-vien: #e2e7ef; --hgm-chu: #14223a; --hgm-mo: #5b6880; --hgm-zalo: #0068ff; }

.hgm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: 0; background: var(--hgm-cam); color: #fff !important; font-weight: 600; text-decoration: none !important; cursor: pointer; font-size: 16px; line-height: 1.2; }
.hgm-btn:hover { background: var(--hgm-cam-2); }
.hgm-btn--zalo { background: var(--hgm-zalo); }
.hgm-btn--zalo:hover { background: #0052cc; }
.hgm-nut { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; }

/* Bảng thông số dự án */
.hgm-thong-so { margin: 0 0 24px; border: 1px solid var(--hgm-vien); border-radius: 12px; overflow: hidden; background: #fff; }
.hgm-thong-so table { width: 100%; border-collapse: collapse; margin: 0; }
.hgm-thong-so th, .hgm-thong-so td { padding: 11px 16px; border: 0; border-bottom: 1px solid var(--hgm-vien); text-align: left; vertical-align: top; font-size: 15.5px; }
.hgm-thong-so tr:last-child th, .hgm-thong-so tr:last-child td { border-bottom: 0; }
.hgm-thong-so th { width: 34%; background: var(--hgm-nen); color: var(--hgm-mo); font-weight: 600; }

/* Mục lục các phần (thay cho tab web cũ) */
.hgm-muc-luc { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; margin: 0 0 20px; background: #fff; border-bottom: 1px solid var(--hgm-vien); white-space: nowrap; scrollbar-width: thin; }
.hgm-muc-luc strong { align-self: center; color: var(--hgm-mo); font-size: 14px; }
.hgm-muc-luc a { padding: 6px 12px; border-radius: 999px; background: var(--hgm-nen); color: var(--hgm-navy); font-size: 14px; font-weight: 600; text-decoration: none; }
.hgm-muc-luc a:hover { background: var(--hgm-navy); color: #fff; }
.admin-bar .hgm-muc-luc { top: 32px; }
h2[id] { scroll-margin-top: 90px; }

/* Lưới thẻ dự án / tin */
.hgm-luoi { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hgm-luoi--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hgm-luoi--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .hgm-luoi, .hgm-luoi--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .hgm-luoi, .hgm-luoi--2, .hgm-luoi--4 { grid-template-columns: 1fr; } }
.hgm-the { background: #fff; border: 1px solid var(--hgm-vien); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.hgm-the:hover { box-shadow: 0 14px 30px -18px rgba(11, 36, 71, .45); transform: translateY(-2px); }
.hgm-the__anh { display: block; aspect-ratio: 16 / 10; background: var(--hgm-nen); overflow: hidden; }
.hgm-the__anh img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0 !important; }
.hgm-the__trong { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 100%; padding: 18px 20px; color: #fff; background: linear-gradient(135deg, #0b2447 0%, #133a6b 60%, #ea580c 160%); position: relative; }
.hgm-the__trong b { font-size: 19px; line-height: 1.25; }
.hgm-the__trong small { font-size: 14px; opacity: .85; }
.hgm-the__trong i { position: absolute; top: 16px; left: 20px; font-style: normal; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #fdba74; font-weight: 700; }
.hgm-the__than { padding: 14px 16px 16px; }
.hgm-the h3 { font-size: 17px; line-height: 1.35; margin: 0 0 8px; }
.hgm-the h3 a { color: var(--hgm-chu); text-decoration: none; }
.hgm-the h3 a:hover { color: var(--hgm-cam); }
.hgm-the ul { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--hgm-mo); }
.hgm-the li { margin: 3px 0; }
.hgm-the li span { font-weight: 600; color: var(--hgm-chu); }

/* Hộp liên hệ + form */
.hgm-hop { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 36px 0 8px; padding: 26px; border-radius: 16px; background: linear-gradient(135deg, var(--hgm-navy), var(--hgm-navy-2)); color: #e7eefa; }
.hgm-hop h2 { color: #fff; margin: 0 0 10px; font-size: 24px; }
.hgm-hop p { color: #cfdbee; }
@media (max-width: 760px) { .hgm-hop { grid-template-columns: 1fr; padding: 20px; } }
.hgm-form { background: #fff; color: var(--hgm-chu); border-radius: 12px; padding: 18px; margin: 0; }
.hgm-form p { margin: 0 0 12px; color: var(--hgm-chu); }
.hgm-form label { display: block; font-size: 14px; font-weight: 600; }
.hgm-form input, .hgm-form select, .hgm-form textarea { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid #cfd7e3; border-radius: 8px; font: inherit; font-size: 16px; background: #fff; color: var(--hgm-chu); box-sizing: border-box; }
.hgm-form input:focus, .hgm-form select:focus, .hgm-form textarea:focus { outline: 2px solid var(--hgm-cam); border-color: transparent; }
.hgm-form .hgm-btn { width: 100%; }
.hgm-form__ok { padding: 10px 12px; border-radius: 8px; background: #e7f7ee; color: #146c3a !important; font-weight: 600; }
.hgm-form__loi { padding: 10px 12px; border-radius: 8px; background: #fdecec; color: #a12020 !important; font-weight: 600; }
.hgm-an { position: absolute !important; left: -9999px !important; }

/* Liên hệ + bản đồ */
.hgm-lien-he { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; align-items: start; }
.hgm-lien-he ul { list-style: none; margin: 0; padding: 0; }
.hgm-lien-he li { padding: 8px 0; border-bottom: 1px solid var(--hgm-vien); }
.hgm-ban-do { width: 100%; height: 340px; border: 0; border-radius: 12px; }
@media (max-width: 760px) { .hgm-lien-he { grid-template-columns: 1fr; } }

/* Nút nổi */
.hgm-noi { position: fixed; right: 16px; bottom: 22px; z-index: 90; display: flex; flex-direction: column; gap: 12px; }
.hgm-noi a { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; text-decoration: none; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .35); }
.hgm-noi__zalo { background: var(--hgm-zalo); }
.hgm-noi__goi { background: var(--hgm-cam); animation: hgm-rung 2.4s infinite; }
@keyframes hgm-rung { 0%, 85%, 100% { transform: none; } 88% { transform: rotate(-12deg); } 92% { transform: rotate(12deg); } 96% { transform: rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .hgm-noi__goi { animation: none; } }

/* Thanh liên hệ dưới đáy trên điện thoại */
.hgm-thanh { display: none; }
@media (max-width: 760px) {
  .hgm-noi { display: none; }
  .hgm-thanh { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-top: 1px solid var(--hgm-vien); box-shadow: 0 -6px 18px -12px rgba(0, 0, 0, .4); padding-bottom: env(safe-area-inset-bottom); }
  .hgm-thanh a { padding: 14px 6px; text-align: center; font-weight: 700; font-size: 15px; text-decoration: none; color: var(--hgm-navy); }
  .hgm-thanh a:first-child { background: var(--hgm-cam); color: #fff; }
  .hgm-thanh a:nth-child(2) { color: var(--hgm-zalo); }
  body { padding-bottom: 56px; }
}

.hgm-the__anh { position: relative; }
.hgm-the__tt { position: absolute; z-index: 2; left: 12px; top: 12px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #fff; background: #0b2447; box-shadow: 0 6px 16px -6px rgba(0,0,0,.4); }
.hgm-the__tt--dang-mo-ban { background: #ea580c; }
.hgm-the__tt--moi-ban-giao { background: #0f766e; }
.hgm-the__tt--sap-mo-ban { background: #ea580c; }

/* 2.1.8 – popup nhận bảng giá */
.hgm-pop[hidden] { display: none !important; }
.hgm-pop { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.hgm-pop__nen { position: absolute; inset: 0; background: rgba(8, 20, 40, .62); backdrop-filter: blur(2px); }
.hgm-pop__hop { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; border-radius: 18px; background: #fff; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); animation: hgm-pop-vao .22s ease-out; }
@keyframes hgm-pop-vao { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.hgm-pop__than { padding: 26px 24px 22px; }
.hgm-pop__dong { position: absolute; top: 8px; right: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f1f5f9; color: #0b2447; font-size: 24px; line-height: 1; cursor: pointer; }
.hgm-pop__nhan { margin: 0 0 6px; color: #c2410c; font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.hgm-pop__td { margin: 0 34px 10px 0; color: #0b2447; font-size: 21px; font-weight: 800; line-height: 1.3; }
.hgm-pop__loi { margin: 0 0 16px; padding: 0; list-style: none; }
.hgm-pop__loi li { position: relative; padding: 3px 0 3px 26px; color: #334155; font-size: 15px; }
.hgm-pop__loi li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 14px; height: 8px; border-left: 2.5px solid #16a34a; border-bottom: 2.5px solid #16a34a; transform: rotate(-45deg); }
.hgm-pop__o { display: block; margin: 0 0 10px; }
.hgm-pop__o span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hgm-pop__o input { width: 100%; box-sizing: border-box; padding: 14px 14px; border: 1.5px solid #cbd5e1; border-radius: 12px; font-size: 17px; }
.hgm-pop__o input:focus { outline: none; border-color: #ea580c; box-shadow: 0 0 0 3px rgba(234,88,12,.15); }
.hgm-pop__nut { display: block; width: 100%; box-sizing: border-box; padding: 15px 16px; border: 0; border-radius: 12px; background: #ea580c; color: #fff !important; font-size: 17px; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 12px 24px -12px rgba(234,88,12,.8); }
.hgm-pop__nut:hover { background: #c2410c; }
.hgm-pop__cam { margin: 10px 0 0; text-align: center; color: #64748b; font-size: 13px; }
.hgm-pop__cam a { color: #0068ff; font-weight: 600; }
.hgm-pop__xong p { color: #334155; }
html.hgm-pop-mo, html.hgm-pop-mo body { overflow: hidden; }
.hgm-pop--xong .hgm-pop__nhan, .hgm-pop--xong #hgm-pop-td, .hgm-pop--xong .hgm-pop__loi { display: none; }
.hgm-pop__xong .hgm-pop__td { margin-top: 6px; color: #15803d; }

.hgm-the__thuoc { font-size: 13.5px; color: #5b6880; margin-bottom: 2px; }
.hgm-the__thuoc b { color: #0b2447; font-weight: 600; }
