@media (min-width: $screen-sm-min) {
    .header-navigation {
        .header-variant-standard & {
            float: right;
        }

        .nav li {
            margin: 0;

            a {
                color: map-get($color-primary, 200);

                .header-minimal & {
                    color: map-get($grey, 800);
                }

                .header-minimal.primary & {
                    color: map-get($color-primary, 200);
                }

                .header-background & {
                    color: map-get($color-primary, 100);
                }

                .header-call-to-action-wrapper & {
                    color: rgba(#fff, .68);
                }

                display: block;
                font-weight: 500;
                padding: 16px 20px;
                position: relative;
                text-transform: uppercase;
                transition: color .15s linear;

                @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
                    padding: 16px 16px;
                }

                &:hover {
                    background-color: transparent;
                    color: #fff;

                    .header-minimal & {
                        color: map-get($grey, 800);
                    }
                }

                &:focus {
                    background-color: transparent;
                    border-radius: 0;
                    outline: 0 !important;
                }
            }

            &.important {
                > a {
                    color: #fff;
                    font-weight: 600;

                    &:hover {
                        color: #fff;
                    }

                    .header-minimal & {
                        color: map-get($color-secondary, 400);

                        &:hover {
                            color: map-get($color-secondary, 400);
                        }
                    }

                    .header-minimal.primary & {
                        color: #fff;

                        &:hover {
                            color: #fff;
                        }
                    }
                }
            }

            &.active {
                > a {
                    background-color: transparent !important;
                    color: #fff;

                    .header-minimal & {
                        color: map-get($grey, 800);
                    }
                }
            }

            &:focus {
                outline: 0 !important;
            }

            &.has-children {
                position: relative;

                &:after {
                    background-color: transparent;
                    content: '';
                    display: block;
                    height: 100%;
                    position: absolute;
                    top: 0;
                    right: -10px;
                    width: 10px;
                }

                a {
                    text-decoration: none !important;
                }

                > a:after {
                    content: '\f0d7';
                    font-family: 'FontAwesome';
                    margin: 0 0 0 15px;
                }

                div {
                    background-color: #fff;
                    border-radius: 1px;
                    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16);
                    height: 0;
                    left: 0;
                    overflow: hidden;
                    position: absolute;
                    top: 0;
                    width: 0;
                    z-index: 9999;

                    > a {
                        color: map-get($color-primary, 200);
                        transition: color .2s linear;
                        white-space: nowrap;

                        &:hover {
                            text-decoration: none;
                        }

                        .header-minimal & {
                            color: map-get($grey, 800);
                        }

                        &:after {
                            content: '\f0d7';
                            font-family: 'FontAwesome';
                            margin: 0 0 0 15px;
                        }
                    }
                }

                .sub-menu {
                    list-style: none;
                    padding: 0;

                    li {
                        position: relative;

                        a.subtitle {
                            color: map-get($grey, 500);
                            cursor: default;
                            font-size: 12px;
                            font-weight: 600;
                            text-transform: uppercase;

                            &:after, &:before {
                                display: none;
                            }
                        }

                        a {
                            color: map-get($color-black, 900);
                            display: block;
                            font-weight: normal;
                            padding: 10px 20px;
                            position: relative;
                            text-transform: none;
                            transition: background-color .15s linear;
                            white-space: nowrap;

                            &:hover {
                                text-decoration: none;

                                &:before {
                                    width: 100%;
                                }
                            }

                            &:before {
                                background-color: map-get($color-black, 100);
                                content: '';
                                display: block;
                                height: 100%;
                                left: 0;
                                position: absolute;
                                top: 0;
                                transition: width .15s linear;
                                width: 0;
                                z-index: -1;
                            }
                        }

                        &.has-children {
                            > a {
                                &:after {
                                    color: map-get($grey, 400);
                                    content: '\f0da';
                                    font-family: 'FontAwesome';
                                    left: auto;
                                    position: absolute;
                                    right: 10px;
                                }
                            }
                        }
                    }
                }

                .has-children {
                    div {
                        left: 102% !important;
                    }
                }
            }

            &.has-children:hover {
                > div {
                    visibility: visible;

                    > a {
                        color: map-get($color-black, 900);
                    }
                }
            }
        }

        .nav > li {
            &.current-menu-ancestor, &.current-menu-item {
                .header-navigation-wrapper & {
                    box-shadow: inset 0 -2px 0 0 map-get($color-secondary, 400);
                }

                > a {
                    color: #fff !important;
                }
            }
        }
    }

    .header-variant-search, .header-variant-information, .header-variant-ad-space {
        .header-navigation-wrapper {
            background-color: rgba(black, .03);
            margin: 27px -700px -27px -700px;
            padding-left: 700px;
            padding-right: 700px;
        }
    }

    .header-variant-standard {
        .nav > li {
            &.current-menu-ancestor, &.current-menu-item {
                box-shadow: none !important;
            }
        }
    }

    .header-navigation {
        float: left;
    }
}

