@import url("https://fonts.googleapis.com/css?family=Montserrat:wght@100;200;300;400;500;600");

* {
  border: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Montserrat, sans-serif;
}

.go-back {
  display: block;
  position: absolute;
  top: 0;
  left: 83%;
  padding-top: 35px;
  background-color: #222;
  text-align: right;
  margin-right: 30px;
}

body {
  margin: 0;
  padding-top: 10%;
  font-family: sans-serif;
  max-width: 1200px;
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background-color: #212121;
}

/* .box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  width: 100%;
  margin: 0 auto;
} */

.card {
  position: relative;
  width: 300px;
  height: 350px;
  background-color: #fff;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  margin-left: 50px;
  margin-bottom: 50px;
  margin-right: 35px;
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: #fff;
  z-index: -1;
  transition: 0.5s;
}

.card:hover::after {
  transform: rotate(10deg);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.card:hover::before {
  transform: rotate(20deg);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.card .imgbx {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: #222;
  transition: 0.5s;
  z-index: 1;
}

.card:hover .imgbx {
  bottom: 80px;
}

.card .imgbx img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card .details {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  height: 60px;
  text-align: center;
}

.card .details h2 {
  margin: 0;
  padding: 0;
  font-size: 20px;
  font-weight: 600;
  color: #777;
  text-transform: uppercase;
}

.card .details h2 a {
  font-weight: 500;
  font-size: 16px;
  color: #f38695;
  text-decoration: none;
  margin-top: 5px;
}

@media (max-width: 900px) {
  body {
    justify-content: center;
  }

  .go-back {
    display: block;
    position: absolute;
    top: 0;
    left: 73%;
    padding-top: 35px;
    background-color: #222;
    text-align: right;
  }
}

@media (max-width: 450px) {
  body {
    padding-top: 30%;
  }

  .go-back {
    left: 50%;
  }
}
