How should a mega menu change on mobile devices?

A desktop mega menu should usually become a hierarchical disclosure navigation on mobile. Users open the main menu, then expand category buttons to reveal nested links. This avoids a wide multi-column panel and keeps each level readable in a narrow viewport.
Use real buttons for category controls that do not navigate. Set aria-expanded accurately and keep the controlled list adjacent in the DOM. If a category name is also a destination, provide a separate link so tapping it does not have to perform two competing actions.
Allow users to move back, close the entire menu and understand their current level. Escape should close an open panel where the keyboard pattern supports it, and closing should return focus to the menu button. Do not create a focus trap unless the mobile menu is implemented as a proper modal dialog.
Remove decorative promotional columns or move them after the core links when they make the menu excessively long, but retain destinations required for navigation. Search may deserve a prominent position. Large touch targets, visible focus and text labels matter more than preserving the desktop geometry.
Test long translations, several expanded groups, viewport rotation and browser zoom. Closed sections must not leave invisible links in the Tab order. Keep the navigation data shared across desktop and mobile so new links, current states and permissions cannot diverge. Keep the layout rule beside the component and document why the threshold or constraint exists. This reduces accidental overrides and gives future editors a concrete condition to retest after content changes.