* {
  color: #343a40;
  background-color: #f8fafc;
  font-family: "Lato", sans-serif;
  margin: 0;
}

body,
html {
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  margin: 5em 0;
}

.heading-title {
  font-size: 1.5em;
  text-align: center;
  margin: auto;
  left: 50%;
  display: block;
  padding: 0.3em 0;
}

.heading-button {
  cursor: pointer;
  font-size: 1.2em;
  position: fixed;
  z-index: 999;
}

.grid-list {
  list-style: none;
}

.grid {
  width: 100%;
  height: 25%;
  max-width: 100%;
  display: grid;
  grid-template-columns: 400px 400px 400px 400px;
  grid-template-rows: 50px 150px;
  list-style: none;
  justify-items: center;
  justify-content: center;
  position: relative;
  z-index: 50;
}

.hide {
  opacity: 0;
  transition: all 0.2s;
  pointer-events: none;
}

.show {
  opacity: 1;
  transition: all 0.2s;
}

.hidden {
  display: none;
}

.grid--img {
  background: none;
}

.grid--img--list {
  width: 100%;
  height: 250px;
  max-height: 100%;
  object-position: 35% 60%;
  cursor: pointer;
  border-radius: 0.5em;
  box-shadow: 1em 1em 1em 0.3em rgba(52, 58, 64, 0.2);
  transform: translate(0.05em, -0.05em);
}

.grid--img--list:hover {
  animation-name: enlarge;
  animation-duration: 0.5s;
  animation-fill-mode: forwards;
}

.grid--img--list:not(:hover) {
  animation-name: decrement;
  animation-direction: reverse;
}

@keyframes enlarge {
  100% {
    box-shadow: 0.7em 0.5em 0.7em 0.2em rgba(52, 58, 64, 0.25);
    transform: translate(0.2em, -0.2em);
  }
  0% {
    box-shadow: 1em 1em 1em 0.3em rgba(52, 58, 64, 0.2);
    transform: translate(0.05em, -0.05em);
  }
}

@keyframes decrement {
  0% {
    box-shadow: 1em 1em 1em 0.3em rgba(52, 58, 64, 0.2);
    transform: translate(0.05em, -0.05em);
  }
  100% {
    box-shadow: 0.7em 0.5em 0.7em 0.2em rgba(52, 58, 64, 0.25);
    transform: translate(0.2em, -0.2em);
  }
}

.absolute {
  position: absolute;
  top: 460px;
  padding: 2em;
  max-width: 100%;
  font-size: 17px;
}

.img--container {
  width: 1200px;
  height: 200px;
  max-width: 100%;
  margin: auto;
  margin: 1em auto;
}

.img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.destination--info-show {
  opacity: 0;
  transform: all 0.1;
}

.destination--info-hide {
  opacity: 1;
  transform: all 0.1;
}

.bg {
  opacity: 0.1;
  width: 100%;
  height: 100%;
  border-top-left-radius: 2em;
  border-top-right-radius: 2em;
}

@media screen and (max-width: 768px) {
  body {
    margin: 3.5em 0;
  }
  .grid {
    grid-template-columns: auto auto;
    grid-template-rows: auto auto auto auto;
    gap: 15px;
    height: auto;
  }
  .grid--img {
    height: 200px;
    width: 150px;
  }
  .absolute {
    padding: 1em;
    font-size: 14px;
    position: relative;
    top: 0;
  }
  .bg {
    display: none;
  }
  .first {
    grid-area: 1/1;
  }
  .second {
    grid-area: 1/2;
  }
  .third {
    grid-area: 3/1;
  }
  .fourth {
    grid-area: 3/2;
  }
  .first-img {
    grid-area: 2/1;
  }
  .second-img {
    grid-area: 2/2;
  }
  .third-img {
    grid-area: 4/1;
  }
  .fourth-img {
    grid-area: 4/2;
  }
}
