/* EventGH responsive, click-to-view photo gallery.
   Does not change the original grid, About photos, or homepage banner. */
#gallery .showcase-grid img,
.profile-gallery img {
  cursor: zoom-in;
  transition: filter .2s ease;
}
#gallery .showcase-grid img:hover,
.profile-gallery img:hover { filter: brightness(.92); }
#gallery .showcase-grid img:focus-visible,
.profile-gallery img:focus-visible {
  outline: 3px solid #b88d49;
  outline-offset: 4px;
}

dialog.eventgh-lightbox {
  position: fixed;
  width: min(1120px, calc(100vw - 24px));
  height: min(88dvh, 860px);
  max-width: none;
  max-height: none;
  padding: 0;
  margin: auto;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #111;
  color: white;
  box-shadow: 0 18px 70px #0009;
}
dialog.eventgh-lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.eventgh-lightbox-inner {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px 44px 56px;
}
.eventgh-lightbox-photo {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  touch-action: pan-y;
}
.eventgh-lightbox-close,
.eventgh-lightbox-prev,
.eventgh-lightbox-next {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  background: #fffef0ef;
  color: #202520;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  width: 38px;
  height: 38px;
  line-height: 1;
  font-size: 28px;
  box-shadow: 0 2px 14px #0004;
}
.eventgh-lightbox-close { top: 12px; right: 12px; }
.eventgh-lightbox-prev { left: 10px; top: calc(50% - 19px); }
.eventgh-lightbox-next { right: 10px; top: calc(50% - 19px); }
.eventgh-lightbox-prev[hidden],
.eventgh-lightbox-next[hidden] { display: none; }
.eventgh-lightbox-count {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  font-size: .85rem;
  letter-spacing: .04em;
}
@media (max-width: 600px) {
  dialog.eventgh-lightbox {
    width: calc(100vw - 12px);
    height: min(89dvh, 780px);
    border-radius: 10px;
  }
  .eventgh-lightbox-inner { padding: 45px 8px 53px; }
  .eventgh-lightbox-prev { left: 7px; }
  .eventgh-lightbox-next { right: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  #gallery .showcase-grid img, .profile-gallery img { transition: none; }
}
