/* Enhanced touch interactions for mobile and tablet */

/* Apply specific styles for touch-enabled devices */
@media (hover: none) and (pointer: coarse) {
    /* Enhance touch feedback with visual cues */
    .project-card {
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                    box-shadow 0.3s ease,
                    opacity 0.3s ease;
    }
    
    /* Active state for touch */
    .project-card.touch-active {
        transform: scale(0.98);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    /* Add highlight effect after touch */
    .project-card.touch-highlight {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 2px var(--primary-color, #4169E1);
        animation: pulse-highlight 0.5s ease;
    }
    
    @keyframes pulse-highlight {
        0% { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 2px var(--primary-color, #4169E1); }
        50% { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 4px var(--primary-color, #4169E1); }
        100% { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 2px var(--primary-color, #4169E1); }
    }
    
    /* Enhanced button feedback */
    .view-project-btn {
        position: relative;
        overflow: hidden;
        transition: transform 0.2s ease;
    }
    
    .view-project-btn:active {
        transform: scale(0.95);
    }
    
    /* Add ripple effect to buttons on mobile */
    .view-project-btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 5px;
        height: 5px;
        background: rgba(255, 255, 255, 0.7);
        opacity: 0;
        border-radius: 100%;
        transform: scale(1, 1) translate(-50%, -50%);
        transform-origin: 50% 50%;
    }
    
    .view-project-btn:active::after {
        animation: ripple 1s ease-out;
    }
    
    @keyframes ripple {
        0% {
            transform: scale(0, 0) translate(-50%, -50%);
            opacity: 0.5;
        }
        100% {
            transform: scale(20, 20) translate(-50%, -50%);
            opacity: 0;
        }
    }
    
    /* Make carousel dots easier to tap */
    .carousel-dot {
        position: relative;
        width: 15px !important;
        height: 15px !important;
        margin: 0 8px !important;
    }
    
    /* Add larger tap target area */
    .carousel-dot::before {
        content: '';
        position: absolute;
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
        z-index: -1;
    }
    
    .carousel-button {
        width: 44px;
        height: 44px;
    }
}

/* Tablet-specific enhancements */
@media (min-width: 768px) and (max-width: 1200px) and (hover: none) and (pointer: coarse) {
    /* Hybrid experience for tablets */
    .project-card.touch-focus {
        transform: translateY(-5px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    }
    
    /* Smoother transitions for tablets */
    .project-card {
        transition: transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1), 
                    box-shadow 0.4s ease;
    }
}

/* Desktop with touch (touchscreen laptops) */
@media (min-width: 1201px) and (hover: none) and (pointer: coarse) {
    /* Combine hover and touch behaviors */
    .project-card:hover,
    .project-card.touch-active {
        transform: translateY(-10px);
    }
}
