@use '../scss/_variables';
@use '../scss/_mixins';

header {
    position: sticky;
    top: 0;
    z-index: 999;

    min-height: 5rem;
    padding: 0rem 1rem;

    background-color: variables.$color-primary;
    @include mixins.shadow;
    color: variables.$color-white;
    font-family: 'highwayGothic';
    font-size: 2rem;
    text-transform: uppercase;

    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;

    a {
        text-decoration:none;
        color: inherit;
    }
    a:hover, li.selected a {
        background-color: variables.$color-dark
    }
    nav {
        /*transition-delay: 0.1s;
        transform: translateY(-100%);
        transition-duration: 200ms;
        transition-timing-function: ease-out;*/
        display: none;
        font-size: 1.5rem;
        ul {
            list-style-type: none;
        }
    }

    .header-logo {
        display: flex;
        align-items: center;
    }

    .hamburger-button {
        display: none;
    }

    .hamburger-button:checked {
        header {
            display: fixed;
        }
        ~ .hamburger-icon, ~ .header-logo {
            height: 3rem;
            padding-top: 1rem;
            padding-bottom: 1rem;
            margin-top: 1rem;
            margin-bottom: 1rem;
        }

        ~ .header-logo {
        }

        ~ nav {
            /*transform: translateY(0px);
            transition-duration: 200ms;
            transition-timing-function: ease-out;*/
            display: inline;
            width: 100%;
            flex-basis: 100%;
            
        transform: scaleY(1);
            li {
                width: 100%;
            }
            a {
                display: inline-block;
                width: 100%;
            }
        }

        ~ * .hamburger-icon-stroke {
            left: 0.25rem;
            top: 1rem;
        }

        ~ * .stroke-1 {
            width: .25rem;
            left: 1rem;
        }

        ~ * .stroke-2 {
            width: 1.75rem;
            scale: 100%;
        }

        ~ * .stroke-3 {
            width: 0.25rem;
            left: 1rem;
        }

        ~ * .stroke-4 {
            width: 1.75rem;
            scale: 100%;
        }

        ~ * .stroke-5 {
            width: .25rem;
            left: 1rem;
        }
}

    .hamburger-icon {
        width: 2.75rem;
        height: 2.75rem;
        /*border: 0.25rem solid;
        border-radius: 5px;
        border-color: variables.$color-white;*/
        position: relative;
        margin-top: auto;
        margin-bottom: auto;
        cursor: pointer;
    }

    .hamburger-icon-stroke {
        display: block;
        width: 1.75rem;
        height: 0.25rem;
        border-radius: 18px;
        background-color: white;
        position: absolute;
        left: 0.25rem;
        transition-timing-function: ease-out;
        transition-duration: 200ms;
    }
    .stroke-1 {
        top: 0.375rem;
    }

    .stroke-2 {
        top: 1rem;
        transform: rotate(45deg);
        width: .25rem;
        left: 1rem;
        scale: 70%;
    }

    .stroke-4 {
        top: 1rem;
        transform: rotate(-45deg);
        width: .25rem;
        left: 1rem;
        scale: 70%;
    }

    .stroke-3 {
        top: 1rem;
    }

    .stroke-5 {
        top: 1.625rem;
    }


    @media (width > 1300px) {
        nav {
            display: flex;
            align-items: center;
        }

        .hamburger-icon {
            display: none;
        }
        ul {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            a {
                padding: 1.5rem 2rem;
            }
        }
    }
}