Saying offensive things about God or religion is blasphemy. Blasphemy can be used for offensive ideas in other areas too.
If you're saying something bad about a god, or taking the Lord's name in vain, or questioning a religious institution in any way, you could be accused of blasphemy — insulting something sacred. You can use this word in a lot of other ways too. At a meeting of conservatives, a liberal idea could be considered blasphemy (and vice versa). You might even jokingly cry "Blasphemy!" if a friend said your favorite ice cream flavor stinks.