/* Media Viewer Modal Styles */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-modal-content {
    position: relative;
    width: 90%;
    max-width: 1400px;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-modal video {
    width: 100%;
    height: auto;
    max-height: 90vh;
    border-radius: 8px;
}

.gallery-modal-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    padding: 3rem 2rem 2rem;
    color: white;
    text-align: center;
}

.gallery-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-modal-description {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.gallery-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10000;
}

.gallery-modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.gallery-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 2rem;
}

.gallery-nav.next {
    right: 2rem;
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-counter {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    z-index: 10000;
}

.media-preview {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.media-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.media-preview img,
.media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-preview video {
    pointer-events: none;
}

@media (max-width: 768px) {
    .gallery-nav {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    
    .gallery-nav.prev {
        left: 1rem;
    }
    
    .gallery-nav.next {
        right: 1rem;
    }
    
    .gallery-modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .gallery-counter {
        top: 1rem;
        left: 1rem;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}
