/*------------------------------------------------------------------------------
  Content Services Card — horizontal carousel
  4 cards on desktop, 2 on tablet, 1 on mobile. The track is a native
  horizontal scroller (scroll-snap), so touch, trackpad and keyboard keep
  working even when the arrow buttons are not available.
------------------------------------------------------------------------------*/

.cs-carousel {
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
}

.cs-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  margin-right: -0.9375rem;
  margin-left: -0.9375rem;
  padding: 0.25rem 0 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.cs-carousel__track::-webkit-scrollbar {
  display: none;
}

.cs-carousel__track:focus {
  outline: none;
}

.cs-carousel__track:focus-visible {
  outline: 2px solid var(--accent, #ff2a42);
  outline-offset: 4px;
}

/* The card keeps its Bootstrap column padding, so the 15px gutter between
   cards is preserved without adding an extra gap. */
.cs-carousel__track > [data-content-services-card] {
  flex: 0 0 25%;
  max-width: 25%;
  margin-bottom: 0 !important;
  scroll-snap-align: start;
}

/* A secondary track created by the JS fallback inside an existing .row
   must not add a second set of negative margins. */
.cs-carousel__track--nested {
  margin-right: 0;
  margin-left: 0;
}

@media (max-width: 991.98px) {
  .cs-carousel__track > [data-content-services-card] {
    flex-basis: 50%;
    max-width: 50%;
  }
}

@media (max-width: 575.98px) {
  .cs-carousel__track > [data-content-services-card] {
    flex-basis: 100%;
    max-width: 100%;
  }
}

/*------------------------------------------------------------------------------
  Arrow buttons
------------------------------------------------------------------------------*/
.cs-carousel__btn {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-top: -1.25rem;
  padding: 0;
  border: 1px solid var(--border, #eaeaea);
  border-radius: 50%;
  background-color: #fff;
  color: var(--text, #000);
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, opacity 0.2s ease;
}

.cs-carousel__btn--prev {
  left: 0.25rem;
}

.cs-carousel__btn--next {
  right: 0.25rem;
}

.cs-carousel__btn:hover:not(:disabled) {
  border-color: var(--text, #000);
  background-color: var(--text, #000);
  color: #fff;
}

.cs-carousel__btn:focus-visible {
  outline: 2px solid var(--accent, #ff2a42);
  outline-offset: 3px;
}

.cs-carousel__btn:disabled {
  opacity: 0.35;
  box-shadow: none;
  cursor: default;
}

/* Nothing to scroll: no need to show the controls. */
.cs-carousel--static .cs-carousel__btn {
  display: none;
}

@media (max-width: 575.98px) {
  .cs-carousel__btn {
    width: 2.25rem;
    height: 2.25rem;
    margin-top: -1.125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-carousel__track {
    scroll-behavior: auto;
  }

  .cs-carousel__btn {
    transition: none;
  }
}
