@import url("https://fonts.googleapis.com/css?family=Poppins");
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  background: #141E30;
  background: -webkit-linear-gradient(to top, #243B55, #141E30);
  background: linear-gradient(to top, #243B55, #141E30);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: XBRoyaBold, "Poppins", sans-serif;
  overflow: hidden;
}

h4 {
  direction: rtl;
  text-align: center;
}

.card {
  border-radius: 16px;
  width: 360px;
  height: 360px;
  background: url(https://picsum.photos/360/360?image=0);
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 50px rgba(0, 0, 0, 0.85);
}
.card:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  background-color: rgba(0, 0, 0, 0.92);
}
.card .img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
}
.card .img span {
  width: 25%;
  height: 100%;
  background: url(https://picsum.photos/360/360?image=0);
  transition: 0.5s;
}
.card .img span:nth-child(1) {
  background-position: 0;
  transition-delay: 0;
}
.card .img span:nth-child(2) {
  background-position: 33.33%;
  transition-delay: 0.1s;
}
.card .img span:nth-child(3) {
  background-position: 66.66%;
  transition-delay: 0.2s;
}
.card .img span:nth-child(4) {
  background-position: 100%;
  transition-delay: 0.3s;
}

.card:hover .img > span {
  transform: translateY(-100%);
}
.card:hover .content {
  transform: translateY(0%);
  transition: 1s;
  transition-delay: 0.1s;
}

.content {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: white;
  padding: 20px 20px;
  width: 100%;
  height: 100%;
  transform: translateY(100%);
}
