/* Services carousel */

.services__inner {
  max-width: var(--section-max);
  margin: 0 auto;
  padding: 0 var(--page-pad-x);
}

.services__head {
  margin-bottom: var(--space-xl);
}

.services-carousel {
  position: relative;
  width: calc(100% + 2 * var(--page-pad-x));
  margin-inline: calc(-1 * var(--page-pad-x));
}

.services-carousel__layout {
  display: flex;
  align-items: stretch;
  gap: var(--space-sm);
  padding-left: var(--page-pad-x);
}

.services-carousel__nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: var(--space-md) 0;
}

.services-carousel__tick {
  width: 3px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: height 0.35s var(--ease), background 0.35s, box-shadow 0.35s;
}

.services-carousel__tick:hover {
  background: rgba(110, 231, 255, 0.45);
}

.services-carousel__tick.is-active {
  height: 32px;
  background: linear-gradient(180deg, #6ee7ff, #2d5aa0);
  box-shadow: 0 0 14px rgba(110, 231, 255, 0.35);
}

.services-carousel__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  cursor: grab;
  padding: var(--space-xs) 0 var(--space-md);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.services-carousel__viewport.is-dragging {
  cursor: grabbing;
}

.services-carousel__track {
  display: flex;
  gap: var(--space-md);
  width: max-content;
  padding: 0 var(--space-sm) 0 0;
  will-change: transform;
}

.services-carousel__track--animated {
  animation: pf-services-marquee var(--marquee-duration, 28s) linear infinite;
}

.services-carousel__track.is-manual {
  animation: none !important;
}

@keyframes pf-services-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--loop-width, 960px)), 0, 0); }
}

.services-carousel__viewport.is-dragging,
.services-carousel__viewport.is-dragging *,
body.services-dragging,
body.services-dragging * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

.services-carousel__track,
.services-carousel .service-card {
  -webkit-user-drag: none;
}

.services-carousel.is-paused .services-carousel__track--animated {
  opacity: 0.98;
}

.services-carousel .service-card {
  flex: 0 0 min(300px, 78vw);
  padding: var(--space-md) var(--space-md) var(--space-sm);
  display: flex;
  flex-direction: column;
}

.services-carousel .service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.services-carousel .service-card > p {
  font-size: 0.85rem;
  line-height: 1.55;
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.services-carousel .service-card__icon {
  width: 36px;
  height: 36px;
  padding: 0;
  margin-bottom: var(--space-sm);
}

.services-carousel .service-card__icon svg {
  width: 20px;
  height: 20px;
}

.services-carousel .service-card__list {
  margin-bottom: var(--space-sm);
  flex: 1;
}

.services-carousel .service-card__list li {
  font-size: 0.8rem;
  padding: 0.35rem 0;
}

.services-carousel .service-card__link {
  margin-top: auto;
  font-size: 0.72rem;
}

.services-carousel .service-card__badge {
  top: var(--space-sm);
  right: var(--space-sm);
  font-size: 0.6rem;
  padding: 0.25rem 0.6rem;
}

@media (max-width: 640px) {
  .services-carousel__layout {
    flex-direction: column-reverse;
    padding-left: var(--page-pad-x);
    padding-right: var(--page-pad-x);
  }

  .services-carousel__nav {
    flex-direction: row;
    justify-content: center;
    padding: 0 0 var(--space-xs);
  }

  .services-carousel__tick {
    width: 18px;
    height: 3px;
  }

  .services-carousel__tick.is-active {
    width: 32px;
    height: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .services-carousel__viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .services-carousel .service-card {
    scroll-snap-align: start;
  }
}
