/* RESET */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Arial, sans-serif;
}

/* BODY */

body{
  background:#0f172a;
  color:white;
  padding:30px;
}

/* TITLE */

.title{
  text-align:center;
  margin-bottom:30px;
  font-size:3rem;
  letter-spacing:2px;
}

/* FILTER BUTTONS */

.filter-buttons{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:15px;
  flex-wrap:wrap;
  margin-bottom:40px;
}

.filter-buttons button{
  padding:12px 24px;
  border:none;
  border-radius:30px;
  background:#1e293b;
  color:white;
  cursor:pointer;
  font-size:16px;
  font-weight:bold;
  transition:0.3s ease;
}

.filter-buttons button:hover{
  background:#38bdf8;
  transform:scale(1.05);
}

.filter-buttons .active{
  background:#38bdf8;
}

/* GALLERY LAYOUT */

.gallery{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
  gap:20px;
}

/* GALLERY ITEM */

.gallery-item{
  position:relative;
  overflow:hidden;
  border-radius:20px;
  cursor:pointer;
  box-shadow:0 4px 10px rgba(0,0,0,0.4);
}

/* LINK STYLING */

.gallery-item a{
  display:block;
  text-decoration:none;
  color:inherit;
}

/* IMAGE */

.gallery-item img{
  width:100%;
  height:280px;
  object-fit:cover;
  display:block;
  transition:transform 0.5s ease;
}

/* IMAGE HOVER EFFECT */

.gallery-item:hover img{
  transform:scale(1.1);
}

/* OVERLAY */

.overlay{
  position:absolute;
  top:0;
  left:0;

  width:100%;
  height:100%;

  background:rgba(0,0,0,0.5);

  display:flex;
  justify-content:center;
  align-items:center;

  font-size:1.4rem;
  font-weight:bold;

  opacity:0;

  transition:0.4s ease;
}

/* SHOW OVERLAY ON HOVER */

.gallery-item:hover .overlay{
  opacity:1;
}

/* LIGHTBOX */

.lightbox{
  position:fixed;
  top:0;
  left:0;

  width:100%;
  height:100%;

  background:rgba(0,0,0,0.95);

  display:none;

  justify-content:center;
  align-items:center;

  z-index:1000;
}

/* LIGHTBOX IMAGE */

.lightbox-img{
  max-width:80%;
  max-height:80%;
  border-radius:15px;

  animation:zoom 0.4s ease;
}

/* ZOOM ANIMATION */

@keyframes zoom{

  from{
    transform:scale(0.7);
    opacity:0;
  }

  to{
    transform:scale(1);
    opacity:1;
  }

}

/* CLOSE BUTTON */

.close{
  position:absolute;
  top:20px;
  right:35px;

  color:white;
  font-size:45px;

  cursor:pointer;

  transition:0.3s ease;
}

.close:hover{
  color:#38bdf8;
}

/* NEXT & PREVIOUS BUTTONS */

.prev,
.next{
  position:absolute;
  top:50%;

  transform:translateY(-50%);

  font-size:40px;
  color:white;

  background:rgba(255,255,255,0.2);

  padding:12px 18px;

  border-radius:50%;

  cursor:pointer;

  transition:0.3s ease;
}

/* BUTTON HOVER */

.prev:hover,
.next:hover{
  background:#38bdf8;
}

/* BUTTON POSITIONS */

.prev{
  left:30px;
}

.next{
  right:30px;
}

/* RESPONSIVE DESIGN */

@media(max-width:768px){

  .title{
    font-size:2rem;
  }

  .gallery-item img{
    height:220px;
  }

  .prev,
  .next{
    font-size:28px;
    padding:10px 15px;
  }

}

@media(max-width:500px){

  body{
    padding:15px;
  }

  .gallery{
    grid-template-columns:1fr;
  }

  .gallery-item img{
    height:250px;
  }

  .lightbox-img{
    max-width:95%;
  }

}
/* SUPPORT FOR SIMPLE IMAGE PAGES (animal.html, nature.html) */

.gallery img{
  width:100%;
  height:280px;
  object-fit:cover;
  border-radius:20px;
  box-shadow:0 4px 10px rgba(0,0,0,0.4);
  transition:transform 0.5s ease;
}

.gallery img:hover{
  transform:scale(1.05);
}