/* Video Gallery Frontend Styles */

/* Gallery Grid */
.vg-gallery-container {
    width: 100%;
    margin: 20px 0;
}

.vg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.vg-gallery-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.vg-gallery-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .vg-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .vg-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Video Item */
.vg-video-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vg-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Thumbnail */
.vg-video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
}

.vg-thumbnail-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vg-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vg-video-item:hover .vg-video-overlay {
    opacity: 1;
}

.vg-play-button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.vg-play-button:hover {
    background: #fff;
    transform: scale(1.1);
}

.vg-play-icon {
    font-size: 24px;
    color: #333;
    margin-left: 4px;
}

/* Video Info */
.vg-video-info {
    padding: 15px;
}

.vg-video-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.vg-video-date {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
}

.vg-video-actions {
    display: flex;
    gap: 10px;
}

.vg-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.vg-download-btn:hover {
    background: #005a87;
    color: #fff;
}

.vg-download-btn .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* Modal */
.vg-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.vg-modal-content {
    position: relative;
    margin: 2% auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
}

.vg-modal-close {
    position: absolute;
    top: -10px;
    right: 10px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000000;
}

.vg-modal-close:hover,
.vg-modal-close:focus {
    color: #ccc;
}

#vg-modal-title {
    color: #fff;
    margin: 0 0 15px 0;
    font-size: 24px;
}

#vg-modal-video {
    width: 100%;
    height: auto;
    background: #000;
    outline: none;
}

@media (max-width: 768px) {
    .vg-modal-content {
        width: 95%;
        padding: 10px;
    }
    
    #vg-modal-title {
        font-size: 18px;
    }
}
