/* GALLERY SETS
--------------------------------------------*/
/* Gallery Grid */
.gallery-sets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}
.gallery-item {
  cursor: pointer;
  width: 100%;
  max-width: 350px;
  height: 100%;
  max-height: 350px;
  transition: transform 0.2s ease-in-out;
  box-shadow: 1px 1px 5px #aaa;
  overflow: hidden;
}
.gallery-sets img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}
.gallery-item:hover {
  transform: scale(1.01);
}

#modalImage {
  transition: opacity 0.5s ease; /* Slow transition for opacity */
}

/* Modal Display with Transition */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  opacity: 0; /* Start fully transparent */
  transition: opacity 0.5s ease-in-out; /* Smooth fade-in/out */
}

.modal.fade-in {
  opacity: 1; /* Fully visible */
  animation: fadeIn 0.5s ease;
}

.modal.fade-out {
  opacity: 0; /* Fade out */
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  width: auto;
  max-height: 85%;
  margin: auto;
  display: block;
}
.modal .close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
#caption {
  text-align: center;
  color: white;
  margin-top: 10px;
  font-size: 20px;
  display: none;
}

/* Navigation Buttons */
.modal .prev,
.modal .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: white;
  user-select: none;
  padding: 10px;
  z-index: 1001;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 500;
  font-size: 72px;
  opacity: 0.5;
}

.modal .prev {
  left: 20px;
}

.modal .next {
  right: 20px;
}

.modal .prev:hover,
.modal .next:hover {
  opacity: 1;
}
/* Modal Content Transition */
.modal-content {
  opacity: 0; /* Initially hidden */
  transition: opacity 0.5s ease-in-out; /* Smooth fade-in effect */
}

.modal.fade-in .modal-content {
  opacity: 1; /* Fade in when modal is displayed */
}

/* Transition for previous/next navigation */
.modal .prev,
.modal .next {
  opacity: 0.7;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.modal .prev:hover,
.modal .next:hover {
  opacity: 1;
  /*transform: scale(1.1); /* Slight zoom on hover */
}

@media only screen and (max-width: 700px) {
  .modal .prev {
    left: 0;
    font-size: 50px;
  }

  .modal .next {
    right: 0;
    font-size: 50px;
  }
  .modal {
    padding: 0 60px;
  }
  .modal-content {
    left: -30px;
  }
}

.modal .prev,
.modal .next {
  display: none; /* Hidden by default */
}

.modal .prev.show,
.modal .next.show {
  display: block; /* Show only when applicable */
}
.pics {
  cursor: pointer;
}
