/* ============ HOUSE DETAIL PAGE ============ */
.tag.static { position: static; display: inline-block; }

/* Photo grid: 1 large + 4 small on desktop, single photo on phones */
.hd-gallery { position: relative; display: grid; gap: .6rem; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, 1fr); height: clamp(320px, 52vw, 560px); border-radius: 1.75rem; overflow: hidden; }
.hd-gallery.is-few { grid-template-columns: 2fr 1fr; }
.hd-tile { position: relative; overflow: hidden; cursor: zoom-in; background: #EEF2F8; }
.hd-tile.is-main { grid-row: span 2; }
.hd-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .3s; }
.hd-tile:hover img { transform: scale(1.04); filter: brightness(.92); }
.hd-all { position: absolute; right: 1rem; bottom: 1rem; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .6rem 1.1rem; border-radius: 999px; background: #fff; color: var(--navy); font-weight: 700; font-size: .9rem; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); transition: background .2s, color .2s; }
.hd-all:hover { background: var(--navy); color: #fff; }
.hd-all svg { width: 18px; height: 18px; }
@media (max-width: 767px) {
  .hd-gallery, .hd-gallery.is-few { grid-template-columns: 1fr; grid-template-rows: 1fr; height: auto; aspect-ratio: 4 / 4.4; border-radius: 1.25rem; }
  .hd-tile:not(.is-main) { display: none; }
  .hd-tile.is-main { grid-row: auto; }
}

.hd-h2 { font-family: var(--font-heading); font-weight: 600; color: var(--navy); font-size: 1.4rem; margin-bottom: 1rem; }
.hd-section { margin-top: 3rem; padding-top: 3rem; border-top: 1px solid rgba(12,36,72,.1); }

.hd-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 640px) { .hd-facts { grid-template-columns: repeat(4, 1fr); } }
.hd-facts > div { padding: 1rem; border-radius: 1rem; background: #fff; border: 1px solid rgba(12,36,72,.08); }
.hd-facts dt { display: flex; align-items: center; gap: .45rem; font-size: .875rem; font-weight: 700; color: var(--text-muted); }
.hd-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #FAF5EA; color: var(--gold-600); }
.hd-ic svg { width: 16px; height: 16px; }
.hd-facts dd { margin-top: .5rem; font-weight: 800; color: var(--navy); font-size: 1.05rem; }

.hd-features { display: grid; gap: .75rem 1.5rem; }
@media (min-width: 640px) { .hd-features { grid-template-columns: 1fr 1fr; } }
.hd-features li { display: flex; align-items: center; gap: .65rem; color: rgba(26,34,51,.85); }
.hd-check { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #E9F7EF; color: #166534; }
.hd-check svg { width: 13px; height: 13px; }

.hd-card { padding: 1.5rem; border-radius: 1.5rem; background: #fff; border: 1px solid rgba(12,36,72,.1); box-shadow: 0 30px 60px -40px rgba(12,36,72,.45); }
.btn-outline { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .7rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: .95rem; color: var(--navy); border: 1.5px solid rgba(12,36,72,.25); transition: background .2s, border-color .2s; }
.btn-outline:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy svg, .btn-gold svg { width: 18px; height: 18px; }

.hd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid rgba(12,36,72,.1); backdrop-filter: blur(10px); }


/* ============ v3.0 House details ============ */
.hd-main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { .hd-main { padding-bottom: 0; } }
.hd-head { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.hd-price { text-align: left; }
@media (min-width: 640px) { .hd-price { text-align: right; } }
.hd-share { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .9rem; border-radius: 999px; font-size: .875rem; font-weight: 700; color: var(--navy); border: 1px solid rgba(12,36,72,.18); background: #fff; }
.hd-share svg { width: 16px; height: 16px; }
.hd-link { font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

/* Gallery adapts to the number of photos */
.hd-gallery.g1 { grid-template-columns: 1fr; grid-template-rows: 1fr; height: auto; aspect-ratio: 16 / 9; }
.hd-gallery.g1 .hd-tile.is-main { grid-row: auto; }
.hd-gallery.g2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.hd-gallery.g2 .hd-tile.is-main { grid-row: auto; }
.hd-gallery.g3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.hd-tile .card-ribbon { top: 1.4rem; left: -2.2rem; }
.hd-carousel { display: none; }
@media (max-width: 767px) {
  .hd-gallery { display: none !important; }
  .hd-carousel { display: block; position: relative; margin: 0 -1rem; }
  .hd-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .hd-track::-webkit-scrollbar { display: none; }
  .hd-slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 3; overflow: hidden; background: #E9E4D8; }
  .hd-slide img, .hd-slide video { width: 100%; height: 100%; object-fit: cover; }
  .hd-slide .card-ribbon { top: 1.2rem; left: -2.4rem; }
  .hd-count { position: absolute; right: .75rem; bottom: .75rem; padding: .25rem .7rem; border-radius: 999px; background: rgba(7,23,49,.75); color: #fff; font-size: .8rem; font-weight: 700; }
  .hd-nav { position: absolute; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--navy); box-shadow: 0 6px 16px -8px rgba(0,0,0,.5); }
  .hd-nav svg { width: 18px; height: 18px; }
  .hd-nav.prev { left: .6rem; } .hd-nav.next { right: .6rem; }
}

/* Quick facts */
.hd-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
@media (max-width: 639px) { .hd-quick { grid-template-columns: 1fr 1fr; } }
.hd-quick > div { display: flex; flex-direction: column; gap: .2rem; padding: 1rem; border-radius: 1rem; background: #fff; border: 1px solid rgba(12,36,72,.08); }
.hd-qic { color: var(--gold-600); }
.hd-qic svg { width: 24px; height: 24px; }
.hd-quick dd { margin-top: .3rem; font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.hd-quick dt { font-size: .8125rem; font-weight: 600; color: var(--text-muted); }
.hd-inline-cta { display: grid; grid-template-columns: 1.4fr 1fr; gap: .75rem; margin-top: 1rem; }
.hd-inline-cta > a { justify-content: center; }
.hd-inline-cta > a:only-child { grid-column: 1 / -1; }
.btn-gold svg, .btn-outline svg { width: 18px; height: 18px; }

/* Sections as accordions (always open on desktop) */
.hd-about, .hd-acc { margin-top: 2.25rem; padding-top: 2.25rem; border-top: 1px solid rgba(12,36,72,.1); }
.hd-acc > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; list-style: none; cursor: pointer; min-height: 44px; }
.hd-acc > summary::-webkit-details-marker { display: none; }
.hd-acc > summary .hd-h2 { margin: 0; }
.hd-acc-ic { width: 32px; height: 32px; flex: none; border-radius: 50%; background: #F3F5F9; position: relative; }
.hd-acc-ic::before, .hd-acc-ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--navy); transition: transform .2s; }
.hd-acc-ic::after { transform: rotate(90deg); }
.hd-acc[open] .hd-acc-ic::after { transform: rotate(0); }
.hd-acc-body { padding-top: 1rem; }
@media (min-width: 1024px) { .hd-acc > summary { cursor: default; } .hd-acc-ic { display: none; } }

.hd-highlights { display: grid; gap: .6rem; margin-bottom: 1rem; }
.hd-highlights li { display: flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--navy); }
.stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
@media (max-width: 639px) { .stages { grid-template-columns: 1fr; } }
.stages li { display: flex; align-items: center; gap: .6rem; padding: .75rem; border-radius: .9rem; background: #F3F5F9; font-weight: 700; color: var(--text-muted); font-size: .875rem; }
.stages li small { display: block; font-weight: 600; font-size: .75rem; }
.stage-dot { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: #fff; border: 1.5px solid rgba(12,36,72,.2); font-size: .75rem; }
.stage-dot svg { width: 14px; height: 14px; }
.stages li.done { color: var(--navy); }
.stages li.done .stage-dot { background: #166534; border-color: #166534; color: #fff; }
.stages li.current { background: var(--navy); color: #fff; }
.stages li.current .stage-dot { background: var(--gold); border-color: var(--gold); color: var(--navy-900); }
.hd-floors { display: grid; gap: 1rem; }
@media (min-width: 640px) { .hd-floors { grid-template-columns: 1fr 1fr; } }
.hd-floors > div { padding: 1rem 1.1rem; border-radius: 1rem; background: #fff; border: 1px solid rgba(12,36,72,.08); }
.hd-floors h3 { font-weight: 800; color: var(--navy); margin-bottom: .4rem; }
.hd-floors li { padding: .25rem 0; color: var(--text-muted); border-bottom: 1px dashed rgba(12,36,72,.1); }
.hd-plan { display: block; width: 100%; border-radius: 1rem; overflow: hidden; border: 1px solid rgba(12,36,72,.1); cursor: zoom-in; }
.hd-pay, .hd-table { display: grid; gap: 0; border-radius: 1rem; overflow: hidden; border: 1px solid rgba(12,36,72,.1); background: #fff; }
@media (min-width: 640px) { .hd-table { grid-template-columns: 1fr 1fr; } }
.hd-pay > div, .hd-table > div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid rgba(12,36,72,.06); }
.hd-pay dt, .hd-table dt { color: var(--text-muted); font-weight: 600; }
.hd-pay dd, .hd-table dd { color: var(--navy); font-weight: 700; text-align: right; }

/* More houses */
.hd-more { margin-top: 3.5rem; padding-top: 3rem; border-top: 1px solid rgba(12,36,72,.1); }
.hd-more-grid { margin-top: 2rem; display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .hd-more-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .hd-more-grid { grid-template-columns: repeat(3, 1fr); } .hd-more-grid.one { grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; } }
.hd-seeall { display: flex; flex-direction: column; justify-content: center; padding: 2rem; border-radius: var(--radius-card); border: 1.5px dashed rgba(12,36,72,.25); background: #fff; min-height: 220px; transition: border-color .2s; }
.hd-seeall:hover { border-color: var(--navy); }
.hd-seeall-ic { margin-top: 1rem; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; }
.hd-seeall-ic svg { width: 18px; height: 18px; }

/* Phone bottom bar: Call + WhatsApp */
.hd-bar { padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); }
.hd-bar-btn { min-height: 44px; padding: .5rem .9rem; font-size: .875rem; }
.hd-bar-btn svg { width: 18px; height: 18px; }
