Hey there, I don't fully understand the issue with the code you said you're having, but I can suggest a fix as I got some key points out from the issue you highlighted, you're trying to center some texts and for some reasons on mobile screen sizes it won't center because of a padding inherited from the desktop screen version?
if this is the issue, using media query could solve this issue, you could just use the media query to remove the padding instead or reduce the padding to achieve what you want and that should work.
let's take this as an example:
desktop version:
.container{padding: 5px 16px}
using media query, I can remove the padding from the container element completely or reduce the padding as I'd wanted
@media (max-width:400px) {.container{padding: 2px 4px}}
let me know if this did solve the issue you're having with your code. Happy coding.