.hpm-services-carousel {
  --hpm-gap: 22px;
  width: 100%;
  position: relative;
}

.hpm-services-carousel__viewport {
  box-sizing: border-box;
  width: 100%;
  margin-block: -14px -20px;
  margin-inline: 0;
  padding-block: 14px 20px;
  padding-inline: 0;
  overflow-x: hidden;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.hpm-services-carousel__viewport::-webkit-scrollbar { display: none; }

.hpm-services-carousel__track {
  box-sizing: border-box;
  width: 100%;
  padding-inline: var(--hpm-gap);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (0 * var(--hpm-gap))) / 3);
  gap: var(--hpm-gap);
}

.hpm-service-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e3e8ed;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
  scroll-snap-align: start;
  transition: transform .25s ease, box-shadow .25s ease;
}

.hpm-service-card:hover {
  transform: none;
  box-shadow: none;
}

.hpm-service-card__link {
  display: flex;
  height: 100%;
  color: #172b3a;
  flex-direction: column;
  text-decoration: none !important;
}

.hpm-service-card__link:focus-visible {
  outline: 3px solid #0f93db;
  outline-offset: -3px;
}

.hpm-service-card__number {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #0f93db;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.hpm-service-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 1.35 / 1;
  background: #dce8ef;
}

.hpm-service-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .35s ease;
}

.hpm-service-card:hover .hpm-service-card__media img { transform: scale(1.04); }

.hpm-service-card__body {
  display: flex;
  flex: 1;
  padding: 22px;
  flex-direction: column;
}

.hpm-service-card__title {
  color: #102c3c;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.hpm-service-card__text {
  margin-top: 12px;
  color: #52636f;
  font-size: 15px;
  line-height: 1.65;
}

.hpm-service-card__cta {
  margin-top: auto;
  padding-top: 18px;
  color: #0f93db;
  font-size: 15px;
  font-weight: 700;
}

.hpm-services-carousel__footer {
  display: flex;
  margin-top: 24px;
  align-items: center;
  justify-content: space-between;
}

.hpm-services-carousel__status { color: #52636f; font-weight: 600; }
.hpm-services-carousel__controls { display: flex; gap: 10px; }

.hpm-services-carousel__button {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #0f93db;
  border-radius: 50%;
  background: #fff;
  color: #0f93db;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: background .2s ease, color .2s ease;
}

.hpm-services-carousel__button:hover,
.hpm-services-carousel__button:focus-visible { background: #0f93db; color: #fff; }
.hpm-services-carousel__button:disabled { cursor: default; opacity: .4; }

@media (max-width: 1024px) {
  .hpm-services-carousel__track { grid-auto-columns: calc((100% - (3 * var(--hpm-gap))) / 2); }
}

@media (max-width: 767px) {
  .hpm-services-carousel { --hpm-gap: 14px; }
  .hpm-services-carousel__viewport { overflow-x: auto; }
  .hpm-services-carousel__track { grid-auto-columns: 88%; }
  .hpm-service-card__body { padding: 18px; }
  .hpm-service-card__title { font-size: 20px; }
  .hpm-service-card__text { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hpm-services-carousel__viewport { scroll-behavior: auto; }
  .hpm-service-card,
  .hpm-service-card__media img { transition: none; }
}
