/* MathPro Tutors - MathGuru inspired image sections v8 */
:root {
  --mgt-blue: #2b279b;
  --mgt-blue-deep: #241e8f;
  --mgt-pink: #ff5abb;
  --mgt-pink-dark: #e948a7;
  --mgt-mint: #97f3d6;
  --mgt-ink: #171522;
}

/* Keep the reference-style menu open and readable on desktop without logo overlap. */
body.mathguru-theme .mgt-reference-header .mgt-header-inner {
  width: min(100% - 34px, 1360px);
  padding-inline: 0;
}
body.mathguru-theme .mgt-reference-header .pro-brand,
body.mathguru-theme .mgt-reference-header .brand {
  flex: 0 0 280px !important;
  max-width: 280px !important;
  min-width: 260px !important;
  margin-right: clamp(22px, 3vw, 48px);
}
body.mathguru-theme .mgt-reference-header .pro-brand-copy strong,
body.mathguru-theme .mgt-reference-header .pro-brand-copy small {
  max-width: 185px !important;
}
body.mathguru-theme .mgt-reference-nav {
  margin-left: 0 !important;
  gap: clamp(16px, 2vw, 34px) !important;
}
body.mathguru-theme .mgt-reference-nav > a,
body.mathguru-theme .mgt-nav-parent,
body.mathguru-theme .mgt-header-actions .mgt-sign-in {
  font-size: clamp(.92rem, .86vw, 1.05rem) !important;
}
body.mathguru-theme .mgt-contact-cta,
body.mathguru-theme .mgt-portal-cta {
  min-width: 155px !important;
}

/* Rich MathGuru-style content sections added to the homepage. */
body.mathguru-theme .mgt-feature-story {
  position: relative;
  overflow: hidden;
  padding: clamp(76px, 8vw, 130px) 0;
  isolation: isolate;
}
body.mathguru-theme .mgt-feature-story .container {
  width: min(100% - 34px, 1320px);
}
body.mathguru-theme .mgt-feature-story-grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(420px, 1.12fr);
  align-items: center;
  gap: clamp(40px, 7vw, 112px);
}
body.mathguru-theme .mgt-feature-story-grid-reverse {
  grid-template-columns: minmax(420px, 1.12fr) minmax(0, .88fr);
}
body.mathguru-theme .mgt-feature-story-tutors {
  color: #fff;
  background:
    radial-gradient(circle at 83% 12%, rgba(255,90,187,.28), transparent 25%),
    radial-gradient(circle at 14% 88%, rgba(151,243,214,.16), transparent 28%),
    var(--mgt-blue-deep);
}
body.mathguru-theme .mgt-feature-story-space {
  color: var(--mgt-ink);
  background:
    radial-gradient(circle at 6% 18%, rgba(255,90,187,.18), transparent 28%),
    linear-gradient(135deg, #fff6fb 0%, #f4f3ff 100%);
}
body.mathguru-theme .mgt-feature-story-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
body.mathguru-theme .mgt-feature-story-grid-reverse .mgt-feature-story-copy {
  justify-self: end;
}
body.mathguru-theme .mgt-story-kicker {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--mgt-pink);
  font-size: .86rem;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}
