FB 471 then IB 547 at Madrid
Sofia → Madrid → Porto
Timetable, Madrid time
16:20FB 471 from Sofia at the gate
15:40IB 547 to Porto leaves the gatealso AA 8678
23 h 20 apart on the timetable, overnight
IB 547 leaves 23 h 20 after FB 471 arrives on the timetable: more than half a day, so not a connection we count.