.services-cards-home {
  overflow: hidden;
  padding: 1.875rem 0 1.25rem;
  background: #f7f9fc;
}

.services-cards-home__track {
  display: flex;
  align-items: end;
  gap: 0.4375rem;
  width: 100vw;
  min-width: 0;
}

.services-cards-home__card {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: clamp(30.625rem, 30.8vw, 37rem);
  overflow: hidden;
  border-top: 0.375rem solid #043fa8;
  background: #3d3d3d;
  color: var(--color-text-inverse);
  text-decoration: none;
  isolation: isolate;
}

.services-cards-home__card:nth-child(2),
.services-cards-home__card:nth-child(6) {
  height: clamp(29rem, 29.2vw, 35rem);
}

.services-cards-home__card:nth-child(3),
.services-cards-home__card:nth-child(5) {
  height: clamp(27rem, 27.2vw, 32.625rem);
}

.services-cards-home__card:nth-child(4) {
  height: clamp(25.5rem, 25.5vw, 30.625rem);
}

.services-cards-home__image,
.services-cards-home__image img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.services-cards-home__overlay {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0%) 35%, rgb(0 0 0 / 58%) 100%);
}

.services-cards-home__title {
  margin: 0;
  padding: 1.25rem 0.75rem;
  color: inherit;
  font-family: var(--font-hero);
  font-size: 1.5625rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

a.services-cards-home__card:hover .services-cards-home__image,
a.services-cards-home__card:focus-visible .services-cards-home__image {
  transform: scale(1.05);
}

a.services-cards-home__card:focus-visible {
  outline: 0.1875rem solid var(--color-primary);
  outline-offset: -0.1875rem;
}

@media (max-width: 768px) {
  .services-cards-home {
    overflow-x: auto;
    padding: 1.25rem 0;
    scrollbar-width: none;
  }

  .services-cards-home::-webkit-scrollbar {
    display: none;
  }

  .services-cards-home__track {
    gap: 0.75rem;
    width: max-content;
    min-width: max-content;
    padding: 0 var(--section-padding-x);
    scroll-snap-type: x mandatory;
  }

  .services-cards-home__card,
  .services-cards-home__card:nth-child(n) {
    width: min(74vw, 20rem);
    height: 28rem;
    scroll-snap-align: start;
  }
}
