/* MathPro Tutors homepage polish v13
   Purpose: keep the existing MathPro homepage identity and section order, while fixing spacing, copy hierarchy, slider behaviour and responsive polish. */
:root {
  --mpt-navy: #080c2b;
  --mpt-blue: #251f8f;
  --mpt-blue-2: #3d47ff;
  --mpt-pink: #f451b5;
  --mpt-pink-2: #d91e91;
  --mpt-soft: #fff2fb;
  --mpt-ink: #151423;
  --mpt-muted: #596173;
  --mpt-border: rgba(38,31,143,.13);
  --mpt-shadow: 0 24px 64px rgba(21,20,35,.13);
}
body.mathguru-theme { overflow-x: hidden; }
body.mathguru-theme .container { max-width: 1180px; }

/* Header: keep current navigation, fix overlap and spacing. */
body.mathguru-theme .mgt-announcement { min-height: 42px; }
body.mathguru-theme .mgt-announcement-inner {
  display:flex; align-items:center; justify-content:center; gap:12px; flex-wrap:wrap;
  font-size: clamp(.88rem,1.4vw,1.05rem); line-height:1.25; text-align:center;
}
body.mathguru-theme .mgt-announcement-dismiss { top:50%; transform:translateY(-50%); }
body.mathguru-theme .mgt-reference-header { background:#251f8f !important; border:0; }
body.mathguru-theme.mp-homepage .mgt-reference-header { background:rgba(8,10,38,.94) !important; }
body.mathguru-theme .mgt-header-inner {
  min-height: 96px; display:flex; align-items:center; gap:clamp(22px,3vw,52px);
}
body.mathguru-theme .mgt-header-inner .brand,
body.mathguru-theme .mgt-header-inner .pro-brand {
  flex:0 0 auto; min-width:230px; max-width:260px; gap:14px; align-items:center;
}
body.mathguru-theme .mgt-header-inner .brand-mark {
  width:68px; height:68px; border-radius:999px; font-size:1rem; flex:0 0 auto;
}
body.mathguru-theme .mgt-header-inner .pro-brand-copy { min-width:0; }
body.mathguru-theme .mgt-header-inner .pro-brand-copy strong {
  color:#fff; font-size:1.03rem; line-height:1.05; white-space:nowrap;
}
body.mathguru-theme .mgt-header-inner .pro-brand-copy small {
  color:rgba(255,255,255,.82); font-size:.72rem; line-height:1.1; white-space:nowrap;
}
body.mathguru-theme .mgt-reference-nav {
  flex:1; display:flex; align-items:center; justify-content:flex-end; gap:clamp(16px,2.1vw,34px); min-width:0;
}
body.mathguru-theme .mgt-reference-nav > a,
body.mathguru-theme .mgt-nav-parent,
body.mathguru-theme .mgt-sign-in {
  color:#fff !important; font-size:.92rem; font-weight:900; letter-spacing:.01em; white-space:nowrap;
}
body.mathguru-theme .mgt-contact-cta,
body.mathguru-theme .mgt-portal-cta {
  min-width:154px; padding:17px 24px; border-radius:8px; text-align:center; font-weight:950;
  background:var(--mpt-pink) !important; color:#fff !important;
}
body.mathguru-theme .mgt-dropdown-menu {
  background:#251f8f !important; border:1px solid rgba(255,255,255,.12); box-shadow:0 18px 42px rgba(0,0,0,.24);
}
body.mathguru-theme .mgt-dropdown-menu a { color:#fff !important; }

/* Hero: same dark identity with better hierarchy and form sizing. */
body.mathguru-theme .pro-home-hero {
  min-height: clamp(560px, 70vh, 720px); padding:clamp(70px,7vw,118px) 0;
  background:
    linear-gradient(105deg, rgba(3,6,24,.96), rgba(7,8,35,.92) 46%, rgba(8,10,38,.84)),
    radial-gradient(circle at 70% 36%, rgba(244,81,181,.18), transparent 26%),
    radial-gradient(circle at 23% 84%, rgba(61,71,255,.26), transparent 30%),
    url('../img/mathguru-theme-hero.svg') center/cover no-repeat !important;
}
body.mathguru-theme .pro-home-hero-grid {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,430px); gap:clamp(36px,6vw,86px); align-items:center;
}
body.mathguru-theme .pro-home-hero-copy h1 {
  max-width:720px; font-size:clamp(3.1rem,6vw,5.65rem); line-height:.96; letter-spacing:-.055em; margin-bottom:22px;
}
body.mathguru-theme .pro-home-hero-copy > p { max-width:650px; color:rgba(255,255,255,.90); font-size:1.04rem; line-height:1.65; }
body.mathguru-theme .pro-button-row { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-top:26px; }
body.mathguru-theme .pro-inline-trust { display:flex; gap:16px 24px; flex-wrap:wrap; margin-top:24px; padding:0; list-style:none; }
body.mathguru-theme .pro-inline-trust li { display:flex; align-items:center; gap:8px; font-size:.9rem; font-weight:850; }
body.mathguru-theme .pro-find-card { width:100%; padding:28px; border-radius:14px; }
body.mathguru-theme .pro-find-card-heading h2 { font-size:clamp(1.55rem,2.2vw,2rem); line-height:1.08; margin:.25rem 0 .4rem; }
body.mathguru-theme .pro-find-form { display:grid; gap:13px; }
body.mathguru-theme .pro-find-form label { display:grid; gap:6px; font-weight:850; }
body.mathguru-theme .pro-find-card input,
body.mathguru-theme .pro-find-card select { min-height:46px; padding:0 13px; }

/* Compact trust strip. */
body.mathguru-theme .pro-proof-bar { background:linear-gradient(90deg,#3d47ff,#4a56ff) !important; }
body.mathguru-theme .pro-proof-bar .container { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; }
body.mathguru-theme .pro-proof-bar span { display:flex; justify-content:center; align-items:center; gap:10px; min-height:54px; font-size:.9rem; font-weight:850; text-align:center; }
body.mathguru-theme .pro-proof-bar span + span { border-left:1px solid rgba(255,255,255,.30); }

/* Image story sections: preserve blue/pink identity, improve alignment and make images feel integrated. */
body.mathguru-theme .mgt-feature-story { padding:clamp(72px,7.4vw,118px) 0; }
body.mathguru-theme .mgt-feature-story-tutors { background:#251f8f !important; }
body.mathguru-theme .mgt-feature-story-space { background:#9e008f !important; }
body.mathguru-theme .mgt-feature-story-grid,
body.mathguru-theme .mgt-feature-story-grid-reverse { gap:clamp(42px,6vw,92px); }
body.mathguru-theme .mgt-feature-story-copy h2 {
  font-size:clamp(2.35rem,4vw,4.25rem); line-height:1.02; letter-spacing:-.045em; margin:.2rem 0 22px;
}
body.mathguru-theme .mgt-feature-story-copy p { max-width:590px; font-size:1.02rem; line-height:1.58; font-weight:760; }
body.mathguru-theme .mgt-story-kicker { letter-spacing:.12em; font-size:.78rem; }
body.mathguru-theme .mgt-story-button { min-height:50px; padding:0 24px; display:inline-flex; align-items:center; justify-content:center; }
body.mathguru-theme .mgt-feature-story-art img,
body.mathguru-theme .mgt-feature-story-art-left img { filter:drop-shadow(0 24px 40px rgba(0,0,0,.16)); }
body.mathguru-theme .mgt-feature-story-tutors::before,
body.mathguru-theme .mgt-feature-story-tutors::after,
body.mathguru-theme .mgt-feature-story-space::before,
body.mathguru-theme .mgt-feature-story-space::after { opacity:.38 !important; }

/* Smart matching slider: one card visible, no ghosts, stable height, autoplay-ready. */
body.mathguru-theme .mgt-match-section {
  background:linear-gradient(135deg,#fff7fc 0%,#f4f3ff 55%,#eefbff 100%) !important;
  padding:clamp(72px,7vw,110px) 0;
}
body.mathguru-theme .mgt-match-layout { display:grid; grid-template-columns:minmax(280px,.86fr) minmax(0,1.2fr); gap:clamp(36px,6vw,82px); align-items:center; }
body.mathguru-theme .mgt-match-copy h2 { max-width:520px; font-size:clamp(2.2rem,4.2vw,4.1rem); line-height:1.03; letter-spacing:-.045em; }
body.mathguru-theme .mgt-match-copy p { max-width:500px; font-size:1rem; line-height:1.66; }
body.mathguru-theme .mgt-match-benefits { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-top:26px; }
body.mathguru-theme .mgt-match-benefits span { display:grid; justify-items:center; gap:8px; text-align:center; font-size:.82rem; font-weight:850; }
body.mathguru-theme .mgt-match-benefits b { width:36px; height:36px; display:grid; place-items:center; border-radius:999px; color:#251f8f; background:#fff; box-shadow:0 10px 24px rgba(38,31,143,.12); }
body.mathguru-theme .mgt-match-carousel { min-width:0; }
body.mathguru-theme .mgt-match-stage {
  position:relative; min-height:430px; overflow:hidden; border-radius:30px; box-shadow:0 34px 72px rgba(22,20,37,.12);
}
body.mathguru-theme .mgt-match-stage::before,
body.mathguru-theme .mgt-match-stage::after { display:none !important; }
body.mathguru-theme .mgt-match-card {
  inset:0; min-height:430px; opacity:0; visibility:hidden; transform:translateY(26px) scale(.985);
  pointer-events:none; z-index:1; transition:opacity .62s ease, transform .62s cubic-bezier(.22,1,.36,1), visibility .62s ease;
  grid-template-columns:minmax(0,1fr) minmax(250px,.78fr); gap:28px; border-radius:30px;
}
body.mathguru-theme .mgt-match-card.is-active { opacity:1; visibility:visible; transform:translateY(0) scale(1); pointer-events:auto; z-index:3; }
body.mathguru-theme .mgt-match-card.is-prev,
body.mathguru-theme .mgt-match-card.is-next { opacity:0 !important; visibility:hidden !important; transform:translateY(26px) scale(.985) !important; filter:none !important; }
body.mathguru-theme .mgt-match-card h3 { font-size:clamp(1.75rem,2.5vw,2.55rem); }
body.mathguru-theme .mgt-match-fit { background:#eaf8f1; }
body.mathguru-theme .mgt-fit-meter { height:7px; border-radius:99px; background:rgba(15,142,104,.14); overflow:hidden; margin-top:16px; }
body.mathguru-theme .mgt-fit-meter i { display:block; width:82%; height:100%; border-radius:99px; background:linear-gradient(90deg,#f451b5,#ff82cf); }
body.mathguru-theme .mgt-match-fit a { margin-top:16px; font-weight:900; color:#251f8f; }
body.mathguru-theme .mgt-match-controls { display:flex; align-items:center; justify-content:center; gap:24px; margin-top:22px; }
body.mathguru-theme .mgt-match-control { width:48px; height:48px; border-radius:999px; border:0; background:#fff; color:#251f8f; box-shadow:0 12px 28px rgba(21,20,35,.13); font-size:1.8rem; cursor:pointer; }
body.mathguru-theme .mgt-match-dots { display:flex; align-items:center; gap:10px; }
body.mathguru-theme .mgt-match-dots button { width:11px; height:11px; border-radius:99px; border:0; background:#d8d8ec; cursor:pointer; }
body.mathguru-theme .mgt-match-dots button.is-active { width:24px; background:#f451b5; }

/* Existing section cleanup, not redesign. */
body.mathguru-theme .pro-section { padding:clamp(60px,6vw,92px) 0; }
body.mathguru-theme .pro-section-heading { max-width:820px; margin:0 auto 34px; text-align:center; }
body.mathguru-theme .pro-section-heading h2 { font-size:clamp(2rem,3vw,3rem); line-height:1.08; letter-spacing:-.035em; }
body.mathguru-theme .pro-section-heading p { font-size:1rem; line-height:1.6; }
body.mathguru-theme .mpt-learning-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
body.mathguru-theme .mpt-learning-card { background:#fff; border:1px solid rgba(244,81,181,.20); border-radius:18px; padding:26px; box-shadow:0 18px 42px rgba(21,20,35,.07); }
body.mathguru-theme .mpt-learning-icon { width:58px; height:58px; border-radius:999px; display:grid; place-items:center; color:#fff; background:linear-gradient(145deg,#ff5fbe 0%,#e843b3 55%,#9c27b0 100%); box-shadow:0 12px 24px rgba(244,81,181,.28); margin-bottom:18px; }
body.mathguru-theme .mpt-learning-icon svg { width:24px; height:24px; display:block; }
body.mathguru-theme .mpt-learning-card h3 { color:#171522; margin:0 0 8px; font-size:1.2rem; }
body.mathguru-theme .mpt-learning-card p { color:#596173; line-height:1.55; min-height:48px; }
body.mathguru-theme .mpt-learning-card a { color:#251f8f; font-weight:900; }
body.mathguru-theme .pro-course-card,
body.mathguru-theme .pro-tutor-card,
body.mathguru-theme .pro-plan-card,
body.mathguru-theme .pro-empty-state,
body.mathguru-theme .pro-roadmap-preview { border-radius:18px; box-shadow:0 18px 42px rgba(21,20,35,.08); }
body.mathguru-theme .pro-roadmap-section { background:#070b27 !important; color:#fff; }
body.mathguru-theme .pro-roadmap-copy h2,
body.mathguru-theme .pro-roadmap-copy p,
body.mathguru-theme .pro-roadmap-copy li { color:#fff; }

/* Final matching form. */
body.mathguru-theme .pro-contact-section { background:linear-gradient(135deg,#fff7fc,#fff) !important; }
body.mathguru-theme .mpt-final-match-layout { display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.3fr); gap:34px; align-items:center; }
body.mathguru-theme .mpt-final-match-copy h2 { font-size:clamp(1.9rem,2.8vw,2.8rem); line-height:1.08; }
body.mathguru-theme .mpt-final-match-copy p { color:#596173; line-height:1.62; }
body.mathguru-theme .mpt-final-match-form { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; background:#fff; border:1px solid rgba(244,81,181,.18); border-radius:18px; padding:18px; box-shadow:0 20px 48px rgba(21,20,35,.08); }
body.mathguru-theme .mpt-final-match-form label { display:grid; gap:5px; color:#596173; font-size:.75rem; font-weight:900; text-transform:uppercase; letter-spacing:.07em; }
body.mathguru-theme .mpt-final-match-form select,
body.mathguru-theme .mpt-final-match-form input { min-height:48px; border:1px solid rgba(38,31,143,.14); border-radius:10px; padding:0 12px; color:#151423; background:#fff; font:inherit; }
body.mathguru-theme .mpt-final-match-form button { min-height:48px; align-self:end; }

/* Newsletter / footer polish. */
body.mathguru-theme .pro-newsletter-section { min-height:360px; display:flex; align-items:center; background-position:center !important; }
body.mathguru-theme .pro-newsletter-section-overlay { background:linear-gradient(90deg,rgba(0,0,0,.56),rgba(0,0,0,.24)) !important; }
body.mathguru-theme .pro-newsletter-section-inner { position:relative; z-index:2; }
body.mathguru-theme .pro-newsletter-copy { max-width:620px; }
body.mathguru-theme .pro-newsletter-copy h2 { color:#fff; font-size:clamp(2rem,3.3vw,3.2rem); }
body.mathguru-theme .pro-newsletter-copy p { color:#fff; line-height:1.55; }
body.mathguru-theme .pro-newsletter-form { max-width:820px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) minmax(220px,1fr) auto; gap:12px; align-items:end; }
body.mathguru-theme .pro-newsletter-name-row { display:contents; }
body.mathguru-theme .pro-newsletter-field input { min-height:50px; border-radius:8px; border:0; padding:0 15px; }
body.mathguru-theme .pro-newsletter-cta { min-height:50px; min-width:130px; }
body.mathguru-theme .pro-site-footer { background:#070b18 !important; }
body.mathguru-theme .pro-footer-grid { gap:30px; align-items:start; }
body.mathguru-theme .pro-footer-grid nav { display:grid; gap:9px; }
body.mathguru-theme .pro-footer-grid nav strong { color:#fff; margin-bottom:4px; }
body.mathguru-theme .pro-footer-grid a { color:rgba(255,255,255,.76); }
body.mathguru-theme .pro-footer-bottom { display:flex; justify-content:space-between; gap:18px; flex-wrap:wrap; color:rgba(255,255,255,.62); }

@media (max-width: 1180px) {
  body.mathguru-theme .mgt-header-inner { gap:22px; }
  body.mathguru-theme .mgt-header-inner .brand { min-width:205px; }
  body.mathguru-theme .mgt-reference-nav { gap:16px; }
  body.mathguru-theme .mgt-contact-cta { min-width:132px; padding-inline:18px; }
}
@media (max-width: 1024px) {
  body.mathguru-theme .pro-home-hero-grid,
  body.mathguru-theme .mgt-match-layout,
  body.mathguru-theme .mpt-final-match-layout { grid-template-columns:1fr; }
  body.mathguru-theme .pro-find-card { max-width:560px; }
  body.mathguru-theme .mgt-match-benefits { grid-template-columns:repeat(2,minmax(0,1fr)); max-width:430px; }
  body.mathguru-theme .mpt-final-match-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  body.mathguru-theme .mgt-reference-nav { background:#251f8f !important; padding:22px; }
  body.mathguru-theme .mgt-header-inner .brand { min-width:0; }
  body.mathguru-theme .mgt-reference-nav > a,
  body.mathguru-theme .mgt-nav-parent,
  body.mathguru-theme .mgt-sign-in { font-size:1rem; }
  body.mathguru-theme .mgt-contact-cta { width:100%; }
  body.mathguru-theme .pro-proof-bar .container { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.mathguru-theme .pro-proof-bar span:nth-child(3) { border-left:0; }
  body.mathguru-theme .mpt-learning-card-grid { grid-template-columns:1fr; }
  body.mathguru-theme .mgt-match-card { grid-template-columns:1fr; position:relative; min-height:auto; }
  body.mathguru-theme .mgt-match-stage { min-height:620px; }
  body.mathguru-theme .mgt-match-card:not(.is-active) { position:absolute; }
}
@media (max-width: 640px) {
  body.mathguru-theme .mgt-announcement-inner { padding-right:34px; }
  body.mathguru-theme .mgt-header-inner { min-height:78px; }
  body.mathguru-theme .mgt-header-inner .brand-mark { width:54px; height:54px; }
  body.mathguru-theme .mgt-header-inner .pro-brand-copy strong { font-size:.92rem; }
  body.mathguru-theme .pro-home-hero { padding:52px 0 64px; min-height:auto; }
  body.mathguru-theme .pro-home-hero-copy h1 { font-size:clamp(2.55rem,13vw,3.7rem); }
  body.mathguru-theme .pro-proof-bar .container { grid-template-columns:1fr; }
  body.mathguru-theme .pro-proof-bar span { border-left:0 !important; border-top:1px solid rgba(255,255,255,.22); }
  body.mathguru-theme .mgt-feature-story { padding:58px 0; }
  body.mathguru-theme .mgt-match-section { padding:58px 0; }
  body.mathguru-theme .mgt-match-stage { min-height:760px; border-radius:22px; }
  body.mathguru-theme .mgt-match-card { padding:24px; border-radius:22px; }
  body.mathguru-theme .mgt-match-card-top { grid-template-columns:56px 1fr; gap:14px; }
  body.mathguru-theme .mgt-match-logo { width:54px; height:54px; border-radius:15px; }
  body.mathguru-theme .mgt-match-fit { border-radius:18px; padding:22px; }
  body.mathguru-theme .mpt-final-match-form { grid-template-columns:1fr; }
  body.mathguru-theme .pro-newsletter-form { grid-template-columns:1fr; max-width:100%; }
  body.mathguru-theme .pro-newsletter-name-row { display:grid; grid-template-columns:1fr; gap:12px; }
  body.mathguru-theme .pro-newsletter-email { display:block; }
  body.mathguru-theme .pro-newsletter-section { min-height:520px; }
  body.mathguru-theme .pro-footer-bottom { display:grid; }
}


/* V14: correct the smart tutor/course matching section only.
   Keeps the existing homepage design, but fixes the oversized structure, card clipping and broken controls. */
body.mathguru-theme .mgt-match-section {
  padding: clamp(58px, 5.2vw, 88px) 0 !important;
  background:
    radial-gradient(circle at 12% 18%, rgba(244,81,181,.10), transparent 28%),
    radial-gradient(circle at 90% 82%, rgba(151,243,216,.18), transparent 30%),
    linear-gradient(135deg,#fff8fe 0%,#f6f3ff 58%,#effcff 100%) !important;
}
body.mathguru-theme .mgt-match-section::before {
  opacity: .34 !important;
  background-size: 22px 22px !important;
}
body.mathguru-theme .mgt-match-layout {
  width: min(100% - 56px, 1240px) !important;
  grid-template-columns: minmax(320px, .82fr) minmax(560px, 1.04fr) !important;
  gap: clamp(34px, 4.8vw, 68px) !important;
  align-items: center !important;
}
body.mathguru-theme .mgt-match-copy { max-width: 500px !important; }
body.mathguru-theme .mgt-match-kicker {
  margin-bottom: 12px !important;
  font-size: .76rem !important;
  letter-spacing: .13em !important;
}
body.mathguru-theme .mgt-match-copy h2 {
  max-width: 460px !important;
  font-size: clamp(2.35rem, 3.25vw, 3.75rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -.048em !important;
  margin: 0 0 18px !important;
}
body.mathguru-theme .mgt-match-copy p {
  max-width: 470px !important;
  font-size: 1rem !important;
  line-height: 1.62 !important;
  font-weight: 720 !important;
}
body.mathguru-theme .mgt-match-actions {
  margin-top: 24px !important;
  gap: 12px !important;
}
body.mathguru-theme .mgt-match-button {
  min-height: 50px !important;
  min-width: 170px !important;
  padding: 0 22px !important;
  border-radius: 6px !important;
  font-size: .94rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
body.mathguru-theme .mgt-match-benefits {
  max-width: 470px !important;
  margin-top: 28px !important;
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 12px !important;
}
body.mathguru-theme .mgt-match-benefits span {
  font-size: .78rem !important;
  line-height: 1.25 !important;
  gap: 8px !important;
}
body.mathguru-theme .mgt-match-benefits b {
  width: 38px !important;
  height: 38px !important;
  font-size: .86rem !important;
}
body.mathguru-theme .mgt-match-carousel {
  width: 100% !important;
  min-width: 0 !important;
}
body.mathguru-theme .mgt-match-stage {
  height: 390px !important;
  min-height: 390px !important;
  overflow: hidden !important;
  border-radius: 26px !important;
  box-shadow: 0 28px 58px rgba(22,20,37,.12) !important;
}
body.mathguru-theme .mgt-match-stage::before,
body.mathguru-theme .mgt-match-stage::after {
  display: none !important;
}
body.mathguru-theme .mgt-match-card {
  position: absolute !important;
  inset: 0 !important;
  height: 390px !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(238px, .78fr) !important;
  gap: 24px !important;
  padding: 34px !important;
  border-radius: 26px !important;
  background: rgba(255,255,255,.97) !important;
  overflow: hidden !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(22px) scale(.985) !important;
  pointer-events: none !important;
  z-index: 1 !important;
  filter: none !important;
  transition: opacity .58s ease, transform .64s cubic-bezier(.22,1,.36,1), visibility .58s ease !important;
}
body.mathguru-theme .mgt-match-card.is-active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
  z-index: 4 !important;
}
body.mathguru-theme .mgt-match-card:not(.is-active),
body.mathguru-theme .mgt-match-card.is-prev,
body.mathguru-theme .mgt-match-card.is-next {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(22px) scale(.985) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}
body.mathguru-theme .mgt-match-card::before {
  width: 42% !important;
  opacity: .72 !important;
}
body.mathguru-theme .mgt-match-card-left,
body.mathguru-theme .mgt-match-fit { min-width: 0 !important; }
body.mathguru-theme .mgt-match-card-top {
  grid-template-columns: 58px minmax(0,1fr) !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
}
body.mathguru-theme .mgt-match-logo {
  width: 56px !important;
  height: 56px !important;
  border-radius: 16px !important;
  font-size: .92rem !important;
}
body.mathguru-theme .mgt-match-card small {
  margin-bottom: 5px !important;
  font-size: .72rem !important;
}
body.mathguru-theme .mgt-match-card h3 {
  font-size: clamp(1.45rem, 2vw, 2rem) !important;
  line-height: 1.08 !important;
  margin: 0 0 6px !important;
  overflow-wrap: anywhere !important;
}
body.mathguru-theme .mgt-match-card b { font-size: .95rem !important; }
body.mathguru-theme .mgt-match-meta {
  gap: 9px !important;
  margin: 0 0 22px !important;
}
body.mathguru-theme .mgt-match-meta span {
  padding: 8px 12px !important;
  font-size: .86rem !important;
}
body.mathguru-theme .mgt-match-label {
  font-size: .8rem !important;
  margin-bottom: 9px !important;
}
body.mathguru-theme .mgt-match-card-left p {
  font-size: .96rem !important;
  line-height: 1.48 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 4 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
body.mathguru-theme .mgt-match-fit {
  border-radius: 22px !important;
  padding: 26px !important;
  min-height: 0 !important;
}
body.mathguru-theme .mgt-match-fit h4 {
  font-size: clamp(1.05rem,1.35vw,1.22rem) !important;
  margin: 0 0 14px !important;
}
body.mathguru-theme .mgt-match-fit h4 span {
  width: 24px !important;
  height: 24px !important;
  margin-right: 8px !important;
  font-size: .78rem !important;
}
body.mathguru-theme .mgt-match-fit p {
  font-size: .96rem !important;
  line-height: 1.42 !important;
  margin: 0 0 16px !important;
}
body.mathguru-theme .mgt-match-fit ul {
  gap: 10px !important;
  margin: 0 0 18px !important;
}
body.mathguru-theme .mgt-match-fit li {
  font-size: .94rem !important;
  line-height: 1.35 !important;
}
body.mathguru-theme .mgt-match-score {
  padding-top: 14px !important;
  gap: 10px !important;
}
body.mathguru-theme .mgt-match-score strong { font-size: 1.2rem !important; }
body.mathguru-theme .mgt-match-score span { font-size: .9rem !important; }
body.mathguru-theme .mgt-fit-meter { margin-top: 12px !important; }
body.mathguru-theme .mgt-match-fit a { margin-top: 12px !important; font-size: .9rem !important; }
body.mathguru-theme .mgt-match-controls {
  margin-top: 18px !important;
  gap: 18px !important;
}
body.mathguru-theme .mgt-match-control {
  width: 44px !important;
  height: 44px !important;
  font-size: 1.65rem !important;
}
body.mathguru-theme .mgt-match-dots { min-width: 86px !important; }
body.mathguru-theme .mgt-match-dots button {
  width: 9px !important;
  height: 9px !important;
}
body.mathguru-theme .mgt-match-dots button.is-active { width: 22px !important; }

@media (max-width: 1200px) {
  body.mathguru-theme .mgt-match-layout {
    grid-template-columns: minmax(290px,.8fr) minmax(500px,1.1fr) !important;
    width: min(100% - 42px, 1140px) !important;
    gap: 40px !important;
  }
  body.mathguru-theme .mgt-match-copy h2 { font-size: clamp(2.2rem, 3.4vw, 3.25rem) !important; }
}
@media (max-width: 1024px) {
  body.mathguru-theme .mgt-match-layout {
    grid-template-columns: 1fr !important;
    gap: 34px !important;
  }
  body.mathguru-theme .mgt-match-copy,
  body.mathguru-theme .mgt-match-copy h2,
  body.mathguru-theme .mgt-match-copy p {
    max-width: 760px !important;
  }
  body.mathguru-theme .mgt-match-benefits { max-width: 520px !important; }
  body.mathguru-theme .mgt-match-stage { height: 410px !important; min-height: 410px !important; }
  body.mathguru-theme .mgt-match-card { height: 410px !important; }
}
@media (max-width: 760px) {
  body.mathguru-theme .mgt-match-layout { width: min(100% - 28px, 680px) !important; }
  body.mathguru-theme .mgt-match-copy h2 { font-size: clamp(2rem, 10vw, 3rem) !important; }
  body.mathguru-theme .mgt-match-actions { display: grid !important; grid-template-columns: 1fr !important; }
  body.mathguru-theme .mgt-match-button { width: 100% !important; min-width: 0 !important; }
  body.mathguru-theme .mgt-match-benefits { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  body.mathguru-theme .mgt-match-stage { height: 690px !important; min-height: 690px !important; }
  body.mathguru-theme .mgt-match-card {
    height: 690px !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding: 24px !important;
  }
  body.mathguru-theme .mgt-match-fit { padding: 22px !important; }
}
@media (max-width: 420px) {
  body.mathguru-theme .mgt-match-stage { height: 740px !important; min-height: 740px !important; }
  body.mathguru-theme .mgt-match-card { height: 740px !important; }
}


/* V15: refine the smart matching section structure without redesigning it.
   Fixes the oversized heading, awkward proportions, button artifacts, and card balance.
   Homepage identity and section order remain unchanged. */
body.mathguru-theme .mgt-match-section {
  padding: clamp(70px, 6vw, 92px) 0 !important;
}
body.mathguru-theme .mgt-match-layout {
  width: min(100% - 48px, 1180px) !important;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.05fr) !important;
  gap: clamp(30px, 4.2vw, 56px) !important;
  align-items: center !important;
}
body.mathguru-theme .mgt-match-copy {
  max-width: 460px !important;
  padding-top: 6px !important;
}
body.mathguru-theme .mgt-match-kicker {
  display: block !important;
  margin-bottom: 14px !important;
}
body.mathguru-theme .mgt-match-copy h2 {
  max-width: 430px !important;
  font-size: clamp(2.05rem, 2.8vw, 3.2rem) !important;
  line-height: 1.06 !important;
  margin: 0 0 16px !important;
}
body.mathguru-theme .mgt-match-copy p {
  max-width: 440px !important;
  font-size: 1rem !important;
  line-height: 1.64 !important;
}
body.mathguru-theme .mgt-match-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 12px !important;
}
body.mathguru-theme .mgt-match-button,
body.mathguru-theme .mgt-match-button::before,
body.mathguru-theme .mgt-match-button::after {
  background-image: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}
body.mathguru-theme .mgt-match-button::before,
body.mathguru-theme .mgt-match-button::after {
  content: none !important;
  display: none !important;
}
body.mathguru-theme .mgt-match-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 52px !important;
  min-width: 176px !important;
  padding: 0 22px !important;
  font-size: .95rem !important;
  font-weight: 900 !important;
  border-radius: 6px !important;
}
body.mathguru-theme .mgt-match-button-outline {
  border: 1px solid rgba(37,31,143,.25) !important;
}
body.mathguru-theme .mgt-match-benefits {
  max-width: 450px !important;
  margin-top: 26px !important;
  gap: 14px !important;
}
body.mathguru-theme .mgt-match-benefits span {
  gap: 9px !important;
  font-size: .79rem !important;
  line-height: 1.28 !important;
}
body.mathguru-theme .mgt-match-benefits b {
  width: 40px !important;
  height: 40px !important;
  font-size: .84rem !important;
}
body.mathguru-theme .mgt-match-stage {
  height: 378px !important;
  min-height: 378px !important;
  border-radius: 24px !important;
}
body.mathguru-theme .mgt-match-card {
  height: 378px !important;
  padding: 30px !important;
  grid-template-columns: minmax(0,1fr) minmax(260px, .74fr) !important;
  gap: 20px !important;
  border-radius: 24px !important;
}
body.mathguru-theme .mgt-match-card::before {
  width: 38% !important;
  opacity: .62 !important;
}
body.mathguru-theme .mgt-match-card-top {
  margin-bottom: 16px !important;
}
body.mathguru-theme .mgt-match-card h3 {
  font-size: clamp(1.45rem, 1.75vw, 1.9rem) !important;
  line-height: 1.12 !important;
}
body.mathguru-theme .mgt-match-card b {
  display: block !important;
  font-size: .94rem !important;
  line-height: 1.35 !important;
}
body.mathguru-theme .mgt-match-meta {
  margin: 0 0 18px !important;
}
body.mathguru-theme .mgt-match-meta span {
  font-size: .84rem !important;
}
body.mathguru-theme .mgt-match-card-left p {
  font-size: .96rem !important;
  line-height: 1.5 !important;
  -webkit-line-clamp: 5 !important;
}
body.mathguru-theme .mgt-match-fit {
  padding: 24px !important;
  border-radius: 20px !important;
}
body.mathguru-theme .mgt-match-fit h4 {
  font-size: 1rem !important;
  line-height: 1.28 !important;
}
body.mathguru-theme .mgt-match-fit p {
  font-size: .93rem !important;
  line-height: 1.45 !important;
  margin: 0 0 14px !important;
}
body.mathguru-theme .mgt-match-fit ul {
  gap: 8px !important;
  margin: 0 0 16px !important;
}
body.mathguru-theme .mgt-match-fit li {
  font-size: .92rem !important;
  line-height: 1.34 !important;
}
body.mathguru-theme .mgt-match-score {
  align-items: baseline !important;
}
body.mathguru-theme .mgt-match-fit a {
  display: inline-flex !important;
  align-items: center !important;
  margin-top: 10px !important;
}
body.mathguru-theme .mgt-match-controls {
  margin-top: 16px !important;
}
body.mathguru-theme .mgt-match-control {
  font-family: inherit !important;
  line-height: 1 !important;
}

@media (max-width: 1180px) {
  body.mathguru-theme .mgt-match-layout {
    width: min(100% - 40px, 1100px) !important;
    grid-template-columns: minmax(0,.9fr) minmax(0,1fr) !important;
  }
  body.mathguru-theme .mgt-match-copy h2 {
    font-size: clamp(2rem, 3vw, 2.9rem) !important;
  }
}
@media (max-width: 1024px) {
  body.mathguru-theme .mgt-match-layout {
    grid-template-columns: 1fr !important;
    width: min(100% - 36px, 900px) !important;
    gap: 30px !important;
  }
  body.mathguru-theme .mgt-match-copy,
  body.mathguru-theme .mgt-match-copy h2,
  body.mathguru-theme .mgt-match-copy p {
    max-width: 760px !important;
  }
  body.mathguru-theme .mgt-match-stage {
    height: 390px !important;
    min-height: 390px !important;
  }
  body.mathguru-theme .mgt-match-card {
    height: 390px !important;
  }
}
@media (max-width: 760px) {
  body.mathguru-theme .mgt-match-layout {
    width: min(100% - 26px, 680px) !important;
    gap: 26px !important;
  }
  body.mathguru-theme .mgt-match-copy h2 {
    max-width: 100% !important;
    font-size: clamp(1.95rem, 9.6vw, 2.75rem) !important;
  }
  body.mathguru-theme .mgt-match-copy p,
  body.mathguru-theme .mgt-match-benefits {
    max-width: 100% !important;
  }
  body.mathguru-theme .mgt-match-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
  body.mathguru-theme .mgt-match-button {
    width: 100% !important;
  }
  body.mathguru-theme .mgt-match-stage {
    height: 710px !important;
    min-height: 710px !important;
    border-radius: 22px !important;
  }
  body.mathguru-theme .mgt-match-card {
    height: 710px !important;
    grid-template-columns: 1fr !important;
    padding: 22px !important;
    gap: 18px !important;
    border-radius: 22px !important;
  }
}
@media (max-width: 420px) {
  body.mathguru-theme .mgt-match-stage {
    height: 760px !important;
    min-height: 760px !important;
  }
  body.mathguru-theme .mgt-match-card {
    height: 760px !important;
  }
}


/* ===== V17: hide cookie badge/banner ===== */
.cookie-banner,
.cookie-consent,
.cookie-consent-banner,
.cookie-notice,
#cookie-banner,
#cookie-consent,
[data-cookie-banner],
[data-cookie-consent],
[aria-label="Cookie choices"],
[aria-labelledby="cookie-banner-title"],
.mpt-cookie-banner {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.has-cookie-banner,
body.cookie-banner-open {
  overflow: auto !important;
  padding-bottom: 0 !important;
}


/* V19: replace placeholder review block with a Google Reviews style section similar to the approved reference. */
body.mathguru-theme .pro-google-reviews-section {
  background: #f7f7fa;
  padding: clamp(70px, 7vw, 110px) 0;
}
body.mathguru-theme .pro-google-reviews-wrap {
  width: min(100% - 48px, 1220px);
  margin: 0 auto;
}
body.mathguru-theme .pro-google-reviews-wrap > h2 {
  margin: 0 0 42px;
  text-align: center;
  color: #f451b5;
  font-size: clamp(2.3rem, 4.1vw, 4rem);
  line-height: 1.06;
  letter-spacing: -.04em;
}
body.mathguru-theme .pro-google-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #efeff2;
  border-radius: 18px;
  padding: 28px 30px;
  margin-bottom: 24px;
}
body.mathguru-theme .pro-google-summary-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #101225;
  font-size: 1rem;
  font-weight: 800;
}
body.mathguru-theme .mpt-google-wordmark {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.03em;
  line-height: 1;
}
body.mathguru-theme .mpt-google-wordmark .g1 { color:#4285f4; }
body.mathguru-theme .mpt-google-wordmark .g2 { color:#ea4335; }
body.mathguru-theme .mpt-google-wordmark .g3 { color:#fbbc05; }
body.mathguru-theme .mpt-google-wordmark .g4 { color:#34a853; }
body.mathguru-theme .pro-google-summary-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
body.mathguru-theme .pro-google-summary-rating strong {
  color: #101225;
  font-size: 1.1rem;
  line-height: 1;
}
body.mathguru-theme .pro-google-summary-rating small {
  color: #70768a;
  font-size: .98rem;
}
body.mathguru-theme .pro-google-stars {
  color: #fbbc05;
  font-size: 1.65rem;
  letter-spacing: .06em;
  line-height: 1;
}
body.mathguru-theme .pro-google-review-cta {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 8px;
  white-space: nowrap;
}
body.mathguru-theme .pro-google-review-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
body.mathguru-theme .pro-google-review-card {
  background: #efeff2;
  border-radius: 22px;
  padding: 28px 28px 24px;
  min-height: 332px;
  display: flex;
  flex-direction: column;
}
body.mathguru-theme .pro-google-review-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
body.mathguru-theme .pro-google-review-avatar {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ad7cff 0%, #7c4dff 100%);
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 10px 20px rgba(124, 77, 255, .22);
}
body.mathguru-theme .pro-google-review-card:nth-child(1) .pro-google-review-avatar { background: linear-gradient(145deg,#ff8a65 0%,#f451b5 100%); box-shadow: 0 10px 20px rgba(244,81,181,.22); }
body.mathguru-theme .pro-google-review-card:nth-child(3) .pro-google-review-avatar { background: linear-gradient(145deg,#6ec6ff 0%,#3d5afe 100%); box-shadow: 0 10px 20px rgba(61,90,254,.22); }
body.mathguru-theme .pro-google-review-card:nth-child(4) .pro-google-review-avatar { background: linear-gradient(145deg,#00a17a 0%,#00695c 100%); box-shadow: 0 10px 20px rgba(0,105,92,.22); }
body.mathguru-theme .pro-google-review-card h3 {
  margin: 0;
  color: #14172a;
  font-size: 1.05rem;
  line-height: 1.2;
}
body.mathguru-theme .pro-google-card-stars {
  font-size: 1.3rem;
  margin-bottom: 12px;
}
body.mathguru-theme .pro-google-review-card p {
  margin: 0 0 8px;
  color: #24283c;
  font-size: 1rem;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.mathguru-theme .pro-google-readmore {
  color: #757b91;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}
body.mathguru-theme .pro-google-readmore:hover,
body.mathguru-theme .pro-google-readmore:focus-visible { color: #1e2660; }
body.mathguru-theme .pro-google-card-brand {
  margin-top: auto;
  padding-top: 22px;
}
body.mathguru-theme .pro-google-card-brand .mpt-google-wordmark { font-size: 1.05rem; }

@media (max-width: 1100px) {
  body.mathguru-theme .pro-google-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body.mathguru-theme .pro-google-summary-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  body.mathguru-theme .pro-google-review-grid { grid-template-columns: 1fr; }
  body.mathguru-theme .pro-google-review-card { min-height: auto; }
}
@media (max-width: 520px) {
  body.mathguru-theme .pro-google-reviews-wrap { width: min(100% - 28px, 1220px); }
  body.mathguru-theme .pro-google-summary-bar { padding: 22px 18px; border-radius: 16px; }
  body.mathguru-theme .pro-google-review-card { padding: 22px 18px; border-radius: 18px; }
  body.mathguru-theme .pro-google-reviews-wrap > h2 { margin-bottom: 28px; }
}
