#realizacje { background: var(--white); }

/* ── Galeria ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--primary);
  cursor: pointer;
}
.gallery__item img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
  transition: transform .4s ease, opacity .4s ease;
}
.gallery__item:hover img { transform: scale(1.08); opacity: .65; }

.gallery__item-overlay {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .3s;
}
.gallery__item:hover .gallery__item-overlay { opacity: 1; }
.gallery__item-overlay i { font-size: 2rem; color: var(--white); }

/* ── Lightbox ── */
#lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.93);
  z-index: 9999;
  align-items: center; justify-content: center;
  padding: 10px;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 60px rgba(0,0,0,.6);
}

.lightbox__btn {
  position: absolute;
  background: rgba(255,255,255,.12);
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  width: 50px; height: 50px;
  font-size: 1.2rem;
  transition: background .2s;
}
.lightbox__btn:hover { background: rgba(255,255,255,.28); }
#lb-close { top: 18px; right: 22px; font-size: 1.4rem; }
#lb-prev  { left: 16px;  top: 50%; transform: translateY(-50%); }
#lb-next  { right: 16px; top: 50%; transform: translateY(-50%); }

@media (max-width: 767px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery__item img { height: 160px; }
  #lb-prev { left: 6px; }
  #lb-next { right: 6px; }
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr 1fr; }
}
