.contenedor {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    background-color: #fff;
    /* border: 1px solid #aaaaaa; */
    border-radius: 5px;
    margin-bottom: 2rem;
    box-shadow: 0px 1px 8px 1px rgba(0, 0, 0, 0.25);

}

.titulo {
    text-align: center;
}

.contenedor_tarjeta {
    padding: 30px;
    margin-left: auto;
    margin-right: auto;
}

.contenedor_tarjeta a {
    display: flex;
    flex-direction: row;
}

.contenedor_tarjeta:hover figure {
    transform: perspective(600px) rotateY(180deg);
    -webkit-box-shadow: 0px 2px 10px 2px rgba(0, 0, 0, 0.25);
    -moz-box-shadow: 0px 2px 10px 2px rgba(0, 0, 0, 0.25);
    box-shadow: 0px 2px 10px 2px rgba(0, 0, 0, 0.25);
}

.contenedor_tarjeta:hover figure img {
    /* Si queremos podemos aplicar un efecto blur a nuestra imagen al girar */
    filter: blur(2px);
}

figure {
    width: 300px;
    height: 350px;
    margin: 0;
    position: relative;
    transition: all ease .5s;
    transform-style: preserve-3d;
    /* Nota:
		Establecemos que la imagen tendra una rotacion de 0grados al inicio porque si no
		ponemos esta propiedad nos da un poco de problemas en algunos navegadores al pasar el cursor.
	*/
    transform: perspective(600px) rotateY(0deg);
}

figure .frontal,
figure .trasera {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    transition: all ease .5s;
}

figure .frontal {
    display: block;
    background: #000;
    backface-visibility: hidden;
    /* Podemos ocultar la imagen al da la vuelta si lo queremos */
    /**/
}

figure .trasera {
    position: absolute;
    top: 0;
    padding: 20px;
    color: #000;
    transform: perspective(600px) rotateY(180deg);
    backface-visibility: hidden;
    overflow: auto;
}

.contenedor_tarjeta:nth-child(1) figure .trasera {
    background: rgba(223, 234, 241);
    background: -moz-linear-gradient(top, rgba(223, 234, 241) 0%, rgba(15, 99, 144, 1) 100%);
    background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(223, 234, 241)), color-stop(100%, rgba(15, 99, 144, 1)));
    background: -webkit-linear-gradient(top, rgba(223, 234, 241) 0%, rgba(15, 99, 144, 1) 100%);
    background: -o-linear-gradient(top, rgba(223, 234, 241) 0%, rgba(15, 99, 144, 1) 100%);
    background: -ms-linear-gradient(top, rgba(223, 234, 241) 0%, rgba(15, 99, 144, 1) 100%);
    background: linear-gradient(to bottom, rgba(223, 234, 241) 0%, rgba(15, 99, 144, 1) 100%);
    filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#dfeaf1', endColorstr='#0f6390', GradientType=0);
    
}

.contenedor_tarjeta:nth-child(2) figure .trasera {
    background: rgba(255, 157);
    background: -moz-linear-gradient(top, rgba(255, 157, 0) 0%, rgb(138, 178, 238) 100%);
    background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(255, 157, 0)), color-stop(100%, rgb(138, 178, 238) ));
    background: -webkit-linear-gradient(top, rgba(255, 157, 0) 0%, rgb(138, 178, 238)  100%);
    background: -o-linear-gradient(top, rgba(255, 157, 0) 0%, rgb(138, 178, 238)  100%);
    background: -ms-linear-gradient(top, rgba(255, 157, 0) 0%, rgb(138, 178, 238)  100%);
    background: linear-gradient(to bottom, rgba(255, 157)0%, rgb(138, 178, 238) ) 100%);
    filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='rgba(255, 157,0)', endColorstr='rgb(138, 178, 238) ', GradientType=0);
}

.contenedor_tarjeta:nth-child(3) figure .trasera {
    background: rgba(95, 58, 53, 0.7);
    background: -moz-linear-gradient(top, rgba(95, 58, 53) 0%, rgba(221, 32, 47, 1) 100%);
    background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(95, 58, 53)), color-stop(100%, rgba(221, 32, 47, 1)));
    background: -webkit-linear-gradient(top, rgba(95, 58, 53) 0%, rgba(221, 32, 47, 1) 100%);
    background: -o-linear-gradient(top, rgba(95, 58, 53) 0%, rgba(221, 32, 47, 1) 100%);
    background: -ms-linear-gradient(top, rgba(95, 58, 53) 0%, rgba(221, 32, 47, 1) 100%);
    background: linear-gradient(to bottom, rgba(95, 58, 53) 0%, rgba(221, 32, 47, 1) 100%);
    filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#5f3a35', endColorstr='#dd202f', GradientType=0);
}

.contenedor_tarjeta:nth-child(4) figure .trasera {
    background: rgba(95, 58, 53, 0.7);
    background: -moz-linear-gradient(top, rgba(95, 58, 53, 0.7) 0%, rgba(221, 32, 47, 1) 100%);
    background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(95, 58, 53, 0.7)), color-stop(100%, rgba(221, 32, 47, 1)));
    background: -webkit-linear-gradient(top, rgba(95, 58, 53, 0.7) 0%, rgba(221, 32, 47, 1) 100%);
    background: -o-linear-gradient(top, rgba(95, 58, 53, 0.7) 0%, rgba(221, 32, 47, 1) 100%);
    background: -ms-linear-gradient(top, rgba(95, 58, 53, 0.7) 0%, rgba(221, 32, 47, 1) 100%);
    background: linear-gradient(to bottom, rgba(95, 58, 53, 0.7) 0%, rgba(221, 32, 47, 1) 100%);
    filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#5f3a35', endColorstr='#dd202f', GradientType=0);
}

figure .trasera .titulo {
    color: rgb(245, 240, 240);
    font-weight: bold;
    margin-bottom: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    text-align: center;
}

figure .trasera hr {
    height: 2px;
    background: #fff;
    border: none;
    margin-bottom: 20px;
    opacity: .5;
}

figure .trasera p {
    font-family: 'Open Sans', sans-serif;
    line-height: 22px;
    font-size: 14px;
    color: rgb(255, 255, 255);
}
figure .trasera a {
    font-family: 'Open Sans', sans-serif;
    line-height: 22px;
    font-size: 14px;
    color: rgb(36, 70, 70);
    font-weight: bold;
}
@media screen and (max-width: 1352px){
    .contenedor {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        background-color: #fff;
        border: 1px solid #aaaaaa;
        border-radius: 5px;
        margin-bottom: 2rem;
    }
   
    figure{
        width: 250px;
        height: 300px;
    }

}
@media screen and (max-width: 1100px){
    .contenedor {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        background-color: #fff;
        border: 1px solid #aaaaaa;
        border-radius: 5px;
        margin-bottom: 2rem;
    }
   
    figure{
        width: 200px;
        height: 300px;
    }



}
@media screen and (max-width: 992px) {
    figure .trasera {
        /*position: relative;*/
        backface-visibility: visible;
        transform: perspective(600px) rotateY(0deg);
    }
    figure{
        width: 250px;
        height: 300px;
    }
    .contenedor_tarjeta:hover figure {
        transform: perspective(600px) rotateY(0deg);
    }
    .contenedor {
        flex-direction: column;
        align-self: flex-start;
        
        justify-content: center;
        overflow: hidden;
        width: 100%;
        padding: 10px;
    }
    
}