/* Crasol Image Carousel Styles */

.crasol-carousel-wrapper {
    position: relative;
    margin: 20px 0;
}

.crasol-carousel-wrapper .swiper {
    width: 100%;
    padding-top: 20px;
    padding-bottom: 20px;
}

.crasol-carousel-wrapper .swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.crasol-carousel-wrapper .swiper-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.crasol-carousel-wrapper .swiper-slide img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.crasol-carousel-wrapper .swiper-slide:hover img {
    transform: scale(1.05);
}

.crasol-carousel-wrapper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Navigation Buttons */
.crasol-carousel-wrapper .swiper-button-next,
.crasol-carousel-wrapper .swiper-button-prev {
    color: #007cba;
    background: rgba(255, 255, 255, 0.9);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-top: -22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.crasol-carousel-wrapper .swiper-button-next:after,
.crasol-carousel-wrapper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.crasol-carousel-wrapper .swiper-button-next:hover,
.crasol-carousel-wrapper .swiper-button-prev:hover {
    background: #007cba;
    color: white;
    transform: scale(1.1);
}

.crasol-carousel-wrapper .swiper-button-disabled {
    opacity: 0.3;
}

/* Pagination */
.crasol-carousel-wrapper .swiper-pagination {
    position: relative;
    margin-top: 20px;
}

.crasol-carousel-wrapper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    opacity: 1;
    transition: all 0.3s ease;
}

.crasol-carousel-wrapper .swiper-pagination-bullet-active {
    background: #007cba;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 1199px) {
    .crasol-carousel-wrapper .swiper-slide img {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .crasol-carousel-wrapper {
        margin: 15px 0;
    }
    
    .crasol-carousel-wrapper .swiper {
        padding-top: 15px;
        padding-bottom: 15px;
    }
    
    .crasol-carousel-wrapper .swiper-slide {
        border-radius: 6px;
    }
    
    .crasol-carousel-wrapper .swiper-slide img {
        height: 220px;
    }
    
    .crasol-carousel-wrapper .swiper-button-next,
    .crasol-carousel-wrapper .swiper-button-prev {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }
    
    .crasol-carousel-wrapper .swiper-button-next:after,
    .crasol-carousel-wrapper .swiper-button-prev:after {
        font-size: 16px;
    }
    
    .crasol-carousel-wrapper .swiper-pagination {
        margin-top: 15px;
    }
    
    .crasol-carousel-wrapper .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        margin: 0 6px;
    }
}

@media (max-width: 480px) {
    .crasol-carousel-wrapper .swiper-slide img {
        height: 180px;
    }
    
    .crasol-carousel-wrapper .swiper-button-next,
    .crasol-carousel-wrapper .swiper-button-prev {
        width: 36px;
        height: 36px;
        margin-top: -18px;
    }
    
    .crasol-carousel-wrapper .swiper-button-next:after,
    .crasol-carousel-wrapper .swiper-button-prev:after {
        font-size: 14px;
    }
    
    .crasol-carousel-wrapper .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }
}

@media (max-width: 320px) {
    .crasol-carousel-wrapper .swiper-slide img {
        height: 150px;
    }
    
    .crasol-carousel-wrapper .swiper-button-next,
    .crasol-carousel-wrapper .swiper-button-prev {
        width: 32px;
        height: 32px;
        margin-top: -16px;
    }
    
    .crasol-carousel-wrapper .swiper-button-next:after,
    .crasol-carousel-wrapper .swiper-button-prev:after {
        font-size: 12px;
    }
}

/* Loading Animation */
.crasol-carousel-wrapper .swiper-slide.swiper-slide-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Custom Elementor Styling */
.elementor-widget-crasol_carousel .crasol-carousel-wrapper {
    margin: 0;
}

/* Smooth transitions */
.crasol-carousel-wrapper * {
    box-sizing: border-box;
}

.crasol-carousel-wrapper .swiper-wrapper {
    transition-timing-function: ease-in-out;
}

/* Mobile-specific enhancements */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    .crasol-carousel-wrapper .swiper-slide:hover {
        transform: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .crasol-carousel-wrapper .swiper-slide:hover img {
        transform: none;
    }
    
    .crasol-carousel-wrapper .swiper-button-next,
    .crasol-carousel-wrapper .swiper-button-prev {
        opacity: 0.8;
    }
    
    .crasol-carousel-wrapper .swiper-button-next:hover,
    .crasol-carousel-wrapper .swiper-button-prev:hover {
        transform: none;
        background: #007cba;
        color: white;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .crasol-carousel-wrapper .swiper-slide img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .crasol-carousel-wrapper .swiper-slide,
    .crasol-carousel-wrapper .swiper-slide img,
    .crasol-carousel-wrapper .swiper-button-next,
    .crasol-carousel-wrapper .swiper-button-prev,
    .crasol-carousel-wrapper .swiper-pagination-bullet {
        transition: none;
    }
    
    .crasol-carousel-wrapper .swiper-slide:hover {
        transform: none;
    }
    
    .crasol-carousel-wrapper .swiper-slide:hover img {
        transform: none;
    }
}
