/* hi-property.css — enqueue only on single-property templates */
/* Heebo and Manrope are served by the existing local site-shell font assets. */

.hi-p {
  --marine: #0B3045; --cobalt: #145BDE; --cold: #F7FAFC; --white: #fff;
  --steel: #6F8FA3;        /* borders, non-text only: 3.4:1 on white */
  --steel-ink: #4A6678;    /* secondary text: 5.9:1 on white */
  --rule: #D5E0E7; --tile: #EEF3F6;
  --gap: clamp(16px, 4vw, 48px);
  font-family: "Heebo", "Manrope", system-ui, sans-serif;
  color: var(--marine); background: var(--white); line-height: 1.5;
}
.hi-p:lang(en) { font-family: "Manrope", "Heebo", system-ui, sans-serif; }
.hi-p *, .hi-p *::before, .hi-p *::after { box-sizing: border-box; }
.hi-p .wrap { max-width: 1200px; margin-inline: auto; padding-inline: 20px; }

/* Focus: visible on every interactive element, never removed */
.hi-p :is(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 4px;
}
.hi-p .hi-wa:focus-visible { outline-color: var(--marine); outline-offset: 3px; }

/* Breadcrumb */
.hi-crumbs ol { list-style: none; margin: 0; padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .875rem; color: var(--steel-ink); }
.hi-crumbs li + li::before { content: "/"; margin-inline-end: 6px; }
.hi-crumbs a { color: inherit; text-underline-offset: 3px; }

/* Title block */
.hi-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; padding: 20px 0 24px; }
.hi-head__main { flex: 1 1 420px; min-width: 0; }
.hi-area { margin: 0 0 8px; font-weight: 600; color: var(--cobalt); }
.hi-title { margin: 0; font-weight: 700; font-size: clamp(1.875rem, 1.2rem + 2.6vw, 2.875rem); line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; max-width: 20ch; }
.hi-price__label { margin: 0; font-size: .875rem; color: var(--steel-ink); }
.hi-price__value { margin: 2px 0 0; font: 700 2.125rem/1.1 "Manrope", "Heebo", sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Actions: 44px targets */
.hi-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hi-btn { min-height: 44px; min-width: 44px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--steel); border-radius: 999px; background: var(--white); color: var(--marine);
  font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer; }
.hi-btn:hover { border-color: var(--marine); }
.hi-btn svg { width: 18px; height: 18px; flex: none; }

/* Gallery — images come from the CMS; tiles keep space while loading */
.hi-gallery { position: relative; display: grid; gap: 8px; grid-template-columns: 1fr; margin-inline: -20px; }
.hi-gallery figure { margin: 0; position: relative; background: var(--tile); border-radius: 4px; }
.hi-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.hi-gallery figure:first-child { aspect-ratio: 4 / 3; }
.hi-gallery figure:not(:first-child) { display: none; }
.hi-gallery__all { position: absolute; inset-inline-end: 28px; bottom: 14px; min-height: 44px; display: inline-flex; align-items: center;
  padding: 0 18px; border-radius: 999px; background: var(--white); color: var(--marine); border: 1px solid var(--marine); font-weight: 600; text-decoration: none; }
@media (min-width: 900px) {
  .hi-gallery { margin-inline: 0; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(180px, 226px)); }
  .hi-gallery figure:not(:first-child) { display: block; }
  .hi-gallery figure:first-child { grid-row: span 2; aspect-ratio: auto; }
  .hi-gallery__all { inset-inline-end: 14px; }
}

/* Key facts */
.hi-facts { margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); border-top: 2px solid var(--marine); }
.hi-facts > div { padding: 16px 16px 18px 0; padding-inline: 0 16px; border-bottom: 1px solid var(--rule); }
.hi-facts dt { margin: 0 0 4px; font-size: .875rem; color: var(--steel-ink); }
.hi-facts dd { margin: 0; font: 700 1.75rem/1.2 "Manrope", "Heebo", sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hi-facts dd small { font-size: 1rem; font-weight: 600; color: var(--steel-ink); }
.hi-note { margin: 12px 0 0; font-size: .875rem; color: var(--steel-ink); max-width: 68ch; }

/* Body + desktop contact aside */
.hi-body { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 32px; align-items: flex-start; }
.hi-body__main { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.hi-aside { display: none; }
.hi-h2 { margin: 0 0 14px; font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.hi-sub { margin: -8px 0 18px; color: var(--steel-ink); }
.hi-desc { font-size: 1.125rem; line-height: 1.7; max-width: 64ch; text-wrap: pretty; }
.hi-desc p { margin: 0 0 14px; }

/* Specification tables */
.hi-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 28px 40px; }
.hi-spec { width: 100%; border-collapse: collapse; }
.hi-spec caption { text-align: start; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--cobalt); padding-bottom: 8px; border-bottom: 2px solid var(--marine); }
.hi-spec th, .hi-spec td { padding: 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.hi-spec th { text-align: start; font-weight: 500; color: var(--steel-ink); }
.hi-spec td { text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hi-spec td.is-missing { color: var(--steel-ink); font-weight: 500; }

/* Neighborhood */
.hi-hood { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; align-items: start; }
.hi-map { aspect-ratio: 4 / 3; background: var(--tile); border: 1px solid var(--rule); border-radius: 6px; }
.hi-map iframe, .hi-map img { width: 100%; height: 100%; border: 0; border-radius: inherit; }
.hi-places { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.hi-places li { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 52px; border-bottom: 1px solid var(--rule); }

/* Related search collections */
.hi-related { padding: 56px 0 48px; }
.hi-related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); column-gap: 40px; border-top: 1px solid var(--rule); }
.hi-related li { border-bottom: 1px solid var(--rule); }
.hi-related a { min-height: 64px; padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--marine); text-decoration: none; }
.hi-related a:hover { color: var(--cobalt); }
.hi-related a::after { content: "→"; color: var(--cobalt); font-size: 1.25rem; }
.hi-p[dir="rtl"] .hi-related a::after { content: "←"; }
.hi-related strong { display: block; font-weight: 600; font-size: 1.0625rem; }
.hi-related span { font-size: .8125rem; color: var(--steel-ink); }

/* WhatsApp pill — permanently wide label, never icon-only */
.hi-wa { min-height: 52px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 20px;
  border-radius: 999px; background: var(--cobalt); color: var(--white); font-weight: 700; font-size: 1rem; text-decoration: none; text-align: center; }
.hi-wa:hover { background: var(--marine); color: var(--white); }
.hi-wa svg { width: 20px; height: 20px; flex: none; }
/* Mobile: sticky in normal flow at the end of the page, so it reserves its own
   space and never covers share/print/export or the footer when scrolled to the end. */
.hi-wa-bar { position: sticky; bottom: 0; z-index: 5; background: var(--white); border-top: 1px solid var(--rule);
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }

@media (min-width: 900px) {
  .hi-aside { display: flex; flex-direction: column; gap: 14px; flex: 0 1 340px; min-width: 280px;
    position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 76px); border-top: 2px solid var(--marine); padding-top: 18px; }
  .hi-wa-bar { display: none; }
}