.navbar-toggle {
    margin-right: 0;

    .icon-bar {
        background-color: #fff;

        .header-minimal & {
            background-color: map-get($grey, 900);
        }

        .header-minimal.primary & {
            background-color: #fff;
        }
    }

    .header-large & {
        position: absolute;
        right: 15px;
        top: 0;
    }
}

$speed: .3s;

.header-main-title {
    display: none;
}

@media (max-width: $screen-xs-max) {
    .header-main-title {
        color: map-get($grey, 800);
        display: block;
        font-family: 'Montserrat';
        font-size: 24px;
        height: 70px;
        line-height: 70px;
        padding: 0 24px;

        a {
            color: map-get($grey, 800);

            &:hover {
                text-decoration: none;
            }
        }

        img {
            height: 34px;
            margin-right: 15px;
            vertical-align: -5px;
        }
    }

    .header-navigation-wrapper {
        background-color: #fff;
        border-right: 1px solid map-get($grey, 200);
        bottom: 0;
        left: -240px;
        position: fixed;
        top: 0;
        transition: left $speed linear 0s;
        width: 240px;
        z-index: 9999;

        .admin-bar & {
            padding-top: 32px;

            @media screen and (max-width: 782px) {
                padding-top: 46px;
            }
        }

        &.open {
            left: 0;
            transition: left $speed linear $speed;

            &:before {
                left: 240px;
                opacity: 1;
                transition: visibility 0s, opacity $speed linear 0s, left $speed linear $speed;
                visibility: visible;
            }

            &:before {
                background-color: rgba(0, 0, 0, .5);
            }
        }

        &:before {
            background-color: transparent;
            bottom: 0;
            content: '';
            display: block;
            left: 0;
            opacity: 0;
            position: fixed;
            top: 0;
            transition: visibility $speed * 2, opacity $speed linear $speed, left $speed linear 0s;
            visibility: hidden;
            width: 100%;
        }
    }

    .header-navigation {
        height: 100%;
        overflow: auto;
    }

    .primary-menu-container {
        .nav {
            overflow: auto;

            ul {
                list-style: none;
                margin: 0;
                padding: 0;
            }

            div {
                height: 0;
                overflow: hidden;
                width: 100%;
            }

            > li {
                &.active {
                    a {
                        background-color: transparent;
                        border-radius: 0;
                        color: map-get($color-secondary, 600);
                    }
                }

                > a {
                    font-weight: 700;

                    .fa {
                        display: none;
                    }
                }

                > div {
                    > a {
                        display: none;
                    }
                }
            }

            li {
                float: none;
                display: block;
                margin: 0;
            }

            a {
                display: block;
                color: map-get($grey, 800);
                padding: 15px 0 15px 22px;
                transition: all .15s linear;

                &:hover {
                    background-color: map-get($grey, 100);
                    text-decoration: none;
                }
            }
        }
    }
}

.nav-tabs {
    background-color: #fff;
    border: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    display: table;
    margin: 0 0 30px 0;
    padding: 0;
    table-layout: fixed;
    white-space: nowrap;
    width: 100%;

    @media (max-width: $screen-sm-max) {
        display: block;
    }

    .ink {
        background: rgba(black, 0.05);
    }

    li {
        border: 0;
        display: table-cell;
        float: none;
        text-transform: uppercase;
        width: 100%;

        a {
            border: 0 !important;
            border-radius: 0;
            color: map-get($grey, 400);
            font-weight: 500;
            margin: 0;
            overflow: hidden;
            padding: 20px !important;
            position: relative;
            text-align: center;

            &:hover {
                background-color: transparent;
                color: map-get($grey, 500);
            }

            &:focus {
                background-color: transparent;
            }
        }

        &.active {
            a, a:hover {
                border: 0;
                box-shadow: inset 0 -2px 0 0 map-get($color-secondary, 400);
                cursor: pointer;
                color: map-get($color-secondary, 400) !important;
            }
        }

        @media (max-width: $screen-sm-max) {
            display: block;
            float: none;
        }
    }
}
