To center the menu on small screens, you use two key CSS properties:
left-1/2: Positions the menu with its left edge at the center of the screen. transform -translate-x-1/2: Shifts the menu back left by 50% of its own width, effectively centering it. This combination ensures the menu is perfectly centered when it’s toggled on small screens.