header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #f5f5f7; /* Must be set for z-index */
    z-index: 100;
}

/* Navbar */  
header .navbar { 
    display: grid;
    grid-template-columns: auto auto 1fr auto 1fr auto;
    align-items: center; 
    padding: 0.25rem 0.5rem;
}

header .logo {
    display: block;
    height: 2.5rem;
    width: auto;
}

header h1 {
    margin-bottom: 0;
    padding: 0 0.25rem;
}

header .brandname {
    color: black;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1.5rem;
    display: block;
}

header .menu ul {
    list-style: none;
    display: grid;
    grid-template-columns: auto auto auto auto auto auto;
    gap: 1.25rem;
}

header .menu ul li a {
    color: black;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

header .question-icon, header .logout-icon {
    display: block;
    color: black;
    font-size: 1.5rem;
}

@media (hover: hover) and (pointer: fine) {
    header .menu ul li a:hover {
        color: var(--primary-dark);
    }
}

header .menu-btn, header .close-menu-btn {
    background-color: transparent;
}

header .close-menu-btn, header .logout-btn {
    display: none;
}

header .menu-icon, header .close-menu-icon {
    color: black;
    font-size: 1.5rem;
}

/* Sidebar */
header .sidebar {
    display: none;
    position: fixed;
    top: 3rem;
    left: 0;
    right: 0;
    min-height: calc(100vh - 3rem);
    padding: 1rem 0.5rem;
    border-top: 1px solid var(--border-light);
    background-color: var(--light-bg); /* Must be set for z-index */
    z-index: 200;
}

header .sidebar ul {
    list-style: none;
}

header .sidebar ul li {
    padding-bottom: 1rem;
}

header .sidebar ul li a {
    text-decoration: none;
    color: black;
    font-weight: 500;
}

header .sidebar-icon {
    color: var(--primary-dark);
    padding-right: 0.75rem;
}

@media (max-width: 1023px) {
    header .menu {
        display: none; /* No need to set it as !important because it isn't overridden by JavaScript. */
    }

    header .question-icon {
        display: none;
    }
}

/* Don't delete the media query below. It overrides the inline CSS from JavaScript. */
@media (min-width: 1024px) {
    header .sidebar, header .menu-btn, header .close-menu-btn {
        display: none !important;
    }
}