/* Pillar pages — new "What We Do" section.
   Scoped to .pillar-page so styles cannot leak onto Elementor pages that
   happen to include this stylesheet. Pillar-specific accent is supplied by
   a --pillar-accent custom property set inline on the body. */

.pillar-page {
  --mbf-navy: #22384c;
  --mbf-green: #20b050;
  --mbf-cream: #f8f5f0;
  --mbf-warm-gray: #e0d9d6;
  --mbf-rule: #e6dfd9;
  --mbf-text: #22384c;
  --mbf-text-muted: #54595f;
  --pillar-accent: #20b050;
  --pillar-accent-fg: #ffffff;

  color: var(--mbf-text);
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.pillar-page main {
  display: block;
}

/* Accent-colored links apply only inside the narrative column — never to the
   shared site header/footer links, which should keep their own styling. */
.pillar-narrative a {
  color: var(--pillar-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.pillar-narrative a:hover {
  text-decoration-thickness: 2px;
}

/* Hero ------------------------------------------------------------------ */

.pillar-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 360px;
  max-height: 640px;
  overflow: hidden;
  background: var(--mbf-navy);
}

.pillar-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Dark gradient behind text (left-weighted) for WCAG AA contrast on any photo. */
.pillar-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(34, 56, 76, 0.82) 0%,
    rgba(34, 56, 76, 0.65) 40%,
    rgba(34, 56, 76, 0.1) 100%
  );
}

.pillar-hero__inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) clamp(24px, 6vw, 64px);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.pillar-hero__badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
  background: var(--pillar-accent);
  color: var(--pillar-accent-fg);
  max-width: max-content;
}

.pillar-hero__icon {
  display: block;
  width: 44px;
  height: auto;
  filter: brightness(0) invert(1);
}

