/* Closed-preview visual layer for the existing services archive. Copy and URLs stay in WordPress. */
body.post-type-archive-services {
  --mg-canvas: #f6f4ee;
  --mg-surface: #fffefa;
  --mg-surface-blue: #caedf0;
  --mg-ink: #12343a;
  --mg-muted: #5c7074;
  --mg-accent: #14b8c6;
  --mg-accent-deep: #087d89;
  --mg-white: #fff;
  --mg-container: min(1200px, calc(100vw - 64px));
  color: var(--mg-ink);
  background: var(--mg-canvas);
  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.post-type-archive-services .legacy-container {
  width: var(--mg-container);
  max-width: none;
  padding-inline: 0;
}

body.post-type-archive-services a:focus-visible,
body.post-type-archive-services button:focus-visible,
body.post-type-archive-services input:focus-visible {
  outline: 3px solid rgba(20, 184, 198, .7);
  outline-offset: 4px;
}

body.post-type-archive-services .legacy-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: auto;
  min-width: 160px;
  min-height: 47px;
  max-width: none;
  padding: 7px 8px 7px 18px;
  color: var(--mg-white);
  background: var(--mg-ink);
  border: 0;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  transition: background-color .3s ease, box-shadow .3s ease, transform .3s ease;
}

body.post-type-archive-services .legacy-button::after {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--mg-ink);
  background: var(--mg-white);
  border-radius: 50%;
  content: "\2197";
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
}

body.post-type-archive-services .legacy-button:hover,
body.post-type-archive-services .legacy-button:focus-visible {
  color: var(--mg-white);
  background: var(--mg-accent-deep);
  box-shadow: 0 12px 28px rgba(8, 125, 137, .2);
  transform: translateY(-2px);
}

/* The same brand/navigation language as the approved homepage. */
body.post-type-archive-services .legacy-header--inner {
  padding: 14px 0;
  color: var(--mg-ink);
  background: var(--mg-canvas);
  border-bottom: 1px solid rgba(18, 52, 58, .09);
}

body.post-type-archive-services .legacy-top-panel__grid {
  grid-template-columns: 272px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  width: min(1440px, calc(100vw - 96px));
  min-height: 72px;
}

body.post-type-archive-services .mg-inner-logo {
  grid-column: 1;
  display: block;
  width: 272px;
  padding: 7px 10px;
  background: rgba(18, 52, 58, .91);
  border-radius: 7px;
}

