/* gallery.css — PhotoGallery (pg-) + vanilla lightbox */

.pg-wrapper {
  margin-top: 40px;
}

.pg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.pg-item {
  cursor: pointer;
}

.pg-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.pg-image img,
.pg-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.pg-item:hover .pg-image img {
  transform: scale(1.1);
}

.pg-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 119, 182, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.pg-item:hover .pg-overlay {
  opacity: 1;
}

.pg-icon {
  color: white;
  font-size: 32px;
  font-weight: 300;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.pg-item:hover .pg-icon {
  transform: translateY(0);
}

/* ==================== Lightbox (yet-another-react-lightbox yerine) ==================== */
.lb {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
}
.lb.is-open { display: flex; }

.lb-content {
  max-width: 92vw;
  max-height: 88vh;
}
.lb-content img,
.lb-content video {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lb-close:hover,
.lb-prev:hover,
.lb-next:hover { background: var(--primary); }

.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

.lb-counter {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  color: #cbd5e1;
  font-size: 14px;
}

@media (max-width: 768px) {
  .lb-prev, .lb-next { width: 38px; height: 38px; font-size: 20px; }
}
