I have an H1 tag displayed on the desktop version which does not fit into the design of the mobile version.
In order to make the H1 fit on mobile, I created a duplicate H1 with the exact same content which is only visible on mobile devices - on desktop viewports the mobile H1 is hidden and of course the desktop H1 is hidden on mobile devices.
To summarize, do search engines still see two H1 tags which I think is not best practices.?
What is the right approach to this problem?