/* Project Gallery — responsive masonry.
   Uses CSS columns so every image keeps its own natural width/height ratio
   instead of being cropped into a fixed box. */

.pgal-masonry {
  width: 100%;
  margin: 20px 0;
  column-count: 4;
  column-gap: 12px;
}

.pgal-item {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  display: block;
}

.pgal-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.pgal-has-lightbox .pgal-trigger {
  cursor: zoom-in;
}

.pgal-has-lightbox .pgal-trigger:hover {
  opacity: 0.92;
}

.pgal-empty {
  color: #8a8d92;
  font-style: italic;
}

/* Responsive column count — overrides the inline column-count for smaller screens */
@media (max-width: 1100px) {
  .pgal-masonry {
    column-count: 3 !important;
  }
}

@media (max-width: 720px) {
  .pgal-masonry {
    column-count: 2 !important;
  }
}

@media (max-width: 420px) {
  .pgal-masonry {
    column-count: 1 !important;
  }
}

/* Lightbox overlay */
.pgal-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 30px;
  box-sizing: border-box;
}

.pgal-lightbox.pgal-open {
  display: flex;
}

.pgal-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.pgal-lightbox-close {
  position: absolute;
  top: 18px;
  right: 26px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  font-weight: 300;
  user-select: none;
}
