/* Communities — Miami-Dade zones directory */

.cm-page {
  --cm-navy: var(--brand-deep-navy, #001e4d);
  --cm-ink: var(--brand-dark-blue, #003479);
  --cm-gold: var(--brand-gold, #d4af37);
  --cm-gold-deep: #8f6420;
  --cm-cream: var(--brand-warm-light, #fdf9f3);
  --cm-card: #fffdf8;
  --cm-line: rgba(18, 53, 111, 0.14);
  --cm-muted: #f3f6fa;
  background: var(--cm-cream);
  color: var(--cm-ink);
  font-family: var(--font-body, "Montserrat", sans-serif);
}

.cm-page .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cm-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 88% 8%, rgba(201, 150, 44, 0.1), transparent 58%),
    radial-gradient(ellipse 72% 88% at 12% 42%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.42) 48%, transparent 74%),
    linear-gradient(104deg, #faf7f2 0%, #eef5f8 40%, #f9f3ea 100%);
}

.cm-hero .site-breadcrumbs--banner {
  margin: 0 0 0.85rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.cm-hero .site-breadcrumbs--banner .site-breadcrumbs__list {
  padding: 0;
  color: #0a2f63;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cm-hero .site-breadcrumbs--banner .site-breadcrumbs__list a {
  color: #0a2f63;
  text-decoration: none;
}

.cm-hero .site-breadcrumbs--banner .site-breadcrumbs__list a:hover,
.cm-hero .site-breadcrumbs--banner .site-breadcrumbs__list a:focus-visible {
  color: #0e6468;
}

.cm-hero .site-breadcrumbs--banner .site-breadcrumbs__list li + li::before {
  color: var(--cm-gold);
}

.cm-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: center;
  min-height: clamp(300px, 38vw, 360px);
  padding-top: clamp(0.75rem, 1.8vw, 1.5rem);
  padding-bottom: clamp(2.75rem, 4vw, 3.6rem);
}

.cm-hero__copy {
  max-width: 38rem;
}

.cm-hero__eyebrow {
  margin: 0;
  color: var(--cm-gold-deep);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.cm-hero__kicker {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.55rem;
}

.cm-hero__icon-ring {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 150, 44, 0.42);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(11, 36, 88, 0.08);
  color: var(--cm-gold-deep);
}

.cm-hero__icon-ring svg {
  width: 2.35rem;
  height: 2.35rem;
}

.cm-hero__title {
  margin: 0;
  color: var(--cm-navy);
}

.cm-hero__rule {
  display: block;
  width: min(5.5rem, 42%);
  margin: 0.95rem 0 0.85rem;
}

.cm-hero__subtitle {
  margin: 0;
  color: var(--cm-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.2rem, 2.1vw, 1.65rem);
  font-weight: 600;
  line-height: 1.28;
}

.cm-hero__lead {
  max-width: 34rem;
  margin: 0.7rem 0 0;
  color: #2a4168;
  font-size: 1.02rem;
  line-height: 1.58;
}

.cm-hero__media {
  position: relative;
  align-self: stretch;
  min-height: 260px;
  overflow: hidden;
  border: 2px solid rgba(212, 175, 55, 0.62);
  border-radius: 1.35rem 1.35rem 0.5rem 0.5rem;
  box-shadow: 0 22px 46px rgba(11, 36, 88, 0.14);
}

.cm-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(11, 36, 88, 0.22) 0%, transparent 42%, rgba(255, 255, 255, 0.04) 100%);
  pointer-events: none;
}

.cm-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}

.cm-hero__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 78px;
  pointer-events: none;
}

.cm-intro {
  margin-top: -0.4rem;
  padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(1rem, 2.5vw, 1.65rem);
  text-align: center;
}

.cm-intro__inner {
  max-width: min(100%, 46rem);
  margin: 0 auto;
}

