Molecular origin of the two-step mechanism of gellan aggregation