
/* Primary - Menu
----------------------------------------*/

@include media-breakpoint-up(xl) {
    .primary-menu {
        width: 100%;
        float: left;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;

        ul {
            float: left;
            padding: 0;
            margin: 0;

            li {
                height: 120px;
                float: left;
                line-height: $line-height-lem;
                padding: 0;
                margin: 0;
                max-width: 200px; /* Wrap long Menu Items*/

                &:before {
                    display: none;
                }

                > a {
                    top: 50%;
                    transform: translate(0, -50%);
                    height: auto;
                    float: left;
                    font-family: $font-family-primary;
                    font-weight: $font-weight-bold;
                    font-size: $font-size-18;
                    letter-spacing: 0.9px;
                    color: $quaternary-color;
                    line-height: $line-height-30;
                    text-align: center;
                    text-decoration: $link-hover-decoration-none;
                    text-transform: uppercase;
                    @include border-radius($border-radius);
                    position: relative;
                    overflow: hidden;
                    padding: 0 21px;
                }

                &:hover > a,
                > a:focus, 
                &.nav-menu-open > a, 
                &.current-menu-item > a, 
                &.current-menu-parent > a, 
                &.current-menu-ancestor > a {
                    color: $primary-color;
                    background: $quaternary-color;
                }

                > a:focus+ul,
                &:hover > ul,
                &.nav-menu-open > ul {
                    transform: scaleY(1);
                    visibility: visible;
                    opacity: 1;	 
                }

                > ul {
                    width: 300px;
                    float: left;
                    background: $primary-color;
                    box-shadow: $box-shadow-box;
                    transition: all .2s ease-in-out;
                    transform-origin: left top;	
                    transform: scaleY(0);
                    visibility: hidden;
                    opacity: 0;
                    display: block!important;
                    position: absolute;
                    top: 120px;
                    left: -30px;
                    padding: 25px 30px;
                    margin: 0;
                    z-index: 2;

                    li {
                        width: 100%;
                        height: auto;
                        float: left;
                        padding: 0;
                        margin: 0 0 17px 0;

                        > a {
                            height: auto;
                            font-size: $font-size-16;
                            line-height: $line-height-22;
                            text-align: left;
                            text-transform: none;
                            position: relative;
                            padding: 3px 22px;
                            margin: -3px 0;
                            
                            &:before {
                                content: "";
                                width: 12px;
                                height: 12px;
                                background: $quaternary-color;
                                border-radius: 360px;
                                -webkit-transition: all .25s ease-out;
                                -moz-transition: all .25s ease-out;
                                -o-transition: all .25s ease-out;
                                transition: all .25s ease-out; 
                                position: absolute;
                                top: 50%;
                                left: 0;
                                transform: translate(0, -50%);
                                z-index: -1;
                            }
                        }
                        
                        &:last-child {
                            margin-bottom: 0;
                        }
                        
                        > a:hover,
                        > a:focus, 
                        &.current-menu-item > a, 
                        &.current-menu-parent > a, 
                        &.current-menu-ancestor > a {
                            color: $primary-color;
                            text-decoration: none;

                            &:before {
                                width: 100%;
                                height: 100%;
                            }
                        }
                    }
                }
            }
        }
    }
}

@include media-breakpoint-between(xl, xxxl) {
    .primary-menu {
        ul {
            li {
                > a {
                    font-size: $font-size-16;
                    padding: 0 15px;
                }

                > ul {
                    left: -30px;

                    li {
                        > a {
                            padding: 3px 22px;
                        }
                    }
                }
            }
        }
    }    
}

@include media-breakpoint-between(xl, xxl) {
    .primary-menu {
        ul {
            li {
                max-width: 150px;
                > a {
                    font-size: $font-size-16;
                    padding: 0 15px;
                }

                > ul {
                    left: -30px;

                    li {
                        > a {
                            padding: 3px 22px;
                        }
                    }
                }
            }
        }
    }    
}    

