AD 8754 then AD 7271 at Madrid
Campinas → Madrid → Lisbon
Timetable, Madrid time
12:25AD 8754 from Campinas at the gate
12:10AD 7271 to Lisbon leaves the gatealso S4 8699
23 h 45 apart on the timetable, overnight
AD 7271 leaves 23 h 45 after AD 8754 arrives on the timetable: more than half a day, so not a connection we count.