/* SAFA website integration for the "Our communities" map (homepage). */
#our-communities {
  --cmap-header: 80px;
  scroll-margin-top: var(--cmap-header);
  margin: 0;
}

/* Tablets & phones (component compact mode < 992px): fill the viewport under the fixed header
   so the city strip / project card and the map stay visible together. */
@media (max-width: 991.98px) {
  #our-communities { --cmap-header: 72px; }
  #our-communities.safa-cmap.is-compact {
    height: calc(100vh - var(--cmap-header));
    height: calc(100svh - var(--cmap-header));
    min-height: 560px;
    max-height: 900px;
  }
}

/* Small phones */
@media (max-width: 575.98px) {
  #our-communities { --cmap-header: 64px; }
  #our-communities.safa-cmap.is-compact { min-height: 520px; }
}

/* Phones in landscape: keep a usable height and let the page scroll. */
@media (max-width: 991.98px) and (max-height: 500px) and (orientation: landscape) {
  #our-communities.safa-cmap.is-compact { height: 520px; min-height: 520px; }
}
