/* ═══════════════════════════════════════════════════════════════════
   GALERIA
═══════════════════════════════════════════════════════════════════ */

.gallery-hero {
  padding: 120px 0 48px; /* 72px nav + 48px odstęp */
  text-align: center;
}

.gallery-hero .section-title { margin-bottom: 8px; }

.gallery-desc {
  color: var(--gray);
  font-size: 15px;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .gallery-hero { padding: 100px 0 32px; }
}

/* ── SIATKA ──────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 80px;
}

@media (max-width: 768px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; gap: 8px; } }

/* ── KAFELEK ─────────────────────────────────────────────────────── */
.gallery-item { cursor: pointer; border-radius: 4px; overflow: hidden; }

.gallery-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--dark3);
}

.gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .45s ease;
  display: block;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,13,13,.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity .35s ease;
}

.gallery-zoom { font-size: 28px; }

.gallery-caption {
  font-family: var(--font-h);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  text-align: center;
  padding: 0 12px;
}

.gallery-item:hover .gallery-thumb img    { transform: scale(1.06); }
.gallery-item:hover .gallery-overlay      { opacity: 1; }

/* Na dotykowych — overlay zawsze lekko widoczny */
@media (hover: none) {
  .gallery-overlay { opacity: 1; background: rgba(13,13,13,.3); }
}

/* ── LIGHTBOX ────────────────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  padding: 72px 16px 24px;
  backdrop-filter: blur(6px);
  overflow-y: auto;
}

#lightbox.lb-open { display: flex; }

.lb-img-wrap {
  position: relative;
  width: 100%;
  max-width: min(90vw, 1100px);
  display: flex;
  align-items: center;
  justify-content: center;
}

#lb-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 48px rgba(0,0,0,.7);
  display: block;
}

/* Strzałki — domyślnie na zewnątrz obrazka */
.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--white);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
  flex-shrink: 0;
  z-index: 2;
}

.lb-btn:hover { background: var(--orange); border-color: var(--orange); }
.lb-prev { left: -56px; }
.lb-next { right: -56px; }

/* Na mobile — strzałki wewnątrz obrazka przy krawędziach */
@media (max-width: 768px) {
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-btn  { width: 38px; height: 38px; font-size: 16px; background: rgba(0,0,0,.55); }
  #lb-img  { max-height: 60vh; }
  #lightbox { padding: 80px 12px 20px; gap: 12px; }
}

.lb-close {
  position: fixed;
  top: 16px; right: 20px;
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  opacity: .85;
  transition: opacity var(--transition), background var(--transition);
  z-index: 10000;
}

.lb-close:hover { opacity: 1; background: var(--orange); border-color: var(--orange); }

.lb-meta {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 90vw;
}

#lb-caption {
  font-family: var(--font-h);
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
}

#lb-date {
  font-size: 13px;
  color: var(--gray);
}

#lb-counter {
  font-family: var(--font-h);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--orange);
}
