Education systems and gender inequalities in educational attainment