/* ============================================================
   MINDBRIDGE — MAIN STYLESHEET
   Design tokens are injected as CSS custom properties from
   includes/site-config.php (see includes/header.php <style>).
   Signature element: the "bridge arc" — a curved line motif
   that recurs in the logo, section dividers and hero graphic,
   symbolising the bridge between psychology and education.
   ============================================================ */

:root {
  --mb-primary: #1F3A5F;
  --mb-secondary: #5B8C7B;
  --mb-accent: #E3A857;
  --mb-bg: #FAF9F6;
  --mb-ink: #1C2430;

  --mb-primary-tint: #eef2f6;
  --mb-secondary-tint: #eef5f2;
  --mb-accent-tint: #fbf1e0;
  --mb-border: #e4e0d6;
  --mb-muted: #6b7280;

  --mb-font-display: 'Fraunces', Georgia, serif;
  --mb-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --mb-radius-sm: 10px;
  --mb-radius-md: 18px;
  --mb-radius-lg: 28px;

  --mb-shadow-soft: 0 8px 30px rgba(31, 58, 95, 0.08);
  --mb-shadow-lift: 0 16px 40px rgba(31, 58, 95, 0.14);

  --mb-transition: 220ms cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--mb-font-body);
  color: var(--mb-ink);
  background: var(--mb-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .mb-display {
  font-family: var(--mb-font-display);
  font-weight: 600;
  color: var(--mb-primary);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem); }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.75rem); }
h3 { font-size: clamp(1.25rem, 1.2vw + 1rem, 1.6rem); }
p { color: var(--mb-ink); }
.mb-lede { font-size: 1.2rem; color: var(--mb-muted); max-width: 60ch; }
a { color: var(--mb-primary); text-decoration: none; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--mb-primary); color: #fff;
  padding: 0.75rem 1.25rem; z-index: 2000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--mb-accent);
  outline-offset: 2px;
}

section { padding: 5.5rem 0; }
@media (max-width: 767px) { section { padding: 3.25rem 0; } }

.mb-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mb-secondary); margin-bottom: 1rem;
}
.mb-eyebrow::before {
  content: ""; width: 22px; height: 2px; background: var(--mb-accent); display: inline-block;
}

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; padding: 0.7rem 1.6rem; font-weight: 600; font-size: 0.95rem; transition: var(--mb-transition); }
.mb-btn-primary {
  background: var(--mb-primary); color: #fff; border: 1px solid var(--mb-primary);
}
.mb-btn-primary:hover { background: #16283f; color: #fff; transform: translateY(-2px); box-shadow: var(--mb-shadow-lift); }
.mb-btn-outline {
  background: transparent; color: var(--mb-primary); border: 1px solid var(--mb-primary);
}
.mb-btn-outline:hover { background: var(--mb-primary); color: #fff; transform: translateY(-2px); }
.mb-btn-accent { background: var(--mb-accent); color: #1C2430; border: 1px solid var(--mb-accent); }
.mb-btn-accent:hover { background: #d69736; color: #1C2430; transform: translateY(-2px); }
.mb-btn-lg { padding: 0.9rem 2.1rem; font-size: 1.05rem; }

/* ---------- Navbar ---------- */
.mb-navbar { position: sticky; top: 0; z-index: 1030; background: rgba(250,249,246,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--mb-border); }
.mb-brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--mb-font-display); font-weight: 600; font-size: 1.3rem; color: var(--mb-primary); }
.mb-nav .mb-brand img { height: 56px; width: auto; display: block; }
.mb-nav .nav-link { color: var(--mb-ink); font-weight: 500; padding: 0.5rem 1rem !important; border-radius: 999px; transition: var(--mb-transition); }
.mb-nav .nav-link:hover, .mb-nav .nav-link.active { color: var(--mb-primary); background: var(--mb-primary-tint); }

/* ---------- Hero ---------- */
.mb-hero { position: relative; padding: 6rem 0 4rem; overflow: hidden; }
.mb-hero-bridge {
  position: absolute; inset: auto 0 0 0; height: 220px; pointer-events: none; opacity: 0.9;
}
.mb-hero-content { position: relative; z-index: 2; max-width: 46rem; }
.mb-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.mb-hero-stats { display: flex; gap: 2.5rem; margin-top: 3rem; flex-wrap: wrap; }
.mb-hero-stats .stat-num { font-family: var(--mb-font-display); font-size: 2rem; color: var(--mb-primary); font-weight: 600; display: block; }
.mb-hero-stats .stat-label { font-size: 0.85rem; color: var(--mb-muted); }

/* ---------- Cards ---------- */
.mb-card {
  background: #fff; border: 1px solid var(--mb-border); border-radius: var(--mb-radius-md);
  padding: 2rem; height: 100%; transition: var(--mb-transition);
}
.mb-card:hover { transform: translateY(-6px); box-shadow: var(--mb-shadow-lift); border-color: transparent; }
.mb-card-icon {
  width: 56px; height: 56px; border-radius: var(--mb-radius-sm); display: flex; align-items: center; justify-content: center;
  background: var(--mb-primary-tint); color: var(--mb-primary); margin-bottom: 1.25rem; font-size: 1.4rem;
}
.mb-card.tint-secondary .mb-card-icon { background: var(--mb-secondary-tint); color: var(--mb-secondary); }
.mb-card.tint-accent .mb-card-icon { background: var(--mb-accent-tint); color: #b3781f; }

/* ---------- Section dividers (bridge-arc signature) ---------- */
.mb-divider { width: 100%; height: 60px; display: block; }
.mb-section-alt { background: #fff; }

/* ---------- Process / How We Work ---------- */
.mb-process-step { position: relative; padding-left: 3.25rem; margin-bottom: 2.25rem; }
.mb-process-step::before {
  content: attr(data-step); position: absolute; left: 0; top: 0; width: 2.4rem; height: 2.4rem;
  border-radius: 50%; background: var(--mb-primary); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--mb-font-display); font-weight: 600;
}
.mb-process-step:not(:last-child)::after {
  content: ""; position: absolute; left: 1.2rem; top: 2.4rem; width: 1px; height: calc(100% - 1.4rem);
  background: var(--mb-border);
}

/* ---------- Testimonials ---------- */
/* ---------- Recent Activity carousel (Home page) ---------- */
.mb-activity-carousel { border-radius: var(--mb-radius-lg); overflow: hidden; }
.mb-activity-carousel .carousel-item img { object-fit: cover; height: 380px; }
.mb-activity-carousel .carousel-caption {
  background: rgba(28, 36, 48, 0.55); border-radius: var(--mb-radius-sm);
  bottom: 1.25rem; left: 1.25rem; right: 1.25rem; padding: 0.6rem 1rem; text-align: left;
}
.mb-activity-carousel .carousel-indicators [data-bs-target] { background-color: var(--mb-accent); }
.mb-activity-carousel .carousel-control-prev-icon,
.mb-activity-carousel .carousel-control-next-icon { filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4)); }
@media (max-width: 767px) {
  .mb-activity-carousel .carousel-item img { height: 240px; }
  .mb-activity-carousel .carousel-caption p { font-size: 0.85rem; }
}

.mb-testimonial { background: #fff; border-radius: var(--mb-radius-md); padding: 2rem; border: 1px solid var(--mb-border); height: 100%; }
.mb-testimonial-quote { font-family: var(--mb-font-display); font-size: 1.15rem; color: var(--mb-primary); }
.mb-testimonial-person { display: flex; align-items: center; gap: 0.85rem; margin-top: 1.25rem; }
.mb-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--mb-primary-tint); }

