.grid {
    position: relative;
    margin: 20px 0px;
    width: 100%;
    list-style: none;
    text-align: center;
    display: inline-block;
}
/* Common style */
.grid figure {
    position: relative;
    float: left;
    overflow: hidden;
    width: 31%;
    text-align: center;
    cursor: pointer;
    height: 250px;
    margin: 1%;
}
.grid.servizi_riepilogo figure {
    position: relative;
    float: left;
    overflow: hidden;
    width: 48%;
    text-align: center;
    cursor: pointer;
    height: 350px;
    margin: 1%;
}
.grid figure img {
    position: relative;
    display: block;
    max-width: 100%;
    opacity: 0.6;
}
.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, .grid figure figcaption > a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* Anchor will cover the whole item by default */
/* For some effects it will show as a button */
.grid figure figcaption > a {
    z-index: 1000;
    text-indent: 200%;
    white-space: nowrap;
    font-size: 0;
    opacity: 0;
    color: white;
}
.grid figure h2 {
    color: white;
    font-weight: 700;
    font-size: 40px;
}
.grid figure h2 small {
    font-weight: normal;
}
.grid figure h2 span {
    font-weight: 800;
}
.grid figure h2, .grid figure p {
    margin: 0;
}
.grid figure p {
    text-align: center;
}
.grid figure .btn {
    float: inherit
}
/* Individual effects */


/*---------------*/
/***** Duke *****/
/*---------------*/	 

figure.effect-duke {
    background: #2b2a28;/*	background: -webkit-linear-gradient(-45deg, #34495e 0%, #cc6055 100%);
	background: linear-gradient(-45deg, #34495e 0%, #cc6055 100%);*/
}
figure.effect-duke img, figure.effect-duke p {
    -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
    transition: opacity 0.35s, transform 0.35s;
}
figure.effect-duke:hover img {
    opacity: 0.5;
    -webkit-transform: scale3d(2, 2, 1);
    transform: scale3d(2, 2, 1);
}
.grid figure p img {
    position: relative;
    /* display: block; */
    max-height: 80px;
    opacity: 1;
    margin: auto;
}
figure.effect-duke:hover p img {
    opacity: 1;
    -webkit-transform: none;
    transform: none
}
figure.effect-duke h2 {
    -webkit-transition: -webkit-transform 0.35s;
    transition: transform 0.35s;
    -webkit-transform: scale3d(0.8, 0.8, 1);
    transform: scale3d(0.8, 0.8, 1);
    -webkit-transform-origin: 50% 100%;
    transform-origin: 50% 100%;
}
.servizi_riepilogo figure.effect-duke p {
    color: #333;
    text-decoration: none;
}
figure.effect-duke p {
    position: absolute;
    bottom: 0;
    left: 0;
    margin: 3%;
    padding: 20px;
    border: 1px solid #fff;
    text-transform: none;
    font-size: 90%;
    opacity: 0;
    -webkit-transform: scale3d(0.8, 0.8, 1);
    transform: scale3d(0.8, 0.8, 1);
    -webkit-transform-origin: 50% -100%;
    transform-origin: 50% -100%;
    display: inline-block;
    width: 93%;
    color: #2b2a28;
    text-align: center;
    background: white;
    text-decoration: underline;
}
figure.effect-duke:hover h2, figure.effect-duke:hover p {
    opacity: 1;
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
}

@media screen and (max-width: 1034px) {
.grid figure h2 {
    font-size: 30px;
}
.grid figure, .grid.servizi_riepilogo figure {
    height: 290px;
}
.grid figure {
    width: 48%;
}
}

@media screen and (max-width: 875px) {
.grid figure figcaption {
    padding: 20px;
}
.grid figure {
}
.grid figure h2 {
}
.grid figure, .grid.servizi_riepilogo figure {
    height: 236px;
}
figure.effect-duke p {
    font-size: 14px;
    padding: 10px;
}
}

@media screen and (max-width: 778px) {
.grid figure h2 {
    font-size: 40px;
}
.grid.servizi_riepilogo figure {
    width: 98%;
        height: 410px;
    margin: 2% 1%;
}
.grid figure {
    height: 502px;
    width: 100%;
    margin: 1% 0%;
}
.grid figure img {
    position: relative;
    display: block;
    max-width: 100%;
    opacity: 0.6;
    width: 100%;
}
.grid figure p img {
    width: auto
}
}

@media screen and (max-width: 690px) {
.grid.servizi_riepilogo figure {
    height: 395px;
}
}

@media screen and (max-width: 500px) {
    .grid.servizi_riepilogo figure {
        height: 192px;
    }
.grid figure {
    height: 220px;
    width: 100%;
    margin: 1% 0% 2% 0%;
}

.grid figure h2 {
    font-size: 25px;
}
figure.effect-duke p {
    padding: 10px;
    width: 89%;
    font-size: 15px
}
}
