Just returned.
Might recommend this
June 24-27 Porto/Duoro.
Note on Sundays everyone goes down to the River to walk the bridges, etc. Music, crafts, touristy stuff to browse, people-watching. Very nice.
Duoro is very beautiful, but focussed on wine/port. Short river cruise for boys? But you can also do this in Porto. Note, you can also tour and taste along the River warehouses in Porto if that is your focus. We loved Duoro and stayed 3 days, but not sure there is much for kids.
June 28 - Arouca/Coimbra (get tix in advance if you want to see Jao library, but VERY crowded with tour groups already in May)
June 29- 30 - Stay in Nazare (on the beach) or surrounding area and day trip to Fatima, Tomar (mabye add Alcobaca and/or Batalha monasteries, add back Obidos?). They are all very close. Mixed opinions on this thread about Nazare, but I liked it.
July 1 - Evora (don't miss bone chapel)
July 2 - 5/6: Drive to Lisbon and drop off car. Take metro/train to Sintra which leaves every hour.
Go early. You use the same metro/train card and from Rossio it is 40 minutes and 3 Euros each. Then either private bus or tuk-tuk to get up to the castles. Very hard to park in Sintra. (Pena, Moor Castle, Quinta Regaleira) Recommend figure out the train ticket (viagem) - before you go. Very easy, we went 2 days in a row.
Note if your boys have any interest in Harry Potter, they may want to visit the "Hogwarts" library in Lisbon. We didn't go in, but there were a lot of folks hoping to see it!
https://www.livrarialello.pt/en/how-to-visit-us
July 5/6 - - July 8th. Take train to Algarve? Pick up car there for a couple of days and leave from Faro? Stretch out the above plan for more relaxing trip/more cities? Train from Lisbon to Seville and stay a couple of days there?
Have a great time! It's a lovely country - and so is Seville!