/* ---------- Team (About page) ---------- */
.mb-team-avatar { width: 140px; height: 140px; border-radius: 50%; overflow: hidden; background: var(--mb-primary-tint); }
.mb-team-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- FAQ ---------- */
.mb-accordion .accordion-button { font-family: var(--mb-font-display); font-weight: 600; color: var(--mb-primary); background: #fff; }
.mb-accordion .accordion-button:not(.collapsed) { background: var(--mb-primary-tint); color: var(--mb-primary); box-shadow: none; }
.mb-accordion .accordion-item { border: 1px solid var(--mb-border); border-radius: var(--mb-radius-sm) !important; margin-bottom: 1rem; overflow: hidden; }

/* ---------- Final CTA band ---------- */
.mb-final-cta { background: var(--mb-primary); color: #fff; border-radius: var(--mb-radius-lg); padding: 3.5rem; text-align: center; }
.mb-final-cta h2 { color: #fff; }
.mb-final-cta p { color: #d7e0ea; }

/* ---------- Footer ---------- */
.mb-footer { background: #14202f; color: #cfd8e3; padding: 4.5rem 0 1.5rem; margin-top: 4rem; }
.mb-footer-brand { color: #fff; font-size: 1.25rem; margin-bottom: 1rem; }
.mb-footer-brand img { height: 64px; width: auto; display: block; }
.mb-footer-about { color: #9fb0c3; font-size: 0.92rem; }
.mb-footer-heading { font-family: var(--mb-font-display); color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.mb-footer-list { list-style: none; padding: 0; margin: 0; }
.mb-footer-list li { margin-bottom: 0.6rem; }
.mb-footer-list a { color: #b9c6d6; }
.mb-footer-list a:hover { color: var(--mb-accent); }
.mb-social-links { display: flex; gap: 0.6rem; margin-top: 1.25rem; }
.mb-social-links a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid #33465c; color: #cfd8e3;
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700;
}
.mb-social-links a:hover { background: var(--mb-accent); color: #14202f; border-color: var(--mb-accent); }
.mb-whatsapp-link { display: inline-block; margin-top: 1rem; color: var(--mb-secondary); font-weight: 600; }
.mb-footer-bottom { border-top: 1px solid #263140; margin-top: 3rem; padding-top: 1.5rem; font-size: 0.85rem; color: #7e8ea1; }

/* ---------- Forms ---------- */
.mb-form-control, .form-control, .form-select {
  border-radius: var(--mb-radius-sm); border: 1px solid var(--mb-border); padding: 0.75rem 1rem;
}
.form-control:focus, .form-select:focus { border-color: var(--mb-secondary); box-shadow: 0 0 0 0.2rem rgba(91,140,123,0.18); }
.mb-form-card { background: #fff; border-radius: var(--mb-radius-lg); padding: 2.5rem; border: 1px solid var(--mb-border); box-shadow: var(--mb-shadow-soft); }
.mb-honeypot { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; }

/* ---------- Behaviour Reflection Tool ---------- */
.mb-tool-progress { height: 8px; border-radius: 999px; background: var(--mb-border); overflow: hidden; margin-bottom: 2.5rem; }
.mb-tool-progress-bar { height: 100%; background: linear-gradient(90deg, var(--mb-secondary), var(--mb-primary)); width: 0%; transition: width 400ms ease; }
.mb-tool-step { display: none; }
.mb-tool-step.active { display: block; animation: mbFade 400ms ease; }
@keyframes mbFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.mb-tool-option {
  display: block; border: 1px solid var(--mb-border); border-radius: var(--mb-radius-sm); padding: 1rem 1.25rem;
  margin-bottom: 0.75rem; cursor: pointer; transition: var(--mb-transition); background: #fff;
}
.mb-tool-option:hover { border-color: var(--mb-secondary); background: var(--mb-secondary-tint); }
.mb-tool-option input { margin-right: 0.75rem; }
.mb-tool-option.selected { border-color: var(--mb-primary); background: var(--mb-primary-tint); }
.mb-tool-report-bar { height: 14px; border-radius: 999px; background: var(--mb-border); overflow: hidden; margin-bottom: 0.35rem;}
.mb-tool-report-fill { height: 100%; border-radius: 999px; background: var(--mb-secondary); }

/* ============================================================
   CONTACT PAGE — MOBILE RESPONSIVE FIXES ONLY
   Scoped to .page-contact so no other page or the desktop
   layout (>=992px) is affected. Column order (form -> contact
   info -> map) already follows source order; these rules only
   remove fixed heights and tighten vertical spacing below 992px.
   ============================================================ */
.page-contact .mb-card { height: auto; }

@media (max-width: 991.98px) {
  .page-contact .mb-hero { padding: 2.5rem 0 0; }
  .page-contact section#consultation { padding: 1.75rem 0 2.5rem; }
  .page-contact .row.gy-5 { --bs-gutter-y: 1.5rem; }
  .page-contact .mb-form-card,
  .page-contact .mb-card { padding: 24px; }
  .page-contact .mb-card.mb-4 { margin-bottom: 16px !important; }
  .page-contact .mb-whatsapp-link { margin-top: 12px; }
}

@media print {
  .mb-navbar, .mb-footer, .no-print { display: none !important; }
  body { background: #fff; }
  section { padding: 1rem 0; }
}

/* ---------- Brain Games ---------- */
.mb-game-card { cursor: pointer; }
.mb-game-board { display: grid; gap: 0.6rem; }
.mb-game-tile {
  aspect-ratio: 1; border-radius: var(--mb-radius-sm); background: var(--mb-primary-tint);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; cursor: pointer;
  border: 1px solid var(--mb-border); transition: transform 150ms ease;
}
.mb-game-tile:hover { transform: scale(1.04); }
.mb-game-tile.matched { background: var(--mb-secondary-tint); border-color: var(--mb-secondary); cursor: default; }
.mb-game-hud { display: flex; gap: 1.5rem; margin-bottom: 1rem; font-weight: 600; color: var(--mb-primary); flex-wrap: wrap; }
.mb-breathing-circle {
  width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, var(--mb-secondary-tint), var(--mb-primary-tint));
  border: 2px solid var(--mb-secondary); margin: 2rem auto; display: flex; align-items: center; justify-content: center;
  font-family: var(--mb-font-display); color: var(--mb-primary); transition: transform 4s ease-in-out;
}
.mb-reaction-box {
  height: 260px; border-radius: var(--mb-radius-md); display: flex; align-items: center; justify-content: center;
  font-family: var(--mb-font-display); font-size: 1.3rem; color: #fff; cursor: pointer; background: var(--mb-muted);
}

/* ---------- Utility ---------- */
.mb-badge { display: inline-block; padding: 0.3rem 0.85rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--mb-accent-tint); color: #8a5a15; }
.mb-tint-primary { background: var(--mb-primary-tint); }
.mb-tint-secondary { background: var(--mb-secondary-tint); }
.mb-rounded-xl { border-radius: var(--mb-radius-lg); }
.mb-shadow-soft { box-shadow: var(--mb-shadow-soft); }
.mb-img-frame { border-radius: var(--mb-radius-lg); overflow: hidden; }
.mb-img-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
