/* ==========================================================================
   MBS Design Tokens & Base Components  —  single source of truth
   Load ONCE in the (main) theme. Nothing hardcodes brand values elsewhere.
   Font: DM Sans — enqueue once in functions.php. Do not @import here.
   ========================================================================== */
:root{
  --mbs-primary:#795a8b;
  --mbs-primary-hover:#634a72;
  --mbs-secondary:#8490c8;

  --mbs-heading:#1a1a1a;
  --mbs-text:#555555;
  --mbs-dark:#0f0f0f;
  --mbs-footer:#795a8b;

  --mbs-bg:#ffffff;
  --mbs-tint:#f7f5ff;
  --mbs-border:#ece8f7;

  --mbs-font:"DM Sans", system-ui, sans-serif;   /* single font, everywhere */

  --mbs-size-body:18px;   /* description copy; was 15px */
  --mbs-size-lead:20px;   /* intro / lead descriptions; was 15–16px */
  --mbs-size-h3:26px;     /* was 24px */
  --mbs-size-h2:40px;     /* was 36px */
  --mbs-size-h1:56px;     /* was 52px */

  --mbs-space-section:50px;
  --mbs-space-gutter:60px;
  --mbs-maxw:1180px;
  --mbs-logo-h:58px;

  --mbs-radius:16px;
  --mbs-radius-nav:8px;
  --mbs-radius-pill:16px;
  --mbs-radius-card:16px;

  --mbs-header-h:88px;
  --mbs-chrome-h:var(--mbs-header-h);
  --mbs-z-header:1000;
  --mbs-z-lightbox:1100;
  --mbs-z-totop:900;
}

body{
  font-family:var(--mbs-font);
  color:var(--mbs-text);
  font-size:var(--mbs-size-body);
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
}

/* ---- Layout ----
   One column everywhere: max-width + the same side gutter.
   Sections only add vertical space. Do not add a second horizontal pad.
   ---- */
.mbs-section{ padding-block:var(--mbs-space-section); padding-inline:0; }
.mbs-section--tint{ background:var(--mbs-tint); }
.mbs-section--white{ background:var(--mbs-bg); }
.mbs-section--dark{ background:var(--mbs-dark); color:#fff; }
.mbs-wrap,
.mbs-wrap.mbs-prose,
.mbs-wrap.mbs-post-layout,
.mbs-hero__grid,
.mbs-stats-inner,
.mbs-cta-wrap,
.mbs-footer .footer-grid,
.mbs-footer .footer-bottom,
.mbs-404{
  width:100%;
  max-width:var(--mbs-maxw);
  margin-inline:auto;
  padding-inline:var(--mbs-space-gutter);
  box-sizing:border-box;
}

/* ==========================================================================
   Typography  —  HEADINGS ARE NEVER ITALIC.
   Emphasis = colour only (.mbs-accent), same non-italic style/font.
   ========================================================================== */
.mbs-eyebrow{ display:inline-flex; align-items:center; gap:10px;
  font-size:12px; font-weight:500; letter-spacing:.1em;
  text-transform:uppercase; color:var(--mbs-primary); margin:0 0 16px; }
.mbs-eyebrow::before{ content:""; display:inline-block; width:20px; height:1px;
  background:var(--mbs-secondary); }
.mbs-section-label{ font-size:11px; color:var(--mbs-text); letter-spacing:.1em;
  text-transform:uppercase; font-weight:400; margin:0 0 12px; }
h1,.mbs-h1,h1.mbs{ font-weight:400; font-size:var(--mbs-size-h1); line-height:1.1;
  letter-spacing:-.02em; color:var(--mbs-heading); margin:0 0 16px; font-style:normal; }
h2,.mbs-h2,h2.mbs{ font-weight:400; font-size:var(--mbs-size-h2); line-height:1.15;
  letter-spacing:-.02em; color:var(--mbs-heading); margin:0 0 20px; font-style:normal; }
h3,.mbs-h3,h3.mbs{ font-weight:400; font-size:var(--mbs-size-h3); line-height:1.25;
  letter-spacing:-.02em; color:var(--mbs-heading); margin:0 0 10px; font-style:normal; }
.mbs-accent{ color:var(--mbs-primary); font-style:normal; }
.mbs-body{ font-size:var(--mbs-size-body); line-height:1.75; color:var(--mbs-text); margin:0 0 14px; }

/* Global safety net: kill italics on ALL heading tags site-wide */
h1,h2,h3,h4,h5,h6{ font-style:normal !important; }

/* ==========================================================================
   Page title area  —  every page: H1 title + optional H3 subtitle (SEO)
   Exactly ONE H1 per page, and it lives here.
   ========================================================================== */
.mbs-page-title{
  position:relative;
  min-height:220px;
  display:flex;
  align-items:center;
  justify-content:center;
  background-color:#fff;
  background-image:var(--mbs-page-title-bg);
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  padding-block:50px;
  padding-inline:0;
  border-bottom:1px solid var(--mbs-border);
  overflow:hidden;
  text-align:center;
  box-sizing:border-box;
}
.mbs-page-title h1{ font-weight:400; font-size:var(--mbs-size-h1); line-height:1.1;
  letter-spacing:-.02em; color:var(--mbs-heading); margin:0 auto; max-width:16em; }
.mbs-page-title .subtitle,.mbs-page-title h3{ font-weight:400; font-size:var(--mbs-size-lead);
  line-height:1.5; color:var(--mbs-text); margin:0 auto; max-width:40em; }

/* ==========================================================================
   Buttons  —  ONE canonical style, forced across the site.
   NOTE: excludes plugin UIs (donor DB / calculator) so we don't break their
   controls — keep plugin buttons inside their own wrapper class and add it to
   the :not() list, or scope plugin CSS separately.
   ========================================================================== */
.mbs-btn,
a.mbs-btn,
.mbs-btn-primary,
a.mbs-btn-primary,
.wp-block-button__link,
.wp-element-button,
button.mbs-btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--mbs-font); font-size:14px; font-weight:500; line-height:1;
  padding:13px 26px; border:none; border-radius:var(--mbs-radius);
  background:var(--mbs-primary) !important; color:#fff !important;
  text-decoration:none; cursor:pointer;
  transition:background .25s ease;
}
.mbs-btn:hover,
a.mbs-btn:hover,
.mbs-btn-primary:hover,
a.mbs-btn-primary:hover,
.wp-block-button__link:hover,
.wp-element-button:hover,
button.mbs-btn:hover{ background:var(--mbs-secondary) !important; }

