/* Video Testimonials Styles */
.video-testimonials-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.02);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.video-card {
    background: var(--colore-card-sfondo);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 167, 157, 0.2), 0 0 20px rgba(0, 255, 136, 0.4);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .thumbnail-img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.video-card:hover .play-overlay {
    background: rgba(0, 167, 157, 0.4);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    color: var(--colore-primario-scuro);
}

.video-card:hover .play-button {
    transform: scale(1.1);
    background: white;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    color: var(--colore-testo-principale);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.video-info p {
    color: var(--colore-testo-secondario);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.video-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.video-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    width: 800px;
}

.video-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.video-close:hover {
    transform: scale(1.1);
}

#modal-video {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

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

/* Ensure cards are visible by default */
.video-card {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
}

.video-card.reveal {
    animation: slideInUp 0.6s ease-out;
}

/* Fix for mobile touch interactions */
.video-card {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.video-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .video-card {
        max-width: 100%;
    }
    
    .video-modal-content {
        max-width: 95%;
        max-height: 80%;
        width: 100%;
        margin: 0 10px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
    }
    
    .video-close {
        top: -35px;
        right: 5px;
    }
}

@media (max-width: 480px) {
    .video-testimonials-section {
        padding: 40px 0;
    }
    
    .video-grid {
        gap: 15px;
        padding: 0 10px;
    }
    
    .video-info {
        padding: 15px;
    }
    
    .video-info h3 {
        font-size: 1rem;
    }
    
    .video-info p {
        font-size: 0.8rem;
    }
    
    .play-button {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 375px) {
    .video-grid {
        grid-template-columns: 1fr;
        padding: 0 5px;
    }
}