.gallery {
    margin: 1rem;
    padding: 0.5rem;
    background: var(--button);
    border-radius: 20rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow-x: hidden;
    color: black;
}

.gallery h1 {
    font-family: var(--font-kaligrafi);
    font-size: 4rem;
    word-spacing: 0.5rem;
    line-height: 3rem;
    margin: 2rem 0;
}

.gallery p {
    font-family: var(--font-biasa);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.row {
    display: flex;
    overflow-x: hidden;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
}

.row img { 
    object-fit: cover;
}

.gallery img {
    max-height: 800px;
    cursor: pointer;
}

.w-100 { width: 100%; }
.w-50 { width: 50%; }
.w-40 { width: 40%; }
.w-60 { width: 60%; }

.last-image {
  border-radius: 0 0 19.5rem 19.5rem;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 100svh;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  cursor: default;
  padding: 0;
}

#lightboxModal .modal-content {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

#lightboxModal .close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

#lightboxModal .prev,
#lightboxModal .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #fff;
  background: rgba(0,0,0,0.25);
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  z-index: 10010;
}
#lightboxModal .prev:hover,
#lightboxModal .next:hover {
  background: rgba(0,0,0,0.5);
}
#lightboxModal .prev { left: 1rem; }
#lightboxModal .next { right: 1rem; }