Nav bar hidden issue

Hi, I’m having problems with hiding the navbar contents(with a black background part) when clicking certain buttons. Ideally, the navbar should be hidden automatically.

read-only link

  1. if I click “contact” (which links to the footer), the navbar can’t be hidden automatically.
  2. if I click “join us” (which I use a URL link to the section on the home page) on the home page, same issue happens again. But if I’m on another page and click “join us”, the navbar content hides perfectly as I want.

thanks for ur help!