.pillar-hero__eyebrow {
  display: block;
  color: var(--pillar-accent-fg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

.pillar-hero__title {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(2rem, 4.8vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  max-width: 20ch;
}

.pillar-hero__subline {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 400;
  line-height: 1.45;
  max-width: 40ch;
}

/* Narrative bands -------------------------------------------------------- */

.pillar-narrative {
  display: block;
}

.pillar-band {
  padding: clamp(64px, 10vw, 120px) clamp(24px, 6vw, 48px);
}

.pillar-band--challenge { background: #ffffff; }
.pillar-band--approach  { background: var(--mbf-cream); }
.pillar-band--impact    { background: #ffffff; }

.pillar-band__inner {
  max-width: 760px;
  margin: 0 auto;
}

.pillar-band__inner--wide {
  max-width: 960px;
}

.pillar-band__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 clamp(20px, 3vw, 28px);
  color: var(--pillar-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pillar-band__eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 2px;
  background: var(--pillar-accent);
}

.pillar-band__lede {
  margin: 0 0 1.1em;
  color: var(--mbf-navy);
  font-size: clamp(1.2rem, 1.9vw, 1.4rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.pillar-band p {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
}

.pillar-band p + p {
  margin-top: 1em;
}

/* "Defining Shift" — end of Challenge band. Oversized typographic moment
   with an accent rule above it and extra breathing room. */
.pillar-shift {
  position: relative;
  margin: clamp(2em, 5vw, 3em) 0 0 !important;
  padding: clamp(2em, 5vw, 3em) 0 0;
  border-top: 1px solid var(--mbf-rule);
  color: var(--pillar-accent);
  font-size: clamp(1.75rem, 3.4vw, 2.5rem) !important;
  font-weight: 700;
  line-height: 1.12 !important;
  letter-spacing: -0.015em;
}

.pillar-shift::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 64px;
  height: 3px;
  background: var(--pillar-accent);
}

/* "This Is Where You Come In" — end of Approach band. Navy pull-quote with
   accent vertical rule to distinguish it from the shift. */
.pillar-callout {
  margin: clamp(2em, 5vw, 3em) 0 0 !important;
  padding: 0.15em 0 0.15em clamp(20px, 3vw, 28px) !important;
  border-left: 3px solid var(--pillar-accent);
  color: var(--mbf-navy);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem) !important;
  font-weight: 600;
  line-height: 1.28 !important;
  letter-spacing: -0.005em;
}

/* Impact grid — numbered rows with dividers. */
.pillar-impact-grid {
  list-style: none;
  margin: clamp(2em, 4vw, 2.8em) 0 clamp(2em, 4vw, 2.8em);
  padding: 0;
  border-top: 1px solid var(--mbf-rule);
}

.pillar-impact-grid li {
  display: grid;
  grid-template-columns: clamp(64px, 10vw, 92px) 1fr;
  align-items: baseline;
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(18px, 2.5vw, 26px) 0;
  border-bottom: 1px solid var(--mbf-rule);
}

.pillar-impact-grid__num {
  color: var(--pillar-accent);
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pillar-impact-grid__label {
  color: var(--mbf-navy);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 600;
  line-height: 1.35;
}

.pillar-closing {
  margin: clamp(1.5em, 3vw, 2em) 0 0 !important;
  color: var(--mbf-navy);
  font-size: clamp(1.1rem, 1.7vw, 1.3rem) !important;
  font-weight: 500;
  line-height: 1.4 !important;
}

/* Legacy — keep the old .pillar-impact-list class working just in case. */
.pillar-impact-list {
  margin: 0.5em 0;
  padding: 0;
  list-style: none;
}

.pillar-impact-list li {
  position: relative;
  padding: 0.35em 0 0.35em 1.6em;
  font-size: 18px;
  line-height: 1.55;
}

.pillar-impact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 10px;
  height: 2px;
  background: var(--pillar-accent);
}

/* Split band — shift pull-quote paired with a supporting image placeholder.
   Sits between the Challenge and Approach bands. Swap the placeholder div
   for an <img class="pillar-split-band__image"> (or set a background-image
   on .pillar-split-band__frame) when real photography is available. */

.pillar-split-band {
  background: #ffffff;
  padding: clamp(56px, 9vw, 104px) clamp(24px, 6vw, 48px);
}

.pillar-split-band__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.pillar-split-band__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Shift quote styling inside the split band — keep the accent rule + bar
   treatment from the stand-alone version. */
.pillar-split-band .pillar-shift {
  margin: 0 !important;
  padding: clamp(1.5em, 4vw, 2em) 0 0;
  border-top: 1px solid var(--mbf-rule);
}

.pillar-split-band__figure {
  position: relative;
}

.pillar-split-band__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: var(--mbf-warm-gray);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar-split-band__frame::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(34, 56, 76, 0.22);
  pointer-events: none;
}

.pillar-split-band__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pillar-split-band__frame:has(.pillar-split-band__image)::after {
  display: none;
}

.pillar-split-band__label {
  position: relative;
  z-index: 1;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--mbf-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* CTA block -------------------------------------------------------------- */

.pillar-cta {
  background: var(--mbf-cream);
  padding: clamp(48px, 8vw, 88px) clamp(24px, 6vw, 48px);
  border-top: 1px solid var(--mbf-rule);
}

.pillar-cta__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.pillar-cta__kicker {
  margin: 0 0 0.4em;
  color: var(--mbf-text-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pillar-cta__headline {
  margin: 0 0 0.6em;
  color: var(--mbf-navy);
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  max-width: 24ch;
}

.pillar-cta__body {
  margin: 0 0 1.8em;
  color: var(--mbf-text);
  font-size: 18px;
  line-height: 1.55;
  max-width: 52ch;
}

.pillar-cta__button {
  display: inline-block;
  padding: 18px 36px;
  background: var(--pillar-accent);
  color: var(--pillar-accent-fg);
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.pillar-cta__button:hover,
.pillar-cta__button:focus {
  filter: brightness(0.9);
  color: var(--pillar-accent-fg);
  text-decoration: none;
}

/* Cross-page integration ------------------------------------------------- */

.pillar-cross-nav {
  padding: clamp(64px, 9vw, 104px) clamp(24px, 6vw, 48px);
  background: #ffffff;
  border-top: 1px solid var(--mbf-warm-gray);
}

.pillar-cross-nav__inner {
  max-width: 1040px;
  margin: 0 auto;
}

.pillar-cross-nav__eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  color: var(--pillar-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pillar-cross-nav__heading {
  margin: 0 0 0.5em;
  color: var(--mbf-navy);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.pillar-cross-nav__intro {
  margin: 0 0 clamp(2em, 4vw, 2.8em);
  color: var(--mbf-text-muted);
  font-size: 17px;
  line-height: 1.55;
  max-width: 60ch;
}

.pillar-cross-nav__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(24px, 4vw, 40px);
}

.pillar-cross-nav__parent {
  margin: clamp(2.5em, 5vw, 3.5em) 0 0;
  font-size: 15px;
  color: var(--mbf-text-muted);
}

.pillar-cross-nav__parent a {
  color: var(--mbf-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Parent /what-we-do/ page + cross-nav card shared styles --------------- */

.wwd-intro {
  padding: clamp(56px, 9vw, 104px) clamp(24px, 6vw, 48px) clamp(24px, 5vw, 48px);
  max-width: 840px;
  margin: 0 auto;
}

.wwd-intro__eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--mbf-green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wwd-intro__title {
  margin: 0 0 0.5em;
  color: var(--mbf-navy);
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}

.wwd-intro__lede {
  margin: 0 0 1em;
  color: var(--mbf-text);
  font-size: clamp(1.1rem, 1.8vw, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
}

.wwd-intro__body {
  font-size: 18px;
  line-height: 1.65;
}

.wwd-pillars {
  padding: clamp(24px, 5vw, 48px) clamp(24px, 6vw, 48px) clamp(56px, 9vw, 96px);
  max-width: 1200px;
  margin: 0 auto;
}

.wwd-pillars__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.wwd-pillar-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.wwd-pillar-card:hover {
  transform: translateY(-3px);
  color: inherit;
  text-decoration: none;
}

.wwd-pillar-card__media {
  position: relative;
  display: block;
}

.wwd-pillar-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.wwd-pillar-card__icon {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 64px;
  height: 64px;
  padding: 12px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(34, 56, 76, 0.18);
  object-fit: contain;
}

.wwd-pillar-card__body {
  padding: 28px 4px 4px;
}

.wwd-pillar-card__kicker {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wwd-pillar-card--organizational .wwd-pillar-card__kicker { color: #e3731a; }
.wwd-pillar-card--clinical       .wwd-pillar-card__kicker { color: #7a1f2e; }
.wwd-pillar-card--spiritual      .wwd-pillar-card__kicker { color: #c2185b; }

.wwd-pillar-card__title {
  margin: 0 0 10px;
  color: var(--mbf-navy);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.wwd-pillar-card__desc {
  margin: 0 0 18px;
  color: var(--mbf-text-muted);
  font-size: 16px;
  line-height: 1.5;
}

.wwd-pillar-card__more {
  color: var(--mbf-navy);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 1px;
  align-self: flex-start;
}

.wwd-pillar-card:hover .wwd-pillar-card__more {
  border-bottom-color: currentColor;
}

.wwd-closer {
  background: var(--mbf-cream);
  padding: clamp(56px, 9vw, 96px) clamp(24px, 6vw, 48px);
}

.wwd-closer__inner {
  max-width: 760px;
  margin: 0 auto;
}

.wwd-closer__text {
  margin: 0 0 1.6em;
  color: var(--mbf-navy);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  max-width: 42ch;
}

.wwd-closer__button {
  display: inline-block;
  padding: 18px 36px;
  background: var(--mbf-green);
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: filter 0.15s ease;
}

.wwd-closer__button:hover,
.wwd-closer__button:focus {
  filter: brightness(0.9);
  color: #ffffff;
  text-decoration: none;
}

/* Mobile ---------------------------------------------------------------- */

@media (max-width: 768px) {
  .pillar-hero {
    aspect-ratio: 4 / 5;
    min-height: 480px;
    max-height: none;
  }

  .pillar-hero__scrim {
    background: linear-gradient(
      180deg,
      rgba(34, 56, 76, 0.25) 0%,
      rgba(34, 56, 76, 0.45) 40%,
      rgba(34, 56, 76, 0.85) 100%
    );
  }

  .pillar-impact-grid li {
    grid-template-columns: 56px 1fr;
    gap: 16px;
  }

  .pillar-split-band__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pillar-split-band__frame {
    aspect-ratio: 4 / 3;
  }

  .wwd-pillars__list {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pillar-cross-nav__list {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
