@import "../../styles/variables";

.menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    max-width: 320px;
    width: 100%;
    height: 100%;

    &:hover {
        nav {
            ul {
                transform: translate(-30px, 0);
            }
        }

        .menu-skew {
            left: -200px;
            opacity: 1;

            .img-bg {
                opacity: 1;
            }
        }
    }

    nav {
        position: relative;
        z-index: 3;
        padding: 20px;

        .logo {
            margin-bottom: 30px;

            a {
                color: $color-white;
                font-weight: $bold;
                font-size: 30px;
            }
        }

        ul {
            padding-left: 50px;
            transform: translate(-50px, 0);
            transition: 0.6s;

            li {
                a {
                    position: relative;
                    display: inline-block;
                    color: $color-white;
                    font-weight: $semi-bold;
                    font-size: 18px;
                    padding: 10px 0;
                    opacity: 0.7;
                    transition: 0.5s;
                    cursor: pointer;

                    &:before {
                        content: '';
                        display: block;
                        position: absolute;
                        top: 50%;
                        left: -50px;
                        width: 40px;
                        height: 2px;
                        background: $color-white;
                        transform: translate(0, -3px);
                        transition: 0.5s;
                    }

                    &:hover {
                        padding-left: 10px;
                        opacity: 1;

                        &:before {
                            width: 63px;
                        }
                    }
                }
            }
        }
    }

    .menu-skew {
        position: absolute;
        top: 0;
        left: -250px;
        height: 100%;
        width: 400px;
        background: $color-blue;
        z-index: 1;
        overflow: hidden;
        transform: skewX(-17deg);
        opacity: 0.5;
        transition: 0.5s;
    }

    .img-bg {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1;
        height: 100%;
        width: 200%;
        transform: skewX(17deg);
        background-image: url(https://herbalife24tri.la/static/media/LA-bg.c300a964.jpg);
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        opacity: 0;
        transition: 0.3s;
    }
}
