/* Video Gallery Styles */
.video-gallery {
    padding: 0 0 40px;
    overflow: hidden;
}

.video-gallery #content-container {
    overflow: hidden;
}

.video-gallery .page-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.video-gallery-item {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #000;
}

.video-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.video-gallery-item .thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 133.33%; /* 3:4 aspect ratio */
    overflow: hidden;
}

.video-gallery-item .thumb-wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-gallery-item .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.15);
    transition: background 0.3s ease;
}

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

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

.video-gallery-item:hover .play-overlay .play-btn {
    transform: scale(1.1);
    background: rgba(255, 0, 0, 1);
}

.video-gallery-item .play-overlay .play-btn::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 22px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}

.video-gallery-item .video-title {
    padding: 10px 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.75);
    letter-spacing: 1px;
}

/* Modal */
.video-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

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

.video-modal-content {
    position: relative;
    width: 360px;
    max-width: 90vw;
    max-height: 90vh;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-close:hover {
    color: #ff4444;
}

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

    .video-gallery .page-title {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .video-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 5px;
    }

    .video-gallery .page-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .video-gallery-item .play-overlay .play-btn {
        width: 48px;
        height: 48px;
    }

    .video-gallery-item .play-overlay .play-btn::after {
        border-width: 9px 0 9px 16px;
        margin-left: 3px;
    }

    .video-gallery-item .video-title {
        font-size: 12px;
        padding: 8px;
    }

    .video-modal-content {
        width: 300px;
    }
}

@media (max-width: 480px) {
    .video-gallery-grid {
        gap: 10px;
    }

    .video-gallery-item {
        border-radius: 8px;
    }

    .video-gallery-item .play-overlay .play-btn {
        width: 40px;
        height: 40px;
    }

    .video-gallery-item .play-overlay .play-btn::after {
        border-width: 7px 0 7px 13px;
        margin-left: 2px;
    }

    .video-gallery-item .video-title {
        font-size: 11px;
        padding: 6px;
        letter-spacing: 0.5px;
    }
}
