.grid {
    position: relative;
    margin: 0 auto -5px;
    list-style: none;
    text-align: center;
}
.grid li {display: inline-block;}

/* Common style */
.grid figure {
    display: inline-block;
    position: relative;
    overflow: hidden;
    margin: 10px 1%;
    text-align: left;
    cursor: pointer;
}

.grid figure img {
    position: relative;
    display: block;
    /*min-height: 100%;*/
    max-width: 100%;
    opacity: 1;
}

.grid figure figcaption {
    padding: 2em;
    color: #fff;
    text-transform: uppercase;
    font-size: 1.25em;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.grid figure figcaption::before,
.grid figure figcaption::after {
    pointer-events: none;
}

.grid figure figcaption > a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* Caption Style */
figure.effect figcaption {
    position: absolute;
    width: 100%;
    bottom: 0;
    padding: 0.2em 1em;
    color: #3c4a50;
    -webkit-transition: -webkit-transform 0.35s;
    transition: transform 0.35s;
    -webkit-transform: translate3d(0,100%,0);
    transform: translate3d(0,100%,0);
    z-index:2;
}

figure.effect h3 {
    font-size: 18px;
    margin: 0;
}

figure.effect p.icon-links a {
    float: right;
    color: #3c4a50;
    font-size: 1.4em;
}

figure.effect:hover p.icon-links a:hover,
figure.effect:hover p.icon-links a:focus {
    color: #252d31;
}

figure.effect p.description {
    position: absolute;
    top: 0;
    padding: 1em 2em;
    color: #fff;
    text-align: left;
    text-transform: none;
    font-size: 90%;
    opacity: 0;
    -webkit-transition: opacity 0.35s;
    transition: opacity 0.35s;
    -webkit-backface-visibility: hidden; /* Fix for Chrome 37.0.2062.120 (Mac) */
    z-index: 2;
}

figure.effect h3 {
    display: inline-block;
}

figure.effect:hover p.description {
    opacity: 1;
}

figure.effect:hover figcaption {
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}
figure.effect .overlay {
    width:100%;
    height:100%;
    position:absolute;
    opacity:0;
    z-index:1;
    -webkit-transition: opacity 0.35s;
    transition: opacity 0.35s;
}
figure.effect:hover .overlay {
    opacity:0.6;
}