body.post-type-archive-services .mg-inner-logo img {
  width: 100%;
  filter: url(img/hero-logo-tone.svg#brand-tone);
}

body.post-type-archive-services .primary-navigation {
  grid-column: 2;
  justify-self: center;
  margin-top: 0;
}

body.post-type-archive-services .primary-navigation > ul {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(14px, 1.55vw, 25px);
}

body.post-type-archive-services .primary-navigation li { margin-right: 0; }
body.post-type-archive-services .primary-navigation > ul > li > a {
  position: relative;
  display: block;
  padding: 16px 0;
  color: var(--mg-ink);
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: -.01em;
}

body.post-type-archive-services .primary-navigation > ul > li > a::after {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 2px;
  background: var(--mg-accent);
  border-radius: 2px;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

body.post-type-archive-services .primary-navigation > ul > li > a:hover::after,
body.post-type-archive-services .primary-navigation > ul > li > a:focus-visible::after,
body.post-type-archive-services .primary-navigation > ul > .current-menu-item > a::after { transform: scaleX(1); }

body.post-type-archive-services .primary-navigation .sub-menu {
  top: 100%;
  width: 310px;
  padding: 12px;
  background: var(--mg-surface);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(18, 52, 58, .14);
}

body.post-type-archive-services .primary-navigation .sub-menu li { padding: 0; }
body.post-type-archive-services .primary-navigation .sub-menu li:hover { border-left: 0; }
body.post-type-archive-services .primary-navigation .sub-menu a {
  padding: 11px 12px;
  color: var(--mg-ink);
  border-radius: 13px;
  font-size: .84rem;
  font-weight: 500;
}
body.post-type-archive-services .primary-navigation .sub-menu a:hover,
body.post-type-archive-services .primary-navigation .sub-menu a:focus-visible { background: #e6f4f2; }

body.post-type-archive-services .legacy-header-contact {
  grid-column: 3;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 1px 16px;
  min-width: 0;
  padding: 4px 7px 4px 13px;
  background: rgba(13, 48, 54, .88);
  border-radius: 15px;
  text-align: left;
}

body.post-type-archive-services .legacy-header-contact__phone {
  grid-column: 1;
  color: var(--mg-white);
  font-size: 1.05rem;
  font-weight: 700;
}
body.post-type-archive-services .legacy-header-contact__callback {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 145px;
  min-height: 46px;
  margin: 0;
  padding: 7px 8px 7px 18px;
  background: var(--mg-accent);
  font-size: .66rem;
}
body.post-type-archive-services .legacy-header-contact p {
  grid-column: 1;
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: .61rem;
  font-weight: 550;
  letter-spacing: .035em;
  text-transform: uppercase;
}

body.post-type-archive-services .legacy-breadcrumbs {
  margin: 0;
  padding: 17px 0;
  background: var(--mg-canvas);
  border-bottom: 0;
}
body.post-type-archive-services .legacy-breadcrumbs p {
  color: var(--mg-muted);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .06em;
}
body.post-type-archive-services .legacy-breadcrumbs a { color: var(--mg-accent-deep); }

/* The archive retains its exact editorial copy and six existing service URLs. */
body.post-type-archive-services .legacy-services-archive { margin-bottom: 0; }
body.post-type-archive-services .legacy-services-archive > .legacy-description:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: end;
  gap: 48px;
  margin: 8px 0 58px;
  padding: 56px 0 0;
  border: 0;
}
body.post-type-archive-services .legacy-services-archive .legacy-description::before,
body.post-type-archive-services .legacy-services-archive .legacy-description::after { display: none; }
body.post-type-archive-services .legacy-services-archive > .legacy-description:first-child h1 {
  margin: 0;
  color: var(--mg-ink);
  font-size: clamp(3.25rem, 5.2vw, 5.4rem);
  font-weight: 590;
  letter-spacing: -.065em;
  line-height: .98;
  text-wrap: balance;
}
body.post-type-archive-services .legacy-services-archive > .legacy-description:first-child p {
  margin: 0 0 7px;
  padding: 28px;
  color: var(--mg-ink);
  background: var(--mg-surface-blue);
  border-radius: 25px;
  font-family: ui-serif, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
}

body.post-type-archive-services .legacy-services-archive > .legacy-services__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 22px;
  padding-bottom: 94px;
}

body.post-type-archive-services .legacy-service-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: var(--mg-surface);
  border: 1px solid rgba(18, 52, 58, .06);
  border-radius: 17px;
  box-shadow: 0 8px 28px rgba(18, 52, 58, .045);
  transition: box-shadow .35s ease;
}
body.post-type-archive-services .legacy-service-card:hover { box-shadow: 0 15px 38px rgba(18, 52, 58, .095); }
body.post-type-archive-services .legacy-service-card__image {
  width: 100%;
  height: auto;
  aspect-ratio: 1.52;
  overflow: hidden;
  background: #e8eeeb;
  border-radius: 16px 16px 12px 12px;
}
body.post-type-archive-services .legacy-service-card__image img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.32, .72, 0, 1);
}
body.post-type-archive-services .legacy-service-card:hover .legacy-service-card__image img { transform: scale(1.035); }
body.post-type-archive-services .legacy-service-card__title {
  height: auto;
  min-height: 3.35rem;
  margin: 22px 22px 8px;
  overflow: visible;
}
body.post-type-archive-services .legacy-service-card__title h3 {
  margin: 0;
  color: var(--mg-ink);
  font-size: clamp(1.3rem, 1.55vw, 1.55rem);
  font-weight: 670;
  letter-spacing: -.045em;
  line-height: 1.16;
  text-transform: none;
  text-wrap: balance;
}
body.post-type-archive-services .legacy-service-card__description {
  align-self: start;
  max-height: 4.65em;
  margin: 0 22px 21px;
  padding-left: 14px;
  overflow: hidden;
  border-left: 2px solid var(--mg-accent);
  color: var(--mg-muted);
  font-size: .89rem;
  line-height: 1.52;
}
body.post-type-archive-services .legacy-service-card__description p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: 420;
  line-height: inherit;
  text-align: left;
}
body.post-type-archive-services .legacy-service-card > .legacy-button {
  justify-self: start;
  align-self: end;
  margin: 0 22px 22px;
}

