* {
  margin: 0;
  padding: 0;
}

body {
  background-color: rgb(20, 20, 20);
  font-family: Arial;
  overflow: hidden;
  height: 100vh;
}

.image-container {
  display: flex;
  height: 100%;
  align-items: center;
  width: 88%;
  margin: 0 auto;
  grid-gap: 2px;
}

.image-details {
  position: relative;
  width: 300px;
  margin-right: 1px;
  height: 100%;
  overflow: hidden;
}

.image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: filter 0.4s ease-in-out,
    transform 0.4s ease-in-out,
    opacity 0.4s ease-in-out;
  transform-origin: center;
}

.image-name {
  position: absolute;
  font-family: Cambria;
  font-weight: bold;
  top: 85%;
  left: 40%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 20px;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
}

#common_brown {
  width: 200px;
  margin-left: 6%;
}

small {
  margin-top: 10px;
  font-size: 15px;
  font-weight: normal;
  display: block;
}

.button {
  background-color: transparent;
  display: none;
  border: none;
  color: #50c4ed;
  margin: 10px 0 0 0px;
  cursor: pointer;
  margin-top: 6px;
  font-size: 16px;
  transition: opacity 0.4s ease-in-out;
}

/* this will work on Name of animal when some hover */
.image-details:hover .image-name h3,
.image-details:hover .image-name small {
  transform: translateY(-10px);
  transition: transform 0.4s ease-in-out;
}

.image-details:hover .button {
  display: block;
  opacity: 1;
}

/* this will work on Image when some hover */
.image-details:hover .image {
  filter: grayscale(100%) blur(5px);
  transition: 0.6s;
  transform: scale(1.04);
  opacity: 0.4;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}
/*those are style for model opened when we click at any place on Image */

.modal-content {
  margin: auto;
  display: block;
  max-width: 100%;
  max-height: 67%;
  width: auto;
 
}
/* that is for icon x which used to close modal */
.close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: white;
  font-size: 50px;
  font-weight: bold;
  transition: 0.7s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}
/* the following is for the name of Image which is  clicked, it appear under image */
#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #0afada;
  padding: 10px 0;
  height: 150px;
}
/* that is for thumbnails which displays all images, and allow you to click one of them to display clickable image*/
#thumbnails {
  position: absolute;
  bottom: 80px;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.thumbnail {
  width: 60px;
  height: 40px;
  margin: 0 5px;
  cursor: pointer;
  transition: opacity 0.3s ease-in-out;
}

.active-thumbnail {
  opacity: 0.7;
}

/*style for visibility on tablet device*/
@media screen and (max-width: 1200px), (width: 1200px) {
  .image-container {
    width: 100%;
    justify-content: flex-start;
  }

  .image-name {
    visibility: hidden;
  }
}

/*style for visibility on mobile device*/
@media screen and (max-width: 600px), (width: 600px) {
  .image-container {
    width: 100%;
    justify-content: flex-start;
  }

  .image-name {
    visibility: hidden;
  }
  .close {
    font-size: 50px;
    top: 15px;
    right: 5px;
   
  }
}
