.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  margin: 0;
}

.gallery-link {
  display: block;
}

.gallery-link img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1; /* makes square thumbnails */
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close:hover {
  color: #ccc;
}

.gallery-item video {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1;
  cursor: pointer;
}