.si_gallery {
    position: relative;
}

.entry-content figure.si_gallery .image-slider {
    flex-wrap: nowrap;
    max-width: none;
    margin: 0 0 0 5vw;
    overflow-x: scroll;
    display: flex;

    gap: 1rem
}

.entry-content figure.si_gallery .image-slider > figure {
    min-width: fit-content !important;
    width: 100%;
    height: 25rem;
    cursor: pointer;
    flex-direction: row !important;
}

.si_gallery .gradient-overlay {
    /*position: absolute;*/
    /*top: 0;*/
    /*right: 0;*/
    /*bottom: 0;*/
    /*width: 20px;*/
    /*background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75  ));*/
    /*pointer-events: none; !* Ensures the overlay doesn't interfere with image sliding *!*/
}

.entry-content figure.si_gallery img:not(#fake){ /* Increased specificity to override WP default styles */
    height: 100%;
    width: auto !important;
    max-width: initial !important;
    max-height: 100%;
    object-fit: contain !important;
    align-self: stretch;
}

/* Lightbox buttons */
.lg-container .lg-prev, .lg-container .lg-next, .lg-container .lg-close {
    box-shadow: none !important;
}



/* Lightbox close button */
.lg-container .lg-close {
    display: flex;
    justify-content: center;
    right: 2rem;
    position: absolute;
}

.si-gallery-sub {
    position: absolute;
    bottom: 13.5rem; /* Moving lightbox caption and copyright to be above bottom nav */
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem
}
.si-gallery-sub > * {
    height: 100%;
}

.lg-container .lg-img-wrap img {
    max-height: 20rem
}
.si-gallery-sub > * {
    max-width: 95vw;
}



/*.si-gallery-sub {*/
/*background: linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,.3) 70%,transparent);*/
/*}*/

@media (min-width: 640px) {
    .lg-container .lg-img-wrap img {
        max-height: 50rem
    }
}
@media (min-width: 1000px) {

    .entry-content figure.si_gallery .image-slider{
        flex-wrap: wrap;
        margin-right: auto;
        max-width: 87vw;
        overflow-x: inherit;
    }
    .entry-content figure.si_gallery .image-slider > figure {
        width: initial !important;
        height: 25rem;
    }
    .si_gallery .gradient-overlay {
        display: none
    }
    .entry-content figure.si_gallery img:not(#fake){
        height: 100%;
        width: auto !important;
        max-width: none !important;
        max-height: 100%;
        object-fit: cover !important;
    }
    .lg-container .lg-toolbar {
        top: 20rem;

    }
    .si-gallery-sub {
        bottom: 5rem
    }
    .si-gallery-sub > * {
        max-width: 75vw;
    }
    .lg-container .lg-img-wrap img {
        max-height: 30vw
    }
}


/* Removing interference from another plugin */

.entry-content .si_gallery figcaption, .entry-content .si_gallery i, .entry-content .si_gallery span {
    display: none
}