/** ===== Header Navigation ===== **/
.header-container {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    margin: auto;
    max-width: 1550px;
}

.header-navigation {
    position: relative;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100px;

    .navigation-left,
    .navigation-right,
    .navigation-center {
        display: flex;
        align-items: center;
    }
}

/** ===== Site Menu ===== **/
.site-menu {
    ul {
        padding: 0;
        margin: 0;
        list-style: none;
        display: flex;
        align-items: center;
        justify-content: center;

        li {
            height: 100px;
            margin: 0 8px;
            position: relative;
            display: flex;
            align-items: center;

            @include respond-below(c1550) {
                margin: 0;
            }

            a {
                color: $color-heading;
                font: {
                    size: 16px;
                    weight: 500;
                }
                line-height: 1.4;
                text-transform: capitalize;
                padding: 10px;
                display: flex;
                align-items: center;
                justify-content: center;

                @include respond-below(c1350) {
                    padding: 10px 8px;
                    font-size: 15px;
                }

                &::after {
                    position: relative;
                    content: "\f067";
                    font: {
                        family: "Font Awesome 5 Pro";
                        weight: 400;
                    }
                    margin-left: 8px;
                    line-height: 1;
                    font-size: 80%;
                    display: none;
                }

                &:hover {
                    color: $color-secondary;
                }
            }

            .sub-menu {
                display: block;
                position: absolute;
                min-width: 200px;
                background-color: $color-white;
                transition: all 0.3s ease-out 0s;
                z-index: 99;
                box-shadow: 0 2px 8px 0 rgba(0, 29, 35, 0.05);
                left: 0;
                top: calc(100% + 20px);
                visibility: hidden;
                opacity: 0;

                li {
                    height: auto;
                    padding: 0;
                    margin: 0;

                    &:not(:last-child) {
                        border-bottom: 1px solid $color-border;
                    }

                    a {
                        width: 100%;
                        color: $color-heading;
                        justify-content: space-between;
                        padding: 10px 20px;
                        display: flex;
                        justify-content: space-between;
                        font-size: 15px;

                        &:hover {
                            color: $color-secondary;
                        }
                    }

                    .sub-menu {
                        left: 100%;
                        top: 50%;
                    }

                    &:hover {
                        .sub-menu {
                            top: 0;
                        }
                    }
                }
            }

            &.menu-item-has-children {
                & > a {
                    &::after {
                        display: block;
                    }
                }
            }

            &:hover > .sub-menu {
                visibility: visible;
                opacity: 1;
                top: 100%;
            }

            &.current_page_item > a {
                color: $color-secondary;
            }
        }
    }
}

/** ===== Site Logo ===== **/
.site-logo {
    max-width: 250px;

    h2 {
        margin: 0;
        line-height: 1;
        font-size: 32px;
        font-weight: 700;
    }
}

/** ===== Header Button ===== **/
.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid $color-primary;
    border-radius: 5px;
    font: {
        size: 16px;
        weight: 500;
    }
    text-transform: capitalize;
    line-height: 1;
    padding: 16px 30px;
    transition: 0.3s;
    margin-left: 20px;

    i {
        font-size: 80%;
        margin-left: 8px;
    }

    &:hover {
        background-color: $color-primary;
        color: $color-white;
    }

    @include respond-below(c1350) {
        padding: 16px 20px;
    }

    @include respond-below(md) {
        font-size: 14px;
    }

    @include respond-below(c480) {
        display: none;
    }
}

/** ===== Canvas Area ===== **/
.canvas-btn {
    position: relative;
    height: 55px;
    width: 55px;
    padding: 15px;
    border-radius: 50%;
    background: rgba(56, 85, 223, 0.07);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: 0.3s;
    margin-left: 30px;

    span {
        width: 18px;
        height: 3px;
        background-color: $color-primary;
        position: relative;
        border-radius: 20px;
        transition: 0.3s;

        &::before,
        &::after {
            content: "";
            position: absolute;
            right: 0;
            top: -7px;
            height: 3px;
            width: 22px;
            background-color: $color-primary;
            border-radius: 20px;
            transition: 0.3s;
        }

        &::after {
            width: 13px;
            top: auto;
            bottom: -7px;
        }
    }

    &:hover {
        span {
            &,
            &::before,
            &::after {
                width: 22px;
            }
        }
    }

    @include respond-below(c1350) {
        margin-left: 20px;
    }
}

