* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
}

header {
    display: flex;
    justify-content: center;
    width: 100%;
    background-color: var(--primary);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--secondary);
    color: var(--text-dark-background);
}

header > div#content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 2vw;
    position: relative;
}
header > div#content nav{
    margin: 0 auto;
}
header > div#content > nav ul {
    width: min-content;
    display: flex;
}
header > div#content nav ul{
    margin: 0 auto;
}
header > div#content:has(.logout_link) nav ul{
    gap: calc(var(--gap) * 3);
}
header #header_logo{
    display: flex;
    align-items: center;
    width: min-content;
}
header #header_logo img{
    filter: drop-shadow(0 0 0.5px var(--text-dark-background));
}
header #header_logo p{
    color: var(--text-dark-background);
    font-size: calc(var(--font-size-general) * 0.7);
    text-align: center;
    font-family: var(--font-family-heading);
    padding: 0;
}

header nav ul li:has(> a.logout_link):last-child{
    display: none;
}

header #header_logo p span{
    white-space: nowrap;
}

header .icon svg,
header .icon svg path,
header svg,
header svg path,
header a.logout_link svg,
header a.logout_link svg path {
    fill: white !important;
}

header > div#content > a:first-child img {
    width: 5em;
    max-width: unset;
    display: block;
}

header > div#content > nav {
    width: min-content;
    display: flex;
    height: min-content;
}

header > div#content > nav ul li {
    padding: 0;
    text-shadow: unset;
}

header > div#content > nav ul li a {
    white-space: nowrap;
    color: var(--text-dark-background);
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%;
    text-align: center;
}

header > div#content > nav ul li a:not(.CTA):hover {
    background-color: var(--secondary);
}

header > div#content > nav ul li a.active_link {
    border-bottom: 2px solid var(--text-dark-background);
    background-color: var(--secondary-transparent);
}

header div:has(> a){
    display: grid;
    place-content: center;
}

header > div#content > button,
header > div#content #sidebar_donate {
    display: none;
}

header > div#content #navbar_donate {
    position: absolute;
    top: 100%;
    left: auto;
    right: 0;
    z-index: 1;
    background-color: var(--accent);
    color: var(--text-dark-background);
    font-family: var(--font-family-CTA);
    font-size: calc(var(--font-size-general) * 1.5);
    cursor: pointer;
    border: none;
}

header > div#content #navbar_donate:hover {
    background-color: var(--highlight);
    color: var(--primary);
}

header > div#content #close_sidebar_button,
header > div#content #nav_overlay {
    display: none;
}

/* Mobile Styles */
@media screen and (max-width: 800px) {
    header nav ul li:has(> a.logout_link):last-child{
        display: flex;
    }

    header > div#content {
        padding: 0 0.5em;
        display: flex;
        justify-content: space-between;
    }
    header > div#content > a:first-child img {
        width: 90%;
    }

    header > div#content > #open_sidebar_button {
        display: block;
        background: unset;
        border: unset;
    }

    header div:has(> a.logout_link):first-of-type{
        display: none;
    }

    header > div#content > #navbar > ul > #close_sidebar_button {
        display: block;
    }

    header > div#content > #navbar > ul > #close_sidebar_button > button {
        background: unset;
        border: unset;
    }
    header #header_logo{
        width: 35vw !important;
        display: flex;
        align-items: center;
    }
    header #header_logo p{
        height: min-content;
        font-size: 2vw;
        width: min-content;
        margin-bottom: 0;
    }
    header #header_logo img{
        width: 40% !important;
    }
    header > div#content > #navbar {
        position: fixed;
        top: 0;
        right: -100%;
        left: unset;
        height: 100vh;
        width: min(10em, 100%);
        z-index: 10;
        border-left: 1px solid var(--text-dark-background);
        transition: right 300ms ease-out;
        background-color: var(--primary);
    }

    header > div#content > #navbar ul {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 1em;
        width: 100%;
    }

    header > div#content > #navbar ul li {
        width: 100%;
    }

    header > div#content > #navbar ul #sidebar_donate {
        background-color: var(--accent);
        color: var(--text-dark-background);
        font-family: var(--font-family-CTA);
        font-size: calc(var(--font-size-general) * 1.5);
        cursor: pointer;
        border: none;
        display: block;
    }

    header > div#content > #navbar ul li a:not(.CTA) {
        width: 100%;
        text-align: left;
        padding: 1em;
    }

    header > div#content > #navbar > #sidebar_donate {
        display: block;
        margin-bottom: 2%;
        background-color: var(--accent);
    }

    header > div#content > #navbar.show {
        right: 0;
    }

    header > div#content > #navbar.show ~ #nav_overlay {
        display: block;
        background: rgba(0, 0, 0, 0.5);
        position: fixed;
        inset: 0;
        z-index: 9;
    }
}
