German far-right AfD gains first elected official