During Franco´s dictatorship Spain was a very Catholic country. After 3 decades of democracy, Spain is not a Catholic country anymore. First, loss of religion became apparent with the legalization of divorce and contraceptives and the promotion of sex ed. This was followed by the decriminalization of abortion, the acceptance of drug possession for personal consumption (drug users are not criminals in Spain, but treated instead as medical patients) and a general acceptance of premarital sex. Later gambling in public places became commonplace, prostitution was legalized and regulated, and recently gay marriage became legal as well. So other than euthanasia, I can´t think of anything that the Church used to opposed that is not legal now in Spain. While 95% of the Spanish youth declared in the 60s that religion played some role in their life now only a third do.
If anything, Spain proves that societies do not fall apart when they give up religion and almost everything that was illegal for religious reasons, becomes legal. The story of Spain is not unique. Italy, another country where religion used to play a very important role in society, has also transformed most of its churches in tourist attractions. Contrary to popular belief, the country still functions pretty well. I guess --to the disappointment of people who equate religion with morality-- the story of Spain and Italy prove that people do not need religion to behave ethically. A good education will do. Spain and Italy have less policemen, violent crime and people in jail per inhabitant than the United States, which happens to be the last, mostly religious, wealthy country on earth.