/* General */
header {
    background-color: var(--white);
    box-shadow: 0 4px 2px -2px gray;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    height: 64px;
}

.header-offset {
    margin-top: 64px;
}

/* Optional spacing for the nav bar */
.header-offset-extra {
    margin-top: 6rem;
}

.logo-and-userinfo {
    display: flex;
    align-items: center;
    column-gap: 1rem;
}

.nav-link {
    color: var(--gray-700);
    text-decoration: none;
    transition: color 0.3s;
}

/* Desktop */

.desktop-menu {
    display: none;
}

.logo-container {
    font-size: 1.125rem;
    font-weight: bold;
    color: var(--gray-700);
}

.logo-container img {
    height: 32px;
    width: auto;
}

.header-nav {
    display: flex;
    align-items: center;
    column-gap: 1.5rem;
}

@media (min-width: 768px) {
    .desktop-menu {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px;
    }
}

/* Mobile */

#mobile-menu {
    display: none;
}

#mobile-menu-items {
    display: none;
}

@media (max-width: 767px) {
    header {
        height: 56px;
    }

    .header-offset {
        margin-top: 60px;
    }

    .header-offset-extra {
        margin-top: 4.5rem;
    }

    #mobile-menu {
        /* move the children to the right and to the vertical center using flex */
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
    }

    /* md:hidden text-gray-700 focus:outline-none */
    #mobile-menu-button {
        background-color: transparent;
        border: none;
        color: var(--gray-700);
        font-size: 1.75rem;
        cursor: pointer;
    }

    /* hidden by default: off-screen to the right */
    #mobile-menu-items {
        position: fixed;
        top: 0;
        right: -300px;
        /* Start off screen */
        height: 100%;
        width: 300px;
        /* Width of the drawer */
        background-color: var(--white);
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
        display: flex;
        flex-direction: column;
        transition: right 0.3s ease;
        /* Smooth slide in */
        z-index: 50;
    }

    /* When active, slide into view */
    #mobile-menu-items.active {
        right: 0;
    }

    /* Links inside drawer */
    #mobile-menu-items a {
        color: var(--gray-700);
        text-decoration: none;
        padding: 16px;
        transition: color 0.3s;
    }
}