Ambient climate determines the directional trend of community stability under warming and grazing