It can be very confusing to show and hide things in a single masthead for all of the sizes. It’s easier to make separate mastheads for mobile, tablet and desktop.
To do this, create three sections in the header template one for each screen resolution range.
You can show/hide them both in the Header element.