/* -----------------------------------------
   Sterling Carousel
   Replaces the Carousel Anything (Slick) styling.
   ----------------------------------------- */

.strl-carousel {
  position: relative;
  box-sizing: border-box;
  --strl-gap: 20px;
  --strl-per-view: 3;
  --strl-speed: 500ms;
}

.strl-carousel:focus {
  outline: none;
}

.strl-carousel *,
.strl-carousel *::before,
.strl-carousel *::after {
  box-sizing: border-box;
}

/* Viewport clips the track. Without JS it is a horizontally scrollable row. */
.strl-carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.strl-carousel.is-ready .strl-carousel__viewport {
  overflow: hidden;
  scroll-snap-type: none;
  touch-action: pan-y;
}

.strl-carousel__track {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: var(--strl-gap);
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.strl-carousel.is-ready .strl-carousel__track {
  transition: transform var(--strl-speed) ease;
}

.strl-carousel.is-dragging .strl-carousel__track,
.strl-carousel.no-transition .strl-carousel__track {
  transition: none;
}

.strl-carousel__slide {
  flex: 0 0 auto;
  width: var(--strl-slide-width, calc((100% - (var(--strl-gap) * (var(--strl-per-view) - 1))) / var(--strl-per-view)));
  min-width: 0;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
}

.strl-carousel.is-dragging .strl-carousel__slide {
  user-select: none;
  -webkit-user-select: none;
}

.strl-carousel.is-dragging .strl-carousel__slide img,
.strl-carousel.is-dragging .strl-carousel__slide a {
  pointer-events: none;
}

/* Let the slide content fill the slide so cards line up. Column flex items
   stretch by default, which also keeps Bakery row negative margins intact. */
.strl-carousel__slide > * {
  margin-bottom: 0;
}

.strl-carousel__slide > .imagebox,
.strl-carousel__slide > .wpb_content_element {
  flex: 1 1 auto;
}

/* Bakery inner rows are floated. Contain them inside the slide. */
.strl-carousel__slide > .vc_row::after {
  content: "";
  display: table;
  clear: both;
}

/* -----------------------------------------
   Arrows
   ----------------------------------------- */
.strl-carousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 50px;
  height: 50px;
  margin: 0;
  padding: 0;
  /* The theme styles every button with !important, so these must win. */
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #222 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  min-width: 0 !important;
  cursor: pointer;
  transform: translateY(-50%);
  transition: box-shadow .5s, border-color .5s, opacity .3s;
  -webkit-appearance: none;
  appearance: none;
}

.strl-carousel__arrow::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
}

.strl-carousel__arrow--prev {
  left: -70px;
}

.strl-carousel__arrow--prev::before {
  margin-left: 21px;
  transform: rotate(-135deg);
}

.strl-carousel__arrow--next {
  right: -70px;
}

.strl-carousel__arrow--next::before {
  margin-left: 15px;
  transform: rotate(45deg);
}

.strl-carousel__arrow:hover,
.strl-carousel__arrow:focus-visible {
  box-shadow: 7.5px 12.99px 30px 0 rgba(34, 35, 40, .137);
}

.strl-carousel__arrow:focus-visible {
  outline: 2px solid #004987 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(0, 73, 135, .25) !important;
}

.strl-carousel__arrow[disabled] {
  cursor: default;
  opacity: .35;
  box-shadow: none;
}

/* Keep the arrows inside the page on narrower screens so nothing overflows. */
@media (max-width: 1339px) {
  .strl-carousel__arrow {
    background: rgba(255, 255, 255, .9) !important;
  }

  .strl-carousel__arrow--prev {
    left: -12px;
  }

  .strl-carousel__arrow--next {
    right: -12px;
  }
}

/* On phones the arrows move into the strip under the slides, beside the
   dots, so they never sit on top of card text. */
@media (max-width: 767px) {
  .strl-carousel.has-arrows {
    padding-bottom: 28px;
  }

  .strl-carousel__arrow {
    top: auto;
    bottom: 0;
    width: 28px;
    height: 28px;
    background: transparent !important;
    transform: none;
  }

  .strl-carousel__arrow--prev {
    left: 0;
  }

  .strl-carousel__arrow--prev::before {
    margin-left: 11px;
  }

  .strl-carousel__arrow--next {
    right: 0;
  }

  .strl-carousel__arrow--next::before {
    margin-left: 6px;
  }
}

/* No JS: hide the controls, the row scrolls natively. */
.strl-carousel:not(.is-ready) .strl-carousel__arrow,
.strl-carousel:not(.is-ready) .strl-carousel__dots,
.strl-carousel.is-static .strl-carousel__arrow,
.strl-carousel.is-static .strl-carousel__dots {
  display: none;
}

/* -----------------------------------------
   Dots
   ----------------------------------------- */
.strl-carousel.has-dots {
  padding-bottom: 28px;
}

.strl-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 28px;
  margin: 0;
  padding: 0;
}

.strl-carousel__dot {
  display: block;
  width: 10px !important;
  height: 10px !important;
  min-width: 0 !important;
  margin: 0 4px !important;
  padding: 0 !important;
  border: 1px solid #e9e9e9 !important;
  border-radius: 50% !important;
  background: #e9e9e9 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  cursor: pointer;
  transform: scale(.6);
  transition: background-color .5s, border-color .5s, transform .2s;
  -webkit-appearance: none;
  appearance: none;
}

.strl-carousel__dot[aria-current="true"] {
  border-color: #3498db !important;
  background: #3498db !important;
  transform: scale(1);
}

.strl-carousel__dot:focus-visible {
  outline: 2px solid #004987 !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 6px rgba(0, 73, 135, .25) !important;
  transform: scale(1);
}

/* -----------------------------------------
   Reduced motion
   ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .strl-carousel.is-ready .strl-carousel__track,
  .strl-carousel__arrow,
  .strl-carousel__dot {
    transition: none;
  }
}
