/* CAROUSEL.CSS - 3 SMALLER SLIDES LAYOUT */
.carousel-container {
    position: relative;
    max-width: 1300px;
    margin: 2rem auto;
    overflow: hidden;
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 15px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: pan-y;
    will-change: transform;
    padding: 0 20px;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.carousel-track.grabbing {
    cursor: grabbing;
    transition: none;
}

/* 3 SMALLER SLIDES - Optimized for larger screens */
.carousel-slide {
    flex: 0 0 calc(28% - 10px);
    min-width: calc(28% - 10px);
    max-width: calc(28% - 10px);
    width: calc(28% - 10px);
    background: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.carousel-slide:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.2);
    border-color: var(--primary-color);
}

/* Project thumbnail */
.project-thumbnail {
    width: 100%;
    height: 160px;
    position: relative;
    overflow: hidden;
    background: var(--surface-light);
}

.github-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    pointer-events: none;
    -webkit-user-drag: none;
}

.carousel-slide:hover .github-preview {
    transform: scale(1.08);
}

.project-language {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    pointer-events: none;
}

/* Project info */
.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

.project-info p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: var(--surface-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    pointer-events: none;
}

.project-links {
    display: flex;
    gap: 0.5rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: var(--surface-light);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    flex: 1;
    justify-content: center;
    -webkit-tap-highlight-color: rgba(16, 185, 129, 0.2);
    touch-action: manipulation;
}

.project-link:hover,
.project-link:active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-decoration: none;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
    touch-action: manipulation;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: var(--primary-light);
}

/* Responsive design */
@media (max-width: 1200px) {
    .carousel-container {
        max-width: 1000px;
    }

    .carousel-slide {
        flex: 0 0 calc(45% - 10px);
        min-width: calc(45% - 10px);
        max-width: calc(45% - 10px);
        width: calc(45% - 10px);
    }

    .project-thumbnail {
        height: 140px;
    }

    .project-info {
        padding: 1.25rem;
    }

    .project-info h3 {
        font-size: 1.1rem;
    }

    .project-info p {
        font-size: 0.85rem;
    }
}

@media (max-width: 900px) {
    .carousel-container {
        max-width: 100%;
        margin: 1.5rem 0;
        overflow: visible;
        touch-action: pan-y;
    }

    .carousel-track {
        gap: 12px;
        padding: 0 12px;
        touch-action: pan-y;
    }

    .carousel-slide {
        flex: 0 0 calc(95% - 10px);
        min-width: calc(95% - 10px);
        max-width: calc(95% - 10px);
        width: calc(95% - 10px);
        margin: 0 5px;
        touch-action: pan-y;
    }

    .project-info {
        padding: 1.25rem;
    }

    .project-thumbnail {
        height: 150px;
    }

    .project-info h3 {
        font-size: 1.1rem;
    }

    .project-info p {
        font-size: 0.85rem;
    }

    .project-tech {
        gap: 0.3rem;
    }

    .tech-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .project-links {
        flex-direction: column;
        gap: 0.4rem;
    }

    .project-link {
        padding: 0.5rem 1.2rem;
        font-size: 0.8rem;
    }

    .carousel-dots {
        margin-top: 1.25rem;
        gap: 0.4rem;
    }
}

@media (max-width: 480px) {
    .carousel-track {
        gap: 10px;
        padding: 0 8px;
    }

    .carousel-slide {
        flex: 0 0 calc(96% - 8px);
        min-width: calc(96% - 8px);
        max-width: calc(96% - 8px);
        width: calc(96% - 8px);
    }

    .project-thumbnail {
        height: 140px;
    }

    .project-info {
        padding: 1rem;
    }

    .carousel-dots {
        gap: 0.3rem;
    }

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

/* Performance optimizations */
.carousel-track {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.carousel-slide {
    contain: layout style paint;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .carousel-track {
        transform: translateZ(0) scale(0.9999);
    }
}

