/* Modal overlay */
.venegazzu-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Modal inner content */
.venegazzu-modal-content {
  width: 80%;
  max-width: 1100px;
  max-height: 90vh;
  margin: 0 auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  .slick-next-icon,
  .slick-prev-icon {
    display: none !important;
  }
}

/* Close button */
.venegazzu-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  padding: 0 8px;
}

/* Slick slide image */
.venegazzu-slick .venegazzu-slide {
  text-align: center;
}
.venegazzu-slick .venegazzu-slide img {
  max-width: 100%;
  max-height: 80vh;
  margin: 0 auto;
  display: inline-block;
}

/* ensure slick arrows visible on dark bg */
.slick-prev:before,
.slick-next:before {
  color: #fff;
}

/* small responsive tweaks */
@media (max-width: 600px) {
  .venegazzu-modal-content {
    max-width: 95%;
  }
  .venegazzu-modal-close {
    top: -34px;
    font-size: 28px;
  }
}

/* Masonry Grid */
.venegazzu-masonry-grid {
  margin: 20px 0;
}

.venegazzu-masonry-grid .masonry-item {
  width: calc(33.333% - 10px);
  margin: 0;
  position: relative;
  overflow: hidden;
}

/* Responsive columns */
.venegazzu-masonry-grid.columns-2 .masonry-item {
  width: calc(50% - 10px);
}

.venegazzu-masonry-grid.columns-4 .masonry-item {
  width: calc(25% - 10px);
}

.venegazzu-masonry-grid.columns-5 .masonry-item {
  width: calc(20% - 10px);
}

.venegazzu-masonry-grid.columns-6 .masonry-item {
  width: calc(16.666% - 10px);
}

/* Link e immagine */
.venegazzu-masonry-grid .venegazzu-lightbox {
  display: block;
  position: relative;
  overflow: hidden;
}

.venegazzu-masonry-grid .masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.venegazzu-masonry-grid .venegazzu-lightbox:hover img {
  transform: scale(1.05);
}

/* Overlay categoria */
.category-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.venegazzu-lightbox:hover .category-overlay {
  transform: translateY(0);
}

/* Modale lightbox */
.venegazzu-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.venegazzu-modal-content {
  position: absolute;
  width: 85%;
  max-width: 1600px;
  max-height: 90vh;
}

.venegazzu-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  padding: 0;
  width: 40px;
  height: 40px;
}

.venegazzu-modal-close:hover {
  color: #ccc;
}

.venegazzu-slick img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
  .venegazzu-masonry-grid .masonry-item {
    width: calc(50% - 10px) !important;
  }

  .category-overlay {
    transform: translateY(0);
    font-size: 12px;
    padding: 6px 8px;
  }
}

@media (max-width: 480px) {
  .venegazzu-masonry-grid .masonry-item {
    width: calc(100% - 10px) !important;
  }
}