@include media-breakpoint-down(xl) {
    .primary-menu {
        width: 100%;
        float: left;
        padding-bottom: 50px;

        &:last-child {
            padding-bottom: 0;
        }

        ul {
            width: 100%;
            float: left;
            padding: 0;
            margin: -20px 0;

            li {
                width: 100%;
                float: left;
                line-height: $line-height-lem;
                border-bottom: 1px solid $gray-a2;
                padding: 0;
                margin: 0;

                &:last-child {
                    border-bottom: none;
                }


                &:before {
                    display: none;
                }

                > a {
                    width: 100%;
                    float: left;
                    font-family: $font-family-primary;
                    font-weight: $font-weight-bold;
                    font-size: $font-size-18;
                    color: $black;
                    line-height: $line-height-24;            
                    text-decoration: $link-hover-decoration-none;
                    text-transform: uppercase;
                    padding: 20px 0;
                }


                &.menu-item-has-children > .submenu-lv1,
                &.mega-menu-item > .submenu-lv1 {
                    width: 100%;
                    height: 64px;
                    position: absolute;
                    top: 0;
                    right: 0;
                    z-index: 2;
                    cursor: pointer;                        

                    &:after {
                        content: "\f078";
                        font-family: "Font Awesome\ 5 Pro";
                        font-weight: $font-weight-normal;
                        font-size: $font-size-22;
                        color: $quaternary-color;
                        line-height: $line-height-lem;                            
                        position: absolute;
                        top: 50%;
                        right: 0;
                        transform: translate(0, -50%);
                    }

                    &.active {
                        &:after {
                            content: "\f077";
                        }
                    }
                }


                &:hover > a,
                > a:focus, 
                &.nav-menu-open > a, 
                &.current-menu-item > a, 
                &.current-menu-parent > a, 
                &.current-menu-ancestor > a {
                    color: $quaternary-color;
                }                   

                > ul {
                    padding: 0 0 25px 0;
                    margin: 0;
                    display: none;

                    li {
                        border-bottom: none;
                        padding: 0;
                        margin: 0 0 17px 0;

                        > a {
                            width: auto;
                            height: auto;
                            float: left;
                            font-size: $font-size-16;
                            line-height: $line-height-22;
                            text-transform: none;
                            position: relative;
                            z-index: 1;
                            padding: 3px 22px;
                            margin: -3px 0;
                            
                            &:before {
                                content: "";
                                width: 12px;
                                height: 12px;
                                background: $quaternary-color;
                                border-radius: 360px;
                                -webkit-transition: all .25s ease-out;
                                -moz-transition: all .25s ease-out;
                                -o-transition: all .25s ease-out;
                                transition: all .25s ease-out; 
                                position: absolute;
                                top: 50%;
                                left: 0;
                                transform: translate(0, -50%);
                                z-index: -1;
                            }
                        }
                        
                        &:last-child {
                            margin-bottom: 0;
                        }
                        
                        > a:hover,
                        > a:focus, 
                        &.current-menu-item > a, 
                        &.current-menu-parent > a, 
                        &.current-menu-ancestor > a {
                            color: $primary-color;
                            text-decoration: none;

                            &:before {
                                width: 100%;
                                height: 100%;
                            }
                        }
                    }
                }
            }
        }
    }
}



/* Footer - Menu */
.footer-menu {
	width: 100%;
	float: left;	

    ul {
        padding: 0;

        li {
            padding: 0;

            &:before {
                display: none;
            }

            a {
                font-weight: inherit;
                color: $primary-color;
                text-decoration: $link-hover-decoration-none;                
            }
            
            > a:hover,
            > a:focus, 
            &.nav-menu-open > a, 
            &.current-menu-item > a, 
            &.current-menu-parent > a, 
            &.current-menu-ancestor > a {
                color: rgba(255, 255, 255, .70);
                background: none;
            }
        }
    }
    
    @include media-breakpoint-up(md) {
            display: block!important;
    }
    
    @include media-breakpoint-down(md) {
            width: 100%;
            float: left;
            background: $primary-bg;
            display: none;
            padding: 0 20px 20px 20px;            
    }    
}



/* Copy Rights - Menu */
.copyrights-menu {

    ul, ol {
        float: none;
        display: inline-block;
        vertical-align: top;
        padding: 0;
        margin: 0 -12px;

        li {
            float: none;
            display: inline-block;
            vertical-align: top;
            padding: 0 12px;
            margin: 0;

            &:before {
                display: none;
            }

            a {
                font-weight: $font-weight-normal;
                color: $primary-color;
                text-decoration: none;
            }
            
            > a:hover,
            > a:focus, 
            &.nav-menu-open > a, 
            &.current-menu-item > a, 
            &.current-menu-parent > a, 
            &.current-menu-ancestor > a {
                color: rgba(255, 255, 255, .70);
                text-decoration: none;
            }
        }
    }

    @include media-breakpoint-down(lg) {
        width: 100%;
        float: left;
        padding: 0 0 20px 0;

        &:last-child {
            padding-bottom: 0;
        }
    }   
}

.linked-menu-item {
    display: none;
}

@include media-breakpoint-up(lg) {
    .duplicated-parent {
        display: none;
    }
    .non-linked-menu-item {
        display: none;
    }
    .linked-menu-item {
        display: block;
    }
}

/* BEGIN iOS MainNav fix @05.04.2022 */
@media(max-width:1199px) {
    .navbar .nav-item.dropdown li.duplicated-parent {
        display: block!important;
    }
    .navbar a.dropdown-toggle:hover,
    .navbar a.dropdown-toggle:focus {
        outline: none !important;
    }
}
/* END iOS MainNav fix @05.04.2022 */