/* The original long-form blocks remain in place and fully readable. */
body.post-type-archive-services .legacy-services-archive > .legacy-description:nth-of-type(2) {
  margin: 0 0 82px;
  padding: 62px clamp(28px, 7vw, 100px) 72px;
  background: var(--mg-surface);
  border: 0;
  border-radius: 30px;
}
body.post-type-archive-services .legacy-services-archive > .legacy-description:nth-of-type(2) h2 {
  max-width: 800px;
  margin: 36px 0 24px;
  color: var(--mg-ink);
  font-size: clamp(2.1rem, 3.1vw, 3.35rem);
  font-weight: 590;
  letter-spacing: -.055em;
  line-height: 1.07;
  text-align: left;
  text-transform: none;
  text-wrap: balance;
}
body.post-type-archive-services .legacy-services-archive > .legacy-description:nth-of-type(2) h2:first-child { margin-top: 0; }
body.post-type-archive-services .legacy-services-archive > .legacy-description:nth-of-type(2) p,
body.post-type-archive-services .legacy-services-archive > .legacy-description:nth-of-type(2) li {
  max-width: 800px;
  color: var(--mg-muted);
  font-size: 1rem;
  font-weight: 420;
  line-height: 1.68;
  text-align: left;
}
body.post-type-archive-services .legacy-services-archive > .legacy-description:nth-of-type(2) strong { color: var(--mg-ink); font-weight: 650; }
body.post-type-archive-services .legacy-services-archive > .legacy-description:nth-of-type(2) ul { max-width: 800px; padding-left: 24px; }
body.post-type-archive-services .legacy-services-archive > .legacy-description:nth-of-type(2) li { margin-bottom: 10px; }
body.post-type-archive-services .legacy-services-archive > .legacy-description:nth-of-type(2) a { color: var(--mg-accent-deep); text-decoration: underline; text-underline-offset: 3px; }
body.post-type-archive-services .legacy-pagination { padding-bottom: 52px; }

body.post-type-archive-services .legacy-callback {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 88px max(32px, calc((100vw - 1200px) / 2));
  overflow: hidden;
  color: var(--mg-ink);
  background: radial-gradient(circle at 13% 15%, rgba(255, 255, 255, .65), transparent 35%), var(--mg-surface-blue);
  border-radius: 0;
  text-align: left;
}
body.post-type-archive-services .legacy-callback::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--mg-accent);
  content: "";
}
body.post-type-archive-services .legacy-callback .legacy-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, .95fr);
  align-items: center;
  gap: 72px;
  width: 100%;
}
body.post-type-archive-services .legacy-callback h3 {
  max-width: 570px;
  margin: 0;
  color: var(--mg-ink);
  font-size: clamp(2rem, 3.35vw, 3.45rem);
  font-weight: 590;
  letter-spacing: -.05em;
  line-height: 1;
  text-transform: none;
  text-wrap: balance;
}
body.post-type-archive-services .legacy-callback .legacy-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: auto;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
body.post-type-archive-services .legacy-callback .legacy-form input,
body.post-type-archive-services .legacy-callback .legacy-form .legacy-button {
  position: static;
  transform: none;
}
body.post-type-archive-services .legacy-callback .legacy-form input {
  width: 100%;
  max-width: none;
  min-height: 54px;
  padding: 14px 18px;
  color: var(--mg-ink);
  background: var(--mg-white);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 1px 0 rgba(18, 52, 58, .08);
  font-size: .82rem;
  font-weight: 500;
  text-align: left;
}
body.post-type-archive-services .legacy-callback .legacy-form input::placeholder { color: var(--mg-muted); text-align: left; text-transform: none; opacity: .78; }
body.post-type-archive-services .legacy-callback .legacy-form .legacy-button {
  grid-column: 2;
  width: 100%;
  max-width: none;
  min-height: 54px;
  background: var(--mg-accent);
}
body.post-type-archive-services .legacy-callback .legacy-form .legacy-button::after { color: var(--mg-accent-deep); }
body.post-type-archive-services .legacy-callback .legacy-form .legacy-button:not(:disabled):hover,
body.post-type-archive-services .legacy-callback .legacy-form .legacy-button:not(:disabled):focus-visible { background: var(--mg-accent-deep); }

