FR 3877 then IB 777 at Madrid
Tangier → Madrid → Hamburg
Timetable, Madrid time
22:35FR 3877 from Tangier at the gate
19:45IB 777 to Hamburg leaves the gatealso LA 1697, VY 5126, AT 5906
21 h 10 apart on the timetable, overnight
IB 777 leaves 21 h 10 after FR 3877 arrives on the timetable: more than half a day, so not a connection we count.