.jw-gallery { padding-bottom: 150px; }
.jw-gallery__filterbar {
  position: sticky; top: 78px; z-index: 5;
  padding: 18px 0 14px; margin-bottom: 4px;
  background: var(--jw-bg);
}
.jw-gallery__filters {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 26px; margin-bottom: 18px;
}
.jw-gallery__filters:last-child { margin-bottom: 0; }
.jw-gallery__filters button {
  background: none; border: none; padding: 4px 0; margin: 0;
  font: inherit; cursor: pointer;
  color: var(--jw-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .18em;
  border-bottom: 1px solid transparent;
  transition: color .25s var(--jw-ease), border-color .25s var(--jw-ease);
}
.jw-gallery__filters button:hover { color: var(--jw-text); }
.jw-gallery__filters button.is-active { color: var(--jw-text); border-bottom-color: var(--jw-text); }
.jw-gallery__filters--region { gap: 14px; }
.jw-gallery__filters--region button { font-size: 9px; }
.jw-gallery__filters--region button + button::before { content: "\00b7"; margin-right: 14px; color: var(--jw-border); }
.jw-gallery__divider { width: 60px; height: 1px; margin: 0 auto 42px; background: var(--jw-border); }
.jw-gallery__grid { columns: 3 320px; column-gap: 5px; opacity: 1; transition: opacity .25s ease; }
.jw-gallery__grid.is-filtering { opacity: .35; }
.jw-gallery__item { display: block; break-inside: avoid; margin-bottom: 5px; overflow: hidden; background: var(--jw-bg-3); }
.jw-gallery__item img { width: 100%; transition: transform .8s var(--jw-ease); }
.jw-gallery__item:hover img { transform: scale(1.02); }
.jw-gallery__sentinel { break-inside: avoid; height: 1px; }

.jw-lightbox-open { overflow: hidden; }
.jw-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: jw-lightbox-fade .2s ease forwards;
}
@keyframes jw-lightbox-fade { to { opacity: 1; } }
.jw-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(17 17 15 / 96%);
  backdrop-filter: blur(6px);
}
.jw-lightbox__frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  padding: 24px 96px;
  color: var(--jw-text);
}
.jw-lightbox__content { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
.jw-lightbox__content img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgb(0 0 0 / 55%);
}
.jw-lightbox__controls {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  display: flex;
  gap: .5rem;
}
.jw-lightbox button {
  border: 1px solid var(--jw-border);
  border-radius: 4px;
  padding: .5rem .9rem;
  color: var(--jw-text);
  background: rgb(17 17 15 / 60%);
  font-family: var(--jw-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.jw-lightbox button:hover, .jw-lightbox button:focus-visible {
  background: rgb(17 17 15 / 85%);
  border-color: var(--jw-accent);
  color: var(--jw-accent);
}
.jw-lightbox__previous, .jw-lightbox__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}
.jw-lightbox__previous { left: 20px; }
.jw-lightbox__next { right: 20px; }
.jw-lightbox__caption {
  flex: 0 0 auto;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  max-width: 100%;
  text-align: center;
}
.jw-lightbox__caption span {
  font-family: var(--jw-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--jw-muted);
}

@media (max-width: 640px) {
  .jw-gallery__filters {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto;
    gap: 22px; padding: 0 4px 4px; margin-bottom: 14px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .jw-gallery__filters::-webkit-scrollbar { display: none; }
  .jw-gallery__filters button { flex: 0 0 auto; white-space: nowrap; }
  .jw-lightbox__frame { padding: 16px 8px; }
  .jw-lightbox__previous { left: 8px; }
  .jw-lightbox__next { right: 8px; }
  .jw-lightbox__caption span { font-size: 14px; }
}