/* The supplied house imagery is the focal point; warm neutrals match Nordic Timbers. */
html.house-gallery-open { overflow: hidden !important; }
.house-galleries { max-width: 1080px; margin: 0 auto; padding: 0 20px; color: #30302f; }
.house-gallery-intro { max-width: 740px; margin: 0 0 36px; }
.house-gallery-intro h2 { font-size: clamp(25px, 3vw, 34px); font-weight: 500; padding: 0; margin: 0 0 12px; }
.house-gallery-intro p { margin: 0 0 16px; font-size: 16px; line-height: 1.7; color: #50504d; }
.house-gallery-intro nav { display: flex; flex-wrap: wrap; gap: 12px; }
.house-gallery-intro a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid #b9a697; border-radius: 4px; color: #3d342c; }
.house-gallery { scroll-margin-top: 125px; margin: 0 0 52px; }
.house-gallery-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.house-gallery-heading h2 { font-family: Georgia, serif; font-size: clamp(30px, 4vw, 40px); font-weight: 400; margin: 0 0 5px; padding: 0; }
.house-gallery-heading p { margin: 0; font-size: 16px; line-height: 1.5; color: #50504d; }
.house-gallery-heading .house-gallery-price { font-size: 19px; font-weight: 400; color: #30302f; }
.house-gallery-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.house-gallery-images a { display: block; min-width: 0; background: #fff; border-radius: 4px; overflow: hidden; }
.house-gallery-images img { display: block; width: 100%; height: 100% !important; aspect-ratio: 4 / 3; object-fit: contain; }
.house-gallery [hidden], .house-lightbox [hidden] { display: none !important; }
.house-gallery button, .house-lightbox button { font: inherit; cursor: pointer; }
.house-gallery button:focus-visible, .house-gallery a:focus-visible, .house-gallery-intro a:focus-visible, .house-lightbox button:focus-visible, .house-lightbox a:focus-visible, .house-lightbox-image-area:focus-visible { outline: 3px solid #765033; outline-offset: 3px; }
.house-gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.house-gallery-filters button { min-height: 44px; padding: 10px 14px; background: transparent; border: 1px solid #b9a697; border-radius: 4px; color: #403a35; font-size: 14px; line-height: 1.5; }
.house-gallery-filters button[aria-pressed="true"] { background: #f4e9df; border-color: #8a6a52; color: #302921; }
.house-gallery-stage { position: relative; border-radius: 6px; background: #eee9e3; }
.house-gallery-enlarge { display: block; position: relative; width: 100%; padding: 0; border: 0; border-radius: 6px; background: transparent; overflow: hidden; }
.house-gallery-enlarge img { display: block; width: 100%; height: clamp(280px, 65vw, 560px) !important; object-fit: contain; transition: transform 180ms ease; }
.house-gallery-stage.is-plan { background: #fff; }
.house-gallery-stage.is-interior img { height: clamp(420px, 74vw, 640px) !important; }
.house-gallery-enlarge span { position: absolute; right: 12px; bottom: 12px; padding: 8px 12px; background: #fff; color: #39332e; border-radius: 4px; font-size: 13px; }
.house-gallery-status { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; background: #f4eee8; color: #403a35; pointer-events: none; }
.house-gallery-controls { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.house-gallery-controls p { flex: 1; margin: 0; font-size: 14px; line-height: 1.6; color: #45413d; }
.house-gallery-controls button, .house-lightbox-arrow { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid #b9a697; border-radius: 50%; background: #fff; color: #39332e; font-size: 28px; line-height: 1; }
.house-gallery-count { white-space: nowrap; font-size: 13px; color: #55504a; }
.house-gallery.is-enhanced .house-gallery-images { display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 10px; scroll-padding-inline: 4px; scrollbar-width: thin; scrollbar-color: #b9a697 #eee9e3; }
.house-gallery.is-enhanced .house-gallery-images a { flex: 0 0 84px; height: 68px; border: 2px solid transparent; }
.house-gallery.is-enhanced .house-gallery-images a[aria-current="true"] { border-color: #765033; }
.house-gallery.is-enhanced .house-gallery-images img { object-fit: cover; }
.house-gallery.is-enhanced .house-gallery-images a[data-category="Plans & 3D"] img { object-fit: contain; }
.house-gallery-controls button:hover, .house-gallery-filters button:hover, .house-gallery-intro a:hover { background: #f4e9df; color: #302921; }
.house-lightbox { width: calc(100% - 20px); max-width: 1600px; height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); padding: 12px; margin: auto; border: 0; border-radius: 6px; background: #faf8f5; color: #30302f; overflow: auto; }
.house-lightbox::backdrop { background: rgba(22, 21, 20, .86); }
.house-lightbox:not([open]) { display: none; }
.house-lightbox[open] { display: flex; flex-direction: column; gap: 10px; }
.house-lightbox-header, .house-lightbox-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; flex: 0 0 auto; }
.house-lightbox-title { flex: 1 1 140px; margin: 0; padding: 0; font-size: 18px; font-weight: 500; }
.house-lightbox-close { flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid #b9a697; border-radius: 4px; color: #39332e; background: #fff; }
.house-lightbox-image-area { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.house-lightbox-image { width: 100%; height: 100% !important; object-fit: contain; min-height: 0; }
.house-lightbox.is-zoomed .house-lightbox-image-area { display: block; overflow: auto; padding: 0; }
.house-lightbox.is-zoomed .house-lightbox-image { width: max(100%, 1200px); max-width: none !important; height: auto !important; }
.house-lightbox.is-zoomed .house-lightbox-arrow { display: none; }
.house-lightbox .house-lightbox-arrow { font-size: 28px; }
.house-lightbox-arrow { position: absolute; top: calc(50% - 22px); z-index: 1; }
.house-lightbox-arrow.prev { left: 4px; }
.house-lightbox-arrow.next { right: 4px; }
.house-lightbox-caption { font-size: 14px; line-height: 1.5; margin: 0; }
.house-lightbox-original { display: inline-flex; min-height: 44px; align-items: center; font-size: 13px; text-decoration: underline; color: #493e35; }
@media (min-width: 640px) {
  .house-gallery { margin-bottom: 68px; }
  .house-gallery.is-enhanced .house-gallery-images a { flex-basis: 104px; height: 78px; }
  .house-lightbox { padding: 16px 20px; width: calc(100% - 48px); height: calc(100dvh - 40px); }
  .house-lightbox-image-area { padding: 0 54px; }
}
@media (min-width: 1000px) {
  .house-gallery-heading { margin-bottom: 20px; }
  .house-gallery-controls p { font-size: 15px; }
}
@media (hover: hover) and (pointer: fine) {
  .house-gallery-enlarge:hover img { transform: scale(1.025); }
}
@media (prefers-reduced-motion: reduce) {
  .house-gallery-enlarge img { transition: none; transform: none !important; }
}
