/* Video Works Block Styles */

.video_works_block {
    padding: 88px 0 150px;
    background: linear-gradient(90deg, #102A83 0%, #504F99 26%, #102A83 61%, #004A95 100%);
}

.video_works_block .container {
    max-width: 1360px;
    padding: 0 40px;
}

.video-works-title {
    font-family: "DejaVu Sans";
    margin-bottom: 83px;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

/* Grid Layout - 4 items per row */
.video-works-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.video-work-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-work-item:hover {
    transform: translateY(-5px);
}

.video-work-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 175%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #000;
}

.video-work-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.video-work-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);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-work-item:hover .video-work-play-overlay {
    opacity: 1;
}

.play-icon {
    transition: transform 0.3s ease;
}

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

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 10000;
    animation: slideUp 0.3s ease;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s ease;
}

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

.video-modal-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-modal-player iframe,
.video-modal-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

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

/* Tablet - 2 items per row */
@media (max-width: 1024px) {
    .video-works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .video-works-title {
        font-size: 2rem;
    }
}

/* Mobile - 1 item per row */
@media (max-width: 640px) {
    .video_works_block {
        padding: 40px 0;
    }

    .video-works-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .video-works-title {
        font-size: 1.75rem;
        margin-bottom: 30px;
    }

    .video-modal-content {
        width: 95%;
    }

    .video-modal-close {
        top: -45px;
    }

    .play-icon {
        width: 60px;
        height: 60px;
    }
}
