@font-face {
    font-family: 'Komika Display';
    font-style: normal;
    font-weight: 400;
    src: local('Komika Display'), local('Komika-Display'),
         url('../fonts/komika-display.woff') format('woff');
}
@font-face {
    font-family: 'Komika Display';
    font-style: normal;
    font-weight: 700;
    src: local('Komika Display Bold'), local('Komika-Display-Bold'),
         url('../fonts/komika-display-bold.woff') format('woff');
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Helvetica, Arial, sans-serif;
}

/* HOME */

#home {
    position: relative;
    height: 56vw;
    min-height: 100vh;
    margin: 0;
    background-color: #9bb2ce;
    background-image: url(../img/portada-abajo.jpg);
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: contain;
}
#home .logo {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 37.55vw;
}
#home .botonesIdioma {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 97.62vw;
    margin: 0 1.19vw;
}
.btnIdioma {
    width: 27.34vw;
    height: 11.46vw;
    margin: 2.6vw 2.6vw 0 2.6vw;
    cursor: pointer;
    text-align: center;
}
.btnIdioma img {
    display: inline-block;
}
.btnIdioma img:first-child {
    width: 100%;
}
.btnIdioma img:nth-child(2) {
    width: 14.29%;
    margin-top: 1.67vw;
    transition: transform 0.5s ease;
}
.btnIdioma:hover img:nth-child(2) {
    transform: scale(1.5);
}
@media(max-width: 1024px) {
    #home {
        height: 92vw;
    }
    #home .botonesIdioma {
        width: 100vw;
        margin: 0;
    }
    .btnIdioma {
        width: 42vw;
        height: 17.6vw;
        margin: 4vw 4vw 0 4vw;
    }    
    .btnIdioma img:nth-child(2) {
        margin-top: 2.56vw;
    }
}
@media(max-width: 512px) {
    #home {
        height: 290vw;
    }
    #home .botonesIdioma {
        width: 98vw;
        margin: 0 1vw;
    }
    .btnIdioma {
        width: 82vw;
        height: 34.36vw;
        margin: 8vw 8vw 0 8vw;
    }    
    .btnIdioma img:nth-child(2) {
        margin-top: 5vw;
    }
}

/* CÓMIC */

body.comic {
    background-color: #000;
    overflow-x: hidden; /* sin esto la animación del cómic para atrás hace estirarse la página */
}

#comic {
    width: 100vw;
    min-height: 100vh;
    background-color: #000;
}
#comic .pagina {
    position: absolute;
    left: 0;
    top: 0;
}
#comic .pagina img {
    width: 100%;
    transform-origin: center;
}
#comic .pagina img.animAdelante {
    animation: animPaginaAdelante 0.5s ease-in;
}
#comic .pagina img.animAtras {
    animation: animPaginaAtras 0.5s ease-in;
}
@keyframes animPaginaAdelante {
    0% {
        transform: none;
    }
    100% {
        transform: translate(-60vw, -50vw) rotate(-45deg);
    }
}
@keyframes animPaginaAtras {
    0% {
        transform: none;
    }
    100% {
        transform: translate(60vw, -50vw) rotate(45deg);
    }
}
#barraNav {
    position: absolute;
    left: 3vw;
    top: 50vw;
    width: 94vw;
    height: 7vh;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    background-color: #000;
}
.btnBarraNav {
    display: inline-block;
    width: 5vh;
    height: 5vh;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}
.btnBarraNav:hover, .btnBarraNav:active {
    filter: brightness(3);
}
.btnBarraNav#btnAtras {
    background-image: url(../img/icono-atras.png);
}
.btnBarraNav#btnHome {
    width: 3vh;
    background-image: url(../img/icono-home.png);
}
.btnBarraNav#btnAdelante {
    background-image: url(../img/icono-adelante.png);
}
.btnBarraNav#btnHome.vuelta, .btnBarraNav#btnAdelante.vuelta {
    background-image: url(../img/icono-vuelta.png);
}
@media (min-aspect-ratio: 19/10) {
    #comic .pagina {
        top: -2vw;
    }
    #barraNav {
        top: 47.5vw;
        height: 4.5vh;
    }
}

/* ITINERARIO */

