.slideshow {
    position: relative;
    grid-column: 1/-1;
    margin-bottom: 2rem;
    user-select: none;
}

/* Tablet (> 640px) */
@media screen and (min-width: 48rem) {
    .slideshow {
        margin-bottom: 3rem;
    }
}

/* Desktop */
@media only screen and (min-width: 92rem) {
    .slideshow {
        position: relative;
        grid-column: 1/-1;
    }
}


/* Slideshow Slide */
.slideshow-slide {
    grid-column: 1/-1;
    display: none;
    background-color: white;
    opacity: 0;
    transition: opacity 300ms;
    height: 50vh;

    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.slideshow-slide.pre-active {
    display: flex;
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
    top: 0;
    left: 0;
}

/* Slideshow Slide */

/* Tablet (> 768px) */
@media screen and (min-width: 48rem) {
    .slideshow-slide {
        background-color: transparent;
        grid-column: 2/-2;
        height: 80vh;
        max-height: 80vh;
    }
}

/* Desktop */
@media screen and (min-width: 64rem) {
    .slideshow.slideshow.fullscreen .slideshow-slide {
        max-height: 90vh;
    }

    .slideshow-slide {
        background-color: white;
        grid-column: 3/-3;
    }
}


/* Slideshow Figure */
.slideshow-slide-image {
    width: 100%;
    height: 100%;
    max-height: calc(80vh - 2rem);
    object-fit: contain;
    object-position: 50% 50%;
}


/* Slideshow Slide Info */
.slideshow-slide-info {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0rem 1rem;
    margin-top: 0.4rem;
    width: 100%;
}

.slideshow-slide.pre-active .slideshow-slide-info {
    opacity: 0;
}

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

.slideshow-slide-count,
.slideshow-slide-caption {
    grid-column: 1/-3;
}

.slideshow-slide-caption {
    margin-top: 0.2rem;
}

/* Tablet (> 768px) */
@media screen and (min-width: 48rem) {
    .slideshow-slide-info {
        grid-template-columns: repeat(8, 1fr);
    }
    
    .slideshow-slide-count {
        grid-column: 1/2;
    }
    
    .slideshow-slide-caption {
        grid-column: 2/-1;
        margin-top: 0rem;
    }
}


/* 
    Fullscreen 
*/

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


/* Tablet (> 768px) */
@media screen and (min-width: 48rem) {
    .slideshow.fullscreen {
        position: fixed;
        flex-direction: column;
        z-index: 100;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        min-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        margin-bottom: 0 !important;      
    }
}

/* Desktop (> 1024px) */
@media screen and (min-width: 64rem) {
    .slideshow.fullscreen {
        background-color: white;
    }
}


/* Slideshow Fullscreen Slide */

/* Tablet (> 768px) */
@media screen and (min-width: 48rem) {
    .slideshow.fullscreen .slideshow-slide {
        grid-column: 2 / -2;
        align-self: center;
    }

    .slideshow.fullscreen .slideshow-slide {
        height: 90vh;
    }

    .slideshow.fullscreen .slideshow-slide-caption {
        grid-column: 2 / -1;
    }

    .slideshow.fullscreen .slideshow-slide-info {
        margin-top: 0.8rem;
    }
}

/* Desktop (> 1472px) */
@media screen and (min-width: 92rem) {
    .slideshow.fullscreen .slideshow-slide {
        grid-column: 3 / -3;
    }
}


/* Slideshow Expand */
.slideshow-expand {
    display: none;
}

.slideshow button {
    touch-action: manipulation; 
}

.block-gallery-figure {
    position: relative;
}

/* Tablet (> 768px) */
@media screen and (min-width: 48rem) {
    .slideshow-expand {
        display: block;
        position: absolute;
        width: 100%;
        opacity: 0;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

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


/* Overflow */
.overflow {
    overflow: hidden;
}


/* 
    Actions 
*/


/* Fixed Buttons  */
/* .slideshow-arrow.prev,
.slideshow-arrow.next {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20%;
    display: flex;
    align-items: center;
}

.slideshow-arrow.next {
    right: 0;
    justify-content: flex-end;
}

.slideshow-arrow.prev {
    left: 0;
    justify-content: flex-start;
} */

.slideshow-arrow.prev {
    grid-column: -3 / -2;
    grid-row: 2;
}

.slideshow-arrow.next {
    grid-column: -2 / -1;
    grid-row: 2;
}

.slideshow-arrow span {
    opacity: 0;
}

.slideshow-arrow svg {
    width: 2.5rem;
}

/* Tablet (> 768px) */
@media screen and (min-width: 48em) {
    .slideshow-arrow svg {
        width: 2.5rem;
    }

    .slideshow-arrow.prev {
        left: 0;
        grid-row: 1;
        grid-column: 1/3;
        justify-content: flex-start;
    }

    .slideshow-arrow.next {
        right: 0;
        grid-row: 1;
        grid-column: -3/-1;
        justify-content: flex-end;
    }

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

    .slideshow.fullscreen .slideshow-arrow.prev {
        left: 1rem;
        top: 2rem;
        bottom: 2rem;
    }

    .slideshow.fullscreen .slideshow-arrow.next {
        right: 1rem;
        top: 4rem;
        bottom: 4rem;
    }
}

/*  
    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: 1;
}

/* 
    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;
}

/* Close Slideshow Button */

.slideshow-close {
    display: none;
}

.slideshow.fullscreen .slideshow-close {
    position: fixed;
    top: 0;
    right: 0;
    display: flex;
    height: fit-content;
    justify-self: end;
    width: 3.5rem;
    padding: 1rem;
    z-index: 1000;
}


/* Slideshow Small */
.slideshow.small {
    gap: 0.5rem 1rem;
}

.slideshow.small .slideshow-slide {
    grid-column: 1/-1;
    aspect-ratio: 5/4;
    width: 100%;
    height: unset;
    max-height: calc(80vh - 4rem);
}

.slideshow.small .slideshow-arrow.next,
.slideshow.small .slideshow-arrow.prev {
    grid-row: 2;
    align-items: flex-end;
    /* width: calc(100%/6); */
    padding: 0.25rem 0;
}

.slideshow.small .slideshow-arrow.next {
    grid-column: -3 / -1;
    justify-content: flex-end;
}

.slideshow.small .slideshow-arrow.prev {
    grid-column: 1 / 3;
    justify-content: flex-start;
}

.slideshow.small .slideshow-slide-count {
    grid-column: 2/4;
}
.slideshow.small .slideshow-slide-caption {
    grid-column: 4/-2;
}

.slideshow.small img {
    object-position: 50% 0;
}