/* Author: Adrian Martinez Fuentes - UO295454 */

/* Especificidad 001 en cada selector */
header, menu {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; 
    box-sizing: border-box;
    padding: 1.5em;
}

/* Especificidad 001 */
header {
    width: 100%;
}

/* Especificidad 001 */
menu {
    width: 50%; 
    margin-top: 0.5em;
    margin-bottom: 2.5em;
    margin-left: auto;
    margin-right: auto;
}

/* Especificidad 001 */
nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; 
    gap: 1.05em; 
    flex: 2 1 auto; 
    width: auto; 
    padding: 0.25em; 
    box-sizing: border-box;
}

/* Especificidad 001 */
footer {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    align-items: center;
    padding: 0.5em; 
    margin: 0.25em;
}

/* Media Queries */
@media (max-width: 490px) {
    /* Especificidad 002 */
    main > h2 {
        font-size: 1.15em;
    }

    /* Especificidad 002 */
    header > h1 {
        font-size: 1.55em;
    }

    /* Especificidad 001 */
    nav {
        /* Redefinimos el column gap para que se vea mejor en pantallas pequeñas */
        column-gap: 0.6em;
        /* Redefinimos el row gap para que se vea mejor en pantallas pequeñas */
        row-gap: 0.6em;
        /* Redefinimos el flex-wrap para que los elementos se vean mejor en pantallas pequeñas */
        justify-content: flex-start;
    }
    
    /* Especificidad 002 */
    nav a {
        text-align: left;
        padding: 0em;
        font-size: 1.15em;
        box-sizing: border-box;
    }

    /* Especificidades: 002, 001 */
    menu li a, a {
        font-size: 1.15em;
    }

    /* Especificidad 001 */
    footer {
        /* Reducimos el padding para que se vea mejor en pantallas pequeñas */
        padding: 0.25em;
        /* Reducimos el margen para que se vea mejor en pantallas pequeñas */
        margin: 0.25em;
    }

    /* Especificidad 002 */
    footer > p {
        font-size: 1.15em;
    }
}