.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;

  z-index: 9999;
}

/* stato attivo */
.lightbox.is-open{
  opacity: 1;
  visibility: visible;
}

/* animazione immagine (leggero zoom elegante) */
.lightbox-inner img{
  max-width: 90%;
  max-height: 80vh;
  transform: scale(0.95);
  transition: transform 300ms ease;
}

.lightbox.is-open .lightbox-inner img{
  transform: scale(1);
}


/* X in alto a destra */
.lightbox-close{
  position: fixed;
  top: 18px;
  right: 22px;
  font-size: 40px;
  line-height: 1;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
}

/* frecce laterali */
.lightbox-prev,
.lightbox-next{
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.55);
  font-size: 60px;
  cursor: pointer;
  padding: 10px 16px;
}

.lightbox-prev{ left: 18px; }
.lightbox-next{ right: 18px; }

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover{
  color: rgba(255,255,255,1);
}
