/* Ultimate Carousel Fix CSS */

/* Ensure carousel containers have proper dimensions */
.e-n-carousel,
.elementor-image-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.e-n-carousel .swiper-wrapper,
.elementor-image-carousel-wrapper .swiper-wrapper {
    display: flex;
    align-items: center;
}

/* Fix slide dimensions */
.e-n-carousel .swiper-slide {
    width: 100%;
    height: auto;
    opacity: 1 !important;
}

.elementor-image-carousel .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Navigation buttons styling */
.elementor-swiper-button-prev,
.elementor-swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.elementor-swiper-button-prev:hover,
.elementor-swiper-button-next:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.elementor-swiper-button-prev {
    left: 20px;
}

.elementor-swiper-button-next {
    right: 20px;
}

/* Ensure arrows are visible */
.elementor-swiper-button-prev i,
.elementor-swiper-button-next i {
    color: #333;
    font-size: 18px;
}

/* Pagination styling */
.swiper-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.swiper-pagination-bullet-active {
    background: #fff;
    width: 12px;
    height: 12px;
}

/* Hero carousel specific styles */
.e-n-carousel {
    min-height: 400px;
}

.e-n-carousel .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fade effect for hero carousel */
.e-n-carousel.swiper-container-fade .swiper-slide {
    opacity: 0;
    transition: opacity 1s ease;
}

.e-n-carousel.swiper-container-fade .swiper-slide-active {
    opacity: 1;
}

/* Image carousel specific styles */
.elementor-image-carousel img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure proper spacing in gallery carousels */
.elementor-image-carousel-wrapper .swiper-slide {
    height: auto;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .elementor-swiper-button-prev,
    .elementor-swiper-button-next {
        width: 40px;
        height: 40px;
    }
    
    .elementor-swiper-button-prev {
        left: 10px;
    }
    
    .elementor-swiper-button-next {
        right: 10px;
    }
    
    .swiper-pagination {
        bottom: 10px;
    }
    
    .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }
    
    .swiper-pagination-bullet-active {
        width: 10px;
        height: 10px;
    }
}

/* Animation support */
.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.fadeIn {
    animation-name: fadeIn;
}

.fadeInUp {
    animation-name: fadeInUp;
}

.fadeInDown {
    animation-name: fadeInDown;
}

.fadeInLeft {
    animation-name: fadeInLeft;
}

.fadeInRight {
    animation-name: fadeInRight;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -30px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Fix for carousel initialization */
.carousel-initialized {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Prevent layout shift during load */
.e-n-carousel:not(.carousel-initialized),
.elementor-image-carousel-wrapper:not(.carousel-initialized) {
    min-height: 200px;
}

/* Ensure carousel content is visible */
.e-n-carousel *,
.elementor-image-carousel-wrapper * {
    visibility: visible !important;
}