IB 786 then FR 5482 at Madrid
Berlin → Madrid → Porto
Timetable, Madrid time
22:55IB 786 from Berlin at the gatealso VY 5103, AA 8686
22:15FR 5482 to Porto leaves the gate
23 h 20 apart on the timetable, overnight
FR 5482 leaves 23 h 20 after IB 786 arrives on the timetable: more than half a day, so not a connection we count.