
.box {
  position: relative;
  max-height: 300px;
  border-radius: 4px;
  overflow: hidden;
}
.box .hide {
  opacity: 0;
}
.box .frame {
  position: absolute;
  border: 1px solid #fff;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.box h2, .box p {
  position: absolute;
  color: #fff;
  z-index: 2;
  width: 100%;
  transition: opacity 0.2s, transform 0.3s;
}
.box h2 {
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 0;
  letter-spacing: 1px;
}
.box p {
  bottom: 0;
  font-size: 14px;
  letter-spacing: 1px;
}
.box:hover {
  transition: all 0.3s ease-in-out;
}
.box:hover:before {
  transition: all 0.3s ease-in-out;
}
.box img {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
  transition: all 0.3s ease-in-out;
}
.box img:hover {
  transition: all 0.3s ease-in-out;
}
.box img:after {
  content: "";
  position: absolute;
  background-color: rgba(0, 0, 0, 0.6);
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
}
.box img:hover {
  transition: all 0.3s ease-in-out;
}

.zoom-in h2 {
  top: 50%;
  transform: translatey(-50%);
  text-align: center;
  margin: 0;
  text-shadow: 1px 1px 3px black;
}
.zoom-in p {
  text-align: center;
  top: calc(50% + 40px);
  transition: all 0.3s ease;
  transform: scale(1.8);
  opacity: 0;
}
.zoom-in:hover img {
  transform: scale(1.1);
  filter: grayscale(100%);
}
.zoom-in:hover p {
  transform: scale(1);
  transition: all 0.3s ease;
  opacity: 1;
  text-shadow: 1px 1px 3px black;
}


.zoom-out .frame {
  width: calc(100% - 100px);
  height: calc(100% - 100px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 40px);
  height: calc(100% - 40px);
}
.zoom-out h2 {
  font-size: 20px;
  font-weight: 300;
  margin-left: 10px;
  letter-spacing: 1px;
}
.zoom-out span {
  font-size: 24px;
  font-weight: 500;
}
.zoom-out p {
  max-width: 120px;
  text-align: right;
  margin: 10px;
  right: 0;
}
.zoom-out img {
  transform: scale(1.1);
}
.zoom-out:hover img {
  transform: scale(1);
  filter: contrast(70%);
}

@media screen and (max-width: 880px) {
  .wrapper {
    width: 50%;
  }
}
@media screen and (max-width: 520px) {
  .wrapper {
    width: 100%;
  }
}