.itinerario {
    height: 56vw;
    min-height: 100vh;
    margin: 0;
    background-color: #9bb2ce;
    background-image: url(../img/itinerario-abajo.jpg);
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: contain;
}
.itinerario p {
    margin: 0;
}
.itinerario .frase1 {
    padding: 5vw 0 4vw 0;
    color: #fff;
    font-size: 3.125vw;
    text-align: center;
}
.itinerario .frase2 {
    padding-top: 4vw;
    color: #fff;
    font-size: 2.5vw;
    font-style: oblique;
    text-align: center;
}
.botonesItinerario {
    display: flex;
    flex-direction: row;
    justify-content: center;
}
.iconoItinerario {
    width: 10vw;
    margin: 0.5vw auto 3vw auto;
}
.iconoItinerario img {
    display: block;
    width: 10vw;
    transition: transform 0.5s ease;
}
.iconoItinerario p {
    clear: both;
    padding-top: 1vw;
    color: #fff;
    font-size: 1.5625vw;
    font-weight: bold;
    text-align: center;
}
.btnItinerario {
    margin: 0 2.5vw;
    cursor: pointer;
}
.btnItinerario:hover img {
    transform: scale(1.15);
}
.btnItinerario#btnItinerario1 {
    width: 25vw;
}
.btnItinerario#btnItinerario1 img:first-child {
    float: left;
}
.btnItinerario#btnItinerario1 img:nth-child(2) {
    float: right;
}
.itinerario .btnTexto {
    width: 32vw;
    margin: 4vw 0;
    padding: 0 2.5vw;
    color: #fff;
    font-family: Komika Display;
    font-weight: bold;
    font-size: 3vw;
    text-align: center;
    cursor: pointer;
}
.itinerario .btnTexto:first-child {
    border-right: solid 2px #fff;
}
.itinerario .btnTexto p {
    transition: transform 0.5s ease;
}
.itinerario .btnTexto:hover p {
    transform: scale(1.15);
}
.itinerario #textoFin {
    font-size: 2vw;
    padding: 6vw 9vw;
    color: #fff;
    text-align: justify;
    text-align-last: center;
}
.itinerario .linkFinal {
    padding: 0 9vw 6vw 9vw;
    text-align: center;
}
.itinerario .linkFinal a {
    display: inline-block;
    font-size: 2vw;
    color: #fff;
    font-weight: bold;
    transition: transform 0.5s ease;
}
.itinerario .linkFinal a:hover {
    transform: scale(1.15);
}
.itinerario .btnHome {
    width: 3vw;
    height: 3vw;
    margin: 0.5vw auto;
    background-image: url(../img/icono-home-oscuro.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}
.itinerario .btnHome:hover, .itinerario .btnHome:active {
    background-image: url(../img/icono-home-blanco.png);
}
@media(max-width: 512px) {
    .itinerario {
        height: 240vw;
    }
    .itinerario .frase1 {
        padding: 10vw 5vw;
        font-size: 7vw;
    }
    .itinerario .frase2 {
        font-size: 5vw;
    }
    .botonesItinerario {
        flex-direction: column;
        align-items: center;
    }
    .iconoItinerario, .btnItinerario {
        width: 30vw;
        margin-bottom: 10vw;
    }
    .iconoItinerario img, .btnItinerario img {
        width: 30vw;
    }
    .iconoItinerario p {
        padding-top: 3vw;
        font-size: 4.6875vw;
    }
    .btnItinerario#btnItinerario1 {
        width: 75vw;
    }
    .itinerario .btnTexto {
        width: 60vw;
        font-size: 6vw;
    }
    .itinerario .btnTexto:first-child {
        border-right: none;
        padding-bottom: 8vw;
        border-bottom: solid 2px #fff;
    }
    .itinerario .btnHome {
        width: 6vw;
        height: 6vw;
    }    
}

/* CARGANDO */

#cargando {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}
.lds-ring {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0%;
}
#cargando.visible {
    display: flex;
}
#cargando.visible .lds-ring {
    animation: lds-ring-appear 1s linear 0.5s 1 normal forwards;
}
@keyframes lds-ring-appear {
    0% {
        opacity: 0%;
    }
    100% {
        opacity: 100%;
    }
}
.lds-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 8px solid #21578a;
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: #21578a transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
    animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
    animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
    animation-delay: -0.15s;
}
@keyframes lds-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