body.post-type-archive-services .legacy-footer {
  width: 100%;
  margin: 0;
  padding: 88px max(32px, calc((100vw - 1200px) / 2)) 80px;
  background: var(--mg-ink);
  border-radius: 0;
}
body.post-type-archive-services .legacy-footer__grid {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 80px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
body.post-type-archive-services .legacy-footer__logo { margin-bottom: 34px; }
body.post-type-archive-services .legacy-footer__logo img { width: 250px; }
body.post-type-archive-services .legacy-footer__services li { margin-bottom: 8px; }
body.post-type-archive-services .legacy-footer__services a { color: rgba(255, 255, 255, .55); font-size: .88rem; font-weight: 420; }
body.post-type-archive-services .legacy-footer__services a:hover,
body.post-type-archive-services .legacy-footer__services a:focus-visible { color: var(--mg-white); }
body.post-type-archive-services .legacy-footer__menu h3 { margin: 0 0 22px; padding-bottom: 14px; color: rgba(255, 255, 255, .55); border-bottom: 1px solid rgba(255, 255, 255, .14); font-size: .69rem; font-weight: 650; letter-spacing: .11em; }
body.post-type-archive-services .legacy-footer__menu li { width: 49%; margin-bottom: 12px; }
body.post-type-archive-services .legacy-footer__menu a,
body.post-type-archive-services .legacy-footer__social p { color: rgba(255, 255, 255, .88); font-size: .93rem; font-weight: 480; }
body.post-type-archive-services .legacy-footer__social { margin-top: 42px; }
body.post-type-archive-services .legacy-footer__social p { font-size: .7rem; font-weight: 650; letter-spacing: .07em; }

@media (max-width: 1199px) {
  body.post-type-archive-services .legacy-top-panel__grid { width: var(--mg-container); grid-template-columns: 230px minmax(0, 1fr) auto; }
  body.post-type-archive-services .mg-inner-logo { width: 230px; }
  body.post-type-archive-services .legacy-header-contact__callback { display: none; }
  body.post-type-archive-services .legacy-header-contact { grid-template-columns: auto; }
}

@media (max-width: 1020px) {
  body.post-type-archive-services .legacy-top-panel__grid { grid-template-columns: 1fr auto; }
  body.post-type-archive-services .mg-inner-logo { grid-column: 1; margin-left: 52px; }
  body.post-type-archive-services .menu-toggle { top: 22px; left: 0; }
  body.post-type-archive-services .menu-toggle span:not(.screen-reader-text) { background: var(--mg-ink); }
  body.post-type-archive-services .primary-navigation { grid-column: auto; }
  body.post-type-archive-services .primary-navigation.is-open { width: 100vw; background: var(--mg-ink); }
  body.post-type-archive-services.menu-open .menu-toggle span:not(.screen-reader-text) { background: var(--mg-white); }
  body.post-type-archive-services .primary-navigation.is-open > ul { display: block; }
  body.post-type-archive-services .primary-navigation.is-open > ul > li > a { color: var(--mg-white); font-size: 1.25rem; }
  body.post-type-archive-services .primary-navigation.is-open .sub-menu { position: static; display: block; width: auto; padding: 0 0 10px 20px; background: transparent; border-radius: 0; box-shadow: none; }
  body.post-type-archive-services .primary-navigation.is-open .sub-menu a { color: var(--mg-white); }
  body.post-type-archive-services .legacy-header-contact { grid-column: 2; }
  body.post-type-archive-services .legacy-services-archive > .legacy-services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.post-type-archive-services .legacy-callback .legacy-container { grid-template-columns: 1fr; gap: 44px; }
  body.post-type-archive-services .legacy-footer__grid { grid-template-columns: 1fr 1fr; gap: 44px; }
}

@media (max-width: 767px) {
  body.post-type-archive-services { --mg-container: calc(100vw - 40px); }
  body.post-type-archive-services .legacy-header--inner { padding: 14px 0 20px; }
  body.post-type-archive-services .legacy-top-panel__grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
  body.post-type-archive-services .mg-inner-logo { grid-column: 1; justify-self: center; width: 210px; margin-left: 34px; }
  body.post-type-archive-services .menu-toggle { top: 18px; left: 0; }
  body.post-type-archive-services .legacy-header-contact { grid-column: 1; justify-self: center; margin-top: 2px; }
  body.post-type-archive-services .legacy-services-archive > .legacy-description:first-child { display: block; margin: 0 0 34px; padding-top: 36px; }
  body.post-type-archive-services .legacy-services-archive > .legacy-description:first-child h1 { margin: 0 0 26px; font-size: clamp(2.7rem, 10vw, 4.3rem); }
  body.post-type-archive-services .legacy-services-archive > .legacy-description:first-child p { padding: 23px; border-radius: 20px; font-size: .98rem; }
  body.post-type-archive-services .legacy-services-archive > .legacy-services__grid { grid-template-columns: 1fr; gap: 18px; padding-bottom: 65px; }
  body.post-type-archive-services .legacy-service-card { width: 100%; margin: 0; }
  body.post-type-archive-services .legacy-service-card__title { min-height: 0; margin: 20px 20px 7px; }
  body.post-type-archive-services .legacy-service-card__description { margin: 0 20px 18px; }
  body.post-type-archive-services .legacy-service-card > .legacy-button { margin: 0 20px 20px; }
  body.post-type-archive-services .legacy-services-archive > .legacy-description:nth-of-type(2) { margin-bottom: 54px; padding: 34px 24px 42px; border-radius: 22px; }
  body.post-type-archive-services .legacy-services-archive > .legacy-description:nth-of-type(2) h2 { font-size: 2rem; }
  body.post-type-archive-services .legacy-callback { padding: 72px 20px 78px; }
  body.post-type-archive-services .legacy-callback h3 { max-width: 480px; font-size: 2.15rem; }
  body.post-type-archive-services .legacy-callback .legacy-form { display: grid; grid-template-columns: 1fr; }
  body.post-type-archive-services .legacy-callback .legacy-form .legacy-button { grid-column: 1; }
  body.post-type-archive-services .legacy-callback .legacy-form input,
  body.post-type-archive-services .legacy-callback .legacy-form .legacy-button { width: 100%; max-width: none; }
  body.post-type-archive-services .legacy-footer { padding: 68px 24px 64px; }
  body.post-type-archive-services .legacy-footer__grid { grid-template-columns: 1fr; gap: 46px; }
  body.post-type-archive-services .legacy-footer__menu li { display: block; width: 100%; }
}

@media (max-width: 340px) {
  body.post-type-archive-services .legacy-services-archive > .legacy-description:first-child h1 { font-size: 2.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  body.post-type-archive-services .legacy-service-card__image img,
  body.post-type-archive-services .legacy-button { transition: none; }
}
