Afghan president invites Taliban to run in election as militant group gains ground