/* cs-map-location — "Find our office" section with framed Google Maps embed.
   All rem values follow BB Theme's html { font-size: 10px } base — 1.8rem = 18px. */

/* Strip BB's default row top spacing so the section (and its crossing-lines
   decoration) starts exactly where the previous section ends. */
.fl-row-content-wrap:has(.cs-map-location) {
  padding-top: 0;
}
.fl-module-content:has(.cs-map-location) {
  margin-top: 0;
}

.cs-map-location {
  padding-block: var(--cs-space-2xl);
  font-family: var(--cs-font-body);
  color: var(--cs-ink);
}

.cs-map-location__inner {
  max-width: var(--cs-container);
  margin: 0 auto;
  padding-inline: var(--cs-gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--cs-space-xl);
  text-align: center;
}

/* ---------- Header ---------- */
.cs-map-location__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--cs-space-sm);
}

/* ---------- Top CTA (optional, above the heading) ---------- */
.cs-map-location__cta-row {
  display: flex;
  justify-content: center;
  margin-bottom: var(--cs-space-lg);
}

.cs-map-location .cs-map-location__cta,
.cs-map-location .cs-map-location__cta:link,
.cs-map-location .cs-map-location__cta:visited {
  display: inline-block;
  background: var(--cs-orange);
  color: var(--cs-white);
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 1.8rem; /* 18px */
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-decoration: none;
  text-align: center;
  min-width: min(33rem, 100%); /* 330px per Figma */
  padding: 1rem 3.2rem;
  border-radius: var(--cs-radius-pill);
  transition: background 250ms ease-in-out, color 250ms ease-in-out, box-shadow 250ms ease-in-out, filter 250ms ease-in-out, transform 250ms ease-in-out;
}

.cs-map-location .cs-map-location__cta.cs-map-location__cta:hover,
.cs-map-location .cs-map-location__cta.cs-map-location__cta:focus-visible {
  background: var(--cs-orange);
  color: var(--cs-white);
  filter: brightness(1.08);
  box-shadow: 0 0.8rem 2rem -0.8rem rgba(180, 79, 45, 0.6);
  transform: scale(1.02);
  text-decoration: none;
}

.cs-map-location__eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  font-family: var(--cs-font-display);
  font-weight: 500;
  font-size: 2rem; /* 20px */
  line-height: 1.212;
  color: var(--cs-blue);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cs-map-location__eyebrow-line {
  display: inline-block;
  width: 4.9rem;
  height: 2px;
  background: currentColor;
}

/* Doubled-up class specificity so the heading survives BB Global Styles'
   `.fl-builder-content h2 / h2 span` color & font rules. */
.cs-map-location .cs-map-location__heading {
  margin: 0;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: clamp(3rem, 3vw + 1rem, 4rem); /* 30px → 40px */
  font-style: normal;
  color: var(--cs-ink); /* don't inherit the Customizer's #683326 global h2 color */
  line-height: 1.5;
  letter-spacing: var(--cs-tracking-tight);
  text-wrap: balance;
}

.cs-map-location .cs-map-location__heading-main {
  color: var(--cs-ink);
}

/* Accent color variants */
.cs-map-location--accent-blue      .cs-map-location__heading-accent { color: var(--cs-blue); }
.cs-map-location--accent-blue-dark .cs-map-location__heading-accent { color: var(--cs-blue-dark); }
.cs-map-location--accent-orange    .cs-map-location__heading-accent { color: var(--cs-orange); }

/* ---------- Offices ----------
   The section heading renders once; each office below repeats heading +
   paragraph + map. Two-up on desktop, stacked from 1024px down — at narrower
   widths a half-width column leaves the map about 320px wide against a 440px
   height, which reads as a portrait sliver rather than a map. */
.cs-map-location__locations {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--cs-space-xl);
  /* stretch, not start: paired with margin-top:auto on the frame it keeps the
     two maps on the same line even when one office's paragraph wraps to more
     lines than the other's. */
  align-items: stretch;
}

/* One office — keep the original centred, 940px-capped frame. Same single
   column value as the stacked rule below, so the two never disagree. */
.cs-map-location__locations--single {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.cs-map-location__location {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--cs-space-md);
}

/* Pushes the frame to the bottom of its column so both maps sit on the same
   line regardless of paragraph length; the gap above still holds as a floor. */
.cs-map-location__location .cs-map-location__frame {
  margin-top: auto;
}

/* Doubled-up class specificity so the office heading survives BB Global
   Styles' `.fl-builder-content h3` colour & font rules. */
.cs-map-location .cs-map-location__location-heading {
  margin: 0;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 1.5vw + 1rem, 2.8rem); /* 22px → 28px */
  line-height: 1.5;
  letter-spacing: var(--cs-tracking-tight);
  color: var(--cs-ink);
  text-wrap: balance;
}

.cs-map-location__subtitle {
  max-width: 72rem;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 1.8rem; /* 18px — body-copy floor */
  line-height: 1.5;
  color: var(--cs-blue);
}

.cs-map-location__subtitle p {
  margin: 0 0 var(--cs-space-sm);
}

.cs-map-location__subtitle p:last-child {
  margin-bottom: 0;
}

/* ---------- Map frame ---------- */
.cs-map-location__frame {
  width: 100%;
  max-width: 94rem; /* 940px */
  background: var(--cs-map-frame, var(--cs-blue-card));
  border-radius: 4.2rem;
  padding: 3.4rem 3.8rem;
}

.cs-map-location__map {
  border-radius: 3.5rem;
  overflow: hidden;
  height: var(--cs-map-height, 44rem);
}

.cs-map-location__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- SEO footer ---------- */
.cs-map-location__seo {
  max-width: 90rem;
  font-family: var(--cs-font-display);
  font-weight: 400;
  font-size: 1.8rem; /* 18px — body-copy floor */
  line-height: 1.5;
  color: var(--cs-blue);
}

.cs-map-location__seo p {
  margin: 0;
}

.cs-map-location__seo a {
  color: var(--cs-blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

.cs-map-location__seo a:hover,
.cs-map-location__seo a:focus-visible {
  color: var(--cs-blue);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  /* Stack the offices and give each map the full width back. */
  .cs-map-location__locations {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }
}

@media (max-width: 900px) {
  .cs-map-location {
    padding-block: var(--cs-space-section-sm);
  }
  .cs-map-location__frame {
    padding: 2.4rem;
    border-radius: 3.2rem;
  }
  .cs-map-location__map {
    border-radius: 2.4rem;
    height: min(var(--cs-map-height, 44rem), 40rem);
  }
}

@media (max-width: 640px) {
  .cs-map-location__frame {
    padding: 1.6rem;
    border-radius: 2.4rem;
  }
  .cs-map-location__map {
    border-radius: 1.8rem;
    height: min(var(--cs-map-height, 44rem), 32rem);
  }
}
