When you pray all the obligatory Prayers and fast the month of Ramadan, it means that you definitely have faith in Allah in your heart. You might have had some doubts or wrong thoughts which are not been dealt with properly and not been cleared yet. Such thoughts might make you think that you lost your faith in religion but in fact you did not.
These are few important points which usually help in similar cases:
1. Be very frank with your doubts and never suppress any question but face it and discuss it by evidence, reason and logic taken from authentic knowledgeable scholars.
2. Don't fear any question and have self confidence that you will find the real answers in the book of Allah and the sayings of the Prophet (SAWA) and his holy Progeny Ahlul Bayt (AS).
3. Seek more guided knowledge from authentic sincere scholars (Ulama) who have experience in similar cases of doubts and questions.
4. Recite Quran with voice which you can hear and try to understand and ponder on its meanings.
5. Recite the sayings of the Prophet and Ahlul Bayt especially in Nahjul Balagha on the subjects of your question. No doubt, the wisdom of the Prophet and Ahlul Bayt (AS) is the best wisdom for any human being who seeks the truth.