/* ===========================================================
   QUBI LURES — "Złowione na Qubi" gallery + lightbox
   Editorial masonry layout via CSS columns (no JS layout math),
   consistent with the rest of the site: cream background, sharp
   corners, red accents, minimal motion.
   =========================================================== */

.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.gallery-filter__btn {
  font: inherit;
  font-size: 0.82rem;
  padding: 7px 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.gallery-filter__btn.is-active { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.gallery-filter__btn:hover { border-color: var(--ink); }

.gallery-masonry {
  columns: 3 260px;
  column-gap: 16px;
}
@media (max-width: 900px) { .gallery-masonry { columns: 2 200px; } }
@media (max-width: 560px) { .gallery-masonry { columns: 1; } }

.gallery-tile {
  break-inside: avoid;
  margin-bottom: 16px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: var(--cream-2);
}
.gallery-tile img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}
.gallery-tile:hover img { transform: scale(1.03); }
.gallery-tile__badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--red); color: #fff;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 9px;
}
.gallery-tile__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 14px 12px;
  background: linear-gradient(to top, rgba(15,12,10,0.75), rgba(15,12,10,0));
  color: #fff;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.gallery-tile:hover .gallery-tile__caption { opacity: 1; }
.gallery-tile__caption strong { display: block; font-size: 0.85rem; text-transform: uppercase; }
.gallery-tile__caption span { display: block; font-size: 0.75rem; opacity: 0.85; margin-top: 2px; }

.gallery-empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 60px 20px;
  font-size: 1rem;
}

/* ---- Lightbox ---- */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,12,10,0.94);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox__stage {
  max-width: min(900px, 90vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}
.lightbox__info {
  color: var(--cream);
  margin-top: 18px;
  text-align: center;
  max-width: 480px;
}
.lightbox__info h3 { font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.02em; }
.lightbox__info dl {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px;
  margin-top: 12px;
  font-size: 0.82rem;
}
.lightbox__info dl div { display: flex; gap: 6px; }
.lightbox__info dt { color: rgba(239,234,224,0.55); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.04em; align-self: center; }
.lightbox__info dd { color: var(--cream); font-weight: 600; }

.lightbox__close {
  position: absolute; top: 22px; right: 26px;
  width: 40px; height: 40px;
  border: 1px solid rgba(239,234,224,0.4);
  background: transparent; color: var(--cream);
  cursor: pointer;
}
.lightbox__close svg { width: 18px; height: 18px; margin: auto; display: block; }

.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  border: 1px solid rgba(239,234,224,0.4);
  background: transparent; color: var(--cream);
  font-size: 1.8rem; line-height: 1;
  cursor: pointer;
}
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }
.lightbox__nav:hover, .lightbox__close:hover { border-color: var(--cream); }

@media (max-width: 640px) {
  .lightbox__nav { width: 42px; height: 42px; font-size: 1.4rem; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  .lightbox__close { top: 14px; right: 14px; width: 36px; height: 36px; }
  .lightbox__stage img { max-height: 58vh; }
}
