.g-item:focus-visible { outline: 3px solid var(--teal-light); outline-offset: -4px; }
.g-item.hidden-cat { display: none; }
.g-video-badge { position: absolute; top: 16px; left: 16px; padding: 9px 14px; border-radius: 24px; background: rgba(5,12,20,.78); color: white; font-size: 12px; letter-spacing: .04em; pointer-events: none; }
.g-item[data-media="video"] img { object-fit: contain; background: #08121c; }
.lightbox [hidden] { display: none !important; }
.lb-img-wrap video { display: block; max-width: 100%; width: auto; max-height: 74vh; border-radius: 4px; background: #050c14; }
.lb-img-wrap img { max-height: 74vh; }
.lb-close, .lb-nav { min-width: 44px; min-height: 44px; touch-action: manipulation; }
.lb-close:focus-visible, .lb-nav:focus-visible { outline: 2px solid var(--teal-light); outline-offset: 3px; }
.lb-media-error { color: white; text-align: center; padding: 12px; }
@media (hover: none) { .g-caption { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .lightbox { padding: 70px 16px 90px; }
  .lb-inner { position: static; }
  .lb-img-wrap img, .lb-img-wrap video { max-height: 65vh; }
  .lb-close { position: absolute; top: 16px; right: 16px; }
  .lb-nav { display: flex; position: absolute; top: auto; bottom: 18px; transform: none; align-items: center; justify-content: center; }
  .lb-prev { left: calc(50% - 58px); }
  .lb-next { right: calc(50% - 58px); }
  .lb-title { font-size: 18px; }
}
.gallery-wrap { padding: 20px clamp(10px, 2vw, 32px) 32px; }
.gallery-grid { display: block; position: relative; }
.gallery-grid .g-item { position: absolute; left: 0; top: 0; width: var(--gallery-card-width); border-radius: 12px; grid-column: auto; grid-row: auto; transform: none !important; }
.gallery-grid .g-item img { width: 100%; height: auto; display: block; object-fit: contain; }
.gallery-grid .g-item:hover img { transform: none; }
.gallery-grid .g-item:hover { box-shadow: 0 8px 28px rgba(0,0,0,.25); }
.gallery-grid .g-caption { padding: 42px 16px 16px; }
@media (max-width: 560px) {
  .gallery-wrap { padding: 12px 8px 24px; }
  .gallery-grid .g-item { border-radius: 8px; }
  .gallery-grid .g-caption { padding: 30px 9px 10px; }
  .gallery-grid .g-caption-title { font-size: 12px !important; line-height: 1.25; }
  .gallery-grid .g-caption-tag { display: none; }
  .gallery-grid .g-video-badge { top: 8px; left: 8px; padding: 6px 9px; font-size: 10px; }
}
