@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

:root {
    --blanco-fondo: #FFFFFF;
    --gris-texto: #828282;
    --azul-corporativo: #242a46;
    --azul-i360: #1ca8c1;
}

header,
section {
    margin-left: 4rem;
    margin-right: 4rem;
}

/* Aplico estilos para la bienvenida */

#welcome {
    margin-top: 2rem;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;

    gap: 1.25rem;

    min-height: 100vh;
    position: relative;

    background-image: url(/assets/images/fondo_bienvenida.png);
    background-repeat: no-repeat;
    background-size: cover;

    color: var(--azul-corporativo);
}

#welcome h1 {
    font-size: 4rem;
}

#welcome p {
    font-size: 2rem;
}

/* Aplico los estilos para el apartado de lo que ofrecemos */

section {
    margin-top: 6.25rem;
}

#offer {
    display: flex;
}

.offer-content {
    display: flex;
    gap: 5rem;
}



.offer-text h2 {
    font-size: 3rem;
    color: var(--azul-corporativo);
}

.offer-content-text {
    width: 100%; /*Importante para que la imagen se vaya a la derecha*/
}

.offer-content-text h4 {
    margin-top: 3rem;
    margin-left: 1.875rem;
    font-size: 1.5rem;
    color: var(--azul-corporativo);
}

.offer-content-text p {
    margin-top: 1.25rem;
    margin-left: 1.875rem;
    font-size: 1.5rem;
    color: var(--gris-texto);
}

.offer-content .offer-img img {
    margin-top: 2.5rem;

    width: 751px;
    height: 764px;

    border-top-left-radius: 0.75rem;
    border-bottom-left-radius: 0.75rem;
}

/* Aplico los estilos para el apartado de nuestras oposiciones */

.opos-text {
    text-align: center;
}

.opos-text h2 {
    color: var(--azul-corporativo);
    font-size: 3rem;
}

.opos-text p {
    max-width: 1110px;
    margin: 0 auto;
    margin-top: 1.25rem;

    color: var(--gris-texto);
    font-size: 1.5rem;
}

.opos-cols {
    display: flex;
    justify-content: center;

    gap: 1.25rem;
}

.estado,
.ayuntamiento,
.cmadrid {
    margin-top: 1.875rem;
    max-width: 516px;

    font-size: 1.5rem;
}

.estado h4,
.ayuntamiento h4,
.cmadrid h4 {
    color: var(--azul-corporativo);
}

.estado p,
.ayuntamiento p,
.cmadrid p {
    margin-top: 1.25rem;
    color: var(--gris-texto);
}

/* Aplico los estilos para modos */

.modes-text h2 {
    color: var(--azul-corporativo);
    font-size: 3rem;
}

.modes-content {
    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: 1.5rem;

    gap: 2.5rem;
    margin-top: 2.5rem;

    width: 100%;
}

.modes-content h4 {
    color: var(--azul-corporativo);
}

.modes-content p {
    color: var(--gris-texto);
}

.practice,
.exam,
.random {
    max-width: 405px;
}

.practice h4, .exam h4, .random h4,
.practice p, .exam p, .random p {
    margin-top: 1.25rem;
}

.practice img,
.exam img,
.random img {
    max-width: 405px;
    border-radius: 0.625rem;
}

/* Aplico los estilos para la estructura de la página */

#estructure h2 {
    color: var(--azul-corporativo);
    font-size: 3rem;
    text-align: right;
}

.estructure-content {
    display: flex;
    justify-content: space-between;

    gap: 5rem;
    margin-top: 2.5rem;
}

.estructure-text p {
    color: var(--gris-texto);
    font-size: 1.5rem;
    margin-top: 1.25rem;

    max-width: 700px;
}

.estructure-video video {
    max-width: 700px;
}

/* Creo las clases para la animación de aparecer */
.hidden {
    opacity: 0;
    transform: translateY(2.5rem);
}

.show {
    animation: fade 2s ease-in-out forwards;
}

@keyframes fade {
    0%   { 
        opacity: 0; 
        transform: translateY(2.5rem); /* Empezamos abajo */
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);    /* Terminamos en su posición original */
    }
}


@media (max-width: 1366px) {
    header,
    section {
        margin-left: 3rem;
        margin-right: 3rem;
    }
    
    #welcome h1 {
        font-size: 2.5rem;
    }

    #welcome p {
        font-size: 1.25rem;
    }

    .offer-content {
        max-width: 1200px;
        gap: 2.5rem;
    }

    .offer-content .offer-img img {
        width: 500px;
        height: 500px;
    }

    .modes-text h2 {
        text-align: center;
    }

    .modes-content {
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Medidas para móvil */

@media (max-width: 972px) {
    header,
    section {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    #welcome h1 {
        font-size: 1.875rem;
    }

    #welcome p {
        font-size: 1.125rem;
    }

    #offer {
        justify-content: center;
    }

    .offer-content {
        max-width: 350px;

        justify-content: center;
        align-items: center;
        text-align: center;
        flex-direction: column;
    }


    .offer-content-text h4,
    .offer-content-text p {
        margin-left: 0;
    }
    
    .offer-content .offer-img img {
        width: 320px;
        height: 320px;
    }

    .opos-cols {
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    .practice,
    .exam,
    .random {
        max-width: 350px;
    }

    .practice img,
    .exam img,
    .random img {
        max-width: 350px;
        border-radius: 0.625rem;
    }

    .estructure-content {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .modes-text h2, 
    .opos-text h2,
    .offer-text h2,
    #estructure h2 {
        font-size: 1.875rem;
        text-align: center;
    }

    .estructure-text p {
        color: var(--gris-texto);
        font-size: 1.5rem;
        margin-top: 1.25rem;

        max-width: 350px;
    }

    .estructure-video video {
        max-width: 350px;
    }
}