.tarjetas {
    --bgTarjeta: #ffdc5d;
    --bgTarjeta2: #008C44;
    --nameTarjeta: transparent;
    --anchoTarjeta: 200px;
    --altoTarjeta: 300px;
    --anchoContentTarjetas: 1000px;
}

@media (max-width: 400px) {

    .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: 22px;
    margin-top: 0;
    margin-bottom: 5px;
    line-height: 1.15;
}

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

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

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

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

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

.tarjetas .flip-container:nth-child(odd) .front,
.tarjetas .flip-container:nth-child(odd) .back {
    background-color: var(--bgTarjeta);
}

.tarjetas .flip-container:nth-child(even) .front,
.tarjetas .flip-container:nth-child(even) .back {
    background-color: var(--bgTarjeta2);
}

.tarjetas .imgFront {
    max-width: 100%;
    max-height: 200px;
    padding: 0;
    margin: 40px auto 20px;
}

.tarjetas .nameFront {
    font-size: 20px;
    border-radius: 1em;
    text-align: center;
    line-height: 1.3;
}

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

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

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