/*=== ESTILOS REDI 5 LECCION 2 ===*/

@media (max-width: 767px) {
    .backdrop header h1 {
        font-size: 37px;
    }

    .backdrop header {
        font-size: 1em;
        padding: 15px 10px;
    }
}

.escenario {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

@media (max-width: 767px) {
    .escenario {
        margin-top: 0;
    }
}

/*.personaje.origen::before {
    content: "Colaborador";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    line-height: 1.15;
    color: #fff;
    font-size: 18px;
    background: #d83d3d;
    border-radius: 6px;
    padding: 3px;
}*/

.escenas .personaje.origen {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 130%;
    background-color: #fff;
}

.backdrop .contenido {
    overflow: initial;
}

.personaje-completado {
    opacity: .4;
}

@media (max-width: 767px) {

    .escenas.escena-personaje {
        height: 33vh;
        position: sticky;
        top: 2px;
        z-index: 99;
    }

    .escenas .personaje.origen {
        height: 100%;
        padding: 5px;
    }

    .escenas .personaje.origen img {
        height: 80%;
        margin-top: 5px;
    }

    .personaje-completado {
        opacity: 0;
    }
}

img#escena0 {
    max-height: 80%;
    top: 50%;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
}

.escenas {
    margin: 0;
    padding: 0 10px;
    position: relative;
    display: flex;
    flex-flow: column wrap;
}

.escenas .img {
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    width: 100%;
    height: 0;
    padding-bottom: 130%;
    background-color: #e5e5e5;
    border: 2px solid #e5e5e5;
}

.escenas:not(.escena-personaje) {
    counter-increment: numeroEscena;
}

.escenas:not(.personaje) .img {
    opacity: .35;
    transition: opacity .3s;
    -webkit-transition: opacity .3s;
    -moz-transition: opacity .3s;
    -ms-transition: opacity .3s;
    -o-transition: opacity .3s;
}

.escenas .img.activa {
    opacity: 1;
    transition: opacity .3s;
    -webkit-transition: opacity .3s;
    -moz-transition: opacity .3s;
    -ms-transition: opacity .3s;
    -o-transition: opacity .3s;
    background-color: hsla(47, 100%, 68%, 0.25);
    border: 2px solid #ffdc5d;
}

.escenas:not(.personaje) .img::after {
    content: counter(numeroEscena);
    background-color: #016d38;
    height: 30px;
    width: 30px;
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -o-transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: bold;
}

@media (max-width: 767px) {
    .escenas.destino {
        min-height: 105vw;
    }
}

@keyframes escena1Visitado {
    0% {
        background-image: url("../img/escena01.png");
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }

    50% {
        background-image: url("../img/escena01.png");
        opacity: 0.5;
        transform: scale(0);
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
    }

    50.1% {
        background-image: url("../img/escena01-1.png");
        opacity: 0.5;
        transform: scale(0);
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
    }

    100% {
        background-image: url("../img/escena01-1.png");
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }
}

@keyframes escena2Visitado {
    0% {
        background-image: url("../img/escena02.png");
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }

    50% {
        background-image: url("../img/escena02.png");
        opacity: 0.5;
        transform: scale(0);
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
    }

    50.1% {
        background-image: url("../img/escena02-2.png");
        opacity: 0.5;
        transform: scale(0);
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
    }

    100% {
        background-image: url("../img/escena02-2.png");
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }
}

@keyframes escena3Visitado {
    0% {
        background-image: url("../img/escena03.png");
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }

    50% {
        background-image: url("../img/escena03.png");
        opacity: 0.5;
        transform: scale(0);
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
    }

    50.1% {
        background-image: url("../img/escena03-3.png");
        opacity: 0.5;
        transform: scale(0);
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
    }

    100% {
        background-image: url("../img/escena03-3.png");
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }
}


@keyframes escena4Visitado {
    0% {
        background-image: url("../img/escena04.png");
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }

    50% {
        background-image: url("../img/escena04.png");
        opacity: 0.5;
        transform: scale(0);
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
    }

    50.1% {
        background-image: url("../img/escena04-4.png");
        opacity: 0.5;
        transform: scale(0);
        -webkit-transform: scale(0);
        -moz-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
    }

    100% {
        background-image: url("../img/escena04-4.png");
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }
}


.escena1 {
    background-image: url("../img/escena01.png");
}

.escena1.visitado {
    background-image: url("../img/escena01-1.png");
    animation: escena1Visitado .6s linear;
    -webkit-animation: escena1Visitado .6s linear;
}

.escena2 {
    background-image: url("../img/escena02.png");
}

.escena2.visitado {
    background-image: url("../img/escena02-2.png");
    animation: escena2Visitado .6s linear;
    -webkit-animation: escena2Visitado .6s linear;
}

.escena3 {
    background-image: url("../img/escena03.png");
}

