Is it legal ? Do I have any recourse?

Hello everyone,

I have a question, does my employer have the right to demote me because I'm pregnant and my performance has declined in the last 5 months (due to some problems with my ex-manager who resigned) ? I worked there since 2 years.

Thanks,