.tarjetas {
    --bgTarjeta: #add6c2;
    --bgTarjeta2: #f6e9b9;
    --nameTarjeta: transparent;
    --anchoTarjeta: 230px;
    --altoTarjeta: 300px;
    --anchoContentTarjetas: 1200px;
}

@media (max-width: 400px) {

    .tarjetas {
        --anchoTarjeta: 230px;
        --altoTarjeta: 250px;
    }

    .tarjetas header h1 {
        font-size: 38px;
    }
}

.tarjetas * {
    box-sizing: border-box;
}

/*=== TARJETAS GIRATORIAS ===*/

.tarjetas .flip-container {
    -webkit-perspective: 1000;
    -o-perspective: 1000;
    perspective: 1000;
    display: inline-block;
}

@media all and (min-device-width: 768px) {
    .tarjetas .flip-container:hover .flipper {
        -webkit-transform: rotateY(180deg);
        transform: rotateY(180deg);
    }
}

@media all and (max-device-width: 767px) {
    .tarjetas .flip-container.hover .flipper {
        -webkit-transform: rotateY(180deg);
        transform: rotateY(180deg);
    }
}


.tarjetas .flip-container,
.tarjetas .front,
.tarjetas .back {
    width: var(--anchoTarjeta);
    height: var(--altoTarjeta);
}

.tarjetas .flip-container .flipper {
    -webkit-transition: 0.6s;
    -webkit-transform-style: preserve-3d;

    -moz-transition: 0.6s;
    -moz-transform-style: preserve-3d;

    -o-transition: 0.6s;
    -o-transform-style: preserve-3d;

    transition: 0.6s;
    transform-style: preserve-3d;

    position: relative;
}

.tarjetas .flip-container .front,
.tarjetas .flip-container .back {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
}

.tarjetas .flip-container .back {
    -moz-transform: rotateY(180deg);
    -o-transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    text-align: center;
    transform: rotateY(180deg);
}

/*=== FIN TARJETAS GIRATORIAS ===*/

.tarjetas {
    padding: 10px 0;
    color: #fff;
    max-width: var(--anchoContentTarjetas);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.tarjetas .flip-container {
    cursor: pointer;
    margin: 5px;
}

.tarjetas .back {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-flow: column;
    flex-flow: column;
}

.tarjetas .tituloCardBack {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 5px;
    line-height: 1.15;
}

.tarjetas .contenidoCardBack {
    padding: 5px 10px;
    font-size: 22px;
    line-height: 1.15;
    margin-bottom: 0;
    text-align: center;
}

.tarjetas .contenidoCardBack2 {
    padding: 5px 10px;
    font-size: 22px;
    line-height: 1.15;
    margin-bottom: 0;
    text-align: center;
    color: #333;
}

.tarjetas .contenidoCardFront {
    padding: 5px 10px;
    font-size: 22px;
    line-height: 1.15;
    margin-bottom: 0;
    text-align: center;
}

@media (max-width: 400px) {

    .tarjetas .contenidoCardFront {
        font-size: 18px;
    }

    .tarjetas .nameFront {
        font-size: 20px;
    }
}

.tarjetas .front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tarjetas .front,
.tarjetas .back {
    border-radius: 15px;
    padding: 10px 15px;
}


.tarjetas .flip-container .front::before,
.tarjetas .flip-container .back::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

.tarjetas .flip-container:nth-child(odd) .front::before,
.tarjetas .flip-container:nth-child(odd) .back::before {
    border: 3px dashed #016d38;
}

.tarjetas .flip-container:nth-child(even) .front::before,
.tarjetas .flip-container:nth-child(even) .back::before {
    border: 3px dashed #ffdc5d;
}

.tarjetas .flip-container:nth-child(odd) .front,
.tarjetas .flip-container:nth-child(odd) .back {
    background-color: var(--bgTarjeta);
    background-image: url(../../img/tarjetas-2/patron-pregunta.png) ;
    background-size: cover;

}

.tarjetas .flip-container:nth-child(even) .front,
.tarjetas .flip-container:nth-child(even) .back {
    background-color: var(--bgTarjeta2);
    background-image: url(../../img/tarjetas-2/patron-pregunta-2.png) ;
    background-size: cover;
}

.tarjetas .imgFront {
    max-width: 100%;
    width: 180px;
    padding: 0;
    margin: 10px auto;
    position: relative;
    padding-top: 30px;
}

.tarjetas .nameFront {
    font-size: 45px;
    border-radius: 1em;
    text-align: center;
    line-height: 1;
    margin-bottom: 0;
    z-index: 0;
    color: #fff !important;
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px 10px 20px;
}

@media (max-width: 400px) {

    .tarjetas .nameFront {
        font-size: 22px;
        margin-bottom: 0;
    }
}

.titleTarjeta {
    color: #016d38;
    margin-top: 70px;
    font-size: 22px;
}

.titleTarjeta1 {
    color: #333;
    margin-top: 70px;
    font-size: 22px;
}

.tarjetas .flip-container:nth-child(odd) .nameFront {
    background-color: #016d38 !important;
}

.tarjetas .flip-container:nth-child(even) .nameFront {
    background-color: #f7b812 !important;
}

.tarjetas .flip-container:nth-child(odd) .nameFront,
.tarjetas .flip-container:nth-child(odd) .contenidoCardBack {
    color: #016d38;
}

.tarjetas .flip-container:nth-child(even) .nameFront,
.tarjetas .flip-container:nth-child(even) .contenidoCardBack {
    color: #ffdc5d;
}

.tarjetas .flip-container .front .nameFront {
    background-color: var(--nameTarjeta);
}

.tarjetas .flip-container:nth-child(odd) .nameFront,
.tarjetas .flip-container:nth-child(odd) .contenidoCardFront {
    color: #016d38;
}

.tarjetas .flip-container:nth-child(even) .nameFront,
.tarjetas .flip-container:nth-child(even) .contenidoCardFront {
    color: #ffdc5d;
}