IB 784 then FR 572 at Madrid
Berlin → Madrid → Porto
Timetable, Madrid time
18:25IB 784 from Berlin at the gate
11:15FR 572 to Porto leaves the gate
16 h 50 apart on the timetable, overnight
FR 572 leaves 16 h 50 after IB 784 arrives on the timetable: more than half a day, so not a connection we count.