/* Map trial: original editorial cards remain available through the view switch. */
.community-explorer { display: none; background: var(--cream, #ece7e2); }
.community-explorer.is-ready { display: block; }
.community-explorer[hidden], .community-original-cards[hidden], .community-map-layout[hidden] { display: none !important; }
.community-explorer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 4vw; color: var(--navy); }
.community-explorer-toolbar p { margin: 0; font-size: 15px; }
.community-view-switch { display: flex; border: 1px solid rgba(24,24,61,.22); }
.community-view-switch button { padding: 12px 23px; background: transparent; border: 0; color: var(--navy); font: inherit; font-size: 12px; letter-spacing: .08em; cursor: pointer; }
.community-view-switch button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.community-map-layout { display: grid; grid-template-columns: minmax(310px, 390px) minmax(0, 1fr); min-height: 660px; padding: 0 0 0 4vw; background: #18183d; }
.community-map-list { background: #18183d; padding: 20px; position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.community-map-card, .community-map-card:hover { background: #e9e3dc; box-shadow: none; }
.community-map-select { display: grid; grid-template-columns: 108px minmax(0,1fr); align-items: center; gap: 20px; width: 100%; padding: 18px; background: transparent; color: var(--navy); border: 0; font: inherit; text-align: start; cursor: pointer; transition: background .25s, color .25s; }
.community-map-select img { width: 108px; height: 115px; object-fit: cover; }
.community-map-card-copy { display: flex; flex-direction: column; gap: 8px; }
.community-map-card-number { color: var(--brand-terracotta); font-size: 10px; letter-spacing: .06em; line-height: 1.6; font-weight: 600; text-transform: uppercase; }
.community-map-card-title { font-size: 21px; line-height: 1.2; font-weight: 500; }
.community-map-card-region { font-size: 11px; line-height: 1.5; opacity: .7; }
.community-map-select[aria-pressed="true"] { background: transparent; color: var(--navy); }
.community-map-select[aria-pressed="true"] .community-map-card-number, .community-map-select[aria-pressed="true"] .community-map-card-title { color: var(--brand-terracotta); }
.community-map-select, .community-map-select:hover { background: transparent; box-shadow: none; }
.community-map-discover { display: block; padding: 0 18px 16px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); text-decoration: none; }
.community-map-card:has([aria-pressed="true"]) .community-map-discover { background: transparent; color: var(--navy); }
.community-map-discover:hover { color: var(--brand-terracotta); }
.community-map-stage { position: relative; min-height: 660px; isolation: isolate; }
#community-map { position: absolute; inset: 0; z-index: 0; background: #18183d; font-family: inherit; }

.community-map-reset { position: absolute; z-index: 1; top: 24px; right: 24px; display: flex; align-items: center; gap: 20px; background: #fff; color: var(--navy); border: 0; padding: 14px 20px; font: inherit; font-size: 11px; cursor: pointer; box-shadow: 0 4px 20px rgba(24,24,61,.08); }
.community-map-reset:hover { color: var(--brand-terracotta); }
.community-map-status { position: absolute; z-index: 1; bottom: 26px; left: 26px; margin: 0; max-width: calc(100% - 100px); background: #fff; padding: 10px 15px; color: var(--navy); font-size: 11px; pointer-events: none; }
.community-pin { background: transparent; border: 0; display: flex; align-items: center; gap: 12px; text-align: start; }
.community-pin-symbol { flex: 0 0 48px; width: 48px; height: 64px; overflow: visible; filter: drop-shadow(0 4px 7px rgba(0,0,0,.18)); transition: transform .25s; }
.community-pin-name { color: #fff; font-size: 21px; font-weight: 500; white-space: nowrap; line-height: 1.2; letter-spacing: -.02em; text-shadow: 0 2px 12px #18183d; }
.community-pin-label-left { flex-direction: row-reverse; text-align: end; }
.community-pin.is-selected .community-pin-symbol { transform: translateY(-5px); }
.community-pin.is-selected .community-pin-name { color: #f3c8b7; }
#community-map .leaflet-control-zoom { border: 0; box-shadow: 0 4px 20px rgba(24,24,61,.12); }
#community-map .leaflet-control-zoom a { color: var(--navy); border-color: #eee; }
#community-map .leaflet-control-attribution { font-size: 9px; background: rgba(24,24,61,.85); color: #fff; }
#community-map .leaflet-control-attribution a { color: #fff; }
.community-explorer button:focus-visible, .community-map-discover:focus-visible, .community-pin:focus-visible { outline: 2px solid var(--brand-terracotta); outline-offset: 3px; }
html[dir="rtl"] .community-map-layout { padding: 0 4vw 0 0; }
@media (min-width: 1500px) { .community-map-layout { grid-template-columns: 440px minmax(0, 1fr); } .community-map-select { grid-template-columns: 130px minmax(0, 1fr); } .community-map-select img { width: 130px; height: 125px; } }
@media (max-width: 850px) {
 .community-map-layout { grid-template-columns: 300px minmax(0,1fr); padding: 0; }
 .community-map-list { padding: 12px; gap: 12px; }
 .community-map-select { grid-template-columns: 80px minmax(0,1fr); gap: 14px; padding: 14px; }
 .community-map-select img { width: 80px; height: 100px; }
 .community-map-card-title { font-size: 18px; }
 html[dir="rtl"] .community-map-layout { padding: 0; }
}
@media (max-width: 650px) {
 .community-explorer-toolbar { padding: 22px 5vw; gap: 12px; }
 .community-explorer-toolbar p { font-size: 12px; max-width: 160px; }
 .community-view-switch button { padding: 10px 16px; }
 .community-map-layout { display: flex; flex-direction: column-reverse; }
 .community-map-stage { min-height: 410px; }
 .community-map-list { padding: 16px 5vw 32px; }
 .community-map-select { grid-template-columns: 100px minmax(0,1fr); }
 .community-map-select img { width: 100px; height: 100px; }
 .community-map-card-title { font-size: 21px; }
 .community-map-reset { top: 14px; right: 14px; font-size: 10px; padding: 12px; }
 .community-map-status { left: 14px; bottom: 26px; font-size: 10px; }
}
@media(prefers-reduced-motion:reduce) { .community-map-select, .community-pin-name { transition: none; } }

@media(max-width:650px) { .community-pin-name { font-size: 19px; } }

/* Keep the overview control clear of project names and land outlines. */
.community-contact-band.project-brochure-launch {
  min-height: 0;
  height: var(--community-toolbar-height, 102px);
  box-sizing: border-box;
  padding: 0 6vw;
}
.community-explorer-toolbar,
.community-contact-band.project-brochure-launch {
  background: var(--cream, #ece7e2);
}
.community-original-cards {
  background: #f5f2ee;
}
.community-explorer-toolbar { flex-wrap: wrap; gap: 14px; }
.community-explorer-toolbar > p { flex: 1; }
.community-explorer-toolbar .community-map-reset { position: static; box-shadow: none; border: 1px solid rgba(24,24,61,.2); padding: 12px 18px; }
@media(max-width:650px) {
 .community-explorer-toolbar > p { flex-basis: 100%; max-width: none; }
 .community-explorer-toolbar .community-map-reset { margin-inline-end: auto; padding: 10px 12px; }
}

/* Featured Communities: left-aligned title over the natural photograph. */
.p-hero.developments-hero {
  background-image: url("../assets/img/developments-garden-walkway.jpg");
  background-position: center 58%;
  background-size: cover;
  background-repeat: no-repeat;
}
.p-hero.developments-hero::after {
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.3) 38%, transparent 76%);
}
.developments-hero .p-hero-content { text-align: start; }
.developments-hero .p-hero-content h1 {
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
}
@supports (background-image: image-set(url("data:image/avif;base64,AAAA") type("image/avif"))) {
  .p-hero.developments-hero {
    background-image: image-set(url("../assets/img/developments-garden-walkway.webp") type("image/webp"), url("../assets/img/developments-garden-walkway.jpg") type("image/jpeg"));
  }
}

/* Keep the selected map in sight when a phone visitor chooses a card. */
@media (max-width: 650px) {
  .community-map-stage { scroll-margin-top: calc(var(--nav-h, 72px) + 12px); }
  #community-map .leaflet-control-zoom a { width: 44px; height: 44px; line-height: 44px; }
  .community-view-switch button { min-height: 44px; }
}
