/* 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(248px, 72vw);
  padding: 1rem 1.05rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

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

.services-carousel .service-card > p {
  font-size: 0.78rem;
  line-height: 1.5;
  margin-bottom: 0.55rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.services-carousel .service-card__icon {
  width: 32px;
  height: 32px;
  margin-bottom: 0.55rem;
}

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

.services-carousel .service-card__list {
  margin-bottom: 0.55rem;
  flex: 1;
}

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

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

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

@media (min-width: 769px) {
  .services-carousel .service-card {
    flex: 0 0 min(300px, 30vw);
    min-height: 420px;
    padding: 1.35rem 1.4rem 1.15rem;
    gap: 0.35rem;
  }

  .services-carousel .service-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.45rem;
    line-height: 1.3;
  }

  .services-carousel .service-card > p {
    font-size: 0.86rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    -webkit-line-clamp: 4;
  }

  .services-carousel .service-card__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.75rem;
  }

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

  .services-carousel .service-card__list {
    margin-bottom: 0.85rem;
  }

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

  .services-carousel .service-card__link {
    font-size: 0.72rem;
    padding-top: 0.25rem;
  }

  .services-carousel .service-card__badge {
    font-size: 0.62rem;
    padding: 0.3rem 0.65rem;
  }
}

@media (min-width: 1280px) {
  .services-carousel .service-card {
    flex: 0 0 min(340px, 26vw);
    min-height: 480px;
    padding: 1.55rem 1.6rem 1.3rem;
  }

  .services-carousel .service-card h3 {
    font-size: 1.22rem;
  }

  .services-carousel .service-card > p {
    font-size: 0.9rem;
    -webkit-line-clamp: 5;
  }

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

@media (max-width: 768px) {
  .services-carousel--native .services-carousel__viewport {
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    cursor: default;
    mask-image: none;
    -webkit-mask-image: none;
    scroll-padding-inline: var(--page-pad-x);
  }

  .services-carousel--native .services-carousel__track {
    transform: none !important;
    animation: none !important;
    will-change: auto;
    width: max-content;
    padding-right: var(--page-pad-x);
  }

  .services-carousel--native .service-card {
    scroll-snap-align: center;
    flex: 0 0 min(248px, 78vw);
  }
}

@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;
  }
}

.services-carousel .service-card:hover {
  transform: none;
}

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