/* Override default splide styles to mimic bootstrap carousel */

html, body {
  overflow-x: hidden;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Width of arrow click zone */
:root {
  --splide-arrow-width: 60px;
  --splide-shadow-gutter: 16px;
}
@media (max-width: 767px) {
  :root {
    --splide-arrow-width: 25px;
    --splide-shadow-gutter: 16px;
  }
}

/* Make sure Splide is a positioning context */
.splide {
  position: relative;
  max-width: 100%;
}

.splide__pagination {
    bottom: 1.5em;
}
.splide__pagination__page.is-active {
    background: #ec2a3a;
}

/* Reserve space inside the slider so arrows don't overlap content */
.splide__track {
    overflow: hidden;
    width: calc(100% - (2 * var(--splide-arrow-width)));
    max-width: 100%;
    margin-left: var(--splide-arrow-width) !important;
    margin-right: var(--splide-arrow-width) !important;
    /* for box shadow */
    padding-left: var(--splide-shadow-gutter) !important;
    padding-right: var(--splide-shadow-gutter) !important;
    padding-top: var(--splide-shadow-gutter);
    padding-bottom: var(--splide-shadow-gutter);
    box-sizing: border-box;
}

.splide__list {
    height: auto;
    margin-left: calc(-1 * var(--splide-shadow-gutter)) !important;
    margin-right: calc(-1 * var(--splide-shadow-gutter)) !important;
    align-items: stretch;
}

.splide__slide {
    display: flex;
}
.splide__slide > div {
  display: flex;
  width: 100%;
}
.splide__slide > div > .card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

/* Put the arrow layer above the track, like .carousel-controls */
.splide__arrows {
  position: absolute;
  height: 100%;
  width: 100%;
  inset: 0;
  z-index: 10;
  pointer-events: none; /* only buttons get clicks */
}

/* Match: .carousel .carousel-control */
.splide__arrow {
  pointer-events: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--splide-arrow-width);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  height: 100%;
  transform: none;
}

/* Hide default Splide SVG arrow */
.splide__arrow svg {
  display: none !important;
}

/* LEFT arrow: background image + positioning */
.splide__arrow--prev {
  left: 0;
  background: url(../images/carousel_left.png) no-repeat center center;
}

/* RIGHT arrow: background image + positioning */
.splide__arrow--next {
  right: 0;
  background: url(../images/carousel_right.png) no-repeat center center;
}

/* On >= 992px, background-position shifts */
@media (min-width: 992px) {
  .splide__arrow--prev {
    background-position: right 14px center;
  }
  .splide__arrow--next {
    background-position: left 14px center;
  }
}

/* Support "white" variant (.white) 
   Add class "is-white-arrows" to the splide root to activate.
*/
.splide.is-white-arrows .splide__arrow--prev {
  background-image: url(../images/carousel_white_left_big.png);
}
.splide.is-white-arrows .splide__arrow--next {
  background-image: url(../images/carousel_white_right_big.png);
}

/* Ensure arrows remain visible even if Splide theme CSS sets opacity */
.splide__arrow:focus,
.splide__arrow:hover {
  outline: 0;
}
