/**
 * Community detail page.
 *
 * Plain CSS on purpose — this page is built with Bootstrap's grid plus the
 * classes below and is NOT part of the Sass build. Edit this file directly;
 * no `yarn build` step is required. Every class is namespaced `cd-` so it
 * cannot collide with (or be overridden by) app.css.
 */

:root {
  --cd-green: #8dc43f;
  --cd-green-dark: #7bb232;
  --cd-navy: #131e29;
  --cd-slate: #415461;
  --cd-muted: #5c6b78;
  --cd-panel: #eef2f6;
  --cd-line: #dfe4ea;
  --cd-foot: #f5f7f8;
  --cd-serif: 'DM Serif Display', 'DM Serif Text', Georgia, serif;
  --cd-sans:
    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cd-intro,
.cd-overview,
.cd-section {
  font-family: var(--cd-sans);
}

/* The design lays out on a 1140px content column, narrower than the theme's
   default container at xxl. */
@media (min-width: 1200px) {
  .cd-intro > .container,
  .cd-overview > .container,
  .cd-section > .container {
    max-width: 71.25rem;
  }
}

/* ---------------------------------------------------------------- Intro -- */

.cd-intro {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.cd-intro__inner {
  max-width: 68rem;
  margin: 0 auto;
}

.cd-intro__headline {
  margin: 0;
  color: var(--cd-navy);
  font-family: var(--cd-serif);
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  font-weight: 400;
  line-height: 1.3;
}

.cd-intro__copy {
  max-width: 47rem;
  margin: 1.25rem auto 0;
  color: var(--cd-slate);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.cd-intro__copy p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------- Overview -- */

.cd-overview {
  --cd-bleed: 0.75rem;

  padding-bottom: 3rem;
  overflow-x: clip;
}

.cd-overview__grid {
  display: grid;
  grid-template-areas:
    'head'
    'specs'
    'media'
    'promo';
  grid-template-columns: minmax(0, 1fr);
  row-gap: 0;
}

.cd-panel {
  grid-area: head;
  position: relative;
  margin-inline: calc(-1 * var(--cd-bleed));
  padding-inline: var(--cd-bleed);
  background: var(--cd-panel);
  overflow: hidden;
}

.cd-panel__inner {
  padding: 2rem 0 2.25rem;
  text-align: center;
}

.cd-panel__title {
  margin: 0;
  color: var(--cd-navy);
  font-family: var(--cd-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
}

.cd-panel__eyebrow {
  margin: 0.5rem 0 0;
  color: var(--cd-slate);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cd-panel__copy {
  max-width: 46rem;
  margin: 1.25rem auto 0;
  color: var(--cd-slate);
  font-size: 1rem;
  line-height: 1.8;
}

.cd-panel__copy p:last-child {
  margin-bottom: 0;
}

/* "Overview" divider */
.cd-rule {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 60rem;
  margin: 2rem auto 0;
}

.cd-rule::before,
.cd-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #c7d0d9;
}

.cd-rule span {
  color: var(--cd-slate);
  font-size: 0.875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------- Promo ribbon -- */

.cd-ribbon__inner {
  display: block;
  margin-inline: calc(-1 * var(--cd-bleed));
  padding: 0.75rem 1rem;
  background: var(--cd-green);
  color: var(--cd-navy);
  text-align: center;
}

.cd-ribbon__line-1,
.cd-ribbon__line-2 {
  display: block;
  line-height: 1.3;
}

.cd-ribbon__line-1 {
  font-family: var(--cd-serif);
  font-size: 1.375rem;
}

.cd-ribbon__line-2 {
  font-size: 0.875rem;
}

/* ---------------------------------------------------------------- Media -- */

.cd-media {
  grid-area: media;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  padding-top: 1.5rem;
}

.cd-media__img {
  display: block;
  width: 100%;
  height: clamp(15rem, 36vw, 33rem);
  object-fit: cover;
}

.cd-media__video {
  position: relative;
}

.cd-media__video a {
  display: block;
  position: relative;
}

.cd-media__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0.25rem 1rem rgba(19, 30, 41, 0.25);
  color: var(--cd-navy);
  font-size: 1.5rem;
  transition: transform 0.2s ease;
}

.cd-media__video a:hover .cd-media__play {
  transform: translate(-50%, -50%) scale(1.06);
}

.cd-media__gallery {
  position: relative;
}

.cd-splide .splide__slide img {
  display: block;
  width: 100%;
  height: clamp(15rem, 36vw, 33rem);
  object-fit: cover;
}

/* app.css pushes arrows outside the slider globally — pull them back in. */
.cd-splide .splide__arrows .splide__arrow {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--cd-green);
  opacity: 1;
}

.cd-splide .splide__arrows .splide__arrow--prev {
  left: 0.75rem;
}

.cd-splide .splide__arrows .splide__arrow--next {
  right: 0.75rem;
}

.cd-splide .splide__arrows .splide__arrow svg {
  width: 1rem;
  height: 1rem;
  fill: #fff;
}

.cd-splide .splide__arrows .splide__arrow:hover {
  background: var(--cd-green-dark);
}

.cd-splide .splide__slide {
  position: relative;
}

.cd-splide .gallery_lightbox {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  line-height: 0;
}

.cd-splide .open_gallery img {
  display: block;
  width: 2.25rem;
  height: auto;
}

/* The compiled app.js requires #thumbnail-carousel in the DOM, but the design
   shows the gallery without thumbnails — keep it mounted and out of sight. */
.cd-splide-thumbs {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  pointer-events: none;
}

/* ---------------------------------------------------------------- Promo -- */

.cd-promo {
  grid-area: promo;
  padding-top: 2rem;
}

.cd-promo__eyebrow {
  padding: 0.5rem 1rem;
  background: #fdf2d0;
  color: var(--cd-green-dark);
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: center;
}

.cd-promo__img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------- Specs -- */

.cd-specs {
  grid-area: specs;
  margin-inline: calc(-1 * var(--cd-bleed));
  padding: 0 var(--cd-bleed) 2.25rem;
  background: var(--cd-panel);
}

.cd-specs__headline {
  margin: 0 0 1.25rem;
  color: var(--cd-navy);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cd-specs__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.cd-specs__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cd-navy);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cd-specs__item i {
  color: var(--cd-green);
  font-size: 1.125rem;
}

.cd-specs__amenities {
  margin: 0 2rem 1.75rem;
  padding: 0;
  list-style: none;
  color: var(--cd-slate);
}

.cd-specs__amenities li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.65rem;
  font-size: 1rem;
  line-height: 1.5;
}

.cd-specs__amenities li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--cd-slate);
}

