/* Enhanced touch interaction for projects grid */

/* Touch feedback for carousel */
.projects-carousel.touching {
    transition: none !important; /* Disable transition during touch */
    will-change: transform; /* Optimize for performance */
}

/* Make carousel dots more tappable on mobile */
@media (max-width: 768px) {
    /* Enhanced mobile experience - more touch friendly */
    .project-card {
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    }

    .project-card:active {
        transform: scale(0.98);
    }
    
    /* Larger, more tappable dots for pagination */
    .carousel-dot {
        width: 15px !important;
        height: 15px !important;
        margin: 0 8px !important;
        transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                    background-color 0.3s ease !important;
    }
    
    .carousel-dot:active {
        transform: scale(1.3) !important;
    }
    
    .carousel-dots {
        padding: 15px 0;
    }
    
    /* Create a larger touch target */
    .carousel-dot::before {
        content: '';
        position: absolute;
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }
    
    /* Visual feedback for active swipe */
    .projects-carousel.touching::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;
        background: linear-gradient(90deg, 
            rgba(var(--primary-color-rgb), 0.15) 0%, 
            rgba(255, 255, 255, 0) 20%, 
            rgba(255, 255, 255, 0) 80%, 
            rgba(var(--primary-color-rgb), 0.15) 100%);
        -webkit-backdrop-filter: blur(0.5px); /* Safari compatibility */
        backdrop-filter: blur(0.5px);
    }
    
    /* Enhanced view project button for mobile */
    .view-project-btn {
        position: relative;
        overflow: hidden;
        transition: background-color 0.3s ease, transform 0.2s ease;
    }
    
    .view-project-btn:active {
        transform: scale(0.95);
    }
    
    /* Add mobile-specific glow effect to project cards */
    .project-card::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 12px;
        box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb, 255, 255, 255), 0);
        transition: box-shadow 0.5s ease;
        pointer-events: none;
    }
    
    .project-card:active::after {
        box-shadow: 0 0 20px 3px rgba(var(--primary-color-rgb, 255, 255, 255), 0.3);
    }
}

/* Improved navigation buttons */
.carousel-button {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.carousel-button:active {
    transform: scale(0.95);
    background-color: rgba(255, 255, 255, 0.7);
}

/* Animation for page transition */
.projects-page {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
