/**
 * Jubilant Smooth Scroll Carousel Styles
 */

.jubilant-smooth-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* No background or borders - images appear as-is */
}

.jubilant-carousel-track {
    display: flex;
    align-items: center;
    height: 100%;
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    /* Hardware acceleration for ultra-smooth scrolling */
    /* Ensure no gaps at the start */
    margin: 0;
    padding: 0;
}

.jubilant-carousel-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jubilant-carousel-item img {
    display: block;
    object-fit: cover;
    transition: opacity 0.3s ease;
    /* Width, height, and opacity will be controlled by Elementor */
}

/* Hover effects - pause scrolling */
.jubilant-smooth-carousel:hover .jubilant-carousel-track {
    /* JavaScript will handle pause/resume */
}

/* Loading state */
.jubilant-smooth-carousel.loading {
    opacity: 0.7;
}

.jubilant-smooth-carousel.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ccc;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: jubilant-spin 1s linear infinite;
}

@keyframes jubilant-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ensure smooth flow without extra gaps at edges */
.jubilant-carousel-track {
    gap: 0; /* No CSS gap, we use margins instead */
}

/* Responsive adjustments - removed to let Elementor control spacing */

/* Performance optimizations */
.jubilant-smooth-carousel * {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Accessibility - respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .jubilant-carousel-track {
        transform: none !important;
    }
}

/* RTL Support */
.rtl .jubilant-carousel-item {
    margin-right: 0;
    margin-left: 20px;
}