@charset "utf-8";
/* CSS Document */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  font-family: sans-serif;
  background: #000;
}

/* ===== GALLERIA ===== */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));   /* ===== orig, 250 ===== */
  gap: 16px;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.03);
  opacity: 0.95;
}

/* ===== LIGHTBOX ===== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  animation: zoomIn 0.25s ease;
}

/* Animazione apertura */
@keyframes zoomIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
