how does the spanish election work