A vacancy in the office of mayor or councilmember occurs when a duly elected person fails to qualify or when a person who has been duly elected and qualified either dies, resigns, or no longer meets the qualifications of office.