header {
    .navbar {
        background-image: linear-gradient(to right, $mainBrandColor, $secondBrandColor);
        box-shadow: 0 0 2px 2px $headerLightShadowColor, 0 2px 4px 2px $headerDarkShadowColor;
        padding-top: .2em;
        padding-bottom: .2em;

        .logo {
            width: 2em;
            height: 2em;
            top: 3px;
            left: 1.3em;
            position: fixed;
            fill: $textBrandColor;
            transition-duration: 0.8s;
            transition-property: transform;
            transform-origin: 50% 50%;

            circle {
                fill: $mainBrandColor;
                stroke: $textBrandColor;
            }

            @media (min-width: $bp-md) {
                width: 3em;
                height: 3em;
                left: 0.8em;
            }
        }

        .logo:hover {
            transform: rotate(360deg);
        }

        .brand-name {
            color: $textBrandColor;
            font-size: 1em;
            font-weight: 400;
            vertical-align: bottom;
            line-height: 1.1em;
            margin-left: 3.7em;
        }

        a {
            font-weight: 500;
        }

        a.active {
            border-bottom: solid 3px $textBrandColor;
            border-radius: 2px;
        }

        a.nav-link {
            color: $textBrandColor;
            font-size: .9em;

            &:hover {
                color: $textBrandHighlightColor;
            }
        }

        svg.icon {
            stroke: $textBrandColor;
            fill: $textBrandColor;
            width: 1.1em;
            height: 1.1em;

            &:hover {
                fill: $textBrandHighlightColor;
                stroke: $textBrandHighlightColor;
            }
        }

        .dropdown-menu {
            padding: 0;
            background-color: $backgroundColor;
            border-color: $dropdownBorderColor;

            a {
                font-weight: $linkWeight;
            }

            i {
                color: $textColor;
            }
        }

        .dropdown-item.active {
            font-weight: 500;
            background-color: transparent;
            background-image: $dropdownCheck;
            background-repeat: no-repeat;
            background-position: .4rem .6rem;
            background-size: .75rem .75rem;
            border: 0;

            &:hover {
                background-image: $dropdownHoverCheck
            }
        }

        .dropdown-item {
            color: $textColor;

            &:hover {
                color: $textBrandColor;
                background-color: $mainBrandColor;
            }
        }
    }

    .navbar-dark .navbar-nav .nav-link {
        color: $textBrandColor;

        &:hover {
            color: $textBrandHighlightColor;
        }

        &:active {
            color: $textBrandHighlightColor;
        }
    }

    .navbar-dark .navbar-nav .nav-link.active {
        color: $textBrandColor;
        cursor: default;

        &:hover {
            color: $textBrandColor;
        }

        &:active {
            color: $textBrandColor;
        }
    }
}

#navbar-links {
    position: static;
}

#search_form {
    position: static;
    display: flex;
}

#search_close {
    display: none;
}

#search_show {
    display: none;
}

#search_textbox {
    margin: 4px 0 5px 0;
    width: 100%;
}

@media (min-width: $bp-md) {
    #navbar-links {
        position: absolute;
        right: -700px;
        transition: right 0.5s;
    }

    #navbar-links.active {
        right: 1rem;
        transition: right 0.5s;
    }

    #search_form {
        position: absolute;
        right: -700px;
        transition: right 0.5s;
    }

    #search_form.active {
        right: 1rem;
        transition: right 0.5s;
    }

    #search_close {
        display: block;
        background-color: rgba(0, 0, 0, 0);
        color: $textBrandColor;
        border-width: 0;
        cursor: pointer;

        &:hover {
            color:  $textBrandHighlightColor;
        }
    }

    #search_show {
        display: block;
    }

    #search_textbox {
        width: calc(1rem * 22);
    }
}
