/* Gallery grid ([ward20_gallery]) */
.w20g-grid { display: grid; grid-template-columns: repeat(var(--w20g-columns, 3), minmax(0, 1fr)); gap: 18px; }
.w20g-item { margin: 0; }
.w20g-item a { display: block; overflow: hidden; border-radius: 6px; background: #1a1b1f; }
.w20g-item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .45s ease, filter .3s ease; }
.w20g-item a:hover img, .w20g-item a:focus-visible img { transform: scale(1.04); filter: brightness(1.08); }
.w20g-item figcaption { margin-top: 10px; color: #a9adb7; font-size: .78rem; line-height: 1.4; }
@media (max-width: 900px) { .w20g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .w20g-grid { grid-template-columns: 1fr; } }

/* Images that open the slideshow */
.w20g-trigger { cursor: zoom-in; }
img.w20g-trigger { transition: filter .3s ease; }
img.w20g-trigger:hover, img.w20g-trigger:focus-visible { filter: brightness(1.1); }
img.w20g-trigger:focus-visible, .w20g-item a:focus-visible { outline: 2px solid #3b82f6; outline-offset: 3px; }

/* Slideshow overlay */
html.w20g-open { overflow: hidden; }
.w20g-overlay { position: fixed; inset: 0; z-index: 100000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(8, 8, 10, .96); color: #fff; font-family: Inter, Arial, sans-serif; animation: w20g-fade .2s ease; }
.w20g-overlay[hidden] { display: none; }
@keyframes w20g-fade { from { opacity: 0; } to { opacity: 1; } }
.w20g-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.w20g-counter { color: #a9adb7; font-size: .8rem; font-weight: 600; letter-spacing: .12em; }
.w20g-overlay button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.w20g-close { width: 44px; height: 44px; border-radius: 50%; font-size: 2rem !important; line-height: 1; transition: background .15s; }
.w20g-close:hover, .w20g-nav:hover { background: rgba(255, 255, 255, .1); }
.w20g-overlay button:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
.w20g-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 72px; }
.w20g-figure { display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; margin: 0; }
.w20g-full { display: block; max-width: 100%; max-height: calc(100vh - 230px); width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .25s ease; }
.w20g-full.is-loaded { opacity: 1; }
.w20g-caption { margin-top: 14px; color: #d6d8de; font-size: .9rem; text-align: center; }
.w20g-nav { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; font-size: 2.4rem !important; line-height: 1; transition: background .15s; }
.w20g-prev { left: 12px; }
.w20g-next { right: 12px; }
.w20g-thumbs { display: flex; gap: 8px; padding: 14px 18px 18px; overflow-x: auto; scrollbar-width: thin; }
.w20g-thumb { flex: 0 0 auto; width: 84px; height: 60px; padding: 0 !important; border-radius: 4px; overflow: hidden; opacity: .45; outline-offset: 2px; transition: opacity .15s; }
.w20g-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.w20g-thumb:hover, .w20g-thumb.is-active { opacity: 1; }
.w20g-thumb.is-active { box-shadow: 0 0 0 2px #3b82f6; }
@media (max-width: 700px) {
  .w20g-stage { padding: 0 8px; }
  .w20g-nav { top: auto; bottom: -6px; width: 44px; height: 44px; background: rgba(0, 0, 0, .5) !important; }
  .w20g-full { max-height: calc(100vh - 210px); }
  .w20g-thumb { width: 64px; height: 46px; }
}
