.container {
  width: 500px;
  height: 500px;
  position: relative;
  overflow: hidden;
  margin: auto;
}

.container > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s;
}

.caption {
  font-family: Raleway;
}
.caption > h1 {
  font-size: 24px;
  text-transform: uppercase;
  margin: 0;
}
.caption > p {
  font-size: 22px;
  text-transform: capitalize;
}

@media (max-width: 992px) {
  .container {
    width: 300px;
    height: 300px;
  }
  .caption > h1 {
    font-size: 18px;
  }
  .caption > p {
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  .container {
    width: 200px;
    height: 200px;
  }
  .caption > h1 {
    font-size: 14px;
  }
  .caption > p {
    font-size: 12px;
  }
}

/**
* Hover Effect #1 ----------------------------------------------------
*/
.effect-1 .caption {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  transition: 0.5s;
  opacity: 0;
  background-color: rgba(0, 0, 0, 0);
}

.effect-1:hover .caption {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.5);
}

.effect-1:hover > img {
  transform: scale(1.3) rotate(15deg);
}

/**
* Hover Effect #2 ----------------------------------------------------
*/
.effect-2 .caption {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  transition: all 0.5s;
  transform: translateY(-100%);
}

.effect-2:hover .caption {
  background-color: rgba(0, 0, 0, 0.5);
  transform: translateY(0);
}

.effect-2:hover > img {
  transform: scale(1.3) rotate(-15deg);
}

/**
* Hover Effect #3 ----------------------------------------------------
*/
.effect-3 .caption {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  transition: all 0.5s;
  background-color: #333333;
  transform: translateX(-100%);
}

.effect-3:hover .caption {
  transform: translateX(0);
}

.effect-3:hover > img {
  transform: translateX(100%);
}

/**
* Hover Effect #4 ----------------------------------------------------
*/
.effect-4 .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 30%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  transition: all 0.5s;
  background-color: #333333;
  transform: translateY(100%);
}

.effect-4:hover .caption {
  transform: translateY(0);
}

.effect-4 .caption > p {
  margin: 5px 0;
}

.effect-4:hover > img {
  transform: translateY(-30%);
}

/**
* Hover Effect #5 ----------------------------------------------------
*/
.effect-5 {
  color: white;
  font-family: sans-serif;
  position: relative;
  overflow: hidden;
}

.effect-5:before {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  content: "";
  background-color: #006266;
  opacity: 0.5;
  transform: translateY(100%);
  transition: all 0.25s;
  transition-delay: 0.25s;
}

.effect-5:hover:before {
  transform: translateY(0);
  transition-delay: 0s;
}

.effect-5 > img {
  width: 100%;
}

.effect-5 .caption {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.25s ease;
}

.effect-5:hover .caption {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.3s;
}

.effect-5 .caption > p {
  background-color: #ae895d;
  padding: 3px 10px;
}
