/**
 * JC3 — uniform photo gallery framing (Past Events + FooGallery-ready)
 * Targets WordPress [gallery] shortcode output on public pages.
 */

body.jc3-site .entry-content .gallery,
body.jc3-site .gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
}

body.jc3-site .gallery-item {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  text-align: center;
}

body.jc3-site .gallery-icon {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--jc3-radius);
  background: var(--jc3-navy-deep);
  box-shadow: var(--jc3-shadow);
}

body.jc3-site .gallery-icon a {
  display: block;
  width: 100%;
  height: 100%;
}

body.jc3-site .gallery-item img,
body.jc3-site .gallery-icon img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center center;
  display: block;
  border: none !important;
}

body.jc3-site .gallery-caption {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--jc3-silver);
  margin-top: 0.5rem;
  padding: 0 0.25rem;
}

@media (max-width: 480px) {
  body.jc3-site .entry-content .gallery,
  body.jc3-site .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.jc3-site .gallery-icon a {
    transition: none;
  }
}
