/*===== GOOGLE FONTS =====*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap');

/*===== VARIABLES CSS =====*/
:root{
    --header-height: 3rem;
    
    /*===== Colores =====*/
    --first-color: #3664F4;
    --dark-color: #070D1F;
    --dark-color-alt: #282B3A;
    --white-color: #E6E7E9;

    /*===== Fuente y tipografia =====*/
    --body-font: 'Poppins', sans-serif;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;

    /*===== z index =====*/
    --z-fixed: 100;
}
:root{
    @media screen and (min-width: 768px){
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
    }
}

/*===== BASE =====*/
*,::before,::after{
    box-sizing: border-box;
}
body{
    margin: var(--header-height) 0 0 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    font-weight: 500;
}
ul{
    margin: 0;
    padding: 0;
    list-style: none;
}
a{
    text-decoration: none;
}
img{
    max-width: 100%;
    height: auto;
}


.bd-grid{
    max-width: 1024px;
    display: grid;
    grid-template-columns: 100%;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

/*===== HEADER =====*/
.header{
    width: 100%;
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    padding: 0 1.5rem;
    background-color: var(--dark-color);
    z-index: var(--z-fixed);
    display: flex;
    justify-content: space-between;
    align-items: center;

    &__logo{
        color: var(--white-color);
    }
    &__toggle{
        font-size: 1.5rem;
        color: var(--white-color);
        cursor: pointer;
    }
}
/*===== NAV =====*/
@media screen and (max-width: 768px){
    .nav{
        position: fixed;
        top: 0;
        left: -100%;
        background-color: var(--dark-color);
        color: var(--white-color);
        width: 100%;
        height: 100vh;
        padding: 1.5rem 0;
        z-index: var(--z-fixed);
        transition: .5s;
    }
}

.nav{
    &__content{
        height: 100%;
        grid-template-rows: max-content 1fr max-content;
        row-gap: 2rem;
    }
    &__close{
        position: absolute;
        right: 1.5rem;
        font-size: 1.3rem;
        padding: .25rem;
        background-color: var(--dark-color-alt);
        border-radius: 50%;
        cursor: pointer;
    }
    &__img{
        display: flex;
        justify-content: center;
        padding-top: .25rem;
        margin-bottom: .8rem;
        width: 56px;
        height: 56px;
        background-color: var(--first-color);
        border-radius: 50%;
        overflow: hidden;

        & img{
            width: 46px;
        }
    }
    &__name{
        display: block;
        color: var(--white-color);
    }
    &__profesion{
        font-size: var(--small-font-size);
    }
    &__menu{
        align-self: center;
    }
    &__item{
        margin: 2.5rem 0;
    }
    &__link{
        color: var(--white-color);
    }
    &__social{
        padding-top: .5rem;

        &-icon{
            font-size: 1.2rem;
            color: var(--white-color);
            margin-right: 1rem;
    
            &:hover{
                color: var(--first-color);
            }
        }
    }

}
/*Aparecer menu*/
.show{
    left: 0;
}

/*Active menu*/
.active{
    color: var(--first-color);
}

/*===== MEDIA QUERIES =====*/
@media screen and (min-width: 768px){
    body{
        margin: 0;
    }

    .header{
        height: calc(var(--header-height) + 1rem);

        &__logo, &__toggle{
            display: none;
        }
    }
    .nav{
        width: 100%;

        &__content{
            grid-template-columns: repeat(3, max-content);
            grid-template-rows: 1fr;
            column-gap: 1rem;
            justify-content: space-between;
        }
        &__close, &__profesion{
            display: none;
        }
        &__perfil{
            display: flex;
            align-items: center;
        }
        &__img{
            width: 32px;
            height: 32px;
            margin-right: .5rem;
            margin-bottom: 0;
            align-items: center;

            & img{
                width: 26px;
            }
        }

        &__list{
            display: flex;
        }
        &__item{
            margin: 0 .25rem;
        }
        &__link{
            padding: .5rem .8rem;
            border-radius: .25rem;

            &:hover{
                background-color: var(--first-color);
            }
        }
    }
    .active{
        background-color: var(--first-color);
        color: var(--white-color);
    }
}

@media screen and(min-width: 1024px){
    .bd-grid{
        margin-left: auto;
        margin-right: auto;
    }
}
