/* ==================== VIDEO PLAYER FOR TESTIMONIALS ==================== */

/* Video testimonial card */
.testimonial-card.has-video {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.testimonial-card.has-video::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.testimonial-card.has-video:hover::before {
    opacity: 1;
}

/* Video play button overlay */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.95) 0%, rgba(234, 179, 8, 0.85) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 30px rgba(234, 179, 8, 0.5),
                0 0 40px rgba(234, 179, 8, 0.3);
    z-index: 5;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.video-play-overlay i {
    color: #0f172a;
    font-size: 1.75rem;
    margin-left: 4px; /* Optical centering */
    animation: pulsePlay 2s ease-in-out infinite;
}

@keyframes pulsePlay {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.testimonial-card.has-video:hover .video-play-overlay {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 15px 40px rgba(234, 179, 8, 0.6),
                0 0 60px rgba(234, 179, 8, 0.4);
}

/* Video badge */
.video-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(234, 179, 8, 0.95);
    color: #0f172a;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.video-badge i {
    font-size: 0.9rem;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Video modal */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

/* Video container */
.video-modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8),
                0 0 60px rgba(234, 179, 8, 0.4);
    border: 2px solid rgba(234, 179, 8, 0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-modal.active .video-modal-container {
    transform: scale(1);
}

/* Video element */
.video-modal-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video info overlay */
.video-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    padding: 2rem;
    color: #fff;
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.video-modal-container:hover .video-info-overlay {
    opacity: 1;
    transform: translateY(0);
}

.video-info-overlay h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #eab308;
}

.video-info-overlay p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* Close button */
.video-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid rgba(234, 179, 8, 0.5);
    border-radius: 50%;
    color: #eab308;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.video-modal-close:hover {
    background: rgba(234, 179, 8, 0.2);
    border-color: #eab308;
    transform: rotate(90deg) scale(1.1);
}

/* Loading spinner */
.video-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 15;
}

.video-loading i {
    font-size: 3rem;
    color: #eab308;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Custom video controls (optional, if needed) */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal-container:hover .video-controls {
    opacity: 1;
}

.video-control-btn {
    width: 40px;
    height: 40px;
    background: rgba(234, 179, 8, 0.9);
    border: none;
    border-radius: 50%;
    color: #0f172a;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-control-btn:hover {
    background: #eab308;
    transform: scale(1.1);
}

.video-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.video-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #eab308 0%, #f59e0b 100%);
    width: 0%;
    transition: width 0.1s linear;
}

.video-time {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 100px;
    text-align: right;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .video-modal-container {
        width: 95%;
    }
    
    .video-modal-close {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .video-play-overlay {
        width: 80px;
        height: 80px;
    }
    
    .video-play-overlay i {
        font-size: 2rem;
    }
    
    .video-info-overlay {
        padding: 1rem;
    }
    
    .video-info-overlay h3 {
        font-size: 1.25rem;
    }
    
    .video-info-overlay p {
        font-size: 0.875rem;
    }
}

/* Accessibility */
.video-modal-close:focus,
.video-control-btn:focus {
    outline: 3px solid rgba(234, 179, 8, 0.6);
    outline-offset: 4px;
}

/* Performance */
.video-modal,
.video-modal-container {
    will-change: opacity, transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