.cd-specs__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* -------------------------------------------------------------- Buttons -- */

.cd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12rem;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--cd-green);
  border-radius: 999px;
  background: var(--cd-green);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.cd-btn:hover,
.cd-btn:focus {
  background: var(--cd-green-dark);
  border-color: var(--cd-green-dark);
  color: #fff;
}

.cd-btn--ghost {
  background: transparent;
  color: var(--cd-green-dark);
}

.cd-btn--ghost:hover,
.cd-btn--ghost:focus {
  background: var(--cd-green);
  color: #fff;
}

.cd-btn--sm {
  min-width: 8.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.8125rem;
}

/* ------------------------------------------------------------- Sections -- */

.cd-section {
  padding: 3rem 0;
  text-align: center;
}

.cd-section__head {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.cd-section__head h2 {
  margin: 0;
  color: var(--cd-navy);
  font-family: var(--cd-serif);
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
}

.cd-dash {
  flex: 1;
  height: 3px;
  min-width: 1.5rem;
  background-image: repeating-linear-gradient(
    to right,
    #c3ccd6 0,
    #c3ccd6 4px,
    transparent 4px,
    transparent 10px
  );
}

.cd-about__copy {
  max-width: 56rem;
  margin: 0 auto;
  color: var(--cd-slate);
  font-size: 1.0625rem;
  line-height: 1.8;
}

/* ---------------------------------------------------------------- Cards -- */

.cd-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #e7ebef;
  background: #fff;
  box-shadow: 0 0.375rem 0.875rem rgba(19, 30, 41, 0.08);
}

.cd-card__media {
  position: relative;
}

.cd-card__img {
  display: block;
  width: 100%;
  height: 12.5rem;
  object-fit: cover;
}

