How to remove sidebar primary widget on Mobile on category page

Hello i have been trying to figure out how i can hide the sidebar only on Categories page on Mobile

I tried this code:

@media only screen and (max-width: 900px) { .sidebar { display: none; } }

But it removes the sidebar on all pages. I just need to hide it on the category pages