Refine header menu behavior