Salam,
please take look at the following verses:
16:26 Those before them had schemed, so God came to their buildings from the foundation (qawaid), thus the roof fell on top of them; and the retribution came to them from where they did not know.
16:27 Then, on the Day of Resurrection He will humiliate them, and say: "Where are My partners regarding whom you used to dispute?" Those who have received the knowledge said: "The humiliation today and the misery are upon the rejecters."
Does two verses above become the opposite of another 'qawaid' stated in the following verses?
2:127 And as Abraham raised from the Sanctuary its foundations (qawaid), along with Ishmael: "Our Lord accept this from us, You are the Hearer, the Knowledgeable."
22:26 And We have appointed to Abraham the location of the House: "Do not set up anyone with Me, and purify My House for those who visit, and those who are standing, and the kneeling, the prostrating."
One thing crossing in my mind that the "foundation(s)" means something which related to basic belief in the existence of God, either monotheism or polytheism, confirmed by 16:27 and 22:26.
What do you think guys?