/* =============================================================================
   Casa Graziella — Lightbox
   ============================================================================= */

.cg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lb-fadein .2s ease;
}
@keyframes lb-fadein { from { opacity: 0; } to { opacity: 1; } }

.cg-lightbox[hidden] { display: none; }

.cg-lightbox__content {
    position: relative;
    max-width: min(90vw, 1200px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
}

.cg-lightbox__img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
}

.cg-lightbox__caption {
    color: #ddd;
    font-size: .9rem;
    text-align: center;
    margin: 0;
}

.cg-lightbox__counter {
    color: #888;
    font-size: .8rem;
    margin: 0;
}

.cg-lightbox__close,
.cg-lightbox__prev,
.cg-lightbox__next {
    position: fixed;
    z-index: 10000;
    background: rgba(255,255,255,.1);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    line-height: 1;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cg-lightbox__close:hover,
.cg-lightbox__prev:hover,
.cg-lightbox__next:hover { background: rgba(255,255,255,.25); }

.cg-lightbox__close { top: 1rem; right: 1rem; font-size: 1.8rem; }
.cg-lightbox__prev  { left: 1rem; top: 50%; transform: translateY(-50%); }
.cg-lightbox__next  { right: 1rem; top: 50%; transform: translateY(-50%); }

/* Gallery hover overlay */
.gallery-item { position: relative; overflow: hidden; cursor: pointer; }
.gallery-item__link { display: block; height: 100%; }
.gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s;
}
.gallery-item:hover .gallery-item__overlay { opacity: 1; }

/* Leaflet map marker */
.cg-map-marker { background: none; border: none; }
