/* ===== Lightbox: buka foto kategori dalam ukuran besar ===== */

/* Kartu foto bisa diklik */

.kartu-foto {
  cursor: zoom-in;
}

.kartu-foto:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

/* Kunci scroll halaman saat lightbox terbuka */

body.lb-kunci {
  overflow: hidden;
}

/* Lapisan gelap di belakang foto */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(60, 10, 35, .88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .25s ease;
}

.lightbox[hidden] {
  display: none;
}

.lightbox.terbuka {
  opacity: 1;
}

/* Foto + keterangan */

.lb-isi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  max-width: min(92vw, 760px);
  margin: 0;
  text-align: center;
}

.lb-img {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 4px solid #fff;
  border-radius: 1.2rem;
  background: var(--pink2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}

.lb-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
}

.lb-judul {
  font-family: "Playball", "Brush Script MT", cursive;
  font-size: 1.5rem;
  font-weight: 400;
}

.lb-hitung {
  padding: .15rem .75rem;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  font-size: .85rem;
}

.lb-pesan {
  padding: .6rem 1.3rem;
  font-size: .9rem;
}

/* Tombol tutup */

.lb-tutup {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--gelap);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}

/* Panah kiri / kanan */

.lb-panah {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--gelap);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
  transform: translateY(-50%);
  transition: transform .15s;
}

.lb-panah:hover {
  transform: translateY(-50%) scale(1.08);
}

.lb-panah.kiri {
  left: 1rem;
}

.lb-panah.kanan {
  right: 1rem;
}

.lb-panah[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .lb-panah {
    top: auto;
    bottom: 1.2rem;
    transform: none;
  }

  .lb-panah:hover {
    transform: scale(1.08);
  }

  .lb-panah.kiri {
    left: 1.2rem;
  }

  .lb-panah.kanan {
    right: 1.2rem;
  }

  .lb-img {
    max-height: 66vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox {
    transition: none;
  }
}
