Is the marriage contract considered valid if concluded at home by the marriage official (Ma`zon)?
Yes, it is valid as long as it is registered at the court.
I suffer from excessive gas, especially when I pray, and I redo my ablution more than seven times. I have obsessive thoughts about this matter, even though I went to a doctor and was given medication that did not help. What should I do?
If the release of gas stops at certain times between prayers, you should wait for that time, perform ablution, and pray. However, if it is continuous, you should perform ablution after the prayer time begins and pray, and the release of gas during the prayer is excused. And Allah The Almighty Knows Best.
What is the ruling on the cessation of blood after (40) days from delivery, but later continued sporadically during two days of Ramadan?
Once postpartum bleeding (Nifas) ceases, and the woman is certain that it won`t reoccur, then she becomes ritually pure and so she is free to make Ghusl (purificatory bath), pray, and fast. If the bleeding reoccurs before fifteen days from its cessation, and before the end of (60) days after delivery, then the ruling on postpartum bleeding is effective, and her fasting and prayer are null and void, thus she must make up the fasting that she missed and not the prayer during those particular days.
Is it permissible for a person who broke fasting in Ramadan because of being sick to pay a ransom?
If there is hope for him/her to be cured, then he would be required to make up for the missed fasting days when he/she recovers, and no ransom is due on him/her. If his/her disease is incurable, then he/she would be required to pay a ransom for each missed fasting day, which is (600) grams of wheat, or rice. And Allah Knows Best.