Show right sidebar below main content on small devices

When viewing my site ( on a smartphone, the right sidebar (#tertiary) shows up on top of the main content, rendening the main content unreadable.

I understand media queries, but how can I have the right sidebar show AFTER the main content and BEFORE the footer (#sidebar).

{Yes, I know the developer made some strange choices in naming these areas. :slight_frown: }