/* CG Gallery — grid + lightbox */
.cg-gallery { margin: 2rem 0; }
.cg-gallery-loading { text-align: center; color: #777; }
.cg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.cg-gal-item {
  margin: 0;
  cursor: zoom-in;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cg-gal-item:hover, .cg-gal-item:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  outline: none;
}
.cg-gal-item img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.cg-gal-item figcaption {
  padding: .5rem .75rem;
  font-size: .85rem;
  color: #444;
}
/* Lightbox */
.cg-gal-lightbox {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}
.cg-gal-lightbox[hidden] { display: none; }
.cg-gal-lightbox img {
  max-width: 92vw; max-height: 80vh;
  box-shadow: 0 0 30px rgba(0,0,0,.6);
}
.cg-gal-lightbox-caption {
  color: #eee; margin-top: .75rem; font-size: .95rem;
}
.cg-gal-lightbox-close, .cg-gal-lightbox-nav {
  position: absolute;
  background: none; border: none; color: #fff;
  font-size: 2rem; cursor: pointer; line-height: 1;
  padding: .5rem;
}
.cg-gal-lightbox-close { top: .5rem; right: 1rem; }
.cg-gal-lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 2.5rem; }
.cg-gal-lightbox-prev { left: .75rem; }
.cg-gal-lightbox-next { right: .75rem; }
.cg-gal-lightbox-close:hover, .cg-gal-lightbox-nav:hover { color: #ffd; }
