*, *::before, *::after{
  -moz-box-sizing: border-box;
       box-sizing: border-box;
  
  -webkit-transition: all 0.3s ease-in-out;
          transition: all 0.3s ease-in-out;
}

.hero{
  width: 100%;
  height: 40%;
  background: #3498db;
  display: table;
}



figure{
  width: 100%;
  overflow: hidden;
  position: relative;
  display: inline-block;
  vertical-align: top;
  border: 0px solid #fff;
  border-radius:6px;
  box-shadow: 0 0 5px #ddd;
  margin:1em 0;
}

figcaption{
  position: absolute;
  left: 0; right: 0;
  top: 0; bottom: 0;
  text-align: center;
  font-weight: bold;
  width: 100%;
  height: 100%;
  display: table;
}

@media (min-width:768px){
figcaption{
min-height:250px;
max-height:300px;}
}

@media (max-width:767px){
figcaption{
min-height:130px;
max-height:200px;}
}

figcaption div{
  font-size: 1.5em;
  display: table-cell;
  vertical-align: middle;
  position: relative;
/*  top: 20px;*/
  opacity: 0;
  color: #000;
  text-transform: uppercase;
}

figcaption div:after{
  position: absolute;
  content: "";
  left: 0; right: 0;
  bottom: 40%;
  text-align: center;
  margin: auto;
  width: 0%;
  height: 2px;
  background: #2c3e50;
}

figure img{
  -webkit-transition: all 0.5s linear;
          transition: all 0.5s linear;
  -webkit-transform: scale3d(1, 1, 1);
          transform: scale3d(1, 1, 1);
}

figure:hover figcaption{
 background: rgba(255,255,255,0.5);
}

figcaption:hover div{
  opacity: 1;
  top: 0;
}

figcaption:hover div:after{
  width: 50%;
}

figure:hover img{
  -webkit-transform: scale3d(1.2, 1.2, 1);
          transform: scale3d(1.2, 1.2, 1);
}