.home-our-services {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
  padding: 96px 24px;
  min-height: 1195px;
  background: var(--background-medium, #f8fafc);
}

/* Location pages: tighten section depth and drop CTA lower with less trailing whitespace. */
.sample-parent-page .home-our-services {
  padding: 88px 24px 52px;
  min-height: 0;
}

.sample-parent-page .home-our-services__inner {
  gap: 30px;
}

.sample-parent-page .home-our-services__header {
  gap: 16px;
}

.sample-parent-page .home-our-services__cards {
  margin-top: 8px;
}

.sample-parent-page .home-our-services__bg-shape {
  top: clamp(360px, 33vw, 420px);
  height: clamp(420px, 34vw, 500px);
}

.sample-parent-page .home-our-services__cta-wrap {
  margin-top: 18px;
}

.home-our-services__bg-shape {
  position: absolute;
  left: 50%;
  top: 418px;
  transform: translateX(-50%);
  width: min(1060px, calc(100vw - clamp(28px, 8vw, 156px)));
  height: 586px;
  border-radius: var(--xl, 48px);
  background: var(--accent-tertiary, #d9edf8);
  z-index: 0;
}

.home-our-services__inner {
  position: relative;
  z-index: 1;
  width: min(100%, 1290px);
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.home-our-services__header {
  width: min(850px, 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
}

.home-our-services__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: 60px;
  border: 1px solid #5fa8d3;
  background: rgba(21, 50, 75, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-light-secondary, #dde5ec);
  font-family: var(--eyebrow-font-family, 'Inter-Bold', sans-serif);
  font-size: var(--eyebrow-font-size, 14px);
  line-height: var(--eyebrow-line-height, 110%);
  letter-spacing: var(--eyebrow-letter-spacing, 0.012em);
  font-weight: var(--eyebrow-font-weight, 700);
}

.home-our-services__eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #5fa8d3;
}

.home-our-services__title {
  margin: 0;
  width: 100%;
  text-align: center;
  font-family: var(--headings-h2-font-family, 'JosefinSans-Regular', sans-serif);
  font-size: clamp(40px, 4.25vw, 61.04px);
  line-height: var(--headings-h2-line-height, 110%);
  font-weight: var(--headings-h2-font-weight, 400);
}

.home-our-services__title-primary {
  color: #15324b;
}

.home-our-services__title-accent {
  color: #5fa8d3;
}

.home-our-services__subtitle {
  margin: 0;
  width: min(100%, 850px);
  color: var(--text-dark, #5f5d55);
  text-align: center;
  font-family: var(--body-large-font-family, 'Inter-Regular', sans-serif);
  font-size: var(--body-large-font-size, 20px);
  line-height: var(--body-large-line-height, 160%);
  font-weight: var(--body-large-font-weight, 400);
}

.home-our-services__cards {
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 36px;
  min-height: clamp(320px, 36vw, 560px);
  overflow: hidden;
  padding: 0;
  scrollbar-width: none !important;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.home-our-services__cards::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
  background: transparent;
}

.home-our-services.has-no-overflow .home-our-services__cards {
  justify-content: center;
}

.home-our-services__cards-rail {
  width: calc(100vw - clamp(20px, 4vw, 56px));
  margin-left: calc(50% - 50vw + clamp(10px, 2vw, 28px));
  margin-right: calc(50% - 50vw + clamp(10px, 2vw, 28px));
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-our-services__cards-viewport {
  position: static;
  min-width: 0;
}

.home-our-services__cards-viewport::before,
.home-our-services__cards-viewport::after {
  display: none;
}

.home-our-services__cards-viewport::before {
  left: 0;
  background: linear-gradient(90deg, var(--background-medium, #f8fafc) 0%, rgba(248, 250, 252, 0) 100%);
}

.home-our-services__cards-viewport::after {
  right: 0;
  background: linear-gradient(270deg, var(--background-medium, #f8fafc) 0%, rgba(248, 250, 252, 0) 100%);
}

.home-our-services.is-at-start .home-our-services__cards-viewport::before {
  opacity: 0;
}

.home-our-services.is-at-end .home-our-services__cards-viewport::after {
  opacity: 0;
}

.home-our-services.has-no-overflow .home-our-services__cards-viewport::before,
.home-our-services.has-no-overflow .home-our-services__cards-viewport::after {
  opacity: 0;
}

.home-our-services__scroll-btn {
  display: none;
}

.home-our-services__scroll-btn svg {
  width: 40px;
  height: 40px;
  display: block;
  overflow: visible;
}

.home-our-services__controls {
  display: none;
}

.home-our-services__scroll-btn svg rect,
.home-our-services__scroll-btn svg path {
  transition: fill 180ms ease, stroke 180ms ease;
}

.home-our-services__scroll-btn:disabled {
  opacity: 1;
  cursor: default;
}

.home-our-services__scroll-btn:disabled svg rect {
  stroke: #9abbd1;
}

.home-our-services__scroll-btn:disabled svg path {
  fill: #9abbd1;
}

.home-our-services__card {
  position: relative;
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  width: auto;
  min-height: clamp(320px, 36vw, 560px);
  flex: 1 1 0;
  min-width: 0;
  transition: flex-grow 460ms cubic-bezier(0.2, 0.75, 0.2, 1), box-shadow 260ms ease;
  background: #15324b;
  box-shadow: none;
}

.home-our-services__card:hover,
.home-our-services__card:focus-within {
  box-shadow: none;
}

.home-our-services__card.is-active {
  width: auto;
  flex: 1.9 1 0;
}

.home-our-services__card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--service-card-bg) center / cover no-repeat;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* The first uploaded card image is mirrored in source; flip only its bg layer back. */
.home-our-services__card:first-child::before {
  transform: scaleX(-1) translateZ(0);
}

.home-our-services__card-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 1;
  background: linear-gradient(180deg, rgba(21, 50, 75, 0) 0%, rgba(21, 50, 75, 0.63) 36.0577%, rgba(21, 50, 75, 1) 100%);
}

.home-our-services__icon-pill {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 1px solid #5fa8d3;
  background: rgba(21, 50, 75, 0.8);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 220ms ease;
}

.home-our-services__card:hover .home-our-services__icon-pill,
.home-our-services__card:focus-within .home-our-services__icon-pill {
  transform: translateY(-2px) scale(1.04);
  background: rgba(21, 50, 75, 0.92);
}

.home-our-services__card-icon {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-our-services__card:hover .home-our-services__card-icon,
.home-our-services__card:focus-within .home-our-services__card-icon {
  transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .home-our-services__card,
  .home-our-services__icon-pill,
  .home-our-services__card-icon {
    transition: none;
  }

  .home-our-services__card:hover .home-our-services__icon-pill,
  .home-our-services__card:focus-within .home-our-services__icon-pill,
  .home-our-services__card:hover .home-our-services__card-icon,
  .home-our-services__card:focus-within .home-our-services__card-icon {
    transform: none;
  }
}

.home-our-services__icon-media {
  width: 30px;
  height: 30px;
  display: inline-flex;
  position: relative;
}

.home-our-services__card-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-our-services__card-icon--svg {
  display: inline-flex;
  width: 100%;
  height: 100%;
  color: #ffffff;
}

.home-our-services__card-icon--svg svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1.28);
  transform-origin: center;
}

.home-our-services__card-collapsed-title {
  position: absolute;
  left: clamp(10px, 1.2vw, 24px);
  right: clamp(10px, 1.2vw, 20px);
  bottom: clamp(12px, 1.4vw, 28px);
  transform: none;
  color: #fff;
  font-size: clamp(12px, 1.05vw, 24px);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  text-wrap: balance;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  z-index: 2;
  transition: opacity 320ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.home-our-services__card.is-active .home-our-services__card-collapsed-title {
  opacity: 0;
}

.home-our-services__card-expanded {
  position: absolute;
  left: clamp(12px, 1.25vw, 26px);
  right: clamp(12px, 1.25vw, 26px);
  bottom: clamp(12px, 1.2vw, 24px);
  z-index: 2;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms cubic-bezier(0.2, 0.75, 0.2, 1), transform 320ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.home-our-services__card.is-active .home-our-services__card-expanded {
  opacity: 1;
  transform: none;
}

.home-our-services__card-expanded h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(16px, 1.45vw, 32px);
  line-height: 1.05;
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.home-our-services__card-expanded p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(11px, 0.9vw, 17px);
  line-height: 1.4;
  max-width: 520px;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.home-our-services__card-link {
  border: 0;
  border-radius: 999px;
  background: #5fa8d3;
  color: var(--text-light, #ffffff);
  text-align: left;
  font-family: var(--cta-large-font-family, 'PlusJakartaSans-SemiBold', sans-serif);
  font-size: var(--cta-large-font-size, 20px);
  line-height: var(--cta-large-line-height, 130%);
  font-weight: var(--cta-large-font-weight, 600);
  padding: 12px 28px;
  cursor: pointer;
}

.home-our-services__cta-wrap {
  display: flex;
  justify-content: center;
}

.home-our-services__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  border: 2px solid #2f80b7;
  background: #2f80b7;
  color: var(--text-light, #ffffff);
  text-decoration: none;
  padding: 16px 32px;
  text-align: left;
  font-family: var(--cta-large-font-family, 'PlusJakartaSans-SemiBold', sans-serif);
  font-size: var(--cta-large-font-size, 20px);
  line-height: var(--cta-large-line-height, 130%);
  font-weight: var(--cta-large-font-weight, 600);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.home-our-services__cta:hover,
.home-our-services__cta:focus-visible {
  background: #15324b;
  border-color: #15324b;
  color: #fff;
}

.home-our-services__cta-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
}

/* About page reveal pre-hide: JS timeline animates these to opacity 1. */
body.page-template-about .home-our-services__bg-shape,
body.page-template-about .home-our-services__eyebrow,
body.page-template-about .home-our-services__title,
body.page-template-about .home-our-services__subtitle,
body.page-template-about .home-our-services__card,
body.page-template-about .home-our-services__scroll-btn,
body.page-template-about .home-our-services__cta {
  opacity: 0;
}

.home-our-services__modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-our-services__modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-our-services__modal.is-closing {
  opacity: 0;
  visibility: visible;
  pointer-events: auto;
}

.home-our-services__modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 50, 75, 0.6);
  backdrop-filter: blur(4px);
}

.home-our-services__modal-shell {
  position: relative;
  z-index: 2;
  width: min(1290px, 100%);
  max-height: calc(100vh - 48px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 24px;
  background: #dde5ec;
  border: 1px solid rgba(21, 50, 75, 0.18);
  padding: 48px 40px 32px;
  transform: translateY(12px) scale(0.985);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-our-services__modal.is-open .home-our-services__modal-shell {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.home-our-services__modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #2f80b7;
  background: transparent;
  color: #2f80b7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.home-our-services__modal-layout {
  display: grid;
  grid-template-columns: minmax(280px, 40%) minmax(0, 1fr);
  gap: clamp(24px, 3.2vw, 46px);
  align-items: start;
}

.home-our-services__modal-media-col {
  align-self: stretch;
}

.home-our-services__modal-media-wrap {
  position: sticky;
  top: 8px;
  height: min(calc(100vh - 190px), 640px);
  max-height: 100%;
  overflow: hidden;
  border-radius: 24px;
}

.home-our-services__modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Modals are moved under body at runtime, so scope by body template class. */
body[class*="page-template-sample-parent"] .home-our-services__modal-image,
body.page-template-templatessample-parent-php .home-our-services__modal-image {
  object-position: right center !important;
}

.home-our-services__modal-content {
  min-width: 0;
}

.home-our-services__modal-title {
  margin: 0 0 16px;
  color: #15324b;
  font-size: clamp(36px, 3.4vw, 48px);
  line-height: 1.1;
  font-weight: 400;
}

.home-our-services__modal-body {
  color: #15324b;
  font-size: 16px;
  line-height: 1.6;
}

.home-our-services__modal-body p {
  margin: 0 0 14px;
}

.home-our-services__modal-accordions {
  margin-top: 20px;
  border-top: 1px solid rgba(21, 50, 75, 0.2);
}

.home-our-services__accordion-item {
  border-bottom: 1px solid rgba(21, 50, 75, 0.2);
}

.home-our-services__accordion-heading {
  margin: 0;
}

.home-our-services__accordion-toggle {
  width: 100%;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: transparent;
  border: 0;
  color: #15324b;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
}

.home-our-services__accordion-title {
  display: inline-block;
}

.home-our-services__accordion-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  position: relative;
}

.home-our-services__accordion-icon svg {
  position: absolute;
  inset: 0;
  width: 40px;
  height: 40px;
  display: block;
  transition: opacity 220ms ease, transform 220ms ease;
}

.home-our-services__accordion-minus {
  opacity: 0;
  transform: scale(0.88);
}

.home-our-services__accordion-toggle[aria-expanded="true"] .home-our-services__accordion-plus {
  opacity: 0;
  transform: scale(0.88);
}

.home-our-services__accordion-toggle[aria-expanded="true"] .home-our-services__accordion-minus {
  opacity: 1;
  transform: scale(1);
}

.home-our-services__accordion-panel {
  overflow: hidden;
  padding: 0 0 20px;
  color: #15324b;
  font-size: 16px;
  line-height: 1.6;
}

.home-our-services__accordion-panel p {
  margin: 0 0 12px;
}

.home-our-services__accordion-subheading {
  margin: 12px 0 8px;
  color: #15324b;
  font-family: var(--font-secondary);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .home-our-services__cards-rail {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .home-our-services__cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
    overflow: visible;
    padding: 0 20px;
  }

  .home-our-services__cards-rail {
    gap: 0;
  }

  .home-our-services__scroll-btn {
    display: none;
  }

  .home-our-services__card {
    width: 100%;
    flex: none;
    min-height: 360px;
  }

  .home-our-services__card.is-active {
    width: 100%;
    flex: none;
  }

  .home-our-services__card-collapsed-title {
    opacity: 0;
    pointer-events: none;
  }

  .home-our-services__card-expanded {
    opacity: 1;
    transform: none;
  }

  .home-our-services__card-expanded h3 {
    font-size: 32px;
  }

  .home-our-services__card-expanded p {
    font-size: 18px;
  }
}

@media (max-width: 780px) {
  .home-our-services {
    padding: 84px 20px;
    min-height: auto;
  }

  .home-our-services__bg-shape {
    top: 336px;
    width: calc(100% - 24px);
    height: 460px;
    border-radius: 32px;
  }

  .home-our-services__inner {
    width: 100%;
    padding: 0;
    gap: 36px;
  }

  .home-our-services__subtitle {
    font-size: 16px;
  }

  .home-our-services__cards {
    margin-top: 12px;
    gap: 10px;
    padding: 0 12px;
  }

  .home-our-services__card {
    width: 100%;
    min-height: 320px;
  }

  .home-our-services__card.is-active {
    width: 100%;
    flex: none;
  }

  .home-our-services__card-collapsed-title {
    left: 12px;
    right: 12px;
    bottom: 12px;
    font-size: clamp(12px, 2.8vw, 18px);
  }

  .home-our-services__modal {
    padding: 12px;
  }

  .home-our-services__cards-rail {
    gap: 0;
  }

  .home-our-services__cards-viewport::before,
  .home-our-services__cards-viewport::after {
    display: none;
  }

  .home-our-services__controls {
    display: none;
  }

  .home-our-services__scroll-btn {
    display: none;
  }

  .home-our-services__modal-shell {
    padding: 44px 22px 24px;
    max-height: calc(100vh - 24px);
  }

  .home-our-services__modal-close {
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
  }

  /* Location pages often use longer service H2 strings; clamp for home-like mobile card rhythm. */
  .sample-parent-page .home-our-services__card-expanded h3 {
    font-size: clamp(22px, 6.3vw, 30px);
    line-height: 1.12;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .sample-parent-page .home-our-services__card-expanded p {
    font-size: clamp(13px, 4vw, 18px);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  .home-our-services__modal-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .home-our-services__modal-media-wrap {
    position: relative;
    top: auto;
    height: clamp(220px, 44vw, 360px);
  }
}
