
.cgl-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Default: tablet e mobile */
  gap: 15px;
  margin: 30px 0;
}
@media (min-width: 1025px) {
  .cgl-gallery {
    grid-template-columns: repeat(5, 1fr); /* Desktop */
  }
}

.cgl-gallery .cgl-tile img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

@media (max-width: 768px) {
  .cgl-gallery .cgl-tile img {
  height: 200px;
  }
}

#cgl-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}
#cgl-modal img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
  transition: opacity 0.3s ease;
}
#cgl-modal .cgl-close,
#cgl-modal .cgl-nav {
  position: absolute;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  user-select: none;
  z-index: 10001;
}
#cgl-modal .cgl-close {
  top: 20px;
  right: 30px;
}
#cgl-modal .cgl-nav.prev {
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}
#cgl-modal .cgl-nav.next {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}
#cgl-caption {
  color: white;
  margin-top: 15px;
  text-align: center;
  max-width: 90%;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
