/* ==========================================================================
   Core Gallery → Swiper CSS
   ========================================================================== */


/* Main container */

.core-gallery-swiper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    /* critical inside Elementor flex/grid parents */
    overflow: hidden;
    /* prevents brief overflow when Swiper mismeasures */
    --gallery-radius: 0px;
    --gallery-caption-bg: rgba(0, 0, 0, 0.55);
    --gallery-caption-color: #fff;
    --gallery-caption-padding: 8px 10px;
}

.core-gallery-swiper a {
    border: 0;
}

.core-gallery-swiper-wrap {
    display: block;
    /* ensures block formatting in any context */
    clear: both;
    /* prevents stray floats from previous item */
    isolation: isolate;
    /* sandbox stacking context (safer in grids) */
    width: 100%;
}


/* Slides
   -------------------------------------------------------------------------- */

.core-gallery-swiper .swiper-wrapper {
    align-items: stretch;
}

.core-gallery-swiper .swiper-slide {
    flex: 0 0 auto;
    /* prevent flex stretching */
    width: 100% !important;
    /* clamp against Swiper’s insane inline widths */
    max-width: 100% !important;
    /* safety */
    box-sizing: border-box;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* Figures + captions
   -------------------------------------------------------------------------- */

.core-gallery-swiper .gallery-figure {
    display: grid;
    width: 100%;
    border-radius: var(--gallery-radius);
    overflow: hidden;
    margin: 0;
    position: relative;
}

.core-gallery-swiper img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.core-gallery-swiper .gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gallery-caption-bg);
    color: var(--gallery-caption-color);
    padding: var(--gallery-caption-padding);
    font-size: 0.875rem;
    line-height: 1.35;
    backdrop-filter: saturate(120%) blur(2px);
}


/* Controls
   -------------------------------------------------------------------------- */

.core-gallery-swiper .swiper-button-prev,
.core-gallery-swiper .swiper-button-next {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
}

.core-gallery-swiper .swiper-button-prev::after,
.core-gallery-swiper .swiper-button-next::after {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.core-gallery-swiper .swiper-pagination-bullet {
    opacity: .5;
}

.core-gallery-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}


/* Elementor container safety
   -------------------------------------------------------------------------- */

.elementor-container,
.elementor-row,
.elementor-column,
.elementor-widget-container {
    min-width: 0;
    /* prevents flexbox from forcing giant widths */
}


/* Optional: stop inherited transforms blowing up the slider */

.core-gallery-swiper {
    transform: none !important;
}


/* Optional: steady aspect ratio (remove if not needed) */


/*
.core-gallery-swiper .gallery-figure {
  aspect-ratio: 16 / 9;
}
.core-gallery-swiper .gallery-figure img {
  object-fit: cover;
  height: 100%;
}
*/