/* 200% zoom / narrow: everything wraps; no fixed heights on text boxes; no overflow:hidden masks */
@media (max-width: 480px) { .hi-price__value { font-size: 1.75rem; } }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

@media print {
  .hi-actions, .hi-wa-bar, .hi-aside .hi-wa, .hi-gallery__all, .hi-related { display: none !important; }
  .hi-gallery { grid-template-columns: 1fr 1fr; margin: 0; }
  .hi-gallery figure:not(:first-child) { display: block; }
  .hi-p { color: #000; }
}
@media (prefers-reduced-motion: reduce) { .hi-p * { transition: none !important; scroll-behavior: auto !important; } }
.hi-property-body{margin:0;background:#fff;color:#0B3045;padding-bottom:120px}
.hi-p .hi-btn{text-decoration:none;justify-content:center;white-space:normal;text-align:center;padding-block:10px}
.hi-p .hi-crumbs a{display:inline-flex;align-items:center;min-height:44px}
.hi-p .hi-gallery:has(figure:only-of-type){display:block}.hi-p .hi-gallery:has(figure:only-of-type) figure{aspect-ratio:16/9;max-height:620px}
.hi-p .hi-all-photos summary{cursor:pointer;min-height:48px;display:flex;align-items:center;color:#145BDE;font-weight:700}
.hi-p .hi-all-photos>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:18px}.hi-p .hi-all-photos figure{margin:0}.hi-p .hi-all-photos img{width:100%;height:auto;display:block}
.hi-p .hi-body{margin-bottom:48px}.hi-p .project-section{margin-top:48px}.hi-p .hi-desc{overflow-wrap:anywhere}
.hi-p.hi-listed-homes{margin-block:32px}.hi-property-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:24px}.hi-property-cards article{border-bottom:2px solid #0B3045;padding-bottom:18px;min-width:0}.hi-property-cards a{color:#0B3045;text-decoration:none}.hi-property-cards h3{font-size:22px;line-height:1.35;margin:16px 0 8px}.hi-property-cards img{width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}.hi-property-cards p{margin-block:8px}.hi-property-cards dl{display:flex;flex-wrap:wrap;gap:18px}.hi-property-cards dd{margin:0;font-weight:700}.hi-property-cards dt{font-size:14px;color:#4A6678}
@media(max-width:600px){.hi-p .hi-head__main{flex-basis:100%}.hi-p .hi-body{gap:24px}.hi-property-body{padding-bottom:140px}.hi-p .hi-gallery:has(figure:only-of-type) figure{aspect-ratio:4/3}}
@media(min-width:900px){
 .hi-p .hi-gallery:has(figure:nth-of-type(2):last-of-type){grid-template-columns:3fr 2fr;grid-template-rows:minmax(320px,460px)}
 .hi-p .hi-gallery:has(figure:nth-of-type(2):last-of-type) figure:first-child{grid-row:auto}
 .hi-p .hi-gallery:has(figure:nth-of-type(3):last-of-type){grid-template-columns:2fr 1fr}
 .hi-p .hi-gallery:has(figure:nth-of-type(4):last-of-type){grid-template-columns:repeat(2,1fr)}
 .hi-p .hi-gallery:has(figure:nth-of-type(4):last-of-type) figure:first-child{grid-row:auto}
}
@media print{.shared-header,#global-footer,.wa-pill,.hi-actions,.skip{display:none!important}.hi-property-body{padding:0}.hi-p .wrap{max-width:none}.hi-p .hi-gallery figure:first-child{max-height:250px}.hi-p .hi-all-photos{display:block}.hi-p .hi-gallery figure:not(:first-child){display:none}}
