Correlation between collective and molecular dynamics in pH-responsive cyclodextrin-based hydrogels