.masonry {
  column-count: 4;
  column-gap: 12px;
}
.masonry img {
  width: 100%;
  display: block;
  margin: 0 0 12px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  break-inside: avoid;
}

/* Responsive columns */
@media (max-width: 1200px) { .masonry { column-count: 3; } }
@media (max-width: 900px)  { .masonry { column-count: 2; } }
@media (max-width: 600px)  { .masonry { column-count: 1; } }

/* Lightbox overlay */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,.85);
  justify-content: center;
  align-items: center;
}
.lightbox.active { display: flex; cursor: zoom-out; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 2px 16px rgba(0,0,0,.6); }

/* Nice cursor on gallery images */
article[data-page-class~="masonry"] img { cursor: zoom-in; }

