/* Header CSS */

@use 'responsive';
@use 'variables'as var;

.header-area {
    transition: all 500ms ease;
    background-color: transparent;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 1rem 3rem rgba(15, 30, 150, 0.125);

    @media #{responsive.$breakpoint-lg} {
        box-shadow: none;
    }

    &.sticky-on {
        background-color: var.$heading;
        box-shadow: 0 1rem 3rem rgba(15, 30, 150, 0.175);
    }

    &.mobile-menu-open {
        background-color: var.$heading;
    }

    .navbar-toggler {
        padding: 0;
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1.5rem;
        color: var.$white;
        border: 0;

        &:focus {
            box-shadow: none;
        }
    }

    .navbar {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;

        @media #{responsive.$breakpoint-lg} {
            height: 80px;
            padding-top: 0;
            padding-bottom: 0;
        }

        .navbar-brand {
            margin-right: 2rem;
            line-height: 1 !important;

            @media #{responsive.$breakpoint-lg} {
                margin-right: 3rem;
            }

            @media #{responsive.$breakpoint-xl} {
                margin-right: 4rem;
            }
        }
    }

    .navbar-nav {
        margin-top: 1rem;
        margin-bottom: 1rem;

        li {
            >a {
                display: inline-block;
                color: var.$white;
                font-weight: 700;
                font-size: 1rem;
                padding: .375rem .75rem;

                @media #{responsive.$breakpoint-lg} {
                    padding: 1.375rem 1rem;
                }

                &:hover {
                    color: var.$warning;
                }
            }

            .sb-dropdown-menu {
                list-style: none;
                background-color: transparent;
                position: relative;
                z-index: 100;
                top: 100%;
                width: 100%;
                border: 0;
                border-radius: .5rem;
                display: none;
                padding-left: .5rem;

                @media #{responsive.$breakpoint-lg} {
                    padding: 1rem 0;
                    transition: all 500ms ease-in-out;
                    position: absolute;
                    top: calc(100% + 8px);
                    width: 14rem;
                    background-color: var.$white;
                    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.125);
                    visibility: hidden;
                    opacity: 0;
                    display: block;
                }

                li>a {
                    transition: all 500ms;
                    position: relative;
                    font-size: 1rem;
                    padding: .375rem 1rem;
                    color: var.$text;

                    @media #{responsive.$breakpoint-lg} {
                        padding: .375rem 1.5rem;
                    }

                    &:hover,
                    &:focus {
                        background-color: transparent;
                        color: var.$warning;

                        @media #{responsive.$breakpoint-lg} {
                            color: var.$primary;
                        }
                    }
                }
            }

            &.sb-dropdown {
                position: relative;
                z-index: 1;

                .dropdown-toggler {
                    position: absolute;
                    width: 100%;
                    height: 36px;
                    z-index: 100;
                    background-color: transparent;
                    color: var.$warning;
                    top: 2px;
                    cursor: pointer;
                    left: 0;
                    display: flex;
                    align-items: center;
                    justify-content: flex-end;
                    font-size: 14px;
                    padding-right: .75rem;

                    @media #{responsive.$breakpoint-lg} {
                        display: none;
                    }
                }

                >a {
                    position: relative;
                    padding-right: 1.5rem;

                    &::after {

                        @media #{responsive.$breakpoint-lg} {
                            position: absolute;
                            top: 52%;
                            transform: translateY(-50%);
                            right: .5rem;
                            content: "\f229";
                            color: var.$white;
                            font-family: bootstrap-icons !important;
                            font-size: 12px;
                        }
                    }
                }

                &:hover,
                &:focus {

                    @media #{responsive.$breakpoint-lg} {
                        .sb-dropdown-menu {
                            visibility: visible;
                            opacity: 1;
                            top: 100%;
                        }
                    }
                }

                .sb-dropdown {

                    .dropdown-toggler {
                        right: 1rem;
                    }

                    >a {
                        position: relative;
                        padding-right: 1.375rem;
                        width: 100%;

                        &::after {

                            @media #{responsive.$breakpoint-lg} {
                                position: absolute;
                                top: 50%;
                                transform: translateY(-50%);
                                right: 1.25rem;
                                content: "\f231";
                                color: var.$heading;
                                font-family: bootstrap-icons !important;
                                font-size: 12px;
                            }
                        }
                    }

                    .sb-dropdown-menu {
                        display: none;

                        @media #{responsive.$breakpoint-lg} {
                            margin-left: .25rem;
                            top: -8px;
                            left: 100%;
                            visibility: hidden;
                            opacity: 0;
                            display: block;
                        }
                    }

                    &:hover,
                    &:focus {

                        @media #{responsive.$breakpoint-lg} {
                            .sb-dropdown-menu {
                                visibility: visible;
                                opacity: 1;
                            }
                        }
                    }
                }
            }
        }
    }

    &.header-2 {
        @media #{responsive.$breakpoint-lg} {
            background-color: transparent;
        }

        .navbar-toggler {
            color: var.$heading;
        }

        &.mobile-menu-open {
            background-color: var.$white;
        }

        .navbar-nav {
            li {
                >a {
                    color: var.$heading;

                    &:hover {
                        color: var.$primary !important;
                    }
                }

                &.sb-dropdown {

                    .dropdown-toggler {
                        color: var.$heading;
                    }

                    >a {

                        &::after {
                            color: var.$heading;
                        }
                    }
                }
            }
        }

        &.sticky-on {
            background-color: var.$white;
        }
    }
}