.cm-intro__title {
  margin: 0 0 clamp(0.65rem, 1.5vw, 0.9rem);
  color: var(--color-heading, #003479);
  text-wrap: balance;
}

.cm-intro__title .heading-accent {
  color: var(--color-heading-accent, #41c0c9);
}

.cm-intro__text {
  margin: 0 auto;
  max-width: 42rem;
  color: var(--color-text-secondary, #243447);
  font-family: var(--font-body), "Montserrat", sans-serif;
  font-size: var(--font-size-body, 1rem);
  font-weight: 400;
  line-height: var(--line-height-body, 1.75);
  text-wrap: balance;
}

.cm-board {
  padding: 1.3rem 0 2.5rem;
}

.cm-board__grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}

.cm-map {
  position: sticky;
  top: 0.8rem;
  padding: 0;
  background: var(--cm-card);
  border: 1px solid rgba(11, 36, 88, 0.08);
  border-radius: 1.15rem;
  box-shadow: 0 14px 32px rgba(11, 36, 88, 0.06);
  overflow: hidden;
}

.cm-page .cm-map .cm-map__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin: 0;
  padding: 1.15rem 0.85rem;
  text-align: center;
  text-wrap: balance;
  color: #ffffff;
  background: var(--cm-navy, #001e4d);
  font-family: var(--font-heading), "Playfair Display", Georgia, serif;
  font-size: clamp(1.28rem, 1.05rem + 0.65vw, 1.55rem);
  font-weight: 600;
  line-height: 1.26;
  letter-spacing: -0.015em;
}

.cm-page .cm-map .cm-map__title-line {
  display: block;
  width: 100%;
  color: #ffffff;
}

.cm-page .cm-map .cm-map__title-line--accent {
  color: #8fd3d6;
}

.cm-legend {
  margin: 0;
  padding: 0.35rem 0.5rem 0.45rem;
  list-style: none;
  border-bottom: 1px solid rgba(11, 36, 88, 0.06);
}

.cm-map__stage {
  padding: 0.55rem 0.75rem 0.65rem;
}

.cm-map__stage {
  display: block;
}

.cm-map__visual {
  margin: 0;
  padding: 0.45rem;
  background: linear-gradient(180deg, #e8f1f8 0%, #f4f8fc 100%);
  border-radius: 0.85rem;
}

.cm-map__img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 190px;
  border: 1px solid rgba(11, 36, 88, 0.08);
  border-radius: 0.65rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  object-fit: contain;
}

.cm-map.has-selection .cm-map__visual {
  padding: 0.35rem;
}

.cm-map.has-selection .cm-map__img {
  min-height: 0;
}

.cm-legend__btn {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem 0.65rem;
  align-items: center;
  width: 100%;
  margin: 0 0 0.25rem;
  padding: 0.55rem 0.5rem;
  color: var(--cm-navy);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cm-legend__btn:hover,
.cm-legend__btn:focus-visible,
.cm-legend__btn.is-active {
  background: #eef4fa;
  border-color: rgba(11, 36, 88, 0.08);
  outline: none;
}

.cm-legend__swatch {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--cm-zone-color, #76b852);
  border-radius: 999px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.cm-legend__label {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
}

.cm-legend__meta {
  color: #5a7394;
  font-size: 0.75rem;
  font-weight: 600;
}

.cm-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.cm-toolbar.has-zone-filter {
  margin-bottom: 0.45rem;
}

.cm-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.55rem 0.35rem 1rem;
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(11, 36, 88, 0.04);
}

.cm-search.has-query {
  border-color: rgba(201, 150, 44, 0.35);
  box-shadow: 0 8px 20px rgba(11, 36, 88, 0.05), inset 0 0 0 1px rgba(201, 150, 44, 0.12);
}

.cm-search__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  color: #5a7394;
}

.cm-search__icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.cm-search__input {
  width: 100%;
  padding: 0.55rem 0;
  color: var(--cm-navy);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.95rem;
}

.cm-search__input:focus {
  outline: none;
}

.cm-search__clear {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--cm-navy);
  background: #f3f6fa;
  border: 1px solid rgba(11, 36, 88, 0.1);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.cm-search__clear svg {
  width: 0.95rem;
  height: 0.95rem;
}

.cm-search__clear:hover,
.cm-search__clear:focus-visible {
  color: #fff;
  background: var(--cm-navy);
  outline: none;
}

.cm-search__clear[hidden] {
  display: none !important;
}

.cm-filter-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.cm-filter-wrap.is-active .cm-filter__select {
  border-color: rgba(201, 150, 44, 0.45);
  background-color: #fffdf6;
}

.cm-filter__select {
  min-width: 11.5rem;
  min-height: 2.85rem;
  padding: 0.5rem 2.2rem 0.5rem 1rem;
  color: var(--cm-navy);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 L6 6.5 L11 1.5' fill='none' stroke='%2312356f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
  border: 1px solid var(--cm-line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
}

.cm-filter__clear {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.85rem;
  padding: 0.45rem 0.95rem;
  color: var(--cm-navy);
  background: linear-gradient(180deg, #fff 0%, #f6f1e5 100%);
  border: 1px solid rgba(201, 150, 44, 0.42);
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(143, 100, 32, 0.12);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cm-filter__clear-icon {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  color: #fff;
  background: var(--cm-gold-deep);
  border-radius: 999px;
}

.cm-filter__clear-icon svg {
  width: 0.75rem;
  height: 0.75rem;
}

.cm-filter__clear:hover,
.cm-filter__clear:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(143, 100, 32, 0.16);
  outline: none;
}

.cm-filter__clear[hidden] {
  display: none !important;
}

.cm-empty {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  color: #31486f;
  background: #fff;
  border: 1px dashed rgba(11, 36, 88, 0.2);
  border-radius: 0.9rem;
  font-size: 0.95rem;
}

.cm-zone {
  margin-bottom: 0.85rem;
  background: #fff;
  border: 1px solid rgba(11, 36, 88, 0.1);
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(11, 36, 88, 0.04);
  overflow: hidden;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.cm-zone.is-filtered {
  border-color: color-mix(in srgb, var(--cm-zone-color) 45%, #fff);
  box-shadow: 0 14px 30px rgba(11, 36, 88, 0.08);
}

.cm-zone__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  cursor: pointer;
}

.cm-zone__identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.cm-zone__badge {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--cm-zone-color);
  border-radius: 999px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

.cm-zone__title {
  margin: 0;
  color: var(--cm-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.cm-zone__count {
  margin: 0.15rem 0 0;
  color: #5a7394;
  font-size: 0.82rem;
  font-weight: 600;
}

.cm-zone__chev {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  color: var(--cm-gold-deep);
  background: #f8f1df;
  border-radius: 999px;
}

.cm-zone__chev svg {
  width: 1.1rem;
  height: 1.1rem;
}

.cm-zone__cities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 1.1rem 1.05rem;
}

.cm-city {
  position: relative;
  padding: 0.42rem 0.85rem;
  color: var(--cm-navy);
  background: var(--cm-muted);
  border: 1px solid rgba(11, 36, 88, 0.08);
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: default;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cm-city:hover,
.cm-city:focus-visible {
  background: #fff;
  border-color: rgba(201, 150, 44, 0.45);
  transform: translateY(-1px);
  outline: none;
}

.cm-city.is-match {
  border-color: color-mix(in srgb, var(--cm-gold) 55%, #fff);
  box-shadow: 0 0 0 2px rgba(201, 150, 44, 0.15);
}

.cm-city__tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  z-index: 3;
  width: max-content;
  max-width: 14rem;
  padding: 0.45rem 0.65rem;
  color: #fff;
  background: var(--cm-navy);
  border-radius: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.cm-city__tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--cm-navy);
}

.cm-city:hover .cm-city__tip,
.cm-city:focus-visible .cm-city__tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cm-page .cm-cta.experience-cta {
  padding: clamp(1.5rem, 3vw, 2.25rem) 0 clamp(2.5rem, 4vw, 3.5rem);
  background: transparent;
}

.cm-page .cm-cta .cm-cta__banner.experience-cta__banner--no-icon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "text btn";
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  padding: clamp(1.5rem, 2.8vw, 2.15rem) clamp(1.75rem, 3.5vw, 2.75rem);
  border-radius: clamp(1.35rem, 2.2vw, 1.85rem);
}

.cm-page .cm-cta .cm-cta__text {
  grid-area: text;
  margin: 0;
  max-width: none;
  color: #ffffff;
  font-family: var(--font-heading), "Playfair Display", Georgia, serif;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.28;
  text-wrap: balance;
}

.cm-page .cm-cta__btn--style2.home-hero__button {
  grid-area: btn;
  align-self: center;
  justify-content: center;
  min-width: min(100%, 14.25rem);
  padding: 0.55rem 1.45rem;
  text-align: center;
}

.cm-page .cm-cta__btn--style2 .home-hero__button-label {
  align-items: center;
  width: 100%;
}

@media (max-width: 820px) {
  .cm-page .cm-cta .cm-cta__banner.experience-cta__banner--no-icon {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "text"
      "btn";
    justify-items: stretch;
  }

  .cm-page .cm-cta__btn--style2.home-hero__button {
    justify-self: start;
    width: fit-content;
    max-width: 100%;
  }
}

@media (max-width: 899px) {
  .cm-hero__grid {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-bottom: 2.6rem;
  }

  .cm-hero__media {
    min-height: 210px;
    border-radius: 1rem;
  }

  .cm-board__grid {
    grid-template-columns: 1fr;
  }

  .cm-map {
    position: static;
  }

  .cm-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cm-legend__btn,
  .cm-city,
  .cm-zone,
  .cm-cta__btn,
  .cm-city__tip {
    transition: none;
  }
}
