/* custom-gallery-carousel.css */
.wp-block-gallery.swiper {
    display: block !important;
    gap: 0 !important;
    overflow: hidden;
    position: relative; 
    padding-bottom: 50px; /* Space for pagination dots */
    margin-bottom: 2em;
    width: 100% !important;
}

.wp-block-gallery.swiper .swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    box-sizing: content-box;
}

/* Strict override for Swiper slide to force a standard uniform size */
.wp-block-gallery.swiper .swiper-slide {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    /* Notice: No margin-right !important, Swiper needs to set this for spaceBetween! */
    padding: 0 !important;
    flex-shrink: 0 !important;
    /* Notice: No width !important, Swiper needs to calculate and set this inline! */
    height: 60vh !important; /* Standard height */
    min-height: 400px !important;
    max-height: 700px !important;
    background-color: #f8f9fa; /* Light gray to fill the empty space */
    border-radius: 12px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.wp-block-gallery.swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Shows full image, pads the rest with empty space */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
}

/* Customize Swiper Navigation Buttons */
.wp-block-gallery.swiper .swiper-button-next,
.wp-block-gallery.swiper .swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: background 0.3s ease;
}

.wp-block-gallery.swiper .swiper-button-next:hover,
.wp-block-gallery.swiper .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8);
}

.wp-block-gallery.swiper .swiper-button-next::after,
.wp-block-gallery.swiper .swiper-button-prev::after {
    font-size: 18px;
}

/* Pagination Dots */
.wp-block-gallery.swiper .swiper-pagination-bullet {
    background: #555;
    opacity: 0.5;
}

.wp-block-gallery.swiper .swiper-pagination-bullet-active {
    background: #000;
    opacity: 1;
}
