just before; immediately prior to
Temporal use. Often appears as の直前, 直前に, or in compounds such as 試験直前, meaning the moment immediately before an event or deadline.
Just before leaving, I realized I had forgotten my wallet.
試験直前まで単語を確認した。
I reviewed vocabulary until right before the exam.
right in front of; just before a place
Spatial use, especially for a point immediately before something along a route or line of movement, such as a crossing, station, or entrance.
横断歩道の直前で車が止まった。
The car stopped right in front of the pedestrian crossing.
駅の直前で電車が急に減速した。
The train suddenly slowed down just before the station.
It started raining right before the match.
The train stopped just before reaching the station.
We changed the plan at the last minute.
I submitted the report just before the deadline.