/* Each photograph keeps its original aspect ratio. No fixed rows or crops.
   Columns pack full figures; DOM, keyboard and viewer order remain identical. */
.gallery-section .gallery-grid{
 display:block;
 columns:3;
 column-gap:24px;
}
.gallery-section .gallery-grid li{
 display:inline-block;
 width:100%;
 min-width:0;
 margin:0 0 24px;
 break-inside:avoid;
 vertical-align:top;
}
.gallery-section .gallery-grid figure{display:block;height:auto;margin:0}
.gallery-section .gallery-grid li:nth-child(n) .gallery-open{
 display:block;
 aspect-ratio:auto;
 height:auto;
 overflow:visible;
 background:transparent;
}
.gallery-section .gallery-grid .gallery-open img{
 display:block;
 width:100%;
 height:auto;
 object-fit:contain;
 object-position:center;
 transform:none;
}
.gallery-section .gallery-grid figcaption{
 display:block;
 font-size:13px;
 line-height:1.5;
 padding:9px 0 0;
 border:0;
}
.gallery-open:focus-visible{outline:3px solid var(--brand-blue);outline-offset:5px}
@media(max-width:1099px){
 .gallery-section .gallery-grid{columns:2;column-gap:16px}
 .gallery-section .gallery-grid li{margin-bottom:22px}
}
@media(max-width:359px){
 .gallery-section .gallery-grid{columns:1}
}
.pswp{
 --pswp-bg:#161616;
 --pswp-icon-color:#fff;
 --pswp-icon-color-secondary:#161616;
 --pswp-icon-stroke-color:#161616;
 font-family:var(--font-body);
}
.pswp .pswp__top-bar{padding-inline:12px;padding-top:env(safe-area-inset-top)}
.pswp .pswp__button{width:48px;height:48px;margin:8px 4px;opacity:1}
.pswp .pswp__button:focus-visible{outline:3px solid var(--brand-yellow);outline-offset:2px}
.pswp .pswp__button--arrow{
 display:grid;
 place-items:center;
 padding:0;
 font-size:20px;
 color:var(--pswp-icon-color);
 visibility:visible;
 width:48px;
 height:56px;
 margin-top:-28px;
 border:1px solid #ffffff66;
 background:#161616;
}
.pswp .pswp__button--arrow--prev{left:12px}
.pswp .pswp__button--arrow--next{right:12px}
.pswp .pswp__counter{height:auto;line-height:48px;margin:8px 0 0 8px;font-size:14px;opacity:1}
.pswp__caption{
 position:absolute;
 bottom:max(20px,env(safe-area-inset-bottom));
 left:80px;
 right:80px;
 color:#fff;
 text-align:center;
 font-size:14px;
 line-height:1.5;
 pointer-events:none;
}
.pswp__help{font-size:12px;color:#cfc7c0;margin-top:6px}
.pswp__caption,.pswp .pswp__button{transition:opacity 160ms}
.pswp:not(.pswp--ui-visible) .pswp__caption{opacity:0}
@media(max-width:767px){
 .gallery-section .gallery-grid figcaption{font-size:13px;border:0;padding-bottom:0}
 .pswp .pswp__button--arrow{
  display:grid;
  top:auto;
  bottom:max(16px,env(safe-area-inset-bottom));
  width:48px;
  height:48px;
  margin:0;
 }
 .pswp__caption{left:16px;right:16px;bottom:80px;font-size:13px}
 .pswp__help{font-size:11px}
}
@media(prefers-reduced-motion:reduce){
 .pswp__caption,.pswp .pswp__button{transition:none}
}

