 .blocks {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blocks .block {
  position: relative;
  display: block;
  width: 100%;
  max-height: 700px;
  margin: 0;
  transform: perspective(1500px) rotateY(30deg);
  transition: transform 0.9s;
 
}

.blocks .block:before, .blocks .block:after {
  width:100%;
  height:100%;
  position:absolute;
  left:-10px;
  top:10px;
  content:'';
  border:1px solid #ddd;
  z-index:-1;
}
.blocks .block:after {
 
  left:-20px;
  top:20px;
  
}


body.dark .blocks .block:before, body.dark .blocks .block:after{
	border:1px solid var(--grey-dark);
}
 

.blocks .block img {
  width: auto;
  max-width: 100%;
  display:block;
}
 .blocks .block .overlay {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
  -webkit-transform: translate3d(0, 0, 0);
}
.blocks .block .overlay img {
  width: auto;
  max-width: 50%;
}
.blocks .block.hover,  .blocks .block:hover {
  transform: rotateY(0);
  cursor: pointer;
}
 .blocks .block.hover .overlay,  .blocks .block:hover .overlay {
  opacity: 1;
}
@media only screen and (max-width: 768px) {
 .blocks {
 padding: 50px 0;
}


}