If the Moors were able to remain there for so long, an indication to me of their strength over the Catholic Kingdoms to the north, why were they pushed back?
I recently answered a quite similar question here. My focus there is more strongly on the Christian Iberian states and their military campaigns (esp. in the 12th-13th centuries), so hopefully someone can add more for the Muslim states' side of things.
For a shorter version I'll use and add a bit to that post's summary:
Following the end of the Caliphate of Córdoba in the mid 11th century various smaller "taifa" kingdoms formed; which led to power struggles between such kingdoms and a lack of unity compared to the Caliphate or earlier Muslim realms. Here the berber Muslim dynasties of the Almoravids and then the Almohads come into play. Both came from Norther Africa to Iberia, with esp. the Almoravids searching to end (and profit from) such power struggles between taifa realms.
The Muslim realms' position in Iberia in the 12th and esp. 13th century was weakened through internal struggles and conflicts taking place in their North African base. Despite similarly often lacking a united front, the Spanish Christians got the upper hand after the decisive and collaborative victory at Las Navas de Tolosa in 1212, initiating the downfall of the Almohad dynasty. After the surrender of Córdoba it remained rather a question of hold long the Muslims could withstand the superior Christian forces.
As is manifest in examples of remissions of sins promised by popes throughout the centuries and their appeals to take up arms against the “infidels”, crusading ideals were an important factor in the Christian victories. The collaboration with crusaders from France, England and the north (especially during times of crusade) further underlines its internationality, another distinguishing feature of the crusades to the holy land. By contrast, not all campaigns taking place during the continuous struggle of the reconquest can be described as crusades – they were singular events arising from papal and episcopal proclamations.
In the end then, during the 13th century we can notice the Almohad dynasty struggling both internally and due to conflicts in North Africa; and oftentimes stronger cooperation between various Christian Iberian and other European states to combat Muslim realms increasingly portrayed as "enemies of the faith" building on crusade rhetoric.
Edit: it's getting late over here, so in case of follow ups for the linked post i'd have to try and get back to it tomorrow.