/* MathPro Tutors - image-section blending fix v9
   Blends uploaded MathGuru-style graphics with the section background and adds floating math signs. */
:root {
  --mgt-blue: #251f8f;
  --mgt-blue-2: #251f8f;
  --mgt-magenta: #9e008f;
  --mgt-magenta-2: #9e008f;
  --mgt-mint: #98f3d8;
  --mgt-pink: #ff5abb;
  --mgt-ink: #171522;
}

body.mathguru-theme .mgt-feature-story {
  isolation: isolate;
  overflow: hidden;
  padding: clamp(84px, 8.5vw, 140px) 0;
}

body.mathguru-theme .mgt-feature-story .container {
  width: min(100% - 42px, 1340px);
}

body.mathguru-theme .mgt-feature-story-grid,
body.mathguru-theme .mgt-feature-story-grid-reverse {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(38px, 6vw, 92px);
}

/* Match the graphic backgrounds with the whole section so the artwork no longer looks pasted on. */
body.mathguru-theme .mgt-feature-story-tutors {
  color: #fff;
  background: #251f8f !important;
}

body.mathguru-theme .mgt-feature-story-space {
  color: #fff !important;
  background: #9e008f !important;
}

body.mathguru-theme .mgt-feature-story-copy {
  max-width: 640px;
  z-index: 4;
}

body.mathguru-theme .mgt-feature-story-grid-reverse .mgt-feature-story-copy {
  justify-self: end;
}

body.mathguru-theme .mgt-feature-story-copy h2 {
  color: inherit !important;
  font-size: clamp(2.75rem, 4.7vw, 5.1rem);
  letter-spacing: -.045em;
}

body.mathguru-theme .mgt-feature-story-copy p,
body.mathguru-theme .mgt-feature-story-tutors .mgt-feature-story-copy p,
body.mathguru-theme .mgt-feature-story-space .mgt-feature-story-copy p {
  color: rgba(255,255,255,.94) !important;
  font-weight: 800;
  text-shadow: 0 2px 16px rgba(0,0,0,.08);
}

body.mathguru-theme .mgt-feature-story-space .mgt-story-kicker,
body.mathguru-theme .mgt-feature-story-tutors .mgt-story-kicker {
  color: var(--mgt-mint) !important;
}

/* Let the transparent PNG backgrounds merge with the section colour. */
body.mathguru-theme .mgt-feature-story-art,
body.mathguru-theme .mgt-feature-story-art-left {
  min-height: 0 !important;
  position: relative;
  z-index: 2;
  background: transparent !important;
  overflow: visible !important;
}

body.mathguru-theme .mgt-feature-story-art::before,
body.mathguru-theme .mgt-feature-story-art-left::before {
  display: none !important;
}

body.mathguru-theme .mgt-feature-story-art img,
body.mathguru-theme .mgt-feature-story-art-left img {
  width: min(100%, 760px) !important;
  max-width: 760px !important;
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  filter: drop-shadow(0 28px 34px rgba(0,0,0,.14));
}

body.mathguru-theme .mgt-feature-story-art-left img {
  margin-left: 0 !important;
}

body.mathguru-theme .mgt-feature-story-art:not(.mgt-feature-story-art-left) img {
  margin-right: 0 !important;
}

/* Extra MathGuru-style signs placed outside the images so the full section feels designed. */
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 {
  position: absolute;
  z-index: 1;
  color: var(--mgt-mint) !important;
  font-weight: 950;
  line-height: .85;
  opacity: .54;
  pointer-events: none;
  text-shadow: 0 16px 34px rgba(0,0,0,.12);
}

body.mathguru-theme .mgt-feature-story-tutors::before {
  content: "+" !important;
  left: 5.5%;
  bottom: 10%;
  font-size: clamp(4.5rem, 9vw, 9.5rem);
  transform: rotate(-5deg);
}

