* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: #191919;
  color: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.gallery {
  display: flex;
  width: 70vw;
  max-width: 1200px;
  overflow-x: scroll;
}
.gallery::-webkit-scrollbar {
  display: none;
}
.gallery-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#nextBtn,
#backBtn {
  font-size: 40px;
  cursor: pointer;
  transition: transform 500ms;
  margin: 0 10px;
}
#backBtn:hover {
  transform: scale(1.1) translateX(-5px);
}
#nextBtn:hover {
  transform: scale(1.1) translateX(5px);
}

.gallery div {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 20px;
  padding: 10px;
  flex: none;
}
.gallery div img {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  cursor: pointer;
  transition: 600ms;
  filter: grayscale(100%);
}
.gallery div img:hover {
  transform: scale(1.05);
  filter: grayscale(0);
}
@media (max-width: 1200px) {
  .gallery div {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }
  .gallery span {
    display: flex;
  }
  #backBtn,
  #nextBtn {
    display: none;
  }
  .gallery div img {
    height: 700px;
    filter: grayscale(0);
    padding: 30px auto 0;
  }
  .gallery {
    display: flex;
    height: 100vh;
  }
}
