/* Gallery White Patch Fix CSS */

/* Fix white patches/gaps in gallery sections */
.elementor-widget-image-carousel,
.elementor-widget-n-carousel,
.gallery-section {
    background: transparent !important;
    overflow: visible;
}

/* Remove unwanted white backgrounds */
.elementor-widget-image-carousel .swiper-wrapper,
.elementor-widget-n-carousel .swiper-wrapper {
    background: transparent !important;
}

/* Fix white gaps between slides */
.swiper-slide {
    background: transparent !important;
}

/* Ensure images fill their containers */
.elementor-image-carousel img,
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: transparent;
}

/* Remove default margins that cause white spaces */
.elementor-widget-image-carousel .swiper {
    margin: 0 !important;
    padding: 0 !important;
}

/* Fix white patches in carousel containers */
.elementor-carousel-wrapper,
.elementor-image-carousel-wrapper {
    background: transparent !important;
    margin: 0;
    padding: 0;
}

/* Remove white gaps in gallery grid */
.gallery-grid {
    background: transparent;
}

.gallery-grid .gallery-item {
    background: transparent;
    margin: 0;
}

/* Fix white patches caused by borders */
.swiper-slide,
.gallery-item {
    border: none !important;
    outline: none !important;
}

/* Ensure no white background on hover states */
.gallery-item:hover,
.swiper-slide:hover {
    background: transparent !important;
}

/* Fix white patches in lightbox */
.elementor-lightbox,
.gallery-lightbox {
    background: rgba(0, 0, 0, 0.95) !important;
}

/* Remove white patches from pagination */
.swiper-pagination {
    background: transparent !important;
}

/* Fix white patches in navigation buttons */
.elementor-swiper-button-prev,
.elementor-swiper-button-next,
.swiper-button-prev,
.swiper-button-next {
    background: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
}

.elementor-swiper-button-prev:hover,
.elementor-swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.7) !important;
}

/* Remove any box shadows that might create white edges */
.gallery-item,
.swiper-slide img {
    box-shadow: none !important;
}

/* Ensure no white text selections */
::selection {
    background: rgba(0, 0, 0, 0.2);
}

/* Fix potential white patches from animations */
.animated,
.elementor-invisible {
    background: transparent !important;
}

/* Remove white patches from empty areas */
.elementor-widget:empty,
.swiper-slide:empty {
    display: none !important;
}

/* Specific fix for gallery section backgrounds */
#gallery,
.gallery-wrapper {
    background-color: transparent !important;
}

/* Fix white patches between sections */
.elementor-section {
    margin: 0 !important;
}

.elementor-section > .elementor-container {
    margin: 0;
    padding: 0;
}

/* Remove white line artifacts */
* {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Fix sub-pixel rendering issues */
.swiper-wrapper {
    font-size: 0;
    line-height: 0;
}

.swiper-slide {
    font-size: initial;
    line-height: initial;
}

/* Ensure smooth rendering */
.gallery-item img,
.swiper-slide img {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}