nav {
    position: sticky;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f1f1f1;

    top: 0;

    height: 70px;
    width: 100%;

    z-index: 999;

    button#menu {
        display: none;
    }

    img {
        width: 100px;
        margin-left: 35px;
    }
    
    ul {
        display: flex;
        list-style: none;
        align-items: center;
        justify-content: center;
        margin-right: 50px;

        li {
            margin: 0 10px;
            cursor: pointer;

            a {
                text-decoration: none;
                color: var(--color-text);
            }

            a.link-title::after {
                content: ' ';
                display: block;
                width: 0;
                height: 2px;
                border-radius: 100px;
                margin: 0 auto;

                transition: width 0.3s ease;

                background-color: var(--color-primary);
            }

            /*a::after {
                content: "▼";
                margin-left: 5px;
            }*/

            ul {
                display: none;
                position: absolute;
                background-color: #f1f1f1;
                padding: 10px;

                li {
                    display: block;
                    padding: 15px 10px;
                    cursor: pointer;

                    a {
                        color: var(--color-text);
                    }
                }
            }
        }

        li:hover {
            a.link-title::after {
                width: 80%;
            }
            
            ul {
                display: block;
            }
        }
    }
}

@media screen and (max-width: 400px) {
    nav {
        flex-direction: column;
        height: fit-content;

        padding-bottom: 15px;

        button#menu {
            display: block;
            border: none;

            cursor: pointer;
            width: 40px;
            height: 40px;
        }

        img {
            margin: 15px 0;
        }

        ul {
            display: none;
            flex-direction: column;

            margin: 15px auto 0 auto;
            gap: 15px;

            height: 0;

            transition: all 0.3s ease;

            li:hover {
                ul {
                    display: none;
                }
            }
        }

        ul.active {
            display: flex;
            height: fit-content;
        }
    }
}

@media screen and (min-width: 400px) and (max-width: 700px) {
    nav {
        flex-direction: column;
        height: fit-content;

        img {
            margin: 10px 0;
        }

        ul {
            margin: 10px 0;
        }
    }
}