/* Video Modal CSS */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.video-modal-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
}

.video-modal-content {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.video-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s ease;
}

.video-modal-close:hover {
    transform: rotate(90deg);
}

.video-modal-close svg {
    width: 20px;
    height: 20px;
    fill: #333;
}


.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-embed,
.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-embed iframe,
.video-embed video {
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #111;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-placeholder p {
    margin: 0;
    color: #ccc;
}

/* Video Trigger Styles */
.video-modal-trigger {
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s ease;
    max-width: 60%;
}

.video-modal-trigger:hover {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .video-modal {
        padding: 10px;
    }
    
   
    
    .video-modal-container {
        max-height: 80vh;
    }
}