/* ==========================================================================
   mb-final-cta.module — "Book Your Methylene Blue IV Consultation"
   Figma: "Methylene Blue - Desktop" › Section - Find a Hydration Room near you
          (13274:722)
   A variation of tia-final-cta-centered: same centred-copy-over-photo layout,
   restyled to the Methylene Blue type scale and brand button colours. The
   HubDB location lookup and BookSmart hook from that module are intentionally
   left out — this is a service-page CTA, not a location page.
   ========================================================================== */

.mb-final-cta {
  --mb-blue: var(--color-blue-ocean, #0077BA);
  --mb-blue-dark: var(--color-blue-dark, #005381);
  --mb-blue-accent: #7FB4D8;
  --mb-blue-mid: #508AC5;
  --mb-blue-pale: #8CCAE5;
  --mb-card: #D5E9F4;
  --mb-bg-soft: #E7F2FA;
  --mb-text: #4A5B67;
  --mb-muted: #55697A;
  --mb-body: var(--color-gray-dark, #3C3C3C);
  --mb-orange: var(--color-cta-primary, #F96F48);
  --mb-orange-hover: var(--color-cta-primary-hover, #E05C34);
  --mb-font-head: 'Montserrat', sans-serif;
  --mb-font-body: 'Source Sans Pro', 'Lato', sans-serif;
  --mb-shell: 1200px;
  --mb-pad-y: 96px;
  --mb-pad-x: 120px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 796px;
  padding: 80px var(--mb-pad-x);
  font-family: var(--mb-font-body);
  background: #EFF4F8;
}

.mb-final-cta,
.mb-final-cta *,
.mb-final-cta *::before,
.mb-final-cta *::after {
  box-sizing: border-box;
}

/* The parent theme sets `li { margin: .7rem }`, which insets every grid and
   flex item by 11.2px per side and knocks card rows out of alignment with the
   full-width panels around them. Lists here space themselves with `gap`. */
.mb-final-cta ul,
.mb-final-cta ol {
  margin: 0;
  padding: 0;
}

.mb-final-cta li {
  margin: 0;
}

.mb-final-cta__bg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Figma gradient: fades the photo to the brand blue toward the bottom */
.mb-final-cta__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.25) 40%,
    rgba(48, 118, 181, 0.30) 60%,
    rgba(48, 118, 181, 0.75) 80%,
    rgb(48, 118, 181) 100%
  );
}

.mb-final-cta__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 672px;
  text-align: center;
}

.mb-final-cta__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 600px;
}

.mb-final-cta__eyebrow {
  margin: 0;
  color: var(--mb-blue);
  font-size: 16px;
  line-height: 1.5;
}

.mb-final-cta__heading {
  margin: 0;
  max-width: 472px;
  font-family: var(--mb-font-head);
  font-weight: 600;
  font-size: 36px;
  line-height: 1.25;
  color: var(--mb-blue-dark);
}

.mb-final-cta__desc {
  margin: 0;
  color: #666666;
  font-size: 18px;
  line-height: 1.5;
}

.mb-final-cta__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  padding-top: 6px;
}

/* Shared CTA buttons — Figma: 8px/32px padding, 8px radius, 18px/1.5 label */
.mb-final-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--mb-font-body);
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.mb-final-cta__btn--primary {
  background: var(--mb-orange);
  color: #FFFFFF;
}

.mb-final-cta__btn--primary:hover,
.mb-final-cta__btn--primary:focus {
  background: var(--mb-orange-hover);
  color: #FFFFFF;
}

.mb-final-cta__btn--outline {
  background: transparent;
  border-color: var(--mb-blue);
  color: var(--mb-blue);
}

.mb-final-cta__btn--outline:hover,
.mb-final-cta__btn--outline:focus {
  background: var(--mb-blue);
  color: #FFFFFF;
}


/* --------------------------------------------------------------------------
   Full-bleed inside drag-and-drop areas
   The parent @hubspot/growth theme gives .dnd-section side gutters, a centred
   max-width and vertical padding. This section is designed edge-to-edge, so it
   releases those constraints on the wrapper it sits in. :has() is already used
   this way in the theme — see pdp-hero.module.
   -------------------------------------------------------------------------- */
.dnd-section:has(.mb-final-cta) {
  max-width: none !important;
  padding: 0 !important;
}

.dnd-section:has(.mb-final-cta) > .row-fluid,
.dnd-section:has(.mb-final-cta) .dnd-row,
.dnd-section:has(.mb-final-cta) .dnd-column,
.dnd-section:has(.mb-final-cta) .widget-span {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Fallback for engines without :has() — 100vw overhangs by the scrollbar width,
   which child.css clips via `overflow-x: clip` on html/body. */
@supports not selector(:has(*)) {
  .mb-final-cta {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .mb-final-cta {
    min-height: 560px;
    padding: 64px var(--mb-pad-x);
  }

  .mb-final-cta__heading { font-size: 30px; }
}

@media (max-width: 767px) {
  /* The section is shorter here, so the copy lands over the photo rather than
     the gradient's clear top band. Bring the white up to keep it readable. */
  .mb-final-cta__scrim {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(255, 255, 255, 0.78) 45%,
      rgba(48, 118, 181, 0.55) 70%,
      rgba(48, 118, 181, 0.90) 88%,
      rgb(48, 118, 181) 100%
    );
  }
}

@media (max-width: 599px) {
  .mb-final-cta {
    min-height: 480px;
    padding: 48px var(--mb-pad-x);
  }

  .mb-final-cta__heading { font-size: 26px; }
  .mb-final-cta__desc { font-size: 16px; }
  .mb-final-cta__ctas { width: 100%; }
  .mb-final-cta__btn { flex: 1 1 100%; }
}

/* --------------------------------------------------------------------------
   Shared gutter scale — every mb-* section steps down together so blocks stay
   edge-aligned with each other at every width.
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .mb-final-cta { --mb-pad-x: 40px; --mb-pad-y: 64px; }
}

@media (max-width: 599px) {
  .mb-final-cta { --mb-pad-x: 20px; --mb-pad-y: 48px; }
}
