/* ==========================================================================
   Turnstile Carousel — seamless, infinite, native-smooth
   Same technique Apple uses on apple.com/mac (flex row + CSS scroll-snap,
   native momentum scrolling), with clone-and-jump added on top so it loops
   forever instead of stopping at the last card.
   ========================================================================== */

.turnstile {
  position: relative;
}

.turnstile-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: auto; /* we drive smoothness via native momentum + JS scrollBy(smooth) on button clicks, not this */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
}

.turnstile-viewport::-webkit-scrollbar {
  display: none;
}

.turnstile-viewport.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none; /* don't fight the user's own drag with snapping */
}

.turnstile-track {
  display: flex;
  gap: 24px;
}

.turnstile-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  /* width is set inline by JS as a % based on items-per-view, so it stays
     responsive at any breakpoint without a resize-triggered rebuild */
}

/* Scoped to the card photo only — a bare `.turnstile-item img` also catches
   the small arrow icon inside each "get started" link.
   The handoff shipped 3/4 portrait, but this repo's service images are
   landscape (506x341, ratio 1.48); forcing 3/4 made object-fit crop about
   half of every photo away and upscale the rest. 3/2 keeps card heights
   uniform with almost no crop. */
.turnstile-item .wpb_wrapper > p > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 12px;
}

/* Arrow controls */
.turnstile-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.turnstile-arrow:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: translateY(-50%) scale(1.05);
}

.turnstile-arrow--prev {
  left: -22px;
}

.turnstile-arrow--next {
  right: -22px;
}

@media (max-width: 767px) {
  .turnstile-arrow {
    display: none; /* rely on native swipe on touch devices */
  }
}
