/* Gallery grid on full article pages + lightbox. */
.lx-gallery-wrap { margin: 24px 0; }
.lx-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.lx-gallery__item { margin: 0; }
.lx-gallery__item a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: #e2e8f0;
}
.lx-gallery__item img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  border-radius: 0 !important;
  transition: transform .35s ease, filter .35s ease;
}
.lx-gallery__item a:hover img,
.lx-gallery__item a:focus-visible img { transform: scale(1.06); filter: brightness(1.05); }
.lx-gallery__item a:focus-visible { outline: 3px solid #0094ca; outline-offset: 2px; }

/* Lightbox */
html.lx-lightbox-open { overflow: hidden; }
.lx-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 18, 28, .92);
  padding: 56px 72px;
}
.lx-lightbox.is-open { display: flex; }
.lx-lightbox__figure { margin: 0; text-align: center; max-width: 100%; max-height: 100%; }
.lx-lightbox__figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.lx-lightbox__count { color: #cbd5e1; font-size: 14px; margin-top: 12px; }
.lx-lightbox button {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 32px;
  line-height: 44px;
  transition: background .2s;
}
.lx-lightbox button:hover,
.lx-lightbox button:focus-visible { background: rgba(255, 255, 255, .28); outline: none; }
.lx-lightbox__close { top: 16px; right: 16px; font-size: 30px !important; }
.lx-lightbox__nav--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lx-lightbox__nav--next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lx-gallery { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .lx-lightbox { padding: 56px 8px; }
  .lx-lightbox__nav--prev, .lx-lightbox__nav--next { top: auto; bottom: 16px; transform: none; }
}

