AD 8000 then IB 1049 at Madrid
Recife → Madrid → Pamplona
Timetable, Madrid time
08:25AD 8000 from Recife at the gate
07:55IB 1049 to Pamplona leaves the gate
23 h 30 apart on the timetable, overnight
IB 1049 leaves 23 h 30 after AD 8000 arrives on the timetable: more than half a day, so not a connection we count.