/* Masonry-style Gallery */
.gallery {
  column-count: 3;
  column-gap: 15px;
  padding: 20px;
}

.gallery img {
  width: 100%;
  margin-bottom: 15px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  break-inside: avoid;
}

.gallery img:hover {
  transform: rotate(-1deg) scale(1.05);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  align-items: flex-end; /* slide-up effect */
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lightbox.show {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 15px 15px 0 0;
  animation: slideUp 0.5s ease forwards;
  text-align: center;
}

@keyframes slideUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.lightbox img {
  max-width: 90vw;
  max-height: 70vh;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* Caption */
.lightbox .caption {
  color: #fff;
  font-size: 1rem;
  margin-top: 5px;
}

/* Glassmorphism Controls */
.lightbox .prev,
.lightbox .next,
.lightbox .close {
  position: absolute;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 50%;
  padding: 12px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.lightbox .prev:hover,
.lightbox .next:hover,
.lightbox .close:hover {
  background: rgba(255,255,255,0.35);
  transform: scale(1.1);
}

.lightbox .prev { left: 25px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 25px; top: 50%; transform: translateY(-50%); }
.lightbox .close { top: 25px; right: 25px; font-size: 2.2rem; }
