.home-services,
.home-editorial {
  --services-ink: #173129;
  --services-muted: #4e625a;
  --services-green: #176a49;
}

.home-services {
  padding: clamp(56px, 6vw, 96px) 0;
  background: radial-gradient(ellipse at 50% 0%, #f8fbf9, #edf5f0);
  scroll-margin-top: 100px;
}

.home-services__inner {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
}

.home-services__intro {
  max-width: 800px;
  margin: 0 auto clamp(28px, 4vw, 50px);
  text-align: center;
}

.home-services .home-services__eyebrow,
.home-editorial .home-services__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 15px;
  padding: 6px 12px;
  border: 1px solid #cfe3d7;
  border-radius: 999px;
  background: #e5f1e9;
  color: var(--services-green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.home-services__eyebrow::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #247b56;
  content: "";
}

.home-services__intro h2 {
  margin: 0;
  color: var(--services-ink);
  font-size: clamp(34px, 4.2vw, 59px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.08;
}

.home-services__intro h2 span {
  color: var(--services-green);
}

.home-services .home-services__lead {
  max-width: 59ch;
  margin: 20px auto 0;
  color: var(--services-muted);
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.65;
}

.home-services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-services a.home-services__card {
  display: flex;
  height: 100%;
  min-height: 232px;
  flex-direction: column;
  align-items: flex-start;
  padding: 23px 22px 20px;
  border: 1px solid #d9e7df;
  border-top: 3px solid #318b65;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px #1731290b;
  color: var(--services-ink);
  text-decoration: none;
  text-transform: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.home-services a.home-services__card:hover {
  transform: translateY(-3px);
  border-color: #73a78b;
  box-shadow: 0 10px 24px #17312918;
}

.home-services__icon {
  width: 65px;
  height: 65px;
  flex: none;
  padding: 4px;
  border-radius: 12px;
  background: #e8f4ec;
}

.home-3d-icon {
  display: block;
}

.home-3d-icon::before {
  display: block;
  width: 100%;
  height: 100%;
  background: url("/images/home/services-3d.webp") var(--icon-x) var(--icon-y) / 300% 300% no-repeat;
  clip-path: inset(2px);
  content: "";
}

.home-services__card h3 {
  margin: 15px 0 7px;
  color: var(--services-ink);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.home-services__card p {
  margin: 0 0 16px;
  color: var(--services-muted);
  font-size: 14px;
  line-height: 1.6;
}

.home-services__card-action {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  color: var(--services-green);
  font-size: 13px;
  font-weight: 700;
}

.home-services__arrow {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: #edf6f0;
  font-size: 16px;
  line-height: 1;
}

.home-services__consult {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 24px;
  padding: clamp(22px, 3.4vw, 38px);
  border-radius: 17px;
  background: radial-gradient(ellipse at top right, #216e53, #133f34 75%);
  color: #fff;
}

.home-services__consult h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: clamp(23px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.home-services__consult p {
  margin: 0 0 12px;
  color: #e2f0e8;
  font-size: 15px;
}

.home-services__consult-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 18px;
}

.home-services__consult-links a,
.home-services__consult-links a:hover {
  color: #fff;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: none;
}

.home-services a.home-services__button {
  display: inline-flex;
  min-height: 48px;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 17px;
  border-radius: 9px;
  background: #fff;
  color: #144a38;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-transform: none;
}

.home-services a.home-services__button:hover {
  background: #e6f3ea;
}

.home-services a:focus-visible,
.home-editorial a:focus-visible,
.home-editorial button:focus-visible,
.home-catalog a:focus-visible {
  /* Restore keyboard focus where the site stylesheet suppresses outlines. */
  outline: 2px solid #267756 !important;
  outline-offset: 4px;
}

.home-services__consult a:focus-visible {
  outline-color: #fff !important;
}

.home-editorial {
  padding: clamp(40px, 6vw, 82px) 0;
}

.home-editorial__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 23px;
}

.home-editorial__heading h2 {
  margin: 0;
  color: var(--services-ink);
  font-size: clamp(30px, 4vw, 49px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.12;
}

.home-editorial__heading p:not(.home-services__eyebrow) {
  margin: 9px 0 0;
  color: var(--services-muted);
  font-size: 16px;
}

.home-editorial a.home-editorial__link {
  color: var(--services-green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.home-team__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-team a.home-team__card {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d9e7df;
  border-radius: 16px;
  background: #fff;
  color: var(--services-ink);
  text-decoration: none;
}

.home-team a.home-team__card:hover {
  border-color: #80ad95;
  box-shadow: 0 8px 22px #17312913;
}

.home-team__card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 35%;
  background: #edf4ef;
}

.home-team__card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.home-team__card h3 {
  margin: 0 0 6px;
  color: var(--services-ink);
  font-size: clamp(17px, 1.65vw, 22px);
  font-weight: 700;
  line-height: 1.2;
}

.home-team__card p {
  margin: 0 0 13px;
  color: var(--services-muted);
  line-height: 1.45;
}

.home-team__card-copy span {
  margin-top: auto;
  color: var(--services-green);
  font-size: 13px;
  font-weight: 700;
}

.home-patients {
  background: #eff6f2;
}

.home-patients__card {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid #d9e7df;
  border-radius: 17px;
  background: #fff;
}

.home-patients__card[hidden] {
  display: none;
}

.home-patients__media {
  position: relative;
  align-self: center;
  aspect-ratio: 4 / 3;
  background: #fff;
}

.home-patients img.home-patients__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  /* The base theme forces image height to auto. */
  height: 100% !important;
  object-fit: contain;
}

.home-patients__copy {
  align-self: center;
  padding: clamp(22px, 4vw, 49px);
}

.home-patients__copy h3 {
  margin: 0 0 10px;
  color: var(--services-ink);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.18;
}

.home-patients__copy p {
  margin-bottom: 15px;
  color: var(--services-muted);
  font-size: 15px;
  line-height: 1.65;
}

.home-patients__copy a {
  color: var(--services-green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.home-patients__controls:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 15px;
  color: var(--services-muted);
  font-variant-numeric: tabular-nums;
}

.home-patients__controls button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #c6dfd0;
  border-radius: 50%;
  background: #fff;
  color: var(--services-green);
  font-size: 19px;
  line-height: 1;
}

.home-patients__controls button:hover {
  background: #e4f1e8;
}

section.home-catalog {
  /* The theme pulls the footer boxes up by 75px. */
  padding: clamp(40px, 6vw, 76px) 0 calc(75px + clamp(24px, 3vw, 44px));
}

.home-catalog h2 {
  margin: 0 0 26px;
  color: #173129;
  font-size: clamp(25px, 3vw, 34px);
  text-align: center;
}

.home-catalog .posts__list {
  margin-bottom: 0;
}

.home-catalog .card-work {
  height: 100%;
  padding: 20px clamp(20px, 4vw, 54px);
}

.home-catalog__icon {
  width: 82px;
  height: 82px;
}

.home-catalog .card-work__title {
  margin: 12px 0 0;
  color: #173129;
}

@media (max-width: 1050px) {
  .home-services__grid,
  .home-team__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .home-services__inner {
    width: calc(100% - 36px);
  }

  .home-services__desktop-break {
    display: none;
  }

  .home-services__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .home-services a.home-services__card {
    min-height: 0;
  }

  .home-services__consult {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    margin-top: 16px;
  }

  .home-team__grid {
    gap: 10px;
  }

  .home-team__card-copy {
    padding: 12px;
  }

  .home-patients__card {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-services a.home-services__card {
    transition: none;
  }

  .home-services a.home-services__card:hover {
    transform: none;
  }
}