body.mathguru-theme .mgt-feature-story-tutors .mgt-story-kicker { color: #ff8ed6; }
body.mathguru-theme .mgt-feature-story-copy h2 {
  margin: 0 0 28px;
  color: inherit;
  font-size: clamp(2.6rem, 5vw, 5.25rem);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 950;
}
body.mathguru-theme .mgt-feature-story-copy p {
  margin: 0 0 20px;
  color: inherit;
  font-size: clamp(1.08rem, 1.55vw, 1.45rem);
  line-height: 1.62;
  font-weight: 700;
  max-width: 680px;
}
body.mathguru-theme .mgt-feature-story-tutors .mgt-feature-story-copy p { color: rgba(255,255,255,.93); }
body.mathguru-theme .mgt-feature-story-space .mgt-feature-story-copy p { color: #383248; }
body.mathguru-theme .mgt-story-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}
body.mathguru-theme .mgt-story-button {
  min-height: 66px;
  min-width: 178px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 17px 28px;
  border: 2px solid transparent;
  border-radius: 0;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.1;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}
body.mathguru-theme .mgt-story-button:hover,
body.mathguru-theme .mgt-story-button:focus-visible { transform: translateY(-2px); }
body.mathguru-theme .mgt-story-button-pink {
  color: #fff !important;
  background: var(--mgt-pink);
  border-color: var(--mgt-pink);
  box-shadow: 0 18px 38px rgba(255,90,187,.22);
}
body.mathguru-theme .mgt-story-button-pink:hover,
body.mathguru-theme .mgt-story-button-pink:focus-visible { background: var(--mgt-pink-dark); border-color: var(--mgt-pink-dark); }
body.mathguru-theme .mgt-story-button-light {
  color: #fff !important;
  background: transparent;
  border-color: rgba(255,255,255,.72);
}
body.mathguru-theme .mgt-story-button-light:hover,
body.mathguru-theme .mgt-story-button-light:focus-visible { background: #fff; color: var(--mgt-blue) !important; border-color: #fff; }
body.mathguru-theme .mgt-story-button-blue {
  color: #fff !important;
  background: var(--mgt-blue);
  border-color: var(--mgt-blue);
}
body.mathguru-theme .mgt-story-button-blue:hover,
body.mathguru-theme .mgt-story-button-blue:focus-visible { background: #211d7f; border-color: #211d7f; }
body.mathguru-theme .mgt-feature-story-art {
  position: relative;
  z-index: 1;
  margin: 0;
  min-height: 440px;
}
body.mathguru-theme .mgt-feature-story-art::before {
  content: "";
  position: absolute;
  inset: auto -18px -18px auto;
  width: 48%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--mgt-pink);
  opacity: .7;
  z-index: -1;
}
body.mathguru-theme .mgt-feature-story-art-left::before {
  inset: -18px auto auto -18px;
  background: var(--mgt-blue);
  opacity: .12;
}
body.mathguru-theme .mgt-feature-story-art img {
  display: block;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  aspect-ratio: 1.18 / .72;
  object-fit: cover;
  object-position: center;
  border-radius: 48% 0 0 48%;
  box-shadow: 0 34px 90px rgba(0,0,0,.26);
}
body.mathguru-theme .mgt-feature-story-art-left img {
  border-radius: 0 48% 48% 0;
  box-shadow: 0 30px 76px rgba(43,39,155,.18);
}
body.mathguru-theme .mgt-feature-story-tutors::before,
body.mathguru-theme .mgt-feature-story-tutors::after {
  content: "+";
  position: absolute;
  color: var(--mgt-mint);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 950;
  line-height: 1;
  opacity: .68;
  pointer-events: none;
}
body.mathguru-theme .mgt-feature-story-tutors::before { left: 5%; bottom: 10%; transform: rotate(-4deg); }
body.mathguru-theme .mgt-feature-story-tutors::after { right: 9%; top: 10%; transform: rotate(6deg); }
body.mathguru-theme .mgt-feature-story-space::before {
  content: "=";
  position: absolute;
  right: 6%;
  bottom: 7%;
  color: var(--mgt-mint);
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 950;
  opacity: .55;
}
body.mathguru-theme .mgt-mini-trust-card {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 3;
  display: grid;
  gap: 3px;
  padding: 18px 20px;
  min-width: 190px;
  color: var(--mgt-ink);
  background: var(--mgt-pink);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,.22);
  font-weight: 900;
}
body.mathguru-theme .mgt-mini-trust-card small { color: rgba(23,21,34,.72); font-weight: 800; }

@media (max-width: 1280px) {
  body.mathguru-theme .mgt-reference-header .pro-brand,
  body.mathguru-theme .mgt-reference-header .brand {
    flex-basis: 248px !important;
    min-width: 230px !important;
    margin-right: 24px;
  }
  body.mathguru-theme .mgt-reference-header .pro-brand-copy strong,
  body.mathguru-theme .mgt-reference-header .pro-brand-copy small { max-width: 150px !important; }
  body.mathguru-theme .mgt-reference-nav { gap: 16px !important; }
  body.mathguru-theme .mgt-contact-cta,
  body.mathguru-theme .mgt-portal-cta { min-width: 136px !important; padding-inline: 18px !important; }
}

@media (max-width: 1040px) {
  body.mathguru-theme .mgt-reference-header .pro-brand,
  body.mathguru-theme .mgt-reference-header .brand {
    flex: 0 1 auto !important;
    max-width: calc(100% - 90px) !important;
    min-width: 0 !important;
    margin-right: 0;
  }
  body.mathguru-theme .mgt-feature-story-grid,
  body.mathguru-theme .mgt-feature-story-grid-reverse {
    grid-template-columns: 1fr;
    gap: 42px;
  }
  body.mathguru-theme .mgt-feature-story-grid-reverse .mgt-feature-story-copy { justify-self: start; }
  body.mathguru-theme .mgt-feature-story-grid-reverse .mgt-feature-story-copy { order: 1; }
  body.mathguru-theme .mgt-feature-story-grid-reverse .mgt-feature-story-art { order: 2; }
  body.mathguru-theme .mgt-feature-story-art { min-height: 0; }
  body.mathguru-theme .mgt-feature-story-art img,
  body.mathguru-theme .mgt-feature-story-art-left img {
    width: min(100%, 720px);
    border-radius: 40px;
    aspect-ratio: 16/9;
  }
}

@media (max-width: 720px) {
  body.mathguru-theme .mgt-feature-story {
    padding: 58px 0;
  }
  body.mathguru-theme .mgt-feature-story .container {
    width: min(100% - 28px, 680px);
  }
  body.mathguru-theme .mgt-feature-story-copy h2 {
    font-size: clamp(2.25rem, 12vw, 3.6rem);
  }
  body.mathguru-theme .mgt-feature-story-copy p {
    font-size: 1rem;
    line-height: 1.58;
  }
  body.mathguru-theme .mgt-story-actions { align-items: stretch; }
  body.mathguru-theme .mgt-story-button { width: 100%; min-height: 58px; }
  body.mathguru-theme .mgt-feature-story-art img,
  body.mathguru-theme .mgt-feature-story-art-left img {
    border-radius: 26px;
    aspect-ratio: 4/3;
  }
  body.mathguru-theme .mgt-feature-story-tutors::before,
  body.mathguru-theme .mgt-feature-story-tutors::after,
  body.mathguru-theme .mgt-feature-story-space::before { display: none; }
}
