header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: var(--color-primary);
    border-bottom: 2px solid var(--color-secondary);
    z-index: 1000;
}

header nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
}

header nav ul {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    list-style: none;
    height: 100%;
    padding: 0;
    margin: 0;
}

header nav ul li {
    display: flex;
    position: relative;
    align-items: center;
    padding: 0 20px;
    height: 100%;
    cursor: pointer;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

header nav ul li:not(.Company):hover {
    background-color: var(--color-accent-opacity);
}

header nav ul li:not(.Company)::after {
    content: '';
    position: absolute;
    height: 4px;
    bottom: 0;
    width: 0%;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

header nav ul li:not(.Company):hover::after {
    width: 100%;
}

header nav ul li a {
    color: var(--color-text);
}

header nav ul .Company {
    margin-right: auto;
    font-weight: bold;
}

header nav ul .Company a {
    color: var(--color-third-text);
}

header nav ul li a {
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--font-size);
    font-family: var(--family-font);
}

#open-sidebar-button {
    display: none;
    background: none;
    border: none;
    padding: 1em;
    margin-left: auto;
    cursor: pointer;
}

#close-sidebar-button {
    display: none;
    background: none;
    border: none;
    padding: 20px;
    cursor: pointer;
}

#overlay {
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    inset: 0;
    z-index: 9;
    display: none;
}

.skip-link {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: opacity 0.3s ease;
}

.skip-link:focus {
    opacity: 1;
    pointer-events: auto;
    outline: 3px solid #ffffff;
}

@media screen and (max-width: 800px) {

    #open-sidebar-button,
    #close-sidebar-button {
        display: block;
    }

    #sidebar-active:checked~#overlay header nav {
        right: 0;
    }

    #sidebar-active:checked~#overlay {
        background-color: red;
        height: 100%;
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
    }

    header nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: min(15em, 100%);
        z-index: 10;
        border-left: 1px solid var(--color-secondary);
        transition: opacity 300ms ease-in-out;
        opacity: 1;
    }

    .close-nav {
        opacity: 0;
        pointer-events: none;
    }

    header nav ul {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        position: fixed;
        top: 0;
        right: 0;
        z-index: 10;
        width: 300px;
        background-color: var(--color-primary);
        padding-top: 20px;
    }

    header nav ul li {
        width: 100%;
        padding: 0;
        height: auto;
        margin: 0;
    }

    header nav ul li a {
        box-sizing: border-box;
        height: auto;
        width: 100%;
        padding: 20px 30px;
        justify-content: flex-start;
    }

    header nav ul .Company {
        margin-right: unset;
    }
}