/* Clickable service cards and their reading dialog. */
#services {
  scroll-margin-top: 88px;
}

#services .grid-services .service_card {
  appearance: none;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #242424;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

#services .service_card .service_description {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 12px 12px 20px;
}

#services .service_card_title {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 7px;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

#services .service_card .subline {
  display: block;
  flex: 1;
  width: 100%;
}

#services .service_card_plus {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: 16px;
  border-radius: 50%;
  background-color: #f0f0f0;
  color: #555;
  font-size: 0;
  transition: background-color 160ms ease, color 160ms ease;
}

#services .service_card_plus::before,
#services .service_card_plus::after {
  position: absolute;
  content: '';
  background: currentColor;
}

#services .service_card_plus::before {
  width: 16px;
  height: 1.5px;
}

#services .service_card_plus::after {
  width: 1.5px;
  height: 16px;
}

#services .service_card:is(:hover, :focus-visible) .service_card_title {
  text-decoration-line: underline;
}

#services .service_card:is(:hover, :focus-visible) .service_card_plus {
  background-color: #e2e2e2;
  color: #242424;
}

.service_dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: #242424;
  font: inherit;
  text-align: left;
}

.service_dialog:not([open]) {
  display: none;
}

.service_dialog::backdrop {
  background: rgba(0, 0, 0, 0.9);
}

.service_dialog_close {
  position: fixed;
  top: 2vh;
  right: 0;
  z-index: 1;
  width: 68px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii00IDAgMTggMTciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxNyI+PGcgdHJhbnNmb3JtPSJyb3RhdGUoNDUpIj48cGF0aCBkPSJtMCAwaDd2LTdoNXY3aDd2NWgtN3Y3aC01di03aC03eiIgb3BhY2l0eT0iLjQiLz48cGF0aCBkPSJtMSAxaDd2LTdoM3Y3aDd2M2gtN3Y3aC0zdi03aC03eiIgZmlsbD0iI2ZmZiIvPjwvZz48L3N2Zz4=") no-repeat center;
  background-size: 18px;
  opacity: 0.8;
  cursor: pointer;
  transition: opacity 300ms ease;
}

.service_dialog_close:hover {
  opacity: 1;
}

.service_dialog_reader {
  position: absolute;
  inset: 64px 30px 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

#services .service_card:focus-visible,
.service_dialog_close:focus-visible,
.service_dialog_reader:focus-visible {
  outline: 2px solid #f4f4f4;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px #0a0a0a;
}

.service_dialog_panel {
  width: 100%;
  max-width: 590px;
  margin: 0 auto;
  background: #fff;
  color: #242424;
  color-scheme: light;
  overflow-wrap: anywhere;
}

.service_dialog_image {
  display: flex;
  justify-content: center;
  height: 146px;
  overflow: hidden;
  background: #0a0a0a;
}

.service_dialog_image img {
  display: block;
  width: 300px;
  max-width: 100%;
  height: 163px;
  object-fit: cover;
  object-position: center;
  transform: translateY(-8px);
}

.service_dialog_copy {
  padding: 26px 32px 30px;
}

.service_dialog_copy h2 {
  margin: 0 0 13px;
  padding: 0;
  color: inherit;
  font: 400 1.5625rem/1.5 Martel, Georgia, serif;
}

.service_dialog_copy h3 {
  margin: 22px 0 7px;
  color: inherit;
  font: 400 1.125rem/1.5 Martel, Georgia, serif;
}

.service_dialog_copy p {
  margin: 0 0 17px;
  font-size: 1rem;
  line-height: 1.55;
}

.service_dialog_copy .service_dialog_eyebrow {
  margin-bottom: 8px;
  color: #08745f;
  font-size: 0.875rem;
}

.service_dialog_copy > :last-child {
  margin-bottom: 0;
}

@media screen and (max-width: 767px) {
  .service_dialog_close {
    top: 0;
    opacity: 1;
  }

  .service_dialog_reader {
    inset: 56px 14px 20px;
  }
}

@media screen and (max-width: 479px) {
  #services .service_card .service_description {
    padding: 15px 18px 21px;
  }

  .service_dialog_reader {
    inset: 54px 10px 18px;
  }

  .service_dialog_copy {
    padding: 20px;
  }

  .service_dialog_copy h2 {
    font-size: 1.4375rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #services .service_card_plus,
  .service_dialog_close {
    transition: none;
  }
}
