/* ================= LIGHTBOX IMMAGINI ================= */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  z-index: 1;
}

.lightbox-content img {
  width: auto;
  height: auto;
  max-width: 95vw;
  max-height: 95vh;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  z-index: 1;
}

/* Pulsante chiusura fuori dalla foto */
.lightbox-close {
  position: absolute;
  top: 16px;       /* margine dall’alto dell’overlay */
  right: 16px;     /* margine dal lato destro */
  font-size: 36px;
  color: white;
  cursor: pointer;
  user-select: none;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lightbox-close-text {
  font-size: 16px;
  text-transform: uppercase;
}

/* Effetto hover sulle immagini cliccabili */
.lightbox-trigger {
  cursor: zoom-in;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    z-index: 1;
  }
  .lightbox-close {
    font-size: 1.8rem;
    top: 16px;   /* dentro lo schermo */
    right: 16px;
    z-index: 10000; /* assicurato sopra immagine */
  }
  .lightbox-close-text {
    font-size: 12px;
  }
 .lightbox-overlay {
    padding-top: 20px; /* lascia spazio in alto per la X */
  }
}

