/* Local redesign of the existing About page; all historical copy remains in WordPress. */
body.mg-about-page {
  --mg-surface-blue: #e4f2f0;
  color: #12343a;
  background: #f6f4ee;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

body.mg-about-page .legacy-breadcrumbs {
  padding: 22px 0 0;
  color: #5c7074;
  background: #f6f4ee;
}
body.mg-about-page .legacy-breadcrumbs .legacy-container,
body.mg-about-page .legacy-about,
body.mg-about-page .legacy-about__content {
  width: min(1200px, calc(100vw - 64px));
  max-width: none;
}
body.mg-about-page .legacy-breadcrumbs a { color: #087d89; }

body.mg-about-page .legacy-about { padding: 62px 0 104px; }
body.mg-about-page .legacy-about article { margin: 0; }
body.mg-about-page .legacy-about__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(40px, 6vw, 92px);
}
body.mg-about-page .mg-about-photo {
  overflow: hidden;
  background: #e0e8e5;
  border-radius: 28px;
  box-shadow: 0 30px 62px rgba(13, 57, 62, .13);
}
body.mg-about-page .mg-about-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1433 / 1098;
  object-fit: cover;
}
body.mg-about-page .legacy-about__intro h1 {
  margin: 0 0 28px;
  color: #12343a;
  font-size: clamp(4rem, 6.1vw, 6.5rem);
  font-weight: 690;
  letter-spacing: -.075em;
  line-height: .95;
  text-transform: none;
}
body.mg-about-page .legacy-about__intro > div:last-child { min-width: 0; }
body.mg-about-page .legacy-about__intro > div:last-child p {
  max-width: 61ch;
  margin: 0 0 18px;
  color: #5c7074;
  font-size: 1.02rem;
  font-weight: 420;
  line-height: 1.72;
  text-align: left;
}
body.mg-about-page .legacy-about__intro > div:last-child p:first-of-type {
  color: #12343a;
  font-size: 1.16rem;
  line-height: 1.58;
}
body.mg-about-page .legacy-about__intro a,
body.mg-about-page .legacy-about__content .legacy-entry-content a {
  color: #087d89;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.mg-about-page .legacy-benefits {
  padding: 100px 0 106px;
  color: #fff;
  text-align: left;
  background: radial-gradient(circle at 55% 46%, rgba(8, 98, 105, .4), transparent 54%),
    linear-gradient(135deg, rgba(0, 32, 38, .5), transparent 50%), #003b43;
}
body.mg-about-page .legacy-benefits .legacy-container {
  width: min(1480px, calc(100vw - 80px));
  max-width: none;
}
body.mg-about-page .legacy-benefits h2 {
  max-width: 1400px;
  margin: 0 0 66px;
  color: #fff;
  font-size: clamp(2.65rem, 4.7vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.04;
  text-transform: uppercase;
  text-wrap: balance;
}
body.mg-about-page .legacy-benefits__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 30px);
}
body.mg-about-page .legacy-benefit {
  display: block;
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  overflow: visible;
}
body.mg-about-page .legacy-benefit__icon {
  display: grid;
  width: 100%;
  height: 205px;
  margin: 0 0 22px;
  place-items: center;
}
body.mg-about-page .legacy-benefit__icon img {
  width: min(100%, 220px);
  height: 205px;
  max-height: none;
  margin: 0;
  object-fit: contain;
}
body.mg-about-page .legacy-benefit p {
  width: auto;
  max-width: none;
  margin: 0;
  color: rgba(255, 255, 255, .9);
  font-size: .98rem;
  line-height: 1.5;
  text-align: left;
}
body.mg-about-page .legacy-benefit p strong,
body.mg-about-page .legacy-benefit p span { display: block; }
body.mg-about-page .legacy-benefit p strong {
  min-height: 3.2em;
  margin-bottom: 13px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.35;
  text-transform: uppercase;
}

