/* Fixed CSS for mobile scrolling issues */

.wins-container {
    max-width: 1200px;
    width: 100%;
    position: relative;
    padding: 40px 20px;
    /* Add these properties to ensure proper mobile behavior */
    overflow: visible;
    min-height: auto;
}

.title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 50px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    /* Ensure container doesn't interfere with page scroll */
    touch-action: pan-y pinch-zoom;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: var(--bg-card);
}

.slide-content {
    position: relative;
    max-width: 350px;
    width: 100%;
    aspect-ratio: 9/16;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-content:hover {
    transform: scale(1.08);
    box-shadow: 0 35px 70px rgba(139, 61, 255, 0.3);
}

.slide-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-content:hover img {
    transform: scale(1.15);
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 20px 20px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.slide-content:hover .slide-overlay {
    transform: translateY(0);
}

.slide-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.slide-description {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

.navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card-hover);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.navigation:hover {
    background: var(--canva-purple);
    box-shadow: var(--button-glow);
    transform: translateY(-50%) scale(1.1);
}

.navigation.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-prev {
    left: 20px;
}

.nav-next {
    right: 20px;
}

.nav-arrow {
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-left: none;
    border-bottom: none;
    transform: rotate(45deg);
}

.nav-prev .nav-arrow {
    transform: rotate(-135deg);
}

.indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
    padding: 0 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-light);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.indicator.active {
    background: var(--canva-purple);
    box-shadow: 0 0 20px rgba(139, 61, 255, 0.5);
    transform: scale(1.2);
}

.indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.indicator:hover::before {
    left: 100%;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    border-radius: 0 3px 0 0;
}

.slide-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
}

/* Mobile optimizations for better scrolling */
@media (max-width: 768px) {
    .wins-container {
        padding: 30px 15px; /* Reduced padding */
        /* Ensure container doesn't take full viewport */
        max-height: none;
        overflow: visible;
    }
    
    .carousel-slide {
        padding: 30px 15px; /* Reduced padding */
        min-height: auto; /* Don't force height */
    }

    .slide-content {
        max-width: 280px;
        aspect-ratio: 9/16;
        /* Ensure content doesn't overflow */
        max-height: 70vh; /* Limit height to 70% of viewport */
    }

    .navigation {
        width: 40px;
        height: 40px;
    }

    .nav-prev {
        left: 10px;
    }

    .nav-next {
        right: 10px;
    }

    .nav-arrow {
        width: 16px;
        height: 16px;
    }

    .slide-overlay {
        padding: 20px 15px 15px;
    }

    .slide-title {
        font-size: 1rem;
    }

    .slide-description {
        font-size: 0.8rem;
    }
    
    /* Disable hover effects on mobile for better performance */
    .slide-content:hover {
        transform: none;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    }
    
    .slide-content:hover img {
        transform: none;
    }
    
    .slide-content:hover .slide-overlay {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .wins-container {
        padding: 20px 10px;
        /* Ensure proper mobile behavior */
        position: relative;
        overflow: visible;
    }

    .carousel-slide {
        padding: 20px 10px; /* Further reduced padding */
    }
    
    .slide-content {
        max-width: 250px; /* Smaller on very small screens */
        max-height: 60vh; /* Even more limited height */
    }

    .indicators {
        gap: 8px;
        margin-top: 20px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }
}

/* Enhanced touch handling */
.carousel-container {
    touch-action: pan-y pinch-zoom; /* Allow vertical scrolling and pinch zoom */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.carousel-track.dragging {
    transition: none;
}

/* Prevent iOS scroll bounce on carousel */
.carousel-track {
    -webkit-overflow-scrolling: auto;
}

/* Preloader animation */
.slide-content.loading {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}