.mbs-btn--dark,
.mbs-btn-dark,
a.mbs-btn--dark,
a.mbs-btn-dark{
  background:var(--mbs-dark) !important; color:#fff !important; }
.mbs-btn--dark:hover,
.mbs-btn-dark:hover,
a.mbs-btn--dark:hover,
a.mbs-btn-dark:hover{ background:var(--mbs-primary) !important; }

/* Images: same 16px curve as cards and buttons */
.mbs-img,img.mbs,.entry-content img{ border-radius:var(--mbs-radius); }

/* ==========================================================================
   Check list  (at-a-glance / trust)
   ========================================================================== */
.mbs-check-list{ list-style:none; padding:0; margin:0; display:grid;
  grid-template-columns:1fr 1fr; gap:14px 40px; }
.mbs-check-list li{ display:flex; align-items:flex-start; gap:12px;
  font-size:var(--mbs-size-body); color:var(--mbs-heading); }
.mbs-check{ width:18px; height:18px; flex-shrink:0; margin-top:2px;
  stroke:var(--mbs-primary); fill:none; stroke-width:2.4;
  stroke-linecap:round; stroke-linejoin:round; }

/* ==========================================================================
   Contact chips (footer / country CTA)
   ========================================================================== */
.mbs-chip{ display:inline-flex; align-items:center; gap:9px; padding:11px 18px;
  border-radius:var(--mbs-radius-pill); background:var(--mbs-tint);
  border:1px solid var(--mbs-border); color:var(--mbs-heading);
  font-size:14px; font-weight:500; text-decoration:none;
  transition:border-color .2s ease, background .2s ease; }
.mbs-chip:hover{ border-color:var(--mbs-primary); }
.mbs-chip--dark{ background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.14); color:#fff; }
.mbs-chip--dark:hover{ border-color:var(--mbs-secondary); background:rgba(255,255,255,.1); }
.mbs-chip svg{
  width:18px; height:18px; flex-shrink:0;
  fill:none; stroke:var(--mbs-primary); stroke-width:1.6;
  stroke-linecap:round; stroke-linejoin:round;
}
.mbs-chip[href*="wa.me"] svg{ fill:var(--mbs-primary); stroke:none; }

/* ==========================================================================
   Sticky header
   ========================================================================== */
.mbs-header{ position:sticky; top:0; z-index:var(--mbs-z-header);
  background:var(--mbs-bg); border-bottom:1px solid var(--mbs-border);
  transition:box-shadow .25s ease, padding .25s ease; }
.mbs-header.is-scrolled{ box-shadow:0 6px 24px color-mix(in srgb, var(--mbs-primary) 12%, transparent); }
/* offset in-page anchors so the sticky header doesn't cover them */
:target{ scroll-margin-top:calc(var(--mbs-chrome-h) + 20px); }
html{ scroll-behavior:smooth; }

/* ==========================================================================
   Back-to-top button (subtle)
   ========================================================================== */
.mbs-totop{ position:fixed; right:22px; bottom:22px; z-index:var(--mbs-z-totop);
  width:44px; height:44px; border-radius:50%; border:none; cursor:pointer;
  background:var(--mbs-primary); color:#fff;
  display:flex; align-items:center; justify-content:center;
  opacity:0; visibility:hidden; transform:translateY(8px);
  transition:opacity .3s ease, transform .3s ease, background .2s ease; }
.mbs-totop.is-visible{ opacity:1; visibility:visible; transform:translateY(0); }
.mbs-totop:hover{ background:var(--mbs-secondary); }
.mbs-totop svg{ width:18px; height:18px; stroke:#fff; fill:none;
  stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

/* ==========================================================================
   Breadcrumbs (blog posts)
   ========================================================================== */
.mbs-breadcrumb{ font-size:13px; color:var(--mbs-text); margin:0 0 20px; }
.mbs-breadcrumb a{ color:var(--mbs-primary); text-decoration:none; }
.mbs-breadcrumb a:hover{ text-decoration:underline; }
.mbs-breadcrumb .sep{ color:var(--mbs-secondary); margin:0 8px; }

/* Post footer: back to blog / categories */
.mbs-post-footer{ margin-top:48px; padding-top:24px;
  border-top:1px solid var(--mbs-border);
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:16px; }
.mbs-post-cats{ display:flex; gap:8px; flex-wrap:wrap; }
.mbs-post-cats a{ font-size:13px; padding:6px 14px; border-radius:var(--mbs-radius-pill);
  background:var(--mbs-tint); color:var(--mbs-primary); text-decoration:none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width:820px){
  :root{
    --mbs-space-section:50px;
    --mbs-space-gutter:24px;
    --mbs-size-body:17px;
    --mbs-size-lead:18px;
    --mbs-size-h1:40px;
    --mbs-size-h2:32px;
    --mbs-size-h3:24px;
  }
  .mbs-check-list{ grid-template-columns:1fr; }
}