body.mg-about-page .legacy-about__content {
  padding: 90px 0 110px;
}
body.mg-about-page .legacy-about__content > .legacy-entry-content {
  max-width: 880px;
  color: #5c7074;
  font-size: 1rem;
  line-height: 1.72;
}
body.mg-about-page .legacy-about__content > .legacy-entry-content p { margin: 0 0 18px; }
body.mg-about-page .legacy-about__content > .legacy-entry-content h2,
body.mg-about-page .legacy-about__content > .legacy-entry-content h3 {
  margin: 0 0 24px;
  color: #12343a;
  font-size: clamp(1.9rem, 3.3vw, 3rem);
  font-weight: 650;
  letter-spacing: -.045em;
  line-height: 1.14;
  text-transform: none;
}

body.mg-about-page .legacy-certificates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 68px;
  padding: 66px 0 0;
  border-top: 1px solid rgba(18, 52, 58, .14);
}
body.mg-about-page .legacy-certificates a {
  position: relative;
  display: grid;
  width: auto;
  min-width: 0;
  height: 322px;
  padding: 22px;
  place-items: center;
  overflow: hidden;
  color: #12343a;
  background: #fffefa;
  border: 1px solid rgba(18, 52, 58, .07);
  border-radius: 20px;
  box-shadow: 0 12px 34px rgba(18, 52, 58, .05);
  transition: transform .25s ease, box-shadow .25s ease;
}
body.mg-about-page .legacy-certificates a::after {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: #e4f2f0;
  border-radius: 50%;
  content: "↗";
  font-size: 1rem;
}
body.mg-about-page .legacy-certificates a:hover,
body.mg-about-page .legacy-certificates a:focus-visible {
  box-shadow: 0 22px 44px rgba(18, 52, 58, .13);
  transform: translateY(-4px);
}
body.mg-about-page .legacy-certificates a:focus-visible,
body.mg-about-page .mg-certificate-dialog button:focus-visible,
body.mg-about-page .mg-certificate-dialog a:focus-visible {
  outline: 3px solid #14b8c6;
  outline-offset: 3px;
}
body.mg-about-page .legacy-certificates picture {
  display: block;
  width: 100%;
  height: 100%;
}
body.mg-about-page .legacy-certificates img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: contain;
}

