
/* Gallery Grid */
.gallery-container {
    display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 20px;
  padding: 65px;
  background-color: rgb(59, 59, 59);
}

/* Image Box */
.img-box {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}

.img-box img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: 0.4s;
}

.img-box:hover img {
  transform: scale(1.1);
}

/* Bottom Shadow Overlay */
.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: #fff;
  opacity: 0;
  transition: 0.3s;
}

.img-box:hover .overlay {
  opacity: 1;
}

.overlay h3 {
  margin: 0;
  font-size: 22px;
}

.overlay p {
  margin: 5px 0 0;
  font-size: 14px;
}

/* Popup */
.popup {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  text-align: center;
}

/* Popup Image */
.popup-img {
  width: 60%;
  height: 40%;
  margin-top: 120px;
  border-radius: 10px;
}

/* Popup Text */
.popup-text {
  color: white;
  margin-top: 15px;
}

.popup-text h3 {
  margin: 25px;
}

.popup-text p {
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
}

/* Close Button */
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

/* Navigation Buttons */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
  color: white;
  background: rgba(0,0,0,0.5);
  border: none;
  padding: 10px 18px;
  cursor: pointer;
  border-radius: 6px;
}

#prevBtn { 
  left: 20px; }
#nextBtn { right: 20px; }

.nav-btn:hover {
  background: rgba(255,255,255,0.3);
}

@media (max-width: 767px) {
  .gallery-container {
    grid-template-columns: repeat(1, 1fr);
    padding: 20px;
  }
  /* Popup Image */
.popup-img {
  width: 80%;
  height: 30%;
}
#prevBtn { 
  margin-top: 200px;
  left: 20px; }
#nextBtn { 
  margin-top: 200px;
  right: 20px; }
  .popup-text p {
  padding: 25px;
}
  
}