The answer includes a set of files like the template, scss, and extension files. In theme, we can edit the header menu template and its CSS. Currently, when the user hovers through the main category an event is triggered to add a class that opens up the level 2 category, we can apply the same logic here.
For more info check: https://codepen.io/Kamilica/pen/XRbvaL