.escena3.visitado {
    background-image: url("../img/escena03-3.png");
    animation: escena3Visitado .6s linear;
    -webkit-animation: escena3Visitado .6s linear;
}

.escena4 {
    background-image: url("../img/escena04.png");
}

.escena4.visitado {
    background-image: url("../img/escena04-4.png");
    animation: escena4Visitado .6s linear;
    -webkit-animation: escena4Visitado .6s linear;
}

.personaje {
    border: 3px dashed #016d38;
}

.personaje-img {
    cursor: url(../img/cursor-grab.cur), url(../img/cursor-grab.png), move;
}

@media (max-width: 767px) {
    .escenario {
        min-height: 300px;
        flex-direction: column;
    }

    .escenas {
        max-width: 300px;
        margin: 15px auto;
    }

    .personaje {
        max-width: 300px;
        width: 100%;
        padding: 20px 0;
        height: 100%;
    }
}

/* @media (max-width: 500px) {
    .escenas {
        max-width: 90%;
        width: 100%;
    }
} */

.descripcion {
    max-width: 85%;
    width: 100%;
    font-size: 20px;
    text-align: center;
    line-height: 1.3;
    background: #016d38;
    color: #fff;
    margin: 10px auto 20px;
    padding: 25px;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    box-shadow: 9px 9px 5px 0px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 12;
    -webkit-border-radius: 10px;
}

.descripcion::after {
    content: '';
    position: absolute;
    top: 1vw;
    left: 1vw;
    right: 1vw;
    bottom: 1vw;
    border: dashed #fff 2px;
    background: transparent;
    z-index: -1;
    color: #000;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
}

@media (max-width: 767px) {
    .descripcion {
        max-width: 95%;
        width: 100%;
    }
}


@keyframes palpitar {
    0% {
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }

    50% {
        transform: scale(.95);
        -webkit-transform: scale(.95);
        -moz-transform: scale(.95);
        -ms-transform: scale(.95);
        -o-transform: scale(.95);
    }

    100% {
        transform: scale(1);
        -webkit-transform: scale(1);
        -moz-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
    }
}

.palpitar {
    animation: palpitar 1.2s linear infinite;
    -webkit-animation: palpitar 1.2s linear infinite;
}


@keyframes tada {
    0% {
        transform: translate(-50%, -50%) scale(1);
        -webkit-transform: translate(-50%, -50%) scale(1);
        -moz-transform: translate(-50%, -50%) scale(1);
        -ms-transform: translate(-50%, -50%) scale(1);
        -o-transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        -webkit-transform: translate(-50%, -50%) scale(1.05);
        -moz-transform: translate(-50%, -50%) scale(1.05);
        -ms-transform: translate(-50%, -50%) scale(1.05);
        -o-transform: translate(-50%, -50%) scale(1.05);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        -webkit-transform: translate(-50%, -50%) scale(1);
        -moz-transform: translate(-50%, -50%) scale(1);
        -ms-transform: translate(-50%, -50%) scale(1);
        -o-transform: translate(-50%, -50%) scale(1);
    }
}

.anima {
    transform-origin: top;
    animation: tada 1s both infinite;
    -webkit-animation: tada 1s both infinite;
}

.ui-sortable-placeholder {
    position: absolute;
}

@keyframes animacionTexto {
    0% {
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    }

    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

.texto-escena {
    font-size: 18px;
    color: #016d38;
    line-height: 1.2;
    flex-grow: 1;
    text-align: center;
    border-radius: 0 0 15px 15px;
    -webkit-border-radius: 0 0 15px 15px;
    -moz-border-radius: 0 0 15px 15px;
    -ms-border-radius: 0 0 15px 15px;
    -o-border-radius: 0 0 15px 15px;
}

.texto-activo {
    animation: animacionTexto .7s;
    -webkit-animation: animacionTexto .7s;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    background-color: #ffdc5d;
    padding: 5px 10px;
}

/* fin de estilos del modal */

:focus {
    outline: none;
}

.reiniciar {
    position: sticky;
    bottom: 10px;
}

.reiniciar button {
    width: max-content;
    margin: auto;
    color: #fff;
    background-color: #016d38;
    font-size: 20px;
    font-family: var(--fuente__titulos);
    text-transform: uppercase;
    font-weight: bold;
    padding: .3em 1.5em;
    border-radius: 1.2em;
    -webkit-transform: scale(1);
    transform: scale(1);
    -webkit-box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.3);
    box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    -webkit-transition: background-color .3s, -webkit-transform .3s;
    transition: background-color .3s, -webkit-transform .3s;
    transition: background-color .3s, transform .3s;
    transition: background-color .3s, transform .3s, -webkit-transform .3s;
    border: none;
}

@media (hover) {

    .reiniciar button:hover,
    .reiniciar button:focus {
        background-color: #016d38;
        -webkit-transform: scale(1.03);
        transform: scale(1.03);
    }
}