

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 10px;                             
  max-width: 900px;  
  max-height: 900px;
  margin: 0 auto;
  padding: 10px;
  overflow-y: auto;                       
  overflow-x: hidden;
  scroll-behavior: smooth;
}
/*overflow axis dictates scroll direction*/ 

.gallery img {
  width: 100%;       
  height: auto;     
  display: block;
  border-radius: 10px;
  cursor: pointer;
  transform: scale(.9);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.gallery img:hover {
  transform: scale(0.95), translate(1px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transition: transform 0.3s ease; box-shadow 0.3s ease;
}


#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 14px;
  box-shadow: 0 0 30px rgba(255,255,255,0.2);
  animation: zoomIn 0.3s ease;
}

/* Lightbox buttons */
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 76, 168, 0.8);
  color: white;
  border: none;
  font-size: 3em;
  padding: 0.2em 0.5em;
  cursor: pointer;
  border-radius: 5px;
  z-index: 10;
}

#prev {
  left: 20px;
}

#next {
  right: 20px;
}

.lightbox-btn:hover {
  background: rgba(255, 157, 208, 0.8);
}

/* animation */
@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}