body.mg-about-page .mg-certificate-dialog {
  width: min(840px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 48px 20px 20px;
  overflow: auto;
  color: #12343a;
  background: #fffefa;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0, 25, 31, .27);
}
body.mg-about-page .mg-certificate-dialog::backdrop { background: rgba(0, 29, 35, .78); }
body.mg-about-page .mg-certificate-dialog__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #12343a;
  background: #e4f2f0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}
body.mg-about-page .mg-certificate-dialog img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 115px);
  margin: auto;
  object-fit: contain;
}
body.mg-about-page .mg-certificate-dialog__status { margin: 0 0 12px; text-align: center; }
body.mg-about-page .mg-certificate-dialog__file { display: block; margin-top: 10px; color: #087d89; text-align: center; }

body.mg-about-page .legacy-callback {
  width: 100%;
  margin: 0;
  padding: 82px max(32px, calc((100vw - 1200px) / 2));
  color: #12343a;
  text-align: left;
  background: #e4f2f0;
}
body.mg-about-page .legacy-callback .legacy-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, .95fr);
  align-items: center;
  gap: 72px;
  width: 100%;
  max-width: none;
}
body.mg-about-page .legacy-callback h3 {
  margin: 0;
  color: #12343a;
  font-size: clamp(2rem, 3.35vw, 3.45rem);
  font-weight: 590;
  letter-spacing: -.05em;
  line-height: 1;
  text-align: left;
  text-transform: none;
  text-wrap: balance;
}
body.mg-about-page .legacy-callback .legacy-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: auto;
  padding: 10px;
  background: rgba(255, 255, 255, .48);
  border-radius: 28px;
}
body.mg-about-page .legacy-callback .legacy-form input {
  position: static;
  width: 100%;
  max-width: none;
  min-height: 54px;
  padding: 14px 18px;
  color: #12343a;
  background: #fff;
  border: 0;
  border-radius: 18px;
  font-size: .82rem;
  text-align: left;
  transform: none;
}
body.mg-about-page .legacy-callback .legacy-form input::placeholder { color: #5c7074; text-align: left; text-transform: none; }
body.mg-about-page .legacy-callback .legacy-form .legacy-button {
  position: static;
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: none;
  min-height: 54px;
  padding: 7px 8px 7px 18px;
  color: #fff;
  background: #14b8c6;
  border: 0;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  text-transform: none;
  transform: none;
}
body.mg-about-page .legacy-callback .legacy-form .legacy-button::after {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #087d89;
  background: #fff;
  border-radius: 50%;
  content: "\2197";
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
}
body.mg-about-page .legacy-callback .legacy-form .legacy-button:not(:disabled):hover,
body.mg-about-page .legacy-callback .legacy-form .legacy-button:not(:disabled):focus-visible {
  color: #fff;
  background: #087d89;
}
body.mg-about-page .legacy-callback .legacy-form .legacy-button:focus-visible {
  outline: 3px solid #14b8c6;
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  body.mg-about-page .legacy-about__intro { gap: 40px; }
  body.mg-about-page .legacy-benefits__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px 28px; }
  body.mg-about-page .legacy-certificates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  body.mg-about-page .legacy-about__intro { grid-template-columns: 1fr; }
  body.mg-about-page .mg-about-photo { max-width: 680px; }
  body.mg-about-page .legacy-about__intro h1 { font-size: clamp(3.8rem, 12vw, 5.5rem); }
  body.mg-about-page .legacy-callback .legacy-container { grid-template-columns: 1fr; gap: 36px; }
  body.mg-about-page .legacy-callback .legacy-form { max-width: 640px; }
}
@media (max-width: 600px) {
  body.mg-about-page .legacy-breadcrumbs .legacy-container,
  body.mg-about-page .legacy-about,
  body.mg-about-page .legacy-about__content,
  body.mg-about-page .legacy-benefits .legacy-container { width: min(1200px, calc(100vw - 40px)); }
  body.mg-about-page .legacy-about { padding: 38px 0 72px; }
  body.mg-about-page .mg-about-photo { border-radius: 20px; }
  body.mg-about-page .legacy-about__intro { gap: 32px; }
  body.mg-about-page .legacy-about__intro h1 { margin-bottom: 19px; }
  body.mg-about-page .legacy-about__intro > div:last-child p:first-of-type { font-size: 1.06rem; }
  body.mg-about-page .legacy-benefits { padding: 74px 0 78px; }
  body.mg-about-page .legacy-benefits h2 { margin-bottom: 42px; font-size: clamp(2rem, 9vw, 3rem); }
  body.mg-about-page .legacy-benefits__grid { grid-template-columns: 1fr; gap: 28px; }
  body.mg-about-page .legacy-benefit__icon { height: 150px; margin-bottom: 12px; }
  body.mg-about-page .legacy-benefit__icon img { height: 150px; }
  body.mg-about-page .legacy-benefit p strong { min-height: 0; margin-bottom: 8px; }
  body.mg-about-page .legacy-about__content { padding: 72px 0 82px; }
  body.mg-about-page .legacy-certificates { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 52px; padding-top: 46px; }
  body.mg-about-page .legacy-certificates a { height: 210px; padding: 13px; border-radius: 14px; }
  body.mg-about-page .legacy-certificates a::after { right: 8px; bottom: 8px; width: 26px; height: 26px; font-size: .8rem; }
  body.mg-about-page .legacy-callback { padding: 72px 20px 78px; }
  body.mg-about-page .legacy-callback h3 { font-size: 2.15rem; }
  body.mg-about-page .legacy-callback .legacy-form { grid-template-columns: 1fr; padding: 8px; }
  body.mg-about-page .legacy-callback .legacy-form .legacy-button { grid-column: 1; }
}
@media (max-width: 350px) {
  body.mg-about-page .legacy-benefits h2 { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.mg-about-page .legacy-certificates a { transition: none; }
}