.cd-card__flag {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0.5rem 1rem;
  background: var(--cd-slate);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cd-card__body {
  padding: 0.9rem 1rem;
}

.cd-card__title {
  margin: 0;
  font-family: var(--cd-serif);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
}

.cd-card__title a {
  color: var(--cd-navy);
  text-decoration: none;
}

.cd-card__title a:hover {
  color: var(--cd-green-dark);
}

.cd-card__address {
  display: block;
  margin-top: 0.2rem;
  color: var(--cd-muted);
  font-size: 0.9375rem;
}

.cd-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--cd-line);
  font-size: 0.875rem;
}

.cd-card__meta-item strong {
  color: var(--cd-navy);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cd-card__meta-item a {
  color: var(--cd-slate);
  text-decoration: none;
}

.cd-card__meta-item a:hover {
  color: var(--cd-green-dark);
}

.cd-card__specs {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--cd-line);
  list-style: none;
  color: var(--cd-navy);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cd-card__specs i {
  margin-right: 0.35rem;
  color: var(--cd-green);
}

.cd-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--cd-line);
  background: var(--cd-foot);
}

.cd-card__price {
  color: var(--cd-slate);
  font-size: 0.9375rem;
  font-weight: 500;
}

.cd-card__price a {
  color: var(--cd-green-dark);
  text-decoration: none;
}

/* -------------------------------------------------------- Community map -- */

.cd-community-map__inner {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}

.cd-community-map__img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1.5rem;
}

/* ------------------------------------------------------------- Location -- */

.cd-location__map .acf-map {
  width: 100%;
  height: 25rem;
  margin: 0;
}

.cd-location__details {
  padding-top: 1.5rem;
}

.cd-location__details h3 {
  margin: 0 0 0.5rem;
  color: var(--cd-navy);
  font-family: var(--cd-serif);
  font-size: 1.375rem;
  font-weight: 400;
}

.cd-location__address {
  margin: 0 0 0.75rem;
  color: var(--cd-slate);
  font-size: 1rem;
  font-style: normal;
  line-height: 1.6;
}

.cd-location__address span {
  display: block;
}

.cd-location__directions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--cd-navy);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.cd-location__directions:hover {
  color: var(--cd-green-dark);
}

.cd-location__copy {
  margin-top: 1rem;
  color: var(--cd-slate);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.cd-agent {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cd-line);
}

.cd-agent h4 {
  margin: 0 0 1rem;
  color: var(--cd-navy);
  font-family: var(--cd-serif);
  font-size: 1.125rem;
  font-weight: 400;
}

.cd-agent__inner {
  display: flex;
  gap: 1rem;
}

.cd-agent__photo {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
}

.cd-agent__info {
  display: flex;
  flex-direction: column;
  color: var(--cd-slate);
  font-size: 0.9375rem;
}

.cd-agent__name {
  color: var(--cd-navy);
  font-weight: 700;
}

.cd-agent__info a {
  color: var(--cd-green-dark);
  text-decoration: none;
}

/* --------------------------------------------------------------- md up  -- */

@media (min-width: 768px) {
  .cd-specs__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* --------------------------------------------------------------- lg up  -- */

@media (min-width: 992px) {
  .cd-overview {
    /* Panel bleeds past the content column; the section clips the overflow. */
    --cd-bleed: 4.6875rem;

    padding-bottom: 4rem;
  }

  .cd-overview__grid {
    grid-template-areas:
      'head head'
      'media media'
      'promo specs';
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.25rem;
  }

  .cd-panel__inner {
    /* Leaves room for the media to overlap the bottom of the panel. */
    padding: 3.5rem 0 6.5rem;
  }

  .cd-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    width: 22rem;
    height: 22rem;
    pointer-events: none;
  }

  .cd-ribbon__inner {
    position: absolute;
    top: 5.2rem;
    left: -5.9rem;
    width: 27rem;
    margin-inline: 0;
    padding: 0.8rem 0;
    transform: rotate(-45deg);
  }

  .cd-media {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.25rem;
    margin-top: -5.25rem;
    padding-top: 0;
  }

  .cd-promo {
    padding-top: 3rem;
  }

  .cd-specs {
    margin-inline: 0;
    padding: 3rem 0 0;
    background: none;
  }

  .cd-specs__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .cd-location__details {
    padding-top: 0;
    padding-left: 1.5rem;
    text-align: left;
  }
}
