.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: none;
}

.gallery-modal.show {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-content {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.gallery-content img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    transition: opacity 0.2s ease;
}

.gallery-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5rem;
    height: 3.5rem;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.gallery-nav.prev { left: 2rem; }
.gallery-nav.next { right: 2rem; }

.gallery-close:hover,
.gallery-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.gallery-nav:hover.prev { transform: translateY(-50%) scale(1.1); }
.gallery-nav:hover.next { transform: translateY(-50%) scale(1.1); }

.gallery-counter {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.gallery-count {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-count {
    transform: scale(1.05);
}
