.grid {
    margin: 0 -10px;
    list-style: none;
    text-align: center;
    font-size: 0;
}

/* Common style */

.grid figure {
    position: relative;
    display: inline-block;
    height: 300px;
    width: calc(25% - 20px);
    margin: 0 10px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;

}

.grid figure a {
    -webkit-box-shadow: 0 0 20px 0 #fff;
    box-shadow: 0 0 20px 0 #fff;
    background: rgba(255, 255, 255, 0.8392156862745098);
    border-radius: 15px;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    -webkit-transition: all 0.5s;
    transition: all 0.5s;
}

.grid figure:hover a {
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
    background: #fff;
}

.grid figure img {
    position: relative;
    display: block;
    min-height: 100%;
    max-width: 60%;
    margin: 0 auto;
    margin-top: -40px;
    opacity: 0.8;
}


.grid figure img[src*="portfolio"] {
    max-width: 45%;
    max-width: 120px;
}

.grid figure figcaption {
    color: #fff;
    text-transform: uppercase;
    -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;
}

.grid figure h2 {
    font-size: 22px;
    line-height: 1.3;
    font-family: 'Raleway-Bold';
    position: absolute;
    top: 78%;
    left: 0;
    width: 100%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    padding: 30px 20px;
    color: #454545;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}

.index-page .grid figure h2 {
    padding: 30px 25px;
}

.grid figure:hover h2 {
    font-family: 'Raleway-Bold';
    font-size: 22px;
    /*    text-shadow: 0 0 1px #666;*/
}

.grid figure h2 span {
    font-weight: 800;
}

.grid figure h2,
.grid figure p {
    margin: 0;
}

.grid figure p {
    letter-spacing: 1px;
    font-size: 68.5%;
}

/*---------------*/

/***** Chico *****/

/*---------------*/

/*
figure.effect-chico img {
    -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
    transition: opacity 0.35s, transform 0.35s;
    -webkit-transform: scale(1.12);
    transform: scale(1.12);
}
*/

figure.effect-chico:hover img {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
}

/*
figure.effect-chico figcaption {
    padding: 0;
}
*/

figure.effect-chico figcaption::before {
    position: absolute;
    top: 15px;
    right: 15px;
    bottom: 15px;
    left: 15px;
    border-radius: 5px;
    border: 1px solid #e4e2e2;
    border: 1px solid #0C676E;
    content: '';
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
}

figure.effect-chico figcaption::before,
figure.effect-chico p {
    opacity: 0;
    -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
    transition: opacity 0.35s, -webkit-transform 0.35s;
    transition: opacity 0.35s, transform 0.35s;
    transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
}

figure.effect-chico p {
    margin: 0 auto;
    max-width: 200px;
    -webkit-transform: scale(1.5);
    transform: scale(1.5);
}

figure.effect-chico:hover figcaption::before,
figure.effect-chico:hover p {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
}


/*-----------------*/

/***** Apollo RANDOM ANIMATE HOVER BLOCK *****/

/*-----------------*/

figure.effect-chico a::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    content: '';
    -webkit-transform: scale3d(1.9, 1.4, 1) rotate3d(0, 0, 1, 45deg) translate3d(0, -100%, 0);
    transform: scale3d(1.9, 1.4, 1) rotate3d(0, 0, 1, 45deg) translate3d(0, -100%, 0);
}


figure.effect-chico.active-animation a::before {
    -webkit-transform: scale3d(1.9, 1.4, 1) rotate3d(0, 0, 1, 45deg) translate3d(0, 100%, 0);
    transform: scale3d(1.9, 1.4, 1) rotate3d(0, 0, 1, 45deg) translate3d(0, 100%, 0);
    -webkit-transition: -webkit-transform 0.9s;
    transition: -webkit-transform 0.9s;
    transition: transform 0.9s;
    transition: transform 0.9s, -webkit-transform 0.9s;
}


@media (max-width: 767px) {

    .grid {
        margin: 0 -7.5px;
        margin-top: -7.5px;
    }
    .grid figure {
        width: calc(50% - 15px);
        margin: 7.5px 7.5px;
        height: 230px;
    }

    .index-page .grid figure {
        height: 200px;
    }

    .grid figure img {
        margin-top: -25px;
    }

    .grid figure img[src*="portfolio"] {
        max-width: 50%;
        max-width: 100px;
    }

    figure.effect-chico figcaption {
        padding: 0;
    }

    .grid figure h2,
    .grid figure:hover h2,
    .index-page .grid figure h2 {
        font-size: 16px;
        padding: 15px 15px;
    }

    .grid figure:hover a {
        -webkit-transform: none;
        transform: none;
    }

    figure.effect-chico:hover figcaption::before,
    figure.effect-chico:hover p {
        opacity: 0;
    }
}

@media (max-width: 359px) {

    .grid figure img {
        margin-top: -40px;
    }

    .grid figure h2 {
        top: 74%;
    }

    .grid figure img[src*="portfolio"] {
        max-width: 50%;
    }
}


.animated-form-button > span.animated-form-button-element::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    content: '';
    -webkit-transform: scale3d(1.9, 1.4, 1) rotate3d(0, 0, 1, 45deg) translate3d(0, -210%, 0);
    transform: scale3d(1.9, 1.4, 1) rotate3d(0, 0, 1, 45deg) translate3d(0, -210%, 0);
    -webkit-transition: -webkit-transform 0.9s;
    transition: -webkit-transform 0.9s;
    transition: transform 0.9s;
    transition: transform 0.9s, -webkit-transform 0.9s;
    z-index: 2;
}

.animated-form-button {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 5px;
}

#compare-form .animated-form-button {
    display: block
}

.animated-form-button.active-animation > span.animated-form-button-element::before {
    -webkit-transform: scale3d(1.9, 1.4, 1) rotate3d(0, 0, 1, 45deg) translate3d(0, 210%, 0);
    transform: scale3d(1.9, 1.4, 1) rotate3d(0, 0, 1, 45deg) translate3d(0, 210%, 0);
    -webkit-transition: -webkit-transform 0.9s;
    transition: -webkit-transform 0.9s;
    transition: transform 0.9s;
    transition: transform 0.9s, -webkit-transform 0.9s;
}
