/* Gallery: Photos (masonry + lightbox) and Videos */
.g-block + .g-block{ margin-top:44px; }
.g-title{ display:flex; align-items:center; gap:10px; font-size:1.25rem; margin-bottom:16px; }
.g-title i{ color:var(--red); }
.g-count{ font:600 .78rem/1 var(--font-body); padding:5px 10px; border-radius:999px; background:#fff; color:var(--red); border:1px solid var(--line); }

.g-masonry{ column-count:4; column-gap:14px; }
.g-item{ position:relative; display:block; margin:0 0 14px; break-inside:avoid; border-radius:var(--radius); overflow:hidden; background:#fff;
  border:1px solid var(--line); box-shadow:var(--shadow); cursor:zoom-in; transition:transform .3s, box-shadow .3s; }
.g-item img{ display:block; width:100%; height:auto; transition:transform .5s; }
.g-cap{ position:absolute; left:0; right:0; bottom:0; padding:26px 12px 10px; color:#fff; font:600 .82rem/1.3 var(--font-body);
  background:linear-gradient(transparent,rgba(40,6,8,.78)); opacity:0; transform:translateY(8px); transition:opacity .3s, transform .3s; }
@media (hover:hover){
  .g-item:hover{ transform:translateY(-3px); box-shadow:0 12px 28px rgba(183,28,33,.18); }
  .g-item:hover img{ transform:scale(1.05); }
  .g-item:hover .g-cap, .g-item:focus-visible .g-cap{ opacity:1; transform:none; }
}
.g-item:focus-visible{ outline:3px solid var(--red); outline-offset:2px; }

.g-videos{ display:flex; flex-wrap:wrap; gap:18px; justify-content:center; align-items:flex-start; }
.g-video{ margin:0; background:#1b0e10; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); border:1px solid var(--line); flex:0 1 auto; }
.g-video:first-child{ width:min(100%,560px); }
.g-video:nth-child(2){ width:min(100%,300px); }
.g-video video{ display:block; width:100%; aspect-ratio:var(--ar); background:#000; object-fit:contain; }

/* lightbox */
.lb{ position:fixed; inset:0; z-index:200; display:none; align-items:center; justify-content:center; background:rgba(30,6,8,.9); padding:56px 64px 64px; }
.lb.open{ display:flex; animation:lbIn .25s ease-out; }
@keyframes lbIn{ from{ opacity:0; } }
.lb figure{ margin:0; max-width:100%; max-height:100%; display:flex; flex-direction:column; align-items:center; gap:10px; }
.lb img{ max-width:100%; max-height:calc(100vh - 150px); border-radius:10px; background:#222; object-fit:contain; }
.lb figcaption{ color:#fff; font:500 .95rem/1.4 var(--font-body); text-align:center; }
.lb button{ position:absolute; display:grid; place-items:center; width:46px; height:46px; border:0; border-radius:50%; background:rgba(255,255,255,.16); color:#fff; font-size:1.1rem; cursor:pointer; transition:background .2s; }
.lb button:hover{ background:var(--red); }
.lb-close{ top:12px; right:12px; } .lb-prev{ left:10px; top:50%; margin-top:-23px; } .lb-next{ right:10px; top:50%; margin-top:-23px; }
.lb-count{ position:absolute; top:22px; left:20px; color:#fff; font:600 .85rem var(--font-body); opacity:.85; }
body.lb-lock{ overflow:hidden; }

@media (max-width:1000px){ .g-masonry{ column-count:3; } }
@media (max-width:700px){ .g-masonry{ column-count:2; column-gap:10px; } .g-item{ margin-bottom:10px; } .g-cap{ display:none; } }
@media (max-width:599px){
  .lb{ padding:56px 8px 56px; }
  .lb-prev, .lb-next{ top:auto; bottom:6px; margin:0; } .lb-prev{ left:calc(50% - 56px); } .lb-next{ right:calc(50% - 56px); }
  .g-video:first-child, .g-video:nth-child(2){ width:100%; }
  .g-video:nth-child(2){ max-width:320px; }
}
@media (prefers-reduced-motion:reduce){ .lb.open{ animation:none; } .g-item, .g-item img{ transition:none; } }

/* jump buttons in the page header */
.g-jump{ display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.g-jump .btn i{ margin-right:8px; }
.g-block{ scroll-margin-top:8px; }
@media (max-width:599px){ .g-jump .btn{ flex:1 1 0; justify-content:center; } }
