.wp-block-columns:has(.slider-wrapper) {
    overflow-x: hidden;
}

.wp-block-group:is(.slider-wrapper) {
    padding: 1em;
    margin: 5em auto;
}

/* Target the inner container WordPress adds */
.wp-block-group:is(.slider-wrapper) .wp-block-group__inner-container {
    position: relative;
    height: auto;
    min-height: 40vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The gallery container, which holds all the images */
.wp-block-group:is(.slider-wrapper) .wp-block-gallery {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    margin: 1em auto;
    display: block;
    /* Override WP flex styles if necessary */
}

/* Styling for individual image slides (figure elements) */
.wp-block-group:is(.slider-wrapper) .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image),
.wp-block-group:is(.slider-wrapper) .wp-block-gallery > figure:is(.wp-block-image) {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 100%;
    max-height: 35vmax;
    height: 100vmax;
    opacity: 0;
    transform: scale(0.7);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
        opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
        z-index 0.5s;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    aspect-ratio: 4/3;
}

.wp-block-group:is(.slider-wrapper) .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) img,
.wp-block-group:is(.slider-wrapper) .wp-block-gallery > figure:is(.wp-block-image) img {
    background-color: transparent;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-style: none;
}

/* State classes controlled by JavaScript */
.wp-block-group:is(.slider-wrapper) .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image):is(.slide-active),
.wp-block-group:is(.slider-wrapper) .wp-block-gallery > figure.wp-block-image:is(.slide-active) {
    transform: translateX(0) scale(1);
    opacity: 1;
    z-index: 10;
}

.wp-block-group:is(.slider-wrapper) .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image):is(.slide-prev) {
    transform: translateX(-40%) scale(0.8);
    opacity: 0.5;
    z-index: 5;
}

.wp-block-group:is(.slider-wrapper) .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image):is(.slide-next) {
    transform: translateX(40%) scale(0.8);
    opacity: 0.5;
    z-index: 5;
}

/* Navigation Arrows */
.wp-block-group:is(.slider-wrapper) .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background-color: rgb(204 204 204 / .35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wp-block-group:is(.slider-wrapper) .slider-arrow:hover {
    background-color: rgb(204 204 204 / .8);
}

.wp-block-group:is(.slider-wrapper) .slider-arrow-left {
    left: 20px;
}

.wp-block-group:is(.slider-wrapper) .slider-arrow-right {
    right: 20px;
}

.wp-block-group:is(.slider-wrapper) .slider-arrow svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

/* Navigation dots */
.wp-block-group:is(.slider-wrapper) .slider-nav {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%) scale(.6);
    display: flex;
    gap: 0.75rem;
    z-index: 20;
}

.wp-block-group:is(.slider-wrapper) .nav-dot {
    width: 12px;
    height: 12px;
    background-color: #aaa;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.wp-block-group:is(.slider-wrapper) .nav-dot:hover {
    background-color: #6b7280;
}

.wp-block-group:is(.slider-wrapper) .nav-dot.active-dot {
    background-color: #cf9c0c;
    transform: scale(1.2);
}


@media (min-width: 600px) {
    .wp-block-group:is(.slider-wrapper) .slider-nav {
        scale: 1;
    }
}

@media screen and ( max-width: 767px ) {
    .wp-block-group:is(.slider-wrapper) {
        margin-bottom: 8em;
    }

    .wp-block-group:is(.slider-wrapper) .slider-nav {
        bottom: -100px;
    }
}

@media screen and ( min-width: 768px ) {
    .wp-block-group:is(.slider-wrapper) .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image),
    .wp-block-group:is(.slider-wrapper) .wp-block-gallery > figure:is(.wp-block-image) {
        max-height: 40vmax;
        max-width: 60vmax;
    }

    .wp-block-column:has(.slider-wrapper) .wp-block-group:is(.slider-wrapper) .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image),
    .wp-block-column:has(.slider-wrapper) .wp-block-group:is(.slider-wrapper) .wp-block-gallery > figure:is(.wp-block-image) {
        max-height: 30vmax;
    }

    .wp-block-column:has(.slider-wrapper) .wp-block-group:is(.slider-wrapper) .slider-nav {
        bottom: 0;
    }
}