/* Gallery Lightbox CSS • 2025-10-20 */
.gallery-grid {
  --glb-min-col: 500;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--glb-min-col)*1px, 100%), 1fr));
  gap: 10px;
  margin-top: 20px;
}
.gallery-grid figure {
  margin: 0;
}
.gallery-grid img {
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform .2s ease;
  display: block;
}
.gallery-grid img:hover {
  transform: scale(1.03);
}
.gallery-grid figcaption {
  font-size: .9rem;
  margin-top: 6px;
  color: #444;
}

/* Lightbox */
.glb-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.glb-lightbox.active {
  display: flex;
}
.glb-content {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
  max-width: 80vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: glb-fade .2s ease;
}
.glb-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 6px;
}
.glb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  color: #333;
  background: rgba(255,255,255,.7);
  padding: 6px 12px;
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
  transition: background .2s;
}
.glb-arrow:hover {
  background: rgba(255,255,255,1);
}
.glb-arrow.left { left: -40px; }
.glb-arrow.right { right: -40px; }
.glb-close {
  position: absolute;
  top: -15px;
  right: -15px;
  font-size: 22px;
  background: #fff;
  border-radius: 50%;
  padding: 6px 10px;
  cursor: pointer;
  border: 1px solid #ccc;
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
}
@keyframes glb-fade {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: scale(1); }
}
