Spain has some fantastic high speed trains (much nicer than ours), and I'd suggest using them at least for Madrid to Cordoba/Seville (with advance purchase they are pretty cheap too).
We did a few days in Madrid, then took a train to Seville for a few days, then flew to Barcelona for a few days (there are cheap internal flights), then flew home from Barcelona.
We considered Cordoba but didn't make it there (it's an easy day trip from Seville by train) and Granada. We decided to skip Granada because logistically it seemed too much to add, but honestly I am not sure if that was the right decision (at least, I hope to go back some time and spend more time in Andalusia).
I would check the weather. Seville will be the warmest but even there it may not be warm (in March it was very nice, but more spring than summer temps).