.grid {
    position: relative;
    margin: 0px auto 30px auto;
    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 {
        position: relative;
        margin: 0px auto 30px auto;
        width: 100%;
        list-style: none;
        text-align: center;
        display: block;
        text-align: center;
    }

        .grid.servizi_riepilogo figure {
            position: relative;
            float: inherit;
            overflow: hidden;
            width: 47%;
            text-align: center;
            cursor: pointer;
            height: 350px;
            margin: 1%;
            display: inline-block;
        }

    .grid figure img {
        position: relative;
        display: block;
        width: 100%;
        opacity: 0.7;
    }

    .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-size: 40px;
        text-transform: initial;
        font-weight: 600;
    }

        .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: #000;
    /*	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;
    max-width: 200px;
    width: auto;
    position:relative;
    top:20px
}

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;
    font-size:20px;
    padding:20px;
}

figure.effect-duke p {
    position: absolute;
    bottom: 0;
    left: 0;
    margin: 3%;
    padding: 0px 0px 10px 0px;
    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: #23abe1;
    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 {
    }

        .grid figure h2 {
        }

    .grid figure, .grid.servizi_riepilogo figure {
        height: 236px;
    }

    figure.effect-duke p {
        font-size: 80%;
    }
}

@media screen and (max-width: 778px) {
    .grid.servizi_riepilogo figure {
        width: 98%;
        height: 350px;
        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: 670px) {
    .grid figure {
        display: inline-block;
        float: none;
        width: 100%;
        height: 400px;
        margin: 2% 1%;
    }

        .grid figure h2 {
            font-size: 40px;
        }
}

@media screen and (max-width: 500px) {
    .grid.servizi_riepilogo figure {
        height: 200px;
    }

    .grid figure {
        height: 220px;
        width: 100%;
        margin: 1% 0% 2% 0%;
    }

        .grid figure figcaption {
            padding: 2em 1em;
        }

        .grid figure h2 {
            font-size: 25px;
        }

    figure.effect-duke p {
        padding: 10px;
        width: 89%;
        font-size: 15px
    }
}
