/* ============================================
   DRIBBBLE CAROUSEL - SIMPLE HORIZONTAL SCROLL GALLERY
   Clean horizontal scroll with gaps between cards
   ============================================ */

/* Main Section */
.dribbble-carousel-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #e0f2fe 100%);
    overflow: hidden;
}

/* Carousel Container */
.dribbble-carousel {
    width: 100%;
    position: relative;
}

/* Dark Gallery Wrapper */
.carousel-wrapper {
    width: 100%;
    padding: 50px 0;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
}

/* Ambient glow effect */
.carousel-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(14, 165, 233, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* Horizontal Scroll Track - Ultra Smooth */
.carousel-track {
    display: flex;
    gap: 24px;
    padding: 30px 60px;
    overflow-x: auto;
    scroll-behavior: auto;
    /* Controlled by JS for smoother animation */
    scroll-snap-type: none;
    /* Disabled for smoother drag */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    /* GPU acceleration for buttery smooth scrolling */
    will-change: scroll-position;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.carousel-track.is-dragging {
    scroll-snap-type: none;
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-track:active {
    cursor: grabbing;
}

/* Individual Cards */
.carousel-card {
    flex: 0 0 320px;
    height: 420px;
    border-radius: 20px;
    overflow: hidden;
    background: #1a1a1a;
    position: relative;
    scroll-snap-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.carousel-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.carousel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Card Overlay Gradient */
.carousel-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
}

/* Card Content */
.carousel-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px;
    z-index: 2;
}

.carousel-card-content h4 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.carousel-card-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.carousel-card-content p i {
    color: var(--primary, #0ea5e9);
    font-size: 0.85rem;
}

/* Scroll Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-dot.active {
    background: var(--primary, #0ea5e9);
    width: 28px;
    border-radius: 5px;
}

/* Scroll Hint Arrows */
.carousel-scroll-hint {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.carousel-scroll-hint:hover {
    background: var(--primary, #0ea5e9);
    border-color: var(--primary, #0ea5e9);
}

.carousel-scroll-hint.left {
    left: 20px;
}

.carousel-scroll-hint.right {
    right: 20px;
}

/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 1200px) {
    .carousel-card {
        flex: 0 0 280px;
        height: 380px;
    }

    .carousel-track {
        gap: 20px;
        padding: 25px 40px;
    }
}

@media (max-width: 768px) {
    .dribbble-carousel-section {
        padding: 60px 0;
    }

    .carousel-wrapper {
        padding: 40px 0;
    }

    .carousel-track {
        gap: 16px;
        padding: 20px 20px;
        /* Ultra-smooth scrolling for mobile */
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        /* Better momentum scrolling */
        overscroll-behavior-x: contain;
        /* Ensure smooth inertial scrolling on iOS/Android */
        will-change: scroll-position;
        touch-action: pan-x;
    }

    .carousel-card {
        flex: 0 0 280px;
        height: 360px;
        scroll-snap-align: center;
        scroll-snap-stop: normal;
        /* Butter-smooth transitions on scroll */
        transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
            box-shadow 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
            opacity 0.3s ease;
        /* Hardware acceleration for smoother animations */
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    .carousel-card:hover,
    .carousel-card:focus-within {
        transform: translateY(-4px) scale(1.01) translateZ(0);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    }

    .carousel-card-content {
        padding: 18px 15px;
    }

    .carousel-card-content h4 {
        font-size: 1.1rem;
    }

    .carousel-card-content p {
        font-size: 0.85rem;
    }

    .carousel-scroll-hint {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .carousel-scroll-hint.left {
        left: 10px;
    }

    .carousel-scroll-hint.right {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .carousel-wrapper {
        padding: 30px 0;
    }

    .carousel-track {
        gap: 12px;
        padding: 15px 12px;
        /* Ultra-smooth scrolling for small screens */
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        /* Hardware acceleration */
        will-change: scroll-position;
        touch-action: pan-x;
    }

    .carousel-card {
        flex: 0 0 260px;
        height: 320px;
        scroll-snap-align: center;
        scroll-snap-stop: normal;
        /* Smooth buttery transitions */
        transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
            box-shadow 0.35s ease;
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    .carousel-card-content {
        padding: 14px 12px;
    }

    .carousel-card-content h4 {
        font-size: 1rem;
    }

    .carousel-card-content p {
        font-size: 0.8rem;
    }

    .carousel-scroll-hint {
        display: none;
    }
}