Antes de sair, fecha a porta.
temporal or contrastive
Antes de + inf
“Before leaving, close the door.”
Depois de estudar, vi televisão.
temporal or contrastive
Depois de + inf
“After studying, I watched TV.”
Em vez de reclamar, trabalha.
contrastive clauses
Instead of complaining, work.
Em vez de = Instead of..