/* All rules are scoped to this gallery; the home-page slider is unaffected. */
#arsenal-gallery { color: #333; font-family: Tahoma, sans-serif; }
#arsenal-gallery * { box-sizing: border-box; }
#arsenal-gallery .ag-heading { padding: 16px 0 24px; }
#arsenal-gallery h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; font-weight: 600; }
#arsenal-gallery p { margin: 0; font-size: 14px; line-height: 1.5; }
#arsenal-gallery .ag-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); grid-auto-rows: clamp(100px,13vw,200px); gap: 2px; grid-auto-flow: dense; }
#arsenal-gallery .ag-tile { display: block; overflow: hidden; background: #eee; grid-column: span 2; grid-row: span 2; }
#arsenal-gallery .ag-tile:nth-child(9n+3), #arsenal-gallery .ag-tile:nth-child(9n+4) { grid-column: span 1; grid-row: span 1; }
#arsenal-gallery .ag-tile:nth-child(9n+5) { grid-column: span 2; grid-row: span 2; }
#arsenal-gallery .ag-tile:nth-child(9n+8), #arsenal-gallery .ag-tile:nth-child(9n+9) { grid-column: span 1; grid-row: span 1; }
#arsenal-gallery .ag-tile img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s cubic-bezier(.32,.72,0,1); }
#arsenal-gallery .ag-tile:hover img { transform: scale(1.025); }
#arsenal-gallery a:focus-visible { outline: 3px solid #5f9ea0; outline-offset: -3px; }
.ag-lightbox[hidden] { display: none !important; }
.ag-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; font-family: Tahoma,sans-serif; }
.ag-lightbox figure { margin: 0; width: calc(100% - 120px); text-align: center; }
.ag-lightbox figure img { max-width: 100%; max-height: 84vh; width: auto; height: auto; object-fit: contain; }
.ag-lightbox figcaption { color: white; padding: 12px; font-size: 14px; }
.ag-lightbox button { position: absolute; border: 0; background: transparent; color: white; cursor: pointer; width: 48px; height: 48px; font: 40px/1 Arial,sans-serif; }
.ag-lightbox button:focus-visible { outline: 2px solid white; }
.ag-close { top: 12px; right: 12px; }
.ag-prev { left: 8px; top: calc(50% - 24px); }
.ag-next { right: 8px; top: calc(50% - 24px); }
/* Applied only while this static gallery template is present. */

@media(max-width:600px) {
  #arsenal-gallery .ag-grid { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: 150px; }
  #arsenal-gallery .ag-tile:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  #arsenal-gallery .ag-tile:nth-child(5n+1) { grid-column: span 2; grid-row: span 2; }
  .ag-lightbox figure { width: calc(100% - 80px); }
  .ag-prev { left: 0; } .ag-next { right: 0; }
}
@media(prefers-reduced-motion:reduce) { #arsenal-gallery .ag-tile img { transition: none; } }
