.slideshow {
    position: relative;
    height: 70vh;
    margin: 2rem 0;
}

/* Tablet (> 640px) */
@media screen and (min-width: 40em) {
    .slideshow {
        position: relative;
        height: 75vh;
        margin: 2rem 0;
    }
}

.slideshow-slide {
    position: absolute;
    display: flex;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    opacity: 0;
    transition: 100ms;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.slideshow-slide.active {
    opacity: 1;
}

.slideshow-slide-video,
.slideshow-slide-picture {
    display: flex;
    justify-content: center;
    height: 20%;
    flex-grow: 1;
}

.slideshow-slide-picture-image {
    display: block;
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.slideshow-slide-video,
.slideshow-slide-picture img {
    /* border-radius: 4px; */
}

.slideshow-slide-caption {
    max-width: 800px;
    margin: 1rem;
}

/* Tablet */
@media only screen and (min-width: 36rem) {
    
    .grid-slideshow {
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        column-gap: 1.25rem
    }

    .slideshow-figure {
        grid-column: span 4;
        grid-row: 1;
    }
    
}

/* Tablet */
@media only screen and (min-width: 92rem) {
    .slideshow {
        position: relative;
        margin: auto;
    }
}


/* 
    Fullscreen 
*/

.slideshow.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    margin-top: 0;
}

.slideshow-expand {
    display: none;
}

.slideshow button {
    touch-action: manipulation; 
}

/* Tablet (> 768px) */
@media screen and (min-width: 48em) {
    .slideshow-expand {
        display: block;
        position: absolute;
        width: 100%;
        opacity: 0;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        cursor: url("../../icons/zoom-in.svg"), auto;
    }

    .slideshow.fullscreen .slideshow-expand {
        cursor: url("../../icons/zoom-out.svg"), auto;
    }

    .slideshow-expand span {
        opacity: 0;
        pointer-events: none;
    }

    .slideshow.fullscreen {
        position: fixed;
        flex-direction: column;
        z-index: 100;
        aspect-ratio: unset;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        min-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        background-position: center;
        background-color: white;
        background-repeat: no-repeat;
        margin-bottom: 0 !important;      
    }

    .slideshow.fullscreen .slideshow-slide {
        padding: 1.5rem 1rem 1.5rem;
    }

    .slideshow.fullscreen .slideshow-slide-caption {
        margin: 1rem auto;
    }
}

.overflow {
    overflow: hidden;
}




/* 
    Actions 
*/

.slideshow-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
}

.slideshow-arrow span {
    opacity: 0;
}

.slideshow-arrow.prev {
    left: 0;
}

.slideshow-arrow.next {
    right: 0;
}

/*  
    Slideshow Buttons 
*/

.slideshow-buttons {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    box-sizing: border-box;
    pointer-events: none;
}

.slideshow-arrow {
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    margin-top: auto;
    opacity: 0;
}

.slideshow-arrow.prev {
    cursor: url("../../icons/arrow_prev.svg"), auto;
}

.slideshow-arrow.next {
    cursor: url("../../icons/arrow_next.svg"), auto;
}


/* 
    Expand Target 
*/

.image-expand {
    content: " ";
    display: block;
    position: absolute;
    width: 100%;
    opacity: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

.project-cover-image,
figure.block-gallery-figure,
figure.blocks-figure {
    position: relative;
}

button.project-cover-image-fullscreen,
button.blocks-figure-fullscreen,
button.block-gallery-figure-fullscreen {
    opacity: 0;
    transition: ease-in 200ms;
}

.project-cover-image:hover button.project-cover-image-fullscreen,
.blocks-figure:hover button.blocks-figure-fullscreen,
.block-gallery-figure:hover button.block-gallery-figure-fullscreen {
    opacity: 1;
}