.menu-toggler {
    width: 55px;
    height: 50px;
    align-items: center;
    justify-content: center;
    font-size: 0;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 20px;
    background: rgba(56, 85, 223, 0.07);
    display: none;

    span {
        position: relative;
        width: 30px;
        height: 3px;
        background-color: $color-primary;

        &::before,
        &::after {
            content: "";
            position: absolute;
            left: 0;
            top: -8px;
            height: 3px;
            width: 30px;
            background-color: $color-primary;
        }

        &::after {
            top: auto;
            bottom: -8px;
        }
    }
}

/** ===== Header Topbar ===== **/
.header-topbar {
    font-size: 14px;
    padding: 15px 0;
    border-bottom: 1px solid #dfdfdf;

    @include respond-below(c480) {
        display: none;
    }

    .header-container {
        display: flex;
        justify-content: space-between;

        @include respond-below(md) {
            flex-direction: column;
            align-items: center;
        }
    }

    a {
        color: $color-body;

        &:hover {
            color: $color-secondary;
        }
    }

    ul {
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
        flex-wrap: wrap;

        li {
            margin: 0;
            padding: 0;
        }
    }

    .contact-info {
        li:not(:last-child) {
            margin-right: 30px;

            @include respond-below(lg) {
                margin-right: 15px;
            }
        }

        span {
            color: $color-secondary;
            margin-right: 5px;
            font-weight: 500;
        }
    }

    .topbar-menu {
        li:not(:first-child) {
            margin-left: 20px;

            @include respond-below(lg) {
                margin-left: 10px;
            }
        }
        text-transform: capitalize;

        @include respond-below(md) {
            margin-top: 10px;
        }
    }
}

/** ===== Mobile Panel ===== **/
.mobile-panel-wrapper {
    .mobile-panel-overly {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100vh;
        z-index: 998;
        background-color: $color-heading;
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
        cursor: pointer;
    }

    .mobile-panel-inner {
        position: fixed;
        z-index: 999;
        background-color: $color-white;
        overflow: hidden;
        width: 340px;
        height: 100vh;
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.45s ease-in-out;
        user-select: none;
        overflow-y: scroll;
        overflow-x: hidden;
        padding: 75px 30px 45px;

        &::-webkit-scrollbar {
            width: 0;
        }

        @include respond-below(c480) {
            width: calc(100% - 30px);
        }
    }

    &.show-panel {
        .mobile-panel-overly {
            opacity: 0.5;
            visibility: visible;
        }

        .mobile-panel-inner {
            transform: translateX(0);
        }
    }

    .panel-close {
        position: absolute;
        top: 20px;
        right: 30px;
        z-index: 2;
        font-size: 28px;
        line-height: 1;
        color: $color-secondary;
    }

    .mobile-panel-menu {
        ul {
            padding: 0;
            margin: 0;
            list-style: none;
            border-top: 1px solid $color-border;

            li {
                margin: 0;

                a {
                    position: relative;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    padding: 10px 45px 10px 0;
                    border-bottom: 1px solid $color-border;
                    color: $color-heading;
                    text-transform: capitalize;
                    font: {
                        size: 15px;
                        weight: 500;
                    }
                    line-height: 1.4;

                    .link-icon {
                        position: absolute;
                        top: 0;
                        right: 0;
                        width: 45px;
                        height: 100%;
                        line-height: 1;
                        z-index: 2;
                        border-left: 1px solid $color-border;
                        font-size: 14px;

                        &::before,
                        &::after {
                            position: absolute;
                            left: 50%;
                            top: 50%;
                            transform: translate(-50%, -50%);
                            content: "\f067";
                            font: {
                                family: "Font Awesome 5 Pro";
                                weight: 400;
                            }
                        }

                        &::after {
                            content: "\f068";
                        }
                    }

                    &:hover {
                        color: $color-secondary;
                    }
                }

                .sub-menu {
                    display: none;
                    border: none;

                    a {
                        padding-left: 20px;
                    }

                    .sub-menu {
                        a {
                            padding-left: 40px;
                        }

                        .sub-menu {
                            a {
                                padding-left: 60px;
                            }

                            .sub-menu {
                                a {
                                    padding-left: 80px;
                                }

                                .sub-menu {
                                    a {
                                        padding-left: 100px;
                                    }
                                }
                            }
                        }
                    }
                }

                &.current_page_item > a {
                    color: $color-secondary;
                }
            }
        }
    }
}

.site-header.breakpoint-on {
    .menu-toggler {
        display: flex;
    }

    .site-menu {
        display: none;
    }

    .canvas-btn {
        display: none;
    }
}

body.admin-bar {
    .mobile-panel-wrapper {
        .mobile-panel-overly,
        .mobile-panel-inner {
            top: 32px;
            height: calc(100vh - 32px);

            @media screen and (max-width: 782px) {
                top: 46px;
                height: calc(100vh - 46px);
            }
        }
    }
}
