.gallery-page {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 72px);
}

.gallery-sidebar {
  position: sticky;
  top: 108px;
  align-self: start;
}

.gallery-sidebar h1 { max-width: 100%; font-size: clamp(2rem, 2.7vw, 46px); line-height: 1; letter-spacing: -.04em; overflow-wrap: anywhere; margin: 0 0 16px; }
.gallery-sidebar p:not(.content-block__eyebrow) { color: var(--muted); margin: 0 0 28px; }
.gallery-filters { display: grid; gap: 20px; margin-bottom: 28px; }
.gallery-filter-group { display: grid; gap: 8px; }
.gallery-filter-group__label { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.gallery-filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.gallery-filter-pill { min-height: 30px; padding: 0 11px; border-radius: 999px; background: rgba(255, 255, 255, .045); color: var(--muted); box-shadow: none; font-size: .76rem; font-weight: 400; line-height: 1; }
.gallery-filter-pill:hover, .gallery-filter-pill:focus-visible { transform: none; background: rgba(255, 255, 255, .08); color: var(--text); filter: none; }
.gallery-filter-pill.is-active { background: #2f3b66; color: #fff; }

.gallery-grid { columns: 3; column-gap: 12px; }
.gallery-item { position: relative; display: block; width: 100%; min-height: 0; padding: 0; margin: 0 0 12px; break-inside: avoid; border-radius: 0; background: transparent; box-shadow: none; overflow: hidden; }
.gallery-item:hover, .gallery-item:focus-visible { transform: none; filter: brightness(1.08); }
.gallery-item img { width: 100%; height: auto; }
.gallery-item__play { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: rgba(12, 13, 20, .72); color: var(--text); font-size: 9px; }
.gallery-load-more { margin: 32px auto 0; display: flex; }
.gallery-empty { color: var(--muted); }
.gallery-mobile-filters { display: none; }

.gallery-lightbox { position: fixed; inset: 0; z-index: 100; overflow: hidden; background: rgba(5, 6, 10, .94); padding: 36px; }
.gallery-lightbox__media { width: calc(100vw - 72px); height: calc(100dvh - 72px); min-width: 0; min-height: 0; display: grid; place-items: center; }
.gallery-lightbox__media img { display: block; width: auto; height: auto; max-width: calc(100vw - 72px); max-height: calc(100dvh - 72px); object-fit: contain; }
.gallery-lightbox__media iframe { width: min(1200px, 100%); aspect-ratio: 16 / 9; border: 0; }
.gallery-lightbox__close { position: absolute; top: 14px; right: 18px; z-index: 2; min-width: 42px; padding: 0; background: transparent; color: var(--text); box-shadow: none; font-size: 30px; }
.gallery-lightbox__nav { position: absolute; top: 50%; z-index: 2; width: 46px; min-height: 64px; padding: 0; border-radius: 999px; background: rgba(12, 13, 20, .48); color: var(--text); box-shadow: none; font-size: 42px; font-weight: 400; transform: translateY(-50%); }
.gallery-lightbox__nav:hover, .gallery-lightbox__nav:focus-visible { transform: translateY(-50%); background: rgba(47, 59, 102, .9); filter: none; }
.gallery-lightbox__nav--previous { left: 14px; }
.gallery-lightbox__nav--next { right: 14px; }
.gallery-lightbox-open { overflow: hidden; }

@media (max-width: 760px) {
  .gallery-page { display: block; padding-bottom: 72px; }
  .gallery-sidebar { display: none; position: fixed; inset: auto 14px 64px; z-index: 40; max-height: calc(100vh - 100px); overflow: auto; padding: 22px; background: var(--bg-elevated); }
  .gallery-sidebar.is-open { display: block; }
  .gallery-sidebar h1, .gallery-sidebar > p:not(.content-block__eyebrow), .gallery-sidebar > .button { display: none; }
  .gallery-filter-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .gallery-filter-pills::-webkit-scrollbar { display: none; }
  .gallery-filter-pill { flex: 0 0 auto; }
  .gallery-grid { columns: 3; column-gap: 5px; }
  .gallery-item { margin-bottom: 5px; }
  .gallery-mobile-filters { position: fixed; left: 14px; right: 14px; bottom: 12px; z-index: 35; display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 8px 0 16px; border-radius: 999px; background: rgba(23, 25, 36, .94); backdrop-filter: blur(16px); font-weight: 700; }
  .gallery-mobile-filters button { min-height: 36px; box-shadow: none; }
  .gallery-lightbox { padding: 16px; }
  .gallery-lightbox__media { width: calc(100vw - 32px); height: calc(100dvh - 32px); }
  .gallery-lightbox__media img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); }
  .gallery-lightbox__nav { top: auto; bottom: 20px; width: 42px; min-height: 42px; font-size: 32px; transform: none; }
  .gallery-lightbox__nav:hover, .gallery-lightbox__nav:focus-visible { transform: none; }
  .gallery-lightbox__nav--previous { left: calc(50% - 52px); }
  .gallery-lightbox__nav--next { right: calc(50% - 52px); }
}
