/* Video Gallery styles */

.video-gallery-container {
    padding: 40px 0 40px;
    background-color: #fff;
    min-height: 100vh;
}

/* Video Grid Layout */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

.video-item {
    position: relative;
    overflow: hidden;
    background-color: #000;
    transition: opacity 0.3s ease;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    aspect-ratio: 1/1;
}

.video-item:hover {
    opacity: 0.9;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.video-thumbnail video,
.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Play button overlay */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
    pointer-events: none;
}

.video-item:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.5);
}

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

.video-item:hover .video-play-icon {
    transform: scale(1.1);
}

.video-play-icon::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 25px solid #E43D12;
    margin-left: 5px;
}

/* Loading and error states */
.loading {
    text-align: center;
    padding: 50px 0;
    color: #000;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    grid-column: 1 / -1;
}

.error-message {
    text-align: center;
    padding: 30px;
    color: #000;
    max-width: 600px;
    margin: 0 auto;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

/* Full-page Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.video-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    transition: opacity 0.3s ease;
}

.video-modal-close:hover {
    opacity: 0.7;
}

.video-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Preserve aspect ratio */
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-play-icon {
        width: 50px;
        height: 50px;
    }
    
    .video-play-icon::after {
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        border-left: 20px solid #E43D12;
    }
    
    .video-modal-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .video-modal-content {
        width: 95%;
        height: 95%;
    }
}

@media (max-width: 480px) {
    .video-gallery-container {
        padding: 60px 0 20px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-play-icon {
        width: 40px;
        height: 40px;
    }
    
    .video-play-icon::after {
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-left: 15px solid #E43D12;
    }
}