/* Gallery page */

.gallery-hero {
  padding: 150px 0 60px;
  background:
    radial-gradient(circle at 10% 20%, rgba(112, 192, 67, 0.22), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(0, 194, 168, 0.14), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
}

.gallery-hero h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.06em;
  margin-bottom: 18px;
}

.gallery-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.1rem;
}

.filters {
  padding: 24px 0 12px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-btn {
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.filter-btn:hover {
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.gallery-section {
  padding: 30px 0 90px;
}

.gallery-title {
  margin-bottom: 24px;
}

.gallery-title h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.gallery-title p {
  color: var(--muted);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.photo-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #e5e7eb;
  min-height: 240px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--line);
  cursor: pointer;
}

.photo-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  user-select: none;
}

.photo-card:hover img {
  transform: scale(1.05);
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 17, 31, 0.02),
    rgba(7, 17, 31, 0.20)
  );
  z-index: 1;
  pointer-events: none;
}

/* Labels staan niet over de foto in het overzicht. De caption staat in de lightbox. */
.photo-label {
  display: none;
}

.hidden {
  display: none !important;
}

.gallery-empty {
  grid-column: 1 / -1;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  color: var(--muted);
}

.gallery-empty strong {
  display: block;
  color: var(--text);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.photo-card.image-missing {
  display: grid;
  place-items: center;
  min-height: 260px;
  background: linear-gradient(135deg, #d1d5db, #6b7280);
}

.photo-card.image-missing::before {
  content: attr(data-missing-text);
  color: white;
  font-weight: 900;
  z-index: 2;
}

.photo-card.image-missing img {
  display: none;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(7, 17, 31, 0.92);
  backdrop-filter: blur(10px);
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  width: min(100%, 1100px);
  max-height: 90vh;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  background: #111827;
}

.lightbox-content p {
  color: white;
  font-weight: 700;
  text-align: center;
}

.lightbox-close,
.lightbox-arrow {
  border: 0;
  cursor: pointer;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.04);
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  font-size: 2.6rem;
  line-height: 1;
}

.lightbox-arrow:hover {
  transform: translateY(-50%) scale(1.04);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

@media (max-width: 980px) {
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .gallery-hero {
    padding-top: 124px;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    gap: 10px;
  }

  .filter-btn {
    padding: 10px 15px;
  }

  .lightbox {
    padding: 18px;
  }

  .lightbox-arrow {
    width: 44px;
    height: 44px;
    font-size: 2rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}