body.mathguru-theme .mgt-feature-story-tutors::after {
  content: "÷" !important;
  right: 7.5%;
  top: 12%;
  font-size: clamp(4rem, 8vw, 8.5rem);
  transform: rotate(6deg);
}

body.mathguru-theme .mgt-feature-story-space::before {
  content: "−" !important;
  right: 7%;
  bottom: 12%;
  font-size: clamp(4.2rem, 8vw, 8.5rem);
  transform: rotate(-2deg);
}

body.mathguru-theme .mgt-feature-story-space::after {
  content: "+" !important;
  left: 8%;
  top: 13%;
  font-size: clamp(3.8rem, 7vw, 8rem);
  transform: rotate(7deg);
}

body.mathguru-theme .mgt-feature-story-copy::before {
  content: "÷  −  +";
  position: absolute;
  z-index: -1;
  right: -80px;
  top: -62px;
  color: var(--mgt-mint);
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 950;
  letter-spacing: .22em;
  opacity: .22;
  pointer-events: none;
}

body.mathguru-theme .mgt-feature-story-grid-reverse .mgt-feature-story-copy::before {
  left: -70px;
  right: auto;
  top: -54px;
}

body.mathguru-theme .mgt-story-button-light {
  color: #fff !important;
  border-color: rgba(255,255,255,.78) !important;
  background: rgba(255,255,255,.03) !important;
}
body.mathguru-theme .mgt-story-button-light:hover,
body.mathguru-theme .mgt-story-button-light:focus-visible {
  color: var(--mgt-blue) !important;
  background: #fff !important;
}
body.mathguru-theme .mgt-feature-story-space .mgt-story-button-blue {
  color: var(--mgt-blue) !important;
  background: #fff !important;
  border-color: #fff !important;
}
body.mathguru-theme .mgt-feature-story-space .mgt-story-button-blue:hover,
body.mathguru-theme .mgt-feature-story-space .mgt-story-button-blue:focus-visible {
  color: #fff !important;
  background: var(--mgt-blue) !important;
  border-color: var(--mgt-blue) !important;
}

@media (max-width: 1100px) {
  body.mathguru-theme .mgt-feature-story-grid,
  body.mathguru-theme .mgt-feature-story-grid-reverse {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  body.mathguru-theme .mgt-feature-story-grid-reverse .mgt-feature-story-copy,
  body.mathguru-theme .mgt-feature-story-copy {
    justify-self: start;
    max-width: 780px;
  }
  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 img,
  body.mathguru-theme .mgt-feature-story-art-left img {
    width: min(100%, 780px) !important;
    margin-inline: auto !important;
  }
}

@media (max-width: 720px) {
  body.mathguru-theme .mgt-feature-story {
    padding: 62px 0;
  }
  body.mathguru-theme .mgt-feature-story .container {
    width: min(100% - 26px, 680px);
  }
  body.mathguru-theme .mgt-feature-story-copy h2 {
    font-size: clamp(2.25rem, 11vw, 3.55rem);
  }
  body.mathguru-theme .mgt-feature-story-copy p {
    font-size: 1rem;
    line-height: 1.58;
    font-weight: 750;
  }
  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,
  body.mathguru-theme .mgt-feature-story-copy::before {
    display: none !important;
  }
}


body.mathguru-theme .mgt-feature-story-art::after,
body.mathguru-theme .mgt-feature-story-art-left::after {
  content: "+   −   ÷";
  position: absolute;
  right: 2%;
  bottom: 6%;
  color: var(--mgt-mint);
  font-size: clamp(1.9rem, 3vw, 3.1rem);
  font-weight: 900;
  letter-spacing: .35em;
  opacity: .48;
  pointer-events: none;
}
body.mathguru-theme .mgt-feature-story-art-left::after {
  left: 4%;
  right: auto;
  bottom: 9%;
}
@media (max-width: 720px) {
  body.mathguru-theme .mgt-feature-story-art::after,
  body.mathguru-theme .mgt-feature-story-art-left::after { display:none; }
}
