FB 851 then IB 716 at Heathrow
Sofia → London → Madrid
Timetable, London time
16:45FB 851 from Sofia at the gate
11:25IB 716 to Madrid leaves the gate
18 h 40 apart on the timetable, overnight
IB 716 leaves 18 h 40 after FB 851 arrives on the timetable: more than half a day, so not a connection we count.