/**
 * Navigation
 */

.tm-navigation {
    ul {
        margin-bottom: 0;
        padding-left: 0;
        font-size: 0;

        li {
            display: inline-block;
            list-style: none;
            font-size: 16px;
            position: relative;

            a {
                display: inline-block;
                font-size: 16px;
                font-family: $ff-heading;
                font-weight: 500;
                padding: 28px 20px;
                color: $color-body;
            }

            &:hover,
            &.current {
                &>a {
                    color: $color-theme;
                }
            }
        }
    }
}

/* Dropdown Menu */
.tm-navigation {
    .tm-navigation-dropdown {
        ul {
            position: absolute;
            text-align: left;
            left: 100%;
            top: 0;
            width: 230px;
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            border-bottom: 4px solid #aaaaaa;
            visibility: hidden;
            opacity: 0;
            transform: scaleY(0);
            transform-origin: 0 0;
            z-index: -1;
            transition: transform 0.2s ease-in-out 0s, visibility 0.2s ease-in-out 0s, opacity 0.2s ease-in-out 0s, z-index 0s;

            li {
                display: block;
                padding: 0 15px;
                border-bottom: 1px solid rgba(#000000, 0.05);
                transition: all 0.3s ease-in-out 0s;

                a {
                    padding: 10px 0;
                    line-height: 1.3;
                    display: block;
                    font-weight: 400;
                    font-size: 14px;
                }

                &:hover {
                    background: $color-theme;

                    &>a {
                        color: #ffffff;
                    }

                    &>ul {
                        visibility: visible;
                        opacity: 1;
                        transform: scaleY(1);
                        z-index: 1;
                    }
                }
            }
        }

        &>ul {
            left: 0;
            top: 100%;
        }

        &:hover {
            &>ul {
                visibility: visible;
                opacity: 1;
                transform: scaleY(1);
                z-index: 9;
            }
        }

        &.overflow-element {
            ul {
                left: auto;
                right: 100%;
            }

            &>ul {
                left: auto;
                right: 0;
            }
        }
    }

    .tm-navigation-megamenu {
        position: inherit !important;

        &>ul {
            display: flex;
            justify-content: space-between;
            position: absolute;
            text-align: left;
            left: 0;
            top: 100%;
            width: 100%;
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            border-bottom: 4px solid #aaaaaa;
            padding: 15px;
            visibility: hidden;
            opacity: 0;
            transform: scaleY(0);
            transform-origin: 0 0;
            z-index: -1;
            transition: transform 0.2s ease-in-out 0s, visibility 0.2s ease-in-out 0s, opacity 0.2s ease-in-out 0s, z-index 0s;

            &>li {
                display: block;
                width: 100%;
                margin: 15px 0;
                padding: 0 20px;

                &:not(:last-child) {
                    border-right: 1px solid $color-border;
                }

                &>a {
                    display: block;
                    color: $color-theme;
                    border-bottom: 1px solid $color-theme;
                    padding: 0;
                    padding-bottom: 5px;
                    margin-bottom: 15px;
                    text-transform: uppercase;
                    letter-spacing: 1px;
                    font-size: 14px;
                }
            }

            ul {

                li {
                    display: block;

                    a {
                        padding: 5px 0;
                        line-height: 1.3;
                        display: block;
                        font-weight: 400;
                        font-size: 14px;

                        &:hover {
                            padding-left: 10px;
                        }
                    }
                }
            }
        }

        &:hover {
            &>ul {
                visibility: visible;
                opacity: 1;
                transform: scaleY(1);
                z-index: 9;
            }
        }
    }
}