@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
}

.menu {
    background-color: #303b51;
    color: #fff;
    height: 70px;
}

.menu__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.menu__links {
    height: 100%;
    transition: transform .5s;
    display: flex;
}

.menu__item {
    list-style: none;
    position: relative;
    height: 100%;
    --clip: polygon(0 0, 100% 0, 100% 0, 0 0);
    --transform: rotate(-90deg);
}

.menu__item:hover {
    --clip: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    --transform: rotate(0);
}

.menu__link {
    color: #fff;
    text-decoration: none;
    padding: 0 15px;
    display: flex;
    height: 100%;
    align-items: center;
}

.menu__link:hover {
    background-color: #303b51;
}

.menu__arrow {
    transform: var(--transform);
    transition: transform .3s;
    display: block;
    margin-left: 3px;
}

.menu__nesting {
    list-style: none;
    transition: clip-path .3s;
    clip-path: var(--clip);
    position: absolute;
    right: 0;
    bottom: 0;
    width: max-content;
    transform: translateY(100%);
    background-color: #303b51;
}

.menu__link--inside {
    padding: 10px 20px;
}

.menu__link--inside:hover {
    background-color: #303b51;
}

.menu__hamburguer {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 15px;
    cursor: pointer;
    display: none;
}

.menu__img {
    display: block;
    width: 36px;
}

@media (max-width: 800px) {
    .menu__hamburguer {
        display: flex;
    }
    .menu__links {
        position: fixed;
        max-width: 300px;
        width: 100%;
        top: 70px;
        bottom: 0;
        right: 0;
        background-color: #303b51;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        transform: translateX(100%);
        transition: transform .3s ease-in-out;
    }
    .menu__links--show {
        transform: translateX(0);
    }
    .menu__item {
        width: 100%;
    }
    .menu__link {
        padding: 15px;
        height: auto;
    }
    .menu__nesting {
        position: static;
        width: 100%;
        transform: none;
        clip-path: none;
        display: none;
    }
    .menu__item:hover .menu__nesting {
        display: block;
    }
}
