/* ============================================================
   GRANDI VOCI — Gallery
   Carousel + Lightbox + Grid
   ============================================================ */

.gallery-section {
    padding: var(--sp-16) var(--sp-4);
    background: var(--bg-deep);
}

/* ── Grid Layout ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--sp-4);
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all var(--t-slow) var(--ease-out);
    background: #111;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.6);
    transition: all 0.8s var(--ease-out);
}

.gallery-item:hover {
    transform: translateY(-10px);
    border-color: var(--gold-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px var(--gold-subtle);
}

.gallery-item:hover img {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.1);
}

.gallery-item .overlay-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--sp-4) var(--sp-3);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--t-normal) var(--ease-out);
}

.gallery-item:hover .overlay-label {
    opacity: 1;
    transform: translateY(0);
}

.overlay-label p {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--gold-primary);
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    z-index: 5000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(30px);
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius-md);
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 60px var(--gold-glow);
    object-fit: contain;
}

.lb-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2.5rem;
    color: var(--text-white);
    cursor: pointer;
    transition: var(--t-fast);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
}

.lb-close:hover {
    color: var(--gold-primary);
    border-color: var(--gold-primary);
}

.lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5010;
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: rgba(0, 0, 0, 0.5);
    color: var(--gold-primary);
    cursor: pointer;
    transition: var(--t-normal);
    user-select: none;
    backdrop-filter: blur(10px);
}

.lb-arrow:hover {
    background: var(--gold-primary);
    color: var(--bg-void);
    box-shadow: var(--shadow-glow);
}

.lb-arrow.left  { left: 30px; }
.lb-arrow.right { right: 30px; }

.lb-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--text-dim);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--sp-2);
    }
}
