.image-item {
  position: relative;
  overflow: hidden;
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0% cover 40%;
  image-rendering: -moz-crisp-edges;
  border-radius: 12px;
}

.image-item img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.image-item:hover img {
  transform: scale(1.05);
}

.image-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -100%;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
 color: #fff;
  padding: 12px;
  font-size: 14px;
  transition: 0.3s ease;
}

.image-item:hover .image-info {
  bottom: 0;
}



/* //end  */

.image-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-right: 10px;
  margin-left: 10px;
}

.img {
  aspect-ratio: 4/5;
  width: 100%;
  height: auto;
  border-radius:5px;
  cursor: pointer;
  object-fit: cover;
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0% cover 40%;
  image-rendering: -moz-crisp-edges;
  /* transition: transform 0.3s; */
}
@keyframes appear {
  from{
    opacity: 0;
    scale: 0.4;
  }
  
  to{
    opacity: 1;
    scale: 1;
  }
}

.img:hover {
  border-radius: 0px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
  transform: scale(1.05); /* Slight zoom effect when hovering over the image */
}

@media (width < 600px) {
  .image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-right: 10px;
    margin-left: 10px;
  }
  .img {
    aspect-ratio: 3/4;
    width: 100%;
    border-radius: 5px;
    object-fit: cover;
    height: auto;
    cursor: pointer;
    image-rendering: -moz-crisp-edges;
    transition: transform 0.3s;
  }

  .img:hover {
    transform: scale(
      1.05
    ); 
    /* Slight zoom effect when hovering over the image */
  }
}
/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; 
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0,0,0,0.5);
}

/* Close button (×) */
.close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: white;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1000;
}
