/* See https://alvarotrigo.com/blog/create-a-slider-with-pure-CSS/ for explanations */

/* Root Variables */
:root {
    --slide-height: 35rem;
}

@media screen and (max-width: 768px) {
    :root {
        --slide-height: 15rem;
    }
  }

.slider-container {
    background: linear-gradient(149deg, rgb(10, 228, 180) 0%, #e8f3ca 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

@media screen and (max-width: 768px) {
    .slider-container {
        background: linear-gradient(149deg, rgb(10, 228, 180) 0%, #e8f3ca 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }
  }


.slider {
    width: 100%;
    max-width: 37.5rem;
    height: var(--slide-height);
    margin: 0.5rem;
    text-align: center;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

@media screen and (max-width: 768px) {
    .slider {
        width: 100%;
        max-width: 37.5rem;
        height: var(--slide-height);
        margin: 0.5rem;
        text-align: center;
        border-radius: 1rem;
        position: relative;
        overflow: hidden;
    }
  }

.slides {
    display: flex;
    overflow-x: scroll;
    position: relative;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

@media screen and (max-width: 768px) {
    .slides {
        display: flex;
        overflow-x: scroll;
        position: relative;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;  /* Firefox */
        -ms-overflow-style: none;  /* IE and Edge */
    }
  }

.slide:nth-of-type(even) {
    background-color: white;
}


@media screen and (max-width: 768px) {
    .slide:nth-of-type(even) {
        background-color: white;
    }
  }

.slide {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 100%;
    height: var(--slide-height);
    /* min-width to ensure slides don't shrink */
    min-width: 100%;
    margin-right: 0;
    box-sizing: border-box;
    background: whitesmoke;
    transform-origin: center center;
    transform: scale(1);
    scroll-snap-align: center;
    /* position relative for absolute positioning of arrows */
    position: relative;
}

@media screen and (max-width: 768px) {
    .slide {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
        width: 100%;
        height: var(--slide-height);
        /* min-width to ensure slides don't shrink */
        min-width: 100%;
        margin-right: 0;
        box-sizing: border-box;
        background: whitesmoke;
        transform-origin: center center;
        transform: scale(1);
        scroll-snap-align: center;
        /* position relative for absolute positioning of arrows */
        position: relative;
    }
    
  }

.slide__text {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: sans-serif;
}

@media screen and (max-width: 768px) {
    .slide__text {
        display: none; /* hide on mobile */
  }
}

.slide a {
    background: none;
    border: none;
}

a.slide__prev,
.slider::before {
    transform: rotate(135deg);
    -webkit-transform: rotate(135deg);
    left: 5%;
}

a.slide__next,
.slider::after {
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    right: 5%;
}

.slider::before,
.slider::after,
.slide__prev,
.slide__next {
    position: absolute;
    top: 48%;
    width: 1.5625rem;
    height: 1.5625rem;
    border: solid black;
    border-width: 0 0.125rem 0.125rem 0;
    padding: 0.125rem;
    box-sizing: border-box;
}

@media screen and (max-width: 768px) {
    .slider::before,
    .slider::after,
    .slide__prev,
    .slide__next {
        position: absolute;
        top: 48%;
        width: 0.8rem;
        height: 0.8rem;
        border: solid black;
        border-width: 0 0.125rem 0.125rem 0;
        box-sizing: border-box;
        padding: 0.125rem;
        margin:-0.25rem;
    }
}

.slider::before,
.slider::after {
  content: '';
  z-index: 1;
  background: none;
  pointer-events: none;
}

.slider__nav {
    box-sizing: border-box;
    position: absolute;
    bottom: 1%;
    left: 50%;
    width: 12.5rem;
    margin-left: -6.25rem;
    text-align: center;
}

@media screen and (max-width: 768px) {
    .slider__nav {
        width: 10rem;
        margin-left: -5rem;
        bottom: 0.5%;
    }
}

.slider__navlink {
    display: inline-block;
    height: 0.625rem;
    width: 0.625rem;
    border-radius: 50%;
    background-color: black;
    margin: 0 0.3125rem 0 0.3125rem;
}

@media screen and (max-width: 768px) {
    .slider__navlink {
        height: 0.5rem;
        width: 0.5rem;
        margin: 0 0.25rem 0 0.25rem;
    }
}

/* hide scrollbar in Chrome/Safari/Opera */
.slides::-webkit-scrollbar {
    display: none;
}

.slide__title {
    position: absolute;
    top: 0rem;
    width: 100%;
    text-align: center;
    color: #333;
    z-index: 2;
    font-size: 1rem;
}

@media screen and (max-width: 768px) {
    .slide__title {
        display: none;
    }
}

.slide__image {
    width: 80%;
    height: auto;
    max-height: 70%;
    object-fit: contain;
    margin: 0;
    display: block;
}

@media screen and (max-width: 768px) {
    .slide__image {
        width: 80%;
        height: 100%;
        max-height: 100%;
        object-fit: contain;
        margin: 0;
    }
}

.slide__cover_image {
    width: 80%;
    height: auto;
    max-height: 90%;
    object-fit: contain;
    margin: 0;
    display: block;
}

.slide__description {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    text-align: center;
    color: #333;
    font-size: 0.9rem;
}

@media screen and (max-width: 768px) {
    .slide__description {
        display: none;
    }
}