Animals living in stable and cohesive groups acquire resources critical for survival while moving together. Such groups often differ from each other in size and composition and need to cope with challenges induced by environmental heterogeneity. To shed light on the effects of the social and the physical environment on collective behaviour, I will introduce my studies on social groups of vulturine guineafowl (Acryllium vulturinum) that range freely in the Kenyan savannah. For these, I used a combination of methods, including high-resolution GPS tracking, field observations of habituated and non-habituated groups, video tracking and environmental data. Multi-level societies, where stable social groups associate preferentially with each other to form super-groups, have primarily been found in large-brained mammals. However, my collaborative work has shown that vulturine guineafowl, as well as other bird species, can form such complex societies. We have also found that habitat features and seasonality shape inter-group associations. Furthermore, extreme environmental conditions, such as droughts, substantially increase the areas the groups use. Despite the variation in environmental conditions, guineafowl groups maintain cohesion by following shared decision-making rather than despotic processes. The potential to contribute equally to decisions allows group members to satisfy their needs even when conflicts over food arise. When such conflicts disproportionately benefit one group member, collective responses to the rise of inequality play a crucial role in maintaining the benefits of group-living. In addition to my guineafowl studies, I will also introduce my current project on cooperation of collectively moving male Indo-Pacific bottlenose dolphins and propose a unifying framework to characterize and study the largely overlooked levelling behaviours through which subordinate individuals constrain the power of dominants, shaping thus the balance of power within animal groups.