Hungary is a member of both the European Union and NATO – yet in recent years it has increasingly stood apart from its allies.