.grid {
    list-style: none outside none;
    margin: 0 auto;
    padding: 0px;
    text-align: center;
    max-width: 320px;
     margin: 0 auto;
}
.grid li {
    display: inline-block;
    margin: 0;
    position: relative;
    text-align: left;

}
.grid figure {
    margin: 0;
    position: relative;
}
.grid figure img {
    display: block;
    width: 100%;
    position: relative;

}
.grid figcaption {
    left: 0;
    position: absolute;
    top: 0;
}
.grid figcaption h3 {
    color: #FFFFFF;
    margin: 0;
    padding: 0;
}


.cs-style-3 figure {
    overflow: hidden;
}
.cs-style-3 figure img {

    -webkit-transition: transform 0.4s ease 0s;
    transition: transform 0.4s ease 0s;
}

.cs-style-3 figcaption {
    backface-visibility: hidden;
    bottom: 0;
    opacity: 0;
    top: auto;
     -webkit-transform: translateY(100%);
     -webkit-transition: transform 0.4s ease 0s, opacity 0.1s ease 0.3s;
     transform: translateY(100%);
     transition: transform 0.4s ease 0s, opacity 0.1s ease 0.3s;
    width: 100%;
}
.no-touch .cs-style-3 figure:hover figcaption, .cs-style-3 figure.cs-hover figcaption {
    opacity: 1;
    -webkit-transform: translateY(0px);
     -webkit-transition: transform 0.4s ease 0s, opacity 0.1s ease 0s;
     transform: translateY(0px);
     transition: transform 0.4s ease 0s, opacity 0.1s ease 0s;
}
@media screen and (max-width: 31.5em) {
    div.grid,
    .grid li {
        min-width: 250px;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
}