/* Lower Plenty Dance Group – photo gallery on the home page */
.lpdg-gallery, .lpdg-viewer {
  --lpdg-accent: #007bff;     /* change this to retint the gallery */
  --lpdg-ink: #1d1d1f;
  --lpdg-muted: #6b6b70;
  --lpdg-line: #e6e6ea;
  --lpdg-tile: #eeeef1;
  --lpdg-gap: 8px;
  --lpdg-cols: 5;
}
.lpdg-gallery {
  margin: 48px 0 8px;
  font-family: Inter, system-ui, sans-serif;
  color: var(--lpdg-ink);
  width: 100%;
  flex: 0 0 100%;
  max-width: 100%;
}
.lpdg-gallery *, .lpdg-gallery *::before, .lpdg-gallery *::after,
.lpdg-viewer *, .lpdg-viewer *::before, .lpdg-viewer *::after { box-sizing: border-box; }

.lpdg-gallery__head { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-bottom: 12px; }
.lpdg-gallery__links { display: flex; align-items: center; gap: 18px; }
.lpdg-gallery__all {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--lpdg-accent);
  background: var(--lpdg-accent); color: #fff; font: inherit; font-weight: 500; font-size: .95rem; cursor: pointer;
  transition: filter .2s;
}
.lpdg-gallery__all:hover { filter: brightness(1.08); }
.lpdg-gallery__all:focus-visible { outline: 3px solid var(--lpdg-accent); outline-offset: 2px; }
.lpdg-gallery__fb { color: var(--lpdg-accent); font-weight: 500; font-size: .95rem; text-decoration: none; }
.lpdg-gallery__fb:hover { text-decoration: underline; color: var(--lpdg-accent); }

.lpdg-grid {
  display: grid;
  grid-template-columns: repeat(var(--lpdg-cols), minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: var(--lpdg-gap);
}

.lpdg-tile {
  position: relative; display: block; width: 100%; padding: 0; margin: 0; border: 0;
  border-radius: 10px; overflow: hidden; background: var(--lpdg-tile); cursor: zoom-in;
  aspect-ratio: 1 / 1;
}
.lpdg-tile--big { grid-column: span 2; grid-row: span 2; }
.lpdg-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s ease, opacity .3s ease; opacity: 0;
}
.lpdg-tile img.is-loaded { opacity: 1; }
.lpdg-tile:hover img { transform: scale(1.04); }
.lpdg-tile:focus-visible { outline: 3px solid var(--lpdg-accent); outline-offset: 2px; }

/* Album title over the big first photo */
.lpdg-tile--big { container-type: inline-size; }
.lpdg-tile__title {
  position: absolute; left: 0; right: 0; top: 3.2%; z-index: 1;
  display: flex; justify-content: center; pointer-events: none;
}
.lpdg-tile__title span {
  display: inline-block; max-width: 88%; text-align: center; text-align-last: right;
  font-family: Arial, Helvetica, sans-serif; font-weight: 400;
  font-size: 34px; font-size: 10.9cqw; line-height: 1.08; letter-spacing: .005em;
  color: #fff;
  -webkit-text-stroke: .2em #000; paint-order: stroke fill;
  filter: drop-shadow(0 .03em .06em rgba(0,0,0,.45));
  overflow-wrap: break-word;
}

.lpdg-tile__play {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; background: rgba(0,0,0,.6); display: grid; place-items: center;
  transition: background .2s, transform .2s;
}
.lpdg-tile__play::after {
  content: ""; margin-left: 4px; border-style: solid; border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}
.lpdg-tile:hover .lpdg-tile__play { background: var(--lpdg-accent); transform: scale(1.06); }
.lpdg-tile--video { cursor: pointer; background: #26262b; }

.lpdg-tile__more {
  position: absolute; inset: 0; background: rgba(20,20,24,.58); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
  transition: background .2s;
}
.lpdg-tile__more b { font-family: "Kumbh Sans", Inter, sans-serif; font-size: 1.7rem; font-weight: 500; }
.lpdg-tile__more span { font-size: .85rem; opacity: .9; margin-top: 2px; }
.lpdg-tile:hover .lpdg-tile__more { background: rgba(20,20,24,.45); }

/* Full-screen "View all" viewer */
html.lpdg-noscroll, html.lpdg-noscroll body { overflow: hidden; }
.lpdg-viewer {
  position: fixed; inset: 0; z-index: 1040; background: #fff; color: var(--lpdg-ink);
  font-family: Inter, system-ui, sans-serif; display: flex; flex-direction: column;
  animation: lpdg-fade .2s ease;
}
@keyframes lpdg-fade { from { opacity: 0; } }
.lpdg-viewer__bar {
  display: flex; align-items: center; gap: 16px; padding: 12px 20px;
  border-bottom: 1px solid var(--lpdg-line); background: #fff;
}
.lpdg-viewer__title { flex: 1; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.lpdg-viewer__title strong { font-family: "Kumbh Sans", Inter, sans-serif; font-size: 1.35rem; font-weight: 500; }
.lpdg-viewer__title span { color: var(--lpdg-muted); font-size: .92rem; }
.lpdg-viewer__close {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--lpdg-tile); color: var(--lpdg-ink);
  display: grid; place-items: center; cursor: pointer; transition: background .2s;
}
.lpdg-viewer__close:hover { background: #e2e2e7; }
.lpdg-viewer__close:focus-visible { outline: 3px solid var(--lpdg-accent); outline-offset: 2px; }
.lpdg-viewer__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 20px 40px; }
.lpdg-viewer__event { max-width: 1200px; margin: 0 auto; padding-top: 22px; }
.lpdg-viewer__head { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.lpdg-viewer__head h3 { font-family: "Kumbh Sans", Inter, sans-serif; font-size: 1.2rem; font-weight: 500; margin: 0; }
.lpdg-viewer__head span { color: var(--lpdg-muted); font-size: .9rem; }
.lpdg-viewer__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--lpdg-gap); }

.lpdg-skeleton .lpdg-tile { cursor: default; animation: lpdg-pulse 1.4s ease-in-out infinite; }
@keyframes lpdg-pulse { 50% { opacity: .55; } }
.lpdg-gallery__error { color: var(--lpdg-muted); }

@media (max-width: 767px) {
  .lpdg-gallery { --lpdg-cols: 3; --lpdg-gap: 6px; margin-top: 32px; }
  .lpdg-viewer { --lpdg-gap: 4px; }
  .lpdg-viewer__bar { padding: 10px 12px 10px 16px; }
  .lpdg-viewer__body { padding: 0 12px 32px; }
  .lpdg-viewer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lpdg-viewer .lpdg-tile { border-radius: 6px; }
  .lpdg-tile__play { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
}
@media (prefers-reduced-motion: reduce) {
  .lpdg-tile img, .lpdg-skeleton .lpdg-tile, .lpdg-viewer { transition: none; animation: none; }
}
