/* Photo & Video Gallery Block Plugin - Frontend Styles */

.wpvg-gallery {
    margin: 2rem 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.wpvg-gallery-empty {
    text-align: center;
    padding: 3rem;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Filter Buttons */
.wpvg-gallery-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.wpvg-filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #007cba;
    background: transparent;
    color: #007cba;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.wpvg-filter-btn:hover,
.wpvg-filter-btn.active {
    background: #007cba;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

/* Gallery Grid */
.wpvg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    gap: var(--gap, 20px);
    margin: 0 auto;
    /*max-width: 1200px;*/
}

/* Gallery Items */
.wpvg-gallery-item {
    position: relative;
    /*border-radius: 12px;*/
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 1;
    cursor: pointer;
}

.wpvg-gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.wpvg-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wpvg-gallery-item:hover img {
    transform: scale(1.05);
}

/* Image Items */
.wpvg-image-item {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Video Items */
.wpvg-video-item {
    position: relative;
    width: 100%;
    height: 100%;
}

.wpvg-video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

/* Overlay */
.wpvg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wpvg-gallery-item:hover .wpvg-overlay {
    opacity: 1;
}

.wpvg-overlay-content {
    text-align: center;
    color: white;
}

.wpvg-zoom-icon,
.wpvg-play-icon {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.wpvg-gallery-item:hover .wpvg-zoom-icon,
.wpvg-gallery-item:hover .wpvg-play-icon {
    transform: scale(1.1);
    background: white;
}

/* Lightbox Styles */
.wpvg-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.wpvg-lightbox.active {
    display: flex;
}

.wpvg-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.wpvg-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.wpvg-lightbox-title {
    color: white;
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.wpvg-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.wpvg-lightbox-close:hover {
    transform: scale(1.2);
}

/* Video Popup Styles */
.wpvg-video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.wpvg-video-popup.active {
    display: flex;
}

.wpvg-video-popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.wpvg-video-popup video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.wpvg-video-popup-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.wpvg-video-popup-close:hover {
    transform: scale(1.2);
}

/* Masonry Layout */
.wpvg-gallery[data-layout="masonry"] .wpvg-gallery-grid {
    columns: var(--columns, 3);
    column-gap: var(--gap, 20px);
}

.wpvg-gallery[data-layout="masonry"] .wpvg-gallery-item {
    break-inside: avoid;
    margin-bottom: var(--gap, 20px);
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wpvg-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .wpvg-gallery[data-layout="masonry"] .wpvg-gallery-grid {
        columns: 2;
        column-gap: 15px;
    }
    
    .wpvg-gallery-filters {
        gap: 0.25rem;
    }
    
    .wpvg-filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .wpvg-zoom-icon,
    .wpvg-play-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .wpvg-gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .wpvg-gallery[data-layout="masonry"] .wpvg-gallery-grid {
        columns: 1;
    }
    
    .wpvg-lightbox-content,
    .wpvg-video-popup-content {
        max-width: 95%;
    }
}

/* Loading Animation */
.wpvg-gallery-item.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Filter Animation */
.wpvg-gallery-item {
    transition: all 0.4s ease;
}

.wpvg-gallery-item.filtered-out {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Accessibility */
.wpvg-gallery-item:focus {
    outline: 3px solid #007cba;
    outline-offset: 2px;
}

.wpvg-filter-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wpvg-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .wpvg-zoom-icon,
    .wpvg-play-icon {
        background: white;
        color: black;
        border: 2px solid black;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wpvg-gallery-item,
    .wpvg-overlay,
    .wpvg-zoom-icon,
    .wpvg-play-icon,
    .wpvg-filter-btn {
        transition: none;
    }
    
    .wpvg-gallery-item:hover {
        transform: none;
    }
    
    .wpvg-gallery-item:hover img {
        transform: none;
    }
} 

.nk-awb {
    width: 100%;
    height: 100%;
}