Ronda's awkward to reach by public transportation. It can absolutely be done (I did it in 2019, but spent multiple nights there), but most people who go there are probably hitting it on the way from Seville to Granada (or vice versa) by rental car. You'll probably need a combination of trains and buses to slot Ronda between Seville and Granada.
A lot of people spend just 2 nights in Granada. It depends on how many things you want to see there. The Alhambra is a large complex (not just one building) where many people spend over half a day.
Very Important: Except for a few tickets available for November 13 and 14, tickets to the Alhambra are sold out until November 18. Availability is limited for most of the remaining days of the month. You need to pin down your Granada dates ASAP so you can buy your Alhambra ticket. You want the "Alhambra General" ticket. If those are sold out by the time you finalize your itinerary, check to see whether the Dobla de Oro ticket is available for one of your dates. It will be a bit more expensive (it covers a few additional things) but still considerably cheaper than paying for a tour. Of course, if you want a tour, that's fine, but it's not something to leave until the last minute.
Alhambra official website
I don't know that you'll have extra time in Barcelona, but if you do, Girona makes a very good day trip. It has a walled medieval district, two important old churches, an art museum and a Jewish-history museum. It's known for good restaurants, I believe. Many people head up to Montserrat from Barcelona. I haven't done that and don't know anything about November weather there. If you like Surrealism, or even art in general, the Dali Theatre-Museum in Figueres is fun. That's farther away than Girona.
Spain has many very interesting towns and cities, but please consider that the country is large and those great destinations are scattered. It just isn't possible to see all Spain's great places in 16 days. Trying to do that can lead to a trip that's a blur. Some of the really key destinations are linked by extremely fast trains, but those tickets can get rather pricey if bought at the last minute. You haven't mentioned budget concerns, so I assume that will not be a significant issue for you.
Madrid has many fabulous side trips. Not all of them are as convenient (quick, cheap) as others. Salamanca is not a quick side trip; it involves over 3 hours in transit. Segovia, Toledo and Alcala de Henares are much quicker.
There's also the town of Cuenca, which is on the fast rail line between Madrid and Valencia. It's very atmospheric with its houses hanging over a ravine, but it's an example of a place that can turn into an expensive day trip if you buy tickets late. I see one departure for next Wednesday that costs about 60 euros one way (other are cheaper). The train from Madrid takes just over an hour, but the fast trains serve the Fernando Zobel station outside town, so you have to add time for a bus (frequency unknown) or a taxi to get to Cuenca itself. The old town is on a hill, so there's walking time required as well.