FB 471 then FR 5482 at Madrid
Sofia → Madrid → Porto
Timetable, Madrid time
16:20FB 471 from Sofia at the gate
09:05FR 5482 to Porto leaves the gate
16 h 45 apart on the timetable, overnight
FR 5482 leaves 16 h 45 after FB 471 arrives on the timetable: more than half a day, so not a connection we count.