/* Gallery: a single photo-only, filterable page. Scoped to page-gallery.html. */
.bbs-photo-gallery { --g-navy:#182f5c; --g-gold:#bf9155; --g-paper:#f7f4ee; --g-line:#e3d9cd; color:var(--g-navy); font-family:var(--wp--preset--font-family--body); }
.bbs-photo-gallery *, .bbs-photo-gallery *::before, .bbs-photo-gallery *::after { box-sizing:border-box; }
.bbs-photo-gallery [hidden] { display:none !important; }
.bbs-gallery-main.wp-block-group { margin-block-start:0; }
.bbs-photo-gallery-shell { width:min(calc(100% - 8rem),80rem); margin-inline:auto; }
.bbs-photo-gallery-hero { padding-block:clamp(3.5rem,7vw,7rem) clamp(2.5rem,4vw,4rem); text-align:center; }
.bbs-photo-gallery-hero h1 { margin:1rem 0 1.25rem; font:400 clamp(2.75rem,5vw,4.75rem)/1.08 var(--wp--preset--font-family--heading); letter-spacing:-.035em; text-wrap:balance; }
.bbs-photo-gallery-hero > p:last-child { max-width:38rem; margin-inline:auto; line-height:1.7; font-size:1rem; text-wrap:pretty; }
.bbs-photo-gallery-eyebrow { margin:0; font-weight:600; font-size:.7rem; letter-spacing:.2em; }
.bbs-photo-gallery-eyebrow::before,.bbs-photo-gallery-eyebrow::after { content:''; display:inline-block; width:1.5rem; height:1px; background:var(--g-gold); vertical-align:middle; margin-inline:.75rem; }
.bbs-photo-gallery-main { scroll-margin-top:7rem; padding-bottom:clamp(4rem,7vw,7rem); }
.bbs-photo-gallery-filters { display:flex; justify-content:center; flex-wrap:wrap; gap:.5rem; padding-block:1rem 1.5rem; border-top:1px solid var(--g-line); border-bottom:1px solid var(--g-line); }
.bbs-photo-gallery-filter { appearance:none; padding:.68rem 1.05rem; border:1px solid transparent; border-radius:2px; background:transparent; color:var(--g-navy); font:600 .7rem/1.35 var(--wp--preset--font-family--body); letter-spacing:.065em; cursor:pointer; transition:background .16s,border-color .16s; }
.bbs-photo-gallery-filter:hover { background:var(--g-paper); }
.bbs-photo-gallery-filter[aria-pressed="true"] { background:var(--g-navy); color:#fff; border-color:var(--g-navy); }
.bbs-photo-gallery-count { min-height:1.4rem; margin:1.65rem 0; color:#596274; text-align:right; font-size:.8rem; }
.bbs-photo-gallery-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(.65rem,1.6vw,1.5rem); }
.bbs-photo-gallery-tile { min-width:0; margin:0; }
.bbs-photo-gallery-tile button { position:relative; display:block; overflow:hidden; width:100%; aspect-ratio:1.35; padding:0; border:0; border-radius:0; background:var(--g-paper); cursor:zoom-in; }
.bbs-photo-gallery-tile img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .25s ease; }
.bbs-photo-gallery-tile button:hover img { transform:scale(1.025); }
.bbs-photo-gallery-zoom { position:absolute; right:.8rem; bottom:.8rem; display:grid; place-items:center; width:2rem; height:2rem; border:1px solid var(--g-line); background:#fffefeea; font-size:1.1rem; }
.bbs-photo-gallery-empty { margin:2rem 0; padding:3rem 1rem; border:1px solid var(--g-line); background:var(--g-paper); text-align:center; }
.bbs-photo-gallery :is(button,a):focus-visible { outline:2px solid var(--g-navy); outline-offset:3px; }
.bbs-photo-gallery-dialog { position:fixed; inset:0; width:min(calc(100vw - 2.5rem),85rem); height:min(calc(100vh - 2.5rem),56rem); max-width:none; max-height:none; padding:0; border:1px solid var(--g-line); background:#fff; color:var(--g-navy); }
.bbs-photo-gallery-dialog::backdrop { background:#101827dc; }
.bbs-photo-gallery-dialog-bar { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.5rem 1rem; min-height:3.5rem; border-bottom:1px solid var(--g-line); }
.bbs-photo-gallery-dialog-bar p { margin:0; font-size:.8rem; }
.bbs-photo-gallery-dialog-bar button { padding:.5rem .75rem; background:transparent; border:0; color:inherit; cursor:pointer; }
.bbs-photo-gallery-dialog-image { display:grid; place-items:center; height:calc(100% - 7rem); padding:.5rem; }
.bbs-photo-gallery-dialog-image img { display:block; width:100%; height:100%; object-fit:contain; }
.bbs-photo-gallery-dialog-controls { display:flex; justify-content:center; gap:1.5rem; padding:.25rem 1rem; height:3.5rem; border-top:1px solid var(--g-line); }
.bbs-photo-gallery-dialog-controls button { min-width:3rem; border:0; background:transparent; color:inherit; font-size:1.5rem; cursor:pointer; }
@media(max-width:64rem) {
  .bbs-photo-gallery-shell { width:calc(100% - 4rem); }
  .bbs-photo-gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:42rem) {
  .bbs-photo-gallery-shell { width:calc(100% - 2.5rem); }
  .bbs-photo-gallery-hero { padding-block:3rem 2rem; }
  .bbs-photo-gallery-filters { justify-content:flex-start; gap:.3rem; }
  .bbs-photo-gallery-filter { padding:.65rem .75rem; font-size:.64rem; }
  .bbs-photo-gallery-count { text-align:left; }
  .bbs-photo-gallery-grid { grid-template-columns:minmax(0,1fr); gap:1rem; }
  .bbs-photo-gallery-tile button { aspect-ratio:1.5; }
  .bbs-photo-gallery-dialog { width:100vw; height:100dvh; border:0; }
}
@media(prefers-reduced-motion:reduce) {
  .bbs-photo-gallery-filter, .bbs-photo-gallery-tile img { transition:none; }
}


/* Gallery: tighten the desktop entry and closing gap, never mobile. */
@media (min-width: 64.001rem) {
	.bbs-photo-gallery-hero {
		padding-block: clamp(3.5rem, 5vw, 5rem) clamp(2rem, 3vw, 3rem);
	}
	.bbs-photo-gallery-main {
		padding-bottom: clamp(3rem, 5vw, 5rem);
	}
}
