/* =========================================================================
   GALERIA WPISÓW — style podglądu zdjęć na stronie Aktualności
   ========================================================================= */

/* miniatura we wpisie — sygnał, że da się kliknąć */
.news-thumb.nlb-trigger {
  position: relative;
  cursor: zoom-in;
}
.news-thumb.nlb-trigger img {
  transition: transform .35s ease, filter .35s ease;
}
.news-thumb.nlb-trigger:hover img,
.news-thumb.nlb-trigger:focus-visible img {
  transform: scale(1.03);
  filter: brightness(1.05);
}
.news-thumb.nlb-trigger:focus-visible {
  outline: 3px solid #f5b800;
  outline-offset: 2px;
}

.nlb-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 4px;
  background: rgba(15, 20, 25, .78);
  color: #fff;
  font-size: 12px;
  letter-spacing: .02em;
  pointer-events: none;
}

/* blokada przewijania strony pod otwartą galerią */
html.nlb-open,
html.nlb-open body {
  overflow: hidden;
}

/* okno galerii */
.nlb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  grid-template-rows: 1fr auto;
  align-items: center;
  background: rgba(10, 13, 17, .94);
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
}
.nlb[hidden] { display: none; }

.nlb-figure {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px 0 12px;
}
.nlb-img {
  max-width: 100%;
  max-height: calc(100% - 48px);
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  user-select: none;
}
.nlb-caption {
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
  font-size: 15px;
}
.nlb-title {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 600;
}
.nlb-count {
  font-size: 13px;
  opacity: .7;
}

/* przyciski */
.nlb button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.nlb-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 44px;
  height: 44px;
  font-size: 34px !important;
  line-height: 1;
  border-radius: 50%;
  z-index: 2;
}
.nlb-nav {
  width: 52px;
  height: 52px;
  justify-self: center;
  font-size: 44px !important;
  line-height: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08) !important;
}
.nlb-prev { grid-column: 1; grid-row: 1; }
.nlb-next { grid-column: 3; grid-row: 1; }
.nlb-close:hover,
.nlb-nav:hover { background: rgba(255, 255, 255, .18) !important; }
.nlb button:focus-visible { outline: 2px solid #f5b800; outline-offset: 2px; }
.nlb-nav[hidden] { visibility: hidden; display: block; }

/* pasek miniatur */
.nlb-thumbs {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  gap: 8px;
  justify-content: safe center;
  overflow-x: auto;
  padding: 10px 16px 16px;
  scrollbar-width: thin;
}
.nlb-thumbs[hidden] { display: none; }
.nlb-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 52px;
  padding: 0 !important;
  border-radius: 3px;
  overflow: hidden;
  opacity: .5;
  outline: 2px solid transparent;
  transition: opacity .2s, outline-color .2s;
}
.nlb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nlb-thumb:hover { opacity: .85; }
.nlb-thumb.is-active {
  opacity: 1;
  outline-color: #f5b800;
}

/* telefony: strzałki nachodzą na zdjęcie, gest przesunięcia też działa */
@media (max-width: 640px) {
  .nlb { grid-template-columns: 0 1fr 0; }
  .nlb-figure { padding: 56px 8px 8px; }
  .nlb-nav {
    position: absolute;
    top: 45%;
    width: 42px;
    height: 42px;
    font-size: 34px !important;
    background: rgba(0, 0, 0, .45) !important;
  }
  .nlb-prev { left: 6px; }
  .nlb-next { right: 6px; }
  .nlb-thumb { width: 56px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .news-thumb.nlb-trigger img { transition: none; }
}
