Let navbar dissapear when link clicked

Hello, as you already can see in my topic, I’ve coded a navbar for mobile version with button etc and there are the link which send you to the specific section. Now I want this to happen: If i click on a link I want the navbar to dissapear and show the content . Here’s the code:

CSS

.navbar {
    width: 100%;
    height: 100px;
    background-color: #00aeef;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

ul {
    list-style-type: none;
    font-size: 25px;
    font-family: "Montserrat", sans-serif;
}

li {
    float: right;
    line-height: 100px;
    margin-right: 25px;
    transition: 0.1s ease-out;
}

a {
    text-decoration: none;
    color: white;
}

li:hover {
    font-size: 33px;
}

.first {
    list-style-type: none;
    font-size: 30px;
    color: white;
    display: none;
    width: 50px;
    height: 50px;
    background: #00aeef;
    border-radius: 50px;
    line-height: 50px;
    text-align: center;
}

#click {
    display: none;
}

.navbar {
        background: none;
        box-shadow: none;
    }

    ul {
        position: fixed;
        height: 100vh;
        width: 100%;
        background-color: #00d2ff;
        left: 0;
        transition: 0.2s cubic-bezier(0.455, 0.03, 0.515, 0.955);
        z-index: 1;
    }

    li {
        position: relative;
        float: none;
        display: flex;
        justify-content: center;
        top: 20%;
        line-height: 80px;
        transition: 0.2s ease-out;
    }

    .first {
        display: block;
        position: fixed;
        right: 0%;
        top: 2%;
        cursor: pointer;
        z-index: 9;
    }

**HTML**
<div class="navbar"> 
        <input type="checkbox" id="click">
        <label for="click">
            <li class="first"><i class="fa fa-bars"></i></li>
        </label>   
        <ul>
            <li><a href="#Home" class="test">Home</a></li>
            <li><a href="#About">About</a></li>
            <li><a href="#Planes">Planes</a></li>
            <li><a href="#Import">Import</a></li>
            <li><a href="#Statistics">Statistics</a></li>
        </ul>
        <div id="top"><h1 >Home</h1></div>
    </div>
    <div id="container">
        <section id="Home">
            <h1 data-aos="fade-right" data-aos-duration="900">Home</h1>
        </section>
        <section id="About"><h1 data-aos="fade-right" data-aos-duration="900">About</h1></section>
        <section id="Planes"><h1 data-aos="fade-right" data-aos-duration="900">Planes</h1></section>
        <section id="Import"><h1 data-aos="fade-right" data-aos-duration="900">Import</h1></section>
        <section id="Statistics"><h1 data-aos="fade-right" data-aos-duration="900">Statistics</h1></section>
    </div>

Hi Chris3837
here is a link to another similar post.