/* Communities — areas index (template-communities.php) and per-community detail
   (taxonomy-rh_location.php).

   Reuses existing components rather than re-styling them:
   - the index grid is .districts / .district-card (home.css)
   - the inventory grid is .prop / .props-grid (home.css + components.css)
   - the FAQ is .faq-item (inner.css)
   - the map popup is .rh-mappop (map.css)

   This file only adds what those don't cover: the two heroes, the fact chips,
   the fundamentals grid, the map+landmarks layout and the closing CTA. Tokens
   only — no new colour values, no structural overrides of shared components. */

/* ============================================================ INDEX PAGE === */

.communities-hero {
  padding: clamp(140px, 18vh, 210px) 0 16px;
}
.communities-hero h1 {
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.95;
  margin: 16px 0 22px;
}

/* The index reuses the homepage .districts band, but flows continuously under
   the hero instead of being a bordered paper section of its own. */
.communities-index .districts {
  background: transparent;
  border-top: none;
  border-bottom: none;
  padding: 8px 0 clamp(80px, 12vh, 140px);
}

.communities-index__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 56px;
}

/* ====================================================== DETAIL: HERO ======= */

.community-hero {
  position: relative;
  padding: clamp(150px, 22vh, 250px) 0 clamp(64px, 9vh, 110px);
  background-size: cover;
  background-position: center;
  color: var(--bone);
}
.community-hero--plain {
  background-color: var(--forest-deep);
}
/* Sits on the .container element, so it must NOT set its own max-width — that
   would override .container's standard max-width + pad-x and re-center the
   content at non-standard gutters. The lede is capped on its own below. */
.community-hero__inner {
  position: relative;
}
.community-hero__kicker {
  color: var(--gold-emaar);
  font-size: 11px;
  letter-spacing: 0.2em;
  margin: 0 0 20px;
}
.community-hero h1 {
  font-size: clamp(52px, 8vw, 120px);
  line-height: 0.92;
  color: var(--bone);
  margin: 0;
}
.community-hero__lede {
  max-width: 640px;
  margin: 22px 0 0;
  color: rgba(244, 241, 236, 0.86);
}
.community-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 38px;
}

/* Fact chips — a thin rule between values, collapsing to wrapped rows on mobile. */
.community-facts {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 0;
}
.community-fact {
  padding: 0 28px;
  border-left: 1px solid rgba(244, 241, 236, 0.24);
}
.community-fact:first-child {
  padding-left: 0;
  border-left: none;
}
.community-fact__value {
  display: block;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1;
  color: var(--bone);
}
.community-fact__label {
  display: block;
  margin-top: 9px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(244, 241, 236, 0.68);
}

/* =================================================== DETAIL: THE CASE ====== */

.community-intro {
  padding: clamp(72px, 11vh, 130px) 0 0;
}
.community-intro__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2vw, 24px);
  align-items: start;
}
.community-intro__head h2 {
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1;
  margin: 0;
}
.community-intro__body p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink-soft);
  margin: 0 0 1.2em;
}
.community-intro__body p:last-child {
  margin-bottom: 0;
}

/* ================================================ DETAIL: FUNDAMENTALS ===== */

.community-highlights {
  padding: clamp(72px, 11vh, 130px) 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.community-highlights__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.community-highlight {
  background: var(--bone);
  border: 1px solid var(--line);
  padding: 32px 30px;
}
.community-highlight__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.community-highlight__body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}

/* ===================================================== DETAIL: LOCATION ==== */

.community-map-section {
  padding: clamp(72px, 11vh, 130px) 0;
}
/* Map spans the full container width; "Life nearby" stacks below it (rather
   than a sidebar), so the map is never boxed in by an empty column. */
.community-map-layout {
  margin-top: 8px;
}
.community-map-wrap {
  border: 1px solid var(--line);
  overflow: hidden;
}
/* id selector keeps this ahead of map.css's .props-map height regardless of
   stylesheet order. Full container width, so a touch taller. */
#rh-map.community-map {
  height: clamp(440px, 62vh, 680px);
}
.community-landmarks {
  margin-top: 24px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(22px, 3vw, 32px);
}
.community-landmarks ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  column-gap: 40px;
}
.community-landmarks li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.community-landmarks__marker {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--gold);
}
.community-landmarks__name {
  color: var(--ink-soft);
}
.community-landmarks__dist {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* ==================================================== DETAIL: INVENTORY ==== */

/* This section carries the .container class itself, so only touch vertical
   padding — a `padding: … 0` shorthand here would zero .container's pad-x and
   let the grid bleed to the viewport edge. */
.community-inventory {
  padding-top: clamp(72px, 11vh, 130px);
  padding-bottom: clamp(72px, 11vh, 130px);
}
/* "Residences in {area}" header (now a .props-head with the Grid/Map toggle). */
.community-residences-head .props-head__intro h2 {
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1;
  margin: 14px 0 0;
}
.community-empty {
  max-width: 760px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(36px, 5vw, 64px);
}
.community-empty .body-lg {
  color: var(--ink-soft);
  margin: 0 0 28px;
}

/* Shared section heads in the detail sections. */
.community-highlights .section-head,
.community-map-section .section-head {
  max-width: 760px;
  margin-bottom: 44px;
}
.community-highlights .section-head h2,
.community-map-section .section-head h2,
.community-inventory .section-head h2 {
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1;
  margin: 14px 0 18px;
}

/* ========================================================== DETAIL: FAQ ==== */

.community-faq {
  padding: clamp(72px, 11vh, 130px) 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.community-faq h2 {
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1;
  margin: 16px 0 40px;
}

/* ======================================================== DETAIL: CLOSE ==== */

.community-cta {
  padding: clamp(72px, 11vh, 130px) 0;
  background: var(--bone-2);
  border-top: 1px solid var(--line);
}
.community-cta__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.community-cta h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 60px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 14px 0 18px;
}
.community-cta__lede {
  max-width: 560px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}
.community-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 244px;
}
.community-cta__actions .btn {
  width: 100%;
}

/* ====================================== INDEX: ALL-AREAS MAP =============== */

/* The map view (toggled in from the hero's Grid/Map switch) — matches the grid
   panel's spacing so the two views sit in the same place. */
.communities-map-section {
  padding: 8px 0 clamp(80px, 12vh, 140px);
}
.communities-map-wrap {
  border: 1px solid var(--line);
  overflow: hidden;
}
/* id selector keeps this ahead of map.css's .props-map height. */
#rh-map.communities-map {
  height: clamp(440px, 64vh, 720px);
}

/* ===================================== DETAIL: OUTLOOK (what's coming) ====== */

.community-outlook {
  padding: clamp(64px, 10vh, 110px) 0;
}
.community-outlook__inner {
  max-width: 860px;
  border-left: 2px solid var(--gold);
  padding-left: clamp(20px, 3vw, 38px);
}
.community-outlook .eyebrow {
  margin-bottom: 16px;
}
.community-outlook__text {
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}

/* ========================================================== RESPONSIVE ===== */

@media (max-width: 980px) {
  .community-highlights__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 860px) {
  .community-cta__inner {
    grid-template-columns: 1fr;
  }
  .community-cta__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .community-cta__actions .btn {
    width: auto;
  }
}
@media (max-width: 600px) {
  .community-highlights__grid {
    grid-template-columns: 1fr;
  }
  .community-fact {
    padding: 0 18px;
  }
}
