.services-section {
  overflow: hidden;
  padding-bottom: 0;
  background: #ffffff;
}

.services-layout {
  display: block;
}

.services-section .section-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.service-grid {
  position: relative;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: 100vw;
  margin: 0;
  transform: translateX(-50%);
}

.service-card,
.service-card:nth-child(2n) {
  position: relative;
  min-height: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  background: #102a3d;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  text-decoration: none;
}

.service-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(16, 42, 61, 0.02) 24%, rgba(16, 42, 61, 0.22) 54%, rgba(16, 42, 61, 0.92) 100%);
  content: "";
}

.service-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  filter: saturate(0.52) contrast(0.92) brightness(0.88);
  opacity: 0.68;
  transition: transform 500ms ease, filter 360ms ease, opacity 360ms ease;
}

.service-card:nth-child(1) .service-image {
  object-position: 52% center;
}

.service-card:nth-child(2) .service-image {
  object-position: 50% center;
}

.service-card:nth-child(3) .service-image {
  object-position: 52% center;
}

.service-card:nth-child(4) .service-image {
  object-position: 50% center;
}

.service-card:focus-visible .service-image {
  filter: saturate(1) contrast(1) brightness(1);
  opacity: 1;
  transform: scale(1.025);
}

@media (hover: hover) and (pointer: fine) {
  .service-card:hover .service-image {
    filter: saturate(1) contrast(1) brightness(1);
    opacity: 1;
    transform: scale(1.025);
  }
}

.service-card:focus-visible {
  z-index: 3;
  outline: 3px solid #69d68a;
  outline-offset: -3px;
}

.service-card-body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: clamp(22px, 2.2vw, 38px);
  color: #ffffff;
}

.service-card h3 {
  margin-bottom: 9px;
  color: #ffffff;
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
}

.service-card p {
  max-width: 440px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.86rem, 1vw, 1rem);
  line-height: 1.55;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
}

.service-card-link span {
  color: #76dfa0;
  font-size: 1.15em;
  transition: transform 180ms ease;
}

.service-card:hover .service-card-link span,
.service-card:focus-visible .service-card-link span {
  transform: translateX(4px);
}

@media (max-width: 820px) {
  .services-section .section-heading {
    margin-bottom: 28px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card,
  .service-card:nth-child(2n) {
    aspect-ratio: 16 / 11;
  }

  .service-card-body {
    padding: 24px;
  }

  .service-card h3 {
    font-size: 1.45rem;
  }
}

@media (min-width: 821px) and (max-width: 1100px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .service-card,
  .service-card:nth-child(2n) {
    min-height: 350px;
    aspect-ratio: auto;
  }

  .service-card p {
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-image {
    transition: none;
  }
}
