/**
 * Infinite Looping Carousel Styles
 * Supports smooth scrolling, responsive design, and hover effects
 */

/* Carousel Container */
.carousel-section {
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.03) 0%, rgba(58, 123, 213, 0.03) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.carousel-label {
    text-align: center;
    color: #ffc107;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.carousel-section h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 15px;
    text-align: center;
}

.carousel-section .section-subtitle {
    text-align: center;
    color: #a0a0a0;
    font-size: 1.1rem;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Main Carousel Container */
.carousel-container,
.featured-carousel-container {
    position: relative;
    margin-bottom: 50px;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(22, 27, 34, 0.3);
}

.carousel-track {
    display: flex;
    gap: 20px;
    padding: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

/* Hide scrollbar for all browsers */
.carousel-track::-webkit-scrollbar {
    display: none;
}

/* Carousel Items */
.carousel-item {
    flex: 0 0 calc(25% - 15px);
    min-width: 200px;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    scroll-snap-align: start;
    position: relative;
}

.carousel-item:hover {
    transform: translateY(-12px) scale(1.05);
}

.carousel-item-content {
    position: relative;
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(58, 123, 213, 0.8), rgba(0, 210, 255, 0.5));
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.carousel-item:hover .carousel-item-content {
    border-color: #00d2ff;
    box-shadow: 0 20px 40px rgba(0, 210, 255, 0.25);
    background: linear-gradient(135deg, rgba(58, 123, 213, 0.9), rgba(0, 210, 255, 0.6));
}

.carousel-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.carousel-item:hover .carousel-item-overlay {
    opacity: 1;
}

.carousel-item-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
}

/* Featured Carousel Items (Larger) */
.featured-carousel-container .carousel-item {
    flex: 0 0 calc(33.333% - 13.33px);
}

.featured-carousel-container .carousel-item-content {
    height: 320px;
}

/* Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 210, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #0b0e14;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-nav:hover {
    background: #00d2ff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.4);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-nav i {
    font-size: 1.2rem;
}

/* Dot Indicators */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: #ffc107;
}

.carousel-dot.active {
    background: #ffc107;
    border-color: #ffc107;
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.5);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .carousel-item {
        flex: 0 0 calc(33.333% - 13.33px);
    }

    .featured-carousel-container .carousel-item {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .carousel-section {
        padding: 60px 0;
    }

    .carousel-item {
        flex: 0 0 calc(50% - 10px);
        min-width: 150px;
    }

    .carousel-item-content {
        height: 200px;
    }

    .featured-carousel-container .carousel-item {
        flex: 0 0 calc(100% - 0px);
    }

    .featured-carousel-container .carousel-item-content {
        height: 250px;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

    .carousel-track {
        padding: 15px;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .carousel-section {
        padding: 40px 0;
    }

    .carousel-item {
        flex: 0 0 calc(100% - 0px);
        min-width: 120px;
    }

    .carousel-item-content {
        height: 180px;
    }

    .carousel-nav {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .carousel-prev {
        left: 5px;
    }

    .carousel-next {
        right: 5px;
    }

    .carousel-track {
        padding: 10px;
        gap: 10px;
    }

    .carousel-dots {
        gap: 8px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

/* Smooth scroll behavior */
@supports (scroll-behavior: smooth) {
    .carousel-track {
        scroll-behavior: smooth;
    }
}

/* Accessibility */
.carousel-nav:focus,
.carousel-dot:focus {
    outline: 2px solid #00d2ff;
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    .carousel-item,
    .carousel-nav,
    .carousel-dot,
    .carousel-track {
        transition: none;
        animation: none;
    }
}