/*****************************/
/* Nav                       */
/*****************************/

#navbar {
    position: absolute;
    height: var(--navbar-height);
    background-color: var(--navbar-bg-color);
    left: 0;
    right: 0;
    z-index: 1;
}

.navbar-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    padding-left: 1.4rem;
    padding-right: 1.4rem;
    margin-left: auto;
    margin-right: auto;
}

.navbar-container a, span {
    font-family: "Roboto", sans-serif;
    font-weight: 300;
    color: var(--white-perl-color);
    text-decoration: none;
    font-size: 1.5rem;
}

.navbar-container a i {
    color: var(--white-perl-color);
    margin-right: .7rem;
    margin-top: .4rem;
    text-decoration: none;
    font-size: 1.8rem;
}

.navbar-blog a i {
    color: var(--white-blue-color);
}

.navbar-container a .fa-blog {
    font-size: 1.6rem;
}

.navbar-container a i:hover {
    color: var(--navbar-text-color-focus);
    background-color: var(--navbar-bg-contrast);
}

.icon-last {
    margin-right: 1%;
}

.navbar-item {
    margin: 0.4em;
    width: 100%;
}

.home-link,
.navbar-link {
    color: var(--navbar-text-color);
    text-decoration: none;
    display: flex;
    font-weight: 400;
    align-items: center;
    transition: background-color 0.2s ease-in-out,
                color 0.2s ease-in-out;
}

.navbar-link {
    justify-content: center;
    width: 100%;
    padding: 0.2em 0.8em;
    border-radius: 5px;
}

.navbar-link:focus,
.navbar-link:hover {
    cursor: pointer;
    outline: 0;
    color: var(--navbar-text-color-focus);
    background-color: var(--navbar-bg-contrast);
    margin-left: 3px;
    transition: margin-left 0.2s ease-in-out,
                color 0.2s ease-in-out;
}

.navbar-toggle {
    cursor: pointer;
    border: none;
    background-color: transparent;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.icon-bar {
    display: block;
    width: 25px;
    height: 4px;
    margin: 2px;
    transition: background-color 0.2s ease-in-out,
                transform 0.2s ease-in-out,
                opacity 0.2s ease-in-out;
    background-color: var(--white-perl-color);
}

.navbar-toggle:focus .icon-bar,
.navbar-toggle:hover .icon-bar {
    cursor: pointer;
    outline: 0;
    background: var(--navbar-text-color-focus);
}

#navbar.opened .navbar-toggle .icon-bar:first-child,
#navbar.opened .navbar-toggle .icon-bar:last-child {
    position: absolute;
    margin: 0;
    width: 30px;
}

#navbar.opened .navbar-toggle .icon-bar:first-child {
    transform: rotate(45deg);
}

#navbar.opened .navbar-toggle .icon-bar:nth-child(2) {
    opacity: 0;
}

#navbar.opened .navbar-toggle .icon-bar:last-child {
    transform: rotate(-45deg);
}

.navbar-menu {
    position: fixed;
    top: var(--navbar-height);
    bottom: 0;
    transition: opacity 0.2s ease-in-out,
                visibility 0.2s ease-in-out;
    opacity: 0;
    visibility: hidden;
    left: 0;
    right: 0;
}

#navbar.opened .navbar-menu {
    opacity: 1;
    visibility: visible;
}

.navbar-links {
    list-style-type: none;
    max-height: 0;
    overflow: hidden;
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    right: 0;
    margin: 1.4rem;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#navbar.opened .navbar-links {
    padding: 1em;
    max-height: none;
}

@media screen and (max-width: 500px) {
    .navbar-container a, span {
        font-size: 1rem;
    }

    .navbar-container a {
        margin-right: 0.2rem;
        margin-top: -0.3rem;
    }
}

@media screen and (max-width: 1000px) {

    #navbar {
        right: 0;
        left: auto;
        height: auto;
    }

    .navbar-container {
        margin-top: 1rem;
    }

    .navbar-blog {
        flex-direction: column;
        padding-right: 0.5rem;
    }

   .navbar-principal-blog .navbar-blog {
       flex-direction: row;
   }

    .navbar-container a i {
        margin-top: .6rem;
    }
}

@media screen and (min-width: 4000px) {

    .navbar-toggle {
        display: none;
    }

    #navbar .navbar-menu,
    #navbar.opened .navbar-menu {
        visibility: visible;
        opacity: 1;
        position: static;
        display: block;
        height: 100%;
    }

    #navbar .navbar-links,
    #navbar.opened .navbar-links {
        margin: 0;
        padding: 0;
        box-shadow: none;
        position: static;
        flex-direction: row;
        list-style-type: none;
        max-height: max-content;
        width: 100%;
        height: 100%;
    }

    #navbar .navbar-link:last-child {
        margin-right: 0;
    }
}
