Introduction

Exploiting natural resources is still considered a challenge for maintaining and conserving global biodiversity. Mining is an example of a natural resource exploitation activity that requires substantial knowledge about the conservation and management of biodiversity, since this activity can be carried out in a controlled way by state agencies or illegally without any concerns about its effects on the environment (Meira et al., 2016; Obeng et al., 2019). Mining activities affect biodiversity on multiple scales (site, landscape, regional and global) through direct (mining) or indirect processes including modify extensive areas for ore extraction, using large amounts of water for processing, transport, mineral processing and dust suppression, and reduce the heterogeneity of the habitats (Sonter et al., 2017). The changes caused by mining extend from terrestrial to aquatic ecosystems, which are highly sensitive to these impacts (Ferrari et al., 2009). Aquatic ecosystems can be affected by many anthropogenic disturbances such as agriculture, deforesting, mining, water contamination, etc. However, mining is one of the anthropogenic activities that causes environmental impacts that most alters the aquatic communities (Martins et al., 2014). Furthermore, in lotic ecosystems, residues can be leached into streams, with the entry of sediments that modify the habitats and environmental variables of the stream (Kemp et al., 2010).

The different habitat changes within each micro-basin caused by mining or the distance from the mining site can affect existing biodiversity (Sonter et al., 2017; Espinosa et al., 2020). In the Amazon, mineral exploration is one of the most economically productive activities. However, such activities cause impacts on the biodiversity of the region (Barbosa et al., 2001; Brasil et al., 2020; Espinosa et al., 2020). In general, mining activities in the Amazon involve soil exploitation, which causes riparian vegetation degradation and loss of water quality (Callisto et al., 2001; Shimano, 2015), which directly and indirectly influences the aquatic flora (Fares et al., 2020) and invertebrate fauna (Callisto et al., 2001; Espinosa et al., 2020). Studies on the effects of mining on the diversity of aquatic organisms are commonly investigated from a taxonomic perspective, disregarding the effects on the species functional aspects (He et al., 2015).

The revolution in studying biodiversity, including functional aspects (Cernansky, 2017), has allowed researchers to understand how communities are structured based on their functional traits. When evaluating the traits, which are basic units of any morphological, physiological, or phenological characteristics of species (Petchey & Gaston, 2006), it is possible to determine where species live (Lavorel et al., 1997), how they interact (Cadotte et al., 2011) and understand how biotic or abiotic filters affect species performance and fitness (Violle et al., 2006; Webb et al., 2010). This occurs because species are continuously evolving in response to environmental transformation (Heino et al., 2013), and their functional traits provided their persistence in habitats over the years as proxies of adaptation (Tapolczai et al., 2016). In this way, measures that incorporate the functional traits of communities can be more informative regarding the effects that activities, such as mining, have on the structure of these organisms (Péru & Dolédec, 2010; Brasil et al., 2014; Dedieu et al., 2015; Fengzhi et al., 2015; He et al., 2015; Gastauer et al., 2020).

Otherwise, functional diversity is a tool that assesses the extension of differences in the functional traits among species within the communities (DiBattista et al., 2016). Higher values of functional diversity indicate greater differences among species according to their traits (Sobral & Cianciaruso, 2012).

Thus, the functional beta diversity evaluates the variation of species traits (dissimilarity) among communities at different sites, and allows for the assessment of the similarity in ecological and evolutionary traits of species across space and time (Swenson et al., 2011, 2012). Furthermore, the functional beta diversity can be partitioned into two components: the functional turnover (replacement of traits), and the functional nestedness (trait loss); these two components can be selected by habitat quality, area, and isolation, or species tolerance to abiotic factors (Wright et al., 1998; Villéger et al., 2013). Assessing functional beta diversity and its components can be more robust than functional alpha diversity, since two communities separated in space or time may present similar functional alpha diversity, but show distinct variability in trait composition (Villéger et al., 2013). Functionally distinct communities may occur among environmentally dissimilar habitats (Weiher et al., 2011; Villéger et al., 2013), and in sites at a greater geographic distance from one another (‘distance decay’: Soininen et al., 2007), due to higher differences in abiotic conditions and to the dispersion limitation of the organisms (Soininen et al., 2007; Zorzal et al., 2017; Ding et al., 2017). Studies of functional beta diversity on different spatial and temporal scales, provide important information about ecosystem functioning, from evolutionary perspectives to issues related to anthropic alteration of meso and microhabitats (Devictor et al., 2010; Alirezazadeh et al., 2021; Li et al., 2021).

Benthic macroinvertebrates are organisms involved in the metabolism of aquatic ecosystems as major components of the trophic chain, since they participate in nutrient cycling, reducing the size of organic particles (e.g., shredders). The study of the functional ecology of aquatic macroinvertebrate groups can be evaluated using all the biological traits of the group (Bady et al., 2005; Peru & Dolédec, 2010), but mostly traits related to the feeding habits (Cummins, 1973; Nhiwatiwa et al., 2009; Shimano et al., 2012; Brazil et al., 2014), size (Pavoine & Dolédec, 2005), and the relationship between locomotion and substrate (Heino, 2005; Heino et al., 2008). Functional groups of benthic macroinvertebrates are good tools in biomonitoring programs (Rosenberg & Resh, 1993; Hering et al., 2004) because of their sensitivity to environmental degradation or changes (Shimano et al., 2011, 2013; Brasil et al., 2014), particularly at the microhabitat level (Péru & Dolédec, 2010; Luiza-Andrade et al., 2017). The mayflies (order Ephemeroptera) are generally present in all types of streams and benthic microhabitats and display high morphological and ecological differentiation among genera (Domínguez et al., 2006). The body shape and structure of their aquatic nymphs are extremely diverse, reflecting their corresponding habitats, movements and feeding behaviors (Jacobus et al., 2019). Therefore, individuals of this order have different levels of tolerance to pollution (Lewis, 1974), but are generally considered sensitive organisms that require good water conditions to survive.

This study aimed to determine how mining activities can affect functional beta diversity and select species with specific traits and evaluate the importance of space and the environment in structuring the functional beta diversity of Ephemeroptera nymphs. We tested whether: (a) preserved streams present higher functional beta diversity of Ephemeroptera than altered streams, based on the prediction that mining activities reduce environmental heterogeneity (microhabitat availability), resource availability, and, therefore, variation in functional traits among nymph communities; (b) preserved streams show greater functional turnover and nestedness components than altered streams, since the environmental heterogeneity between preserved areas indicates more variation and gains in these traits in these streams that are more heterogeneous among themselves; and c) environmental variation is the main driver of functional beta diversity and its components (turnover and nestedness), since these organisms are quite sensitive to environmental changes and, in addition, they can disperse by air (as winged adults) and by water (as nymphs) and, thus, space would not exert an influence. To this end, the study was conducted in an environmental gradient generated by mining activities in 24 streams in the eastern Amazon region.

Materials and methods

Study area

The study area is located in the state of Pará (southeastern portion of the state), Brazil, between the municipalities of Parauapebas, Canaã dos Carajás, and Água Azul do Norte (Bezerra, 2017), and it forms part of the Carajás National Forest or "Carajás Flona". Carajás Flona is subdivided into two ridges, North Ridge and South Ridge (Zappi, 2017). The vegetation is constituted by a Dense Ombrophylous Forest (Montane, Submontane) and an Open Ombrophylous Forest (Submontane). In addition, there is a high abundance of palms or lianas, alternating with seasonal deciduous herbaceous shrubby vegetation that occurs on the ferruginous outcrops, known as "canga” vegetation (ICMBio, 2016). The canga has open vegetation formed mainly by grasses and shrubs associated with other iron-rich conglomerates and other minerals such as manganese, nickel, copper, and gold (Viana et al., 2016; Souza-Filho et al., 2019). The climate is montane or Amazonian highland, classified as type Aw according to Köppen (Alvares, 2013). The dry season occurs between May and October (average precipitation < 60 mm in the driest months; IBAMA et al., 2003) with average annual temperatures ranging from 21 to 22 °C, and the rainy season occurs between November and April with an average temperature of 25 to 26 °C (Souza-Filho et al., 2019).

A total of 24 streams were sampled in the North Ridge (16 streams) and South Ridge (eight streams) of Carajás Flona during three sampling campaigns. The first campaign (campaign 1) was conducted from September to October 2015, the second (campaign 2) from October to November 2016, and the third (campaign 3) was carried out in October 2017. All the streams were sampled in every campaign.

In this study, the streams were classified as altered and preserved according to the impact index value adapted from Espinosa et al. (2020). This index was weighted by the proximity of each sampling site to the nearest mining pits and its exploited area. Each stream site is located at a given distance from each mining pit, which varies in area (m2), and may influence each study stream over the sampled years. For each site sampled (stream), the inverse of the squared distance to each mining pit was calculated and multiplied by its area. Therefore, the higher the value of the Impact Index, the greater the influence of the mining operation on the sample area. Streams with an impact index below 2 were considered preserved, while values greater than or equal to 2 were considered altered. From the total of 16 streams sampled in North Ridge, 13 were recorded as altered and three streams (located far from the power plant) were recorded as preserved. From the total of eight streams sampled in South Ridge, two of them were classified as altered and six as preserved (Table S1). The stream site CONT-04AG was represented as preserved only in 2015, changing to altered due to the increase in the explored area of mine N4.

Sampling procedures

A fixed 100-m section was delimited and subdivided into 20 longitudinal sections of 5 m (20 segments) (Shimano et al., 2018). Individuals were collected using a dipnet (18 cm in diameter with a 0.05 mm mesh) in two portions of the substrate in each of the 20 segments. The specimens collected in each segment were grouped into a single sample representing the stream, and then were fixed in 85% alcohol, quantified, and identified to the genus level (Salles et al., 2004; Domínguez et al., 2006). The identification was limited to the genus level because the specimens collected were immature individuals (larvae), and they do not have complete development of the genitalia, an essential character for identification (Shimano et al., 2018, 2021).

Environmental variables, spatial variables, and impact index

We used the abiotic variables pH, water temperature (°C) and electrical conductivity (µS/cm), determined using a multiparameter probe (Hanna model HI9828). To determine chemical oxygen demand (mg/l), total iron (mg/l), total phosphorus (mg/l), total manganese (mg/l), nitrate (mg/l), dissolved oxygen (mg/l), and turbidity (NTU), we sampled 1 l of water sample from each stream, obtained and preserved following the APHA (2005) protocols, to be analyzed in the laboratory. More details can be assessed in Espinosa et al. (2020).

The spatial variables were extracted from Moran's Eigenvector Maps (MEM) (Dray et al., 2006) from the connectivity matrix (neighborhood nearest coordinates) using the Minimum Spanning Tree criterion (R package adespatial; Dray, 2022). The neighborhood graphs were generated from the Euclidean distances between the spatial coordinates of the sampled streams (R package spdep; Bivand & Wong, 2018). The MEMs generated were the explanatory variables for community variation in relation to space, which are often used as proxies for spatial structure from the largest (lower-order MEMs) to the smallest (higher-order MEMs) scale (Peres-Neto et al., 2006). Only the MEMs that were significant and positive with respect to Moran's Index were selected (Peres-Neto et al., 2006; Legendre & Legendre, 2012).

Functional traits

We used five functional traits of the species: functional feeding group (qualitative trait, feeding strategies), presence of an opercular gill (binary trait), and three morphological quantitative traits, head size, head width, and mesonotum size. These traits have ecological importance for breathing, feeding, protection, and resilience (Table S2).

The ecological importance of Ephemeropteran traits can be explained considering that Ephemeroptera individuals are morphologically adapted to the aquatic environment. Variations in the mayflies’ gills can be used for classification and identification of several documented functions, namely, respiration (Beaver, 1990; Eriksen & Mœur, 1990), osmoregulation (Wichard, 1979; Wichard et al., 2002), locomotion, swimming (Kluge et al., 1984), water circulation (Notestine, 1994), and protection (branchial cover—operculum) (Notestine, 1994). Besides, the gills are very susceptible to being affected by the changes in the stream caused by mining activities, which can increase the entry of sediment and, with this, sink or damage these structures (Eriksen & Mœur, 1990). The head is an important morphological measurement of Ephemeroptera because it is used for feeding and is a stable measurement in insects (Goncalves et al., 2003), enabling comparisons among genera. Similarly, the mesonotum (tergite of the second thoracic segment) of nymphs is important for taxonomic identification, being a stable measurement in mature nymphs (last stage before development as adult individuals, where the wing webs are developed) (Flowers & De La Rosa, 2010). The classification of functional trophic groups related to the ecosystem was based on the literature (Merritt & Cummins, 1996; Cummins et al., 2005; Shimano et al., 2012; Cruz et al., 2013; Brasil et al., 2014; Dedieu et al., 2015), considering food type.

The matrix of functional traits of Ephemeroptera genera was assembled from qualitative and binary traits based on the literature, and quantitative traits were measured in the laboratory on at least two individuals from each genus and from each stream (Table S2). The laboratory measurements were standardized, since we only measured mature nymphs also known as "pharate nymphs". The individuals were measured using a LEICA stereomicroscope connected to a computer that receives the images of each individual and converts the images into photographs, using Leica Application Software (LAS). LAS allows us to obtain the necessary measurements for the chosen morphological traits. The measurement was standardized in millimeters (mm) for all quantitative functional traits (Table S2). From the total of 27 genera used for functional and beta functional diversity analysis, two individuals per genus were randomly selected according to their last larval stage ("pharate nymph") before becoming adults, representing a total of 2,153 individuals included in functional analysis (Table S3).

Functional beta diversity

We used two matrices to estimate the functional beta diversity. The first was a presence-absence matrix of the 27 Ephemeroptera genera sampled throughout the three sampling campaigns (63 samples). The second was a matrix of functional distance among species, calculated using the mixed-variables coefficient of distance (Pavoine et al., 2009). The functional beta diversity was estimated by Sørensen's index, calculated as the dissimilarity between all pairs of streams according to genus composition and weighted by the functional dendrogram generated through the trait distance matrix (Melo, 2013).

The Sorensen dissimilarity matrix generated corresponds to the total functional beta diversity (Fβsor). Then, this matrix was partitioned into two similarity matrices, one based on Simpson's index (Fβsim), which corresponds to species turnover, and another based on the nestedness component (Fβnes), generated by the method proposed by Baselga (2013). The dissimilarity matrices generated (Fβsor, Fβsim and Fβnes) were calculated using the R package CommEcol (Melo, 2013).

Statistical analyses

We performed a Pearson correlation analysis to remove collinear abiotic variables from the analysis (Juen et al., 2016; Luiza-Andrade et al., 2017). From that, 12 environmental variables were selected: electrical conductivity, chemical oxygen demand, total iron, total phosphorus, total manganese, nitrate, dissolved oxygen, pH, temperature, and turbidity.

A principal component analysis (PCA) was performed to evaluate the environmental heterogeneity among streams using the variables obtained through Pearson's correlation. The environmental variables were previously standardized to reduce the possible effects of outliers (Clarke & Gorley, 2006). To assess whether there is greater environmental variation between altered or preserved areas, a multivariate Dispersion Homogeneity Analysis (PERMDISP, Anderson et al., 2006) was used with a Euclidean distance matrix built using the environmental variables included in the PCA. The variation between the groups (altered and preserved, generated by the impact index) was calculated as the centroid distance of the scores generated in the PCA (α < 0.05).

To test our hypothesis that there is higher functional beta diversity (and its components) in preserved streams, we used a test for homogeneity of multivariate dispersions (PERMDISP, Anderson et al., 2006) using the functional dissimilarity matrices (Fβsor, Fβsim, and Fβnes). The variation of functional beta diversity and its components was measured between the groups (altered and preserved generated by the impact index) from the distance between the sampled points and the centroid of each group, measured using Principal Coordinate Analysis (Legendre & Legendre, 2012).

To assess the importance of environmental and spatial predictors on functional beta diversity and its components, we performed a partial Redundancy Analysis (pRDA; Bocard et al., 1992; Legendre & Legendre 2012). The predictor variables for each data set (environmental and spatial) were initially selected using the forward selection method (Blanchet, 2008) and incidence matrix as response variables. We partitioned total functional beta diversity (Fβsor) and its components (Fβsim and Fβnes) using the same sets of selected predictor variables. Then, each beta functional diversity matrix (Fβsor, Fβsim, and Fβnes) was used as a response variable to calculate the partition of explained variance for each set of selected predictor variables, considering all sampling sites (preserved and altered streams). The analysis decomposes the variation of the functional dissimilarity matrices (Fβsor, Fβsim, and Fβnes) into four fractions from the environmental and spatial matrices: [a] "pure" environmental variation, [b] shared environmental and spatial variation, [c] "pure" spatial variation, and [d] unexplained variation (Bocard et al., 1992; Peres-Neto et al., 2006). To assess the significance of the pure environment and pure space partitions, a Monte Carlo test with 9999 permutations was used on the results of a distance-based Redundancy Analysis (dbRDA: Legendre & Anderson, 1999) using a predictor matrix and a conditioning matrix for each dissimilarity matrix.

An RLQ analysis was carried out to identify the relationships between the environment and the functional traits (Dolédec et al., 1996; Dray et al., 2014). This analysis is a multivariate method based on the ordination of three matrices, including environmental variables (R), species abundance (L), and their functional traits (Q) (Borcard et al., 2018). First, a correspondence analysis (CA) was performed from the (logarithmized) genus abundances (L), providing a simultaneous ordination of samples and taxa. Then, a principal component analysis (PCA) was performed using the environmental variables selected using Pearson's correlation (R) and standardized using the "standardize" command to homogenize the scales of the different units used to measure each variable (Clarke & Gorley, 2006). Then, a "Fuzzy correspondence analysis" was performed using the functional traits (Q) (FCA, Chevenet et al., 1994). The RLQ analysis (Dolédec et al., 1996) was combined with the Fourth-corner analysis (Legendre et al., 1997), as proposed by Dray et al. (2014), used to test, by permutations, which environmental variables influenced the functional traits of Ephemeroptera genera, using Model 2 and Model 4 (Legendre et al., 1997; Dray et al., 2014; Luiza-Andrade et al., 2017). In permutation null model 2, the species abundances are permuted, and the null hypothesis is that the distribution of species with certain traits is not influenced by environmental variables. In permutation null model 4, the traits are exchanged, with the null hypothesis that species traits do not influence the species composition of communities for the observed conditions (Braak et al., 2012).

All analyses were conducted in the R software (R Development Core Team, 2021). The FD package (Laliberté et al., 2014) was used to calculate RaoQ, the ade4 (Chessel et al., 2004) and picante (Kembel et al., 2010) packages were used to build the functional distance matrix and the functional dendrogram, the CommEcol package (Melo, 2013) were used to calculate the beta diversity partition, the vegan package for the redundancy analysis (Oksanen et al., 2016), and the ade4 package for RLQ analysis (Dray & Dufour, 2006).

Results

We sampled 2259 individuals belonging to 27 genera of the order Ephemeroptera in the three sampling campaigns (Table S3). The genus Miroculis Edmunds, 1963 (Leptophlebiidae) (n = 639) was the most abundant, followed by the genus Fittkaulus Savage & Peters, 1978 (Leptophlebiidae) (n = 347), and the genera Zelusia Lugo-Ortiz & Mccafferty, 1998 (Baetidae) (n = 198), Cloeodes Traver, 1938 (Baetidae) (n = 151), and Hydrosmilodon Flowers & Domínguez, 1992 (Leptophlebiidae) (n = 144), which had the highest abundance in the streams (Table S4) (Fig. 1).

Fig. 1
figure 1

Geographic location of the streams sampled in the Carajás National Forest (Carajás Flona), southeastern state of Pará, Brazil. Circle points represent preserved streams and square points represent altered streams

Environmental variation

The principal component analysis (PCA) summarized 19.8% of the variation on the first axis and 17.6% on the second axis (Fig. 2A). The environmental variables total iron, temperature, and manganese were more correlated with the first axis, and more associated with altered areas, and the second axis showed greater correlation with electrical conductivity and total dissolved solids (Table S5). The results can also be seen in Espinosa et al. (2020). There was greater variation across altered environments, indicating greater heterogeneity among these streams (PERMIDISP; F = 11.801; P = 0.001) (Fig. 2B).

Fig. 2
figure 2

A) Ordination plot generated by the principal component analysis (PCA), and B) box plots showing the environmental variation among treatments from the matrix of environmental variables of the streams sampled in Carajás National Forest, Pará—PA, Brazil. Environmental variables: electrical conductivity (Cond), chemical oxygen demand (COD), total iron (IronTot), total phosphorus (PhosphoTot), total manganese (MangTot), nitrate, dissolved oxygen (Oxygendis), water temperature (Temp), total solids (SolidTot), pH, and turbidity

Variation in functional beta diversity

The total functional beta dissimilarity (Fβsor) represented 90.2% of the functional composition (9.8% of similarity). The turnover component (βsim) shows 82.6% of the functional beta dissimilarity. The nestedness component (Fβnes) represented only 17.4%, indicating that the set of genera found in the Ephemeroptera communities are distinct due to species replacement. Total beta functional diversity (Fβsor) of Ephemeroptera was higher in the altered areas (PERMDISP: F = 6.314, P = 0.008) (Fig. 3A, B). We found no difference in functional turnover (Fβsim) between altered and preserved areas (PERMDISP: F = 0.412, P = 0.623) (Fig. 3C, D). The highest functional nestedness values (Fβness) also occurred in the altered areas (PERMDISP: F = 5.841, P = 0.018) (Fig. 3E, F).

Fig. 3
figure 3

A, C, and E Ordinations generated by the Principal Coordinate Analysis (PCoA), and B, D, and F boxplots showing the variation in functional beta diversity based on the Ephemeroptera functional dissimilarity matrices for total functional beta diversity (Fβsor, A and B), turnover (Fβsim, C and D), and nestedness (Fβnes, E and F)

Importance of environmental and spatial factors for functional beta diversity

The environmental variables selected by the forward selection were dissolved oxygen, temperature and impact index, while the spatial variables selected were MEM1, MEM2, MEM3, MEM4, MEM7, and MEM9 (Table S6). Total functional beta diversity (Fβsor) was equally explained by the environment (Radj2 = 0.079, F = 2.253, P = 0.036) and space (Radj2 = 0.072, F = 2.103, P = 0.009), with an explanation of 7.9% and 7.2%, respectively. The turnover component (Fβsim) was not explained by the environment (Radj2 = − 0.006, F = − 0.320, P = 0.972) nor by space (Radj2 = 0.024, F = 2.412, P = 0.082; Residuals = 0.982). However, the nestedness component (Fβness) was largely explained by the environment (about 16% of the variation; Radj2 = 0.162, F = 5.422, P = 0.003), while space was not determinant in explaining this component of functional beta diversity (Radj2 = 0.062, F = 2.102, P = 0.069) (Fig. 4). The predictor variables selected by the forward methods were distinct (Table S7).

Fig. 4
figure 4

Venn diagram illustrating the partition (Radj2 values) of total functional beta diversity (Fβsor), turnover (Fβsim) and nestedness (Fβness) for functional dissimilarity of Ephemeroptera in the Carajas National Forest. Bold fonts (*) represent significant values (P < 0.05)

RLQ

The first two axes of the RLQ showed eigenvalues of 0.07 (axis 1) and 0.03 (axis 2), and accounted for 62.2% and 23.6% of the coinertia, respectively (Fig. 5A). The first axis was positively correlated with turbidity, impact index, dissolved oxygen, and total iron. Axis 2 was positively correlated to total manganese, total phosphorus, and nitrate; in addition, it was negatively correlated with electrical conductivity (Fig. 5A). The first axis was correlated with collector-type trophic guild, and presence of opercular gills, and the second axis with head length, filter trophic guild, and scraper trophic guild (Fig. 5B). Models 2 and 4 showed no significant relationships between environmental variables and functional traits (Model RLQ 2, r = 0.135, P = 0.151; Model RLQ 4, r = 0.131, P = 0.072).

Fig. 5
figure 5

Ordination of the RLQ values of the environmental variables (A) and functional traits (B). Environmental variables: Cond electrical conductivity, COD chemical oxygen demand, IronTot total iron, PhosphoTot total phosphorus, Mangtot total manganese, OxyDis dissolved oxygen, Temperature water temperature, TDS total solids, ImpactIndex impact index, nitrate, pH and turbidity. Functional traits: tc1 = head length size, tc2 = head width, tm = mesonotum size, tg.Collector = collector, tg.Filterer = filter-feeder, tg.Scraper = scraper, op.gills = opercular gill presence

The fourth-corner analysis showed significant relationships between environmental variables and functional traits. The presence of opercular gills was positively related to total iron (r = 0.092; P = 0.20), dissolved oxygen (r = 0.104; P = 0.14), turbidity (r = 0.114; P = 0.005), and impact index (r = 0.097; P = 0.20). Instead, a negative relationship was observed between filterers and total manganese (r = − 0.082, P = 0.028) (Fig. 6, Tables S2 and S8). All possible relationships between environmental variables and functional traits are shown in Table S8.

Fig. 6
figure 6

Results of the Fourth-corner analysis showing the relationships between environmental variables and functional traits. Black cells indicate positive significant relationships and dark gray cells indicate negative significant relationships. Environmental variables: Cond electrical conductivity, COD chemical oxygen demand, IronTot total iron, PhosphoTot total phosphorus, Mangtot total manganese, OxyDis dissolved oxygen, Temperature water temperature, TDS = total solids, ImpactIndex = impact index, Nitrate, pH and Turbidity. Functional traits: tc1 = head length size, tc2 = head width, tm = mesonotum size, tg.Collector = collector, tg.Filterer = filter-feeder, tg.Scraper = scraper, op.gills = opercular gill presence

Discussion

Our results indicated that streams altered by mining activities exhibited different limnological conditions compared to preserved streams, especially regarding higher values of iron concentration, water temperature, turbidity, electrical conductivity and total dissolved solids. Contrary to what we expected and had predicted, the altered streams were more heterogeneous with each other concerning environmental variables (Fig. 2).

Some studies in Amazonian streams have shown greater environmental heterogeneity in more degraded areas than control areas (e.g. Guterres et al., 2021; Cruz et al., 2022). The greater environmental variability among these impacted streams may reflect various disturbances related to the management of grazing areas (Guterres et al., 2021; Leão et al., 2020). Guterres et al. (2021) reported that streams in areas of pasture with extensive and intensive cattle grazing had a higher environmental heterogeneity than the other streams, and that this pattern does not indicate greater local environmental integrity. The same findings were shown by Cruz et al. (2022) further indicating that undisturbed environments may have lower environmental heterogeneity because they have similar environmental conditions.

As our main findings, we highlight the highest functional beta diversity (Fβsor and Fβnes) observed in altered streams, contrary to what we expected according with the assumption that preserved streams have greater beta diversity. Regarding the communities’ structuring mechanisms, environment and space contributed similarly to explaining the total functional beta diversity, and the functional nestedness component was mainly driven by the environment, as expected. In addition, the spatial factor showed great relative importance for the total functional beta diversity. Our results confirm that studying biological communities by the functional beta diversity approach can provide new and important information about their ecological behavior and ecosystem functioning. Although Espinosa et al. (2020) did not find differences in mayfly taxonomic beta diversity between treatments at the same stream sites, we did find them in this study.

The highest values of the total functional beta diversity (Fβsor) found in altered streams indicate greater variability in functional traits of Ephemeroptera species, perhaps due to the greater environmental heterogeneity among streams in mining areas. Wang et al. (2021) reported that macroinvertebrates from dammed and undammed rivers in China showed a greater functional variation (functional beta diversity) at altered sites, and the increase in beta diversity does not mean that dams favor local diversity, but rather that the environmental dissimilarity among sites is broadened. It is possible that the pool of species found in the altered streams in this study was larger due to the various levels of alteration of the streams, ranging from indirect effects of mining in the basin drainage area, to direct impacts near the stream that may include removal of marginal vegetation.

Considering the functional dissimilarities, the high functional turnover (Fβsim, more than 83%) compared to the functional nestedness (Fβnes, 17%), this result is a typical finding highlighted in ecological studies in both taxonomic and functional approaches (Rocha et al., 2018; Soininen et al., 2018; Castro et al., 2020; Nicacio et al., 2020; Callisto et al. 2021; Wang et al., 2021). Despite the high percentage of functional turnover, preserved and altered streams were not different. These results indicate that trait replacement and functional composition are not directly related to the impact or environmental variation. Luiza-Andrade et al. (2020) mainly attributes the taxonomic and trophic variation of aquatic insects in the studied region (Serra dos Carajás) to the forest mosaic formed by ferruginous savannas (iron-rich rocky outcrops) and ombrophilous forest. We believe the functional turnover can also be mainly associated with this natural landscape variation. Instead, the functional nestedness component was higher in areas altered by mining indicating that the functional traits of the assemblages are a subset of the functional traits generated by differences in functional richness between the pairs of streams evaluated within each treatment (Baselga, 2010; Villéger et al., 2013). Nested patterns describe the orderly loss of organisms and traits in an assemblage (Patterson & Atmar, 1986; Wright et al., 1998) and are affected by many factors that can lead to species extinction or selective colonization (Atmar & Patterson, 1993). Our results showed that the communities in our study area are possibly being affected by an anthropogenic alteration.

The hypothesis that the environment would be the best predictor of functional beta diversity was partially supported, since environment had a stronger effect only of functional nestedness. Contrary to what we expected, space also played an important role in determining mayfly total functional beta diversity, showing that environmental selection and dispersal drive the functional dissimilarities between communities (Castro et al., 2020). The local factors are determinant in the functional dissimilarity of these communities, mainly the variables such as water temperature and impact index that increase the value with the environmental alteration (Castro et al., 2020; Luiza-Andrade et al., 2020). Regarding the spatial effects on total beta diversity, spatial vectors of broad scale were more important for communities, where of the six selected vectors, which explained the 7% of the total functional beta diversity variance, four were the ones with the broadest spatial scale (MEM1, MEM2, MEM3, and MEM4). Rocha et al. (2018) reported the importance of space for beta diversity (and its components) of macroinvertebrates from Finland, and recognized the growing evidence that factors and mechanisms operate at multiple spatial (and temporal) scales.

As we initially expected, the environmental variables had a stronger influence on functional nestedness. According to Castro et al. (2020), nestedness can result from several factors, such as different levels of tolerances between species, habitat heterogeneity and geographic isolation. These factors, combined with the influence of environmental variables as filters, are acting on the Ephemeroptera community. In addition, environmental variables such as dissolved oxygen and water temperature are important in the respiration of the mayflies and may be essential in the gain of the opercular gill trait, especially in altered streams mainly for protection of high concentrations of metals and particles in suspension. The turnover component was explained neither by the environment or space, which is an exciting result. In general, turnover (functional facets) is usually weakly explained by the environment, space, or even both (for lentic macroinvertebrates—Heino & Tolonen, 2017; for diatoms with respect to watercourse position—Jamoneau et al., 2018; for Neotropical freshwater fish—Paláez & Pavanelli, 2019). Branco et al. (2020) analyzed multiple facets of macroalgae beta diversity in tropical streams and found that the functional component as a whole was not significantly correlated to local environment, biome or space, as found in our study. They believe this unexpected finding may reflect the substantial spatial heterogeneity in crucial environmental factors among the stream habitats, resulting in considerable overlap of functional composition across communities and, consequently, no values for functional beta diversity.

Concerning the direct relationship between traits and environment, our results (RLQ) showed that the presence of the opercular gill may provide better establishment in environments altered by mining, like streams with a higher iron concentration and turbidity. Ephemeroptera nymphs are morphologically adapted and their gill adaptations have several functions (Zhou & Zheng, 2010), for example, breathing (Eriksen & Mœur, 1990), and protection of the lower gills (opercular gill), as observed in individuals of the family Caenidae (Notestine, 1994). The opercular gills have a protective function and cover the respiratory gills, protecting them from the suspended solids and sedimentation that can impair the absorption of oxygen (Salles et al., 2014). The genera Amanahyphes, Brasilocaenis, Caenis, Leptohyphes, Tricorythodes, Traverhyphes, and Tricorythopsis have an opercular gill and can therefore become better established in streams disturbed by mining, such as in environments with sedimentation (standing water or increased turbidity), than genera that do not have this type of gill. Our results also showed that the increase in total manganese reduced the occurrence of filterer genera. Some Ephemeroptera nymphs feed on debris and are, therefore, highly sensitive to changes in the substrate and any toxic material entering the water (Landa & Soldán, 1995). Metals such as iron and manganese are indicators of organic pollution (Baker et al., 2019) and can be toxic to aquatic organisms. Our results confirmed the negative effect that these variables can have, reducing the occurrence of organisms sensitive to this alteration.

We conclude that mining impacts can be observed at the level of functional traits, mainly in the variation (beta) between communities in environments under different environmental impacts, and in the relationship of functional traits with limnological variables. The analyses performed during this study showed that functional beta diversity and its components were tools to demonstrate anthropogenic effects on the composition and functional traits of Ephemeroptera genera. We also emphasize the importance of the functional study of communities, which indicates community structuring mechanisms that are not always achieved by taxonomic diversity. Therefore, we suggest that a functional beta diversity approach be used to complement results in future studies. We also emphasize that preserved areas should be prioritized, and that areas altered by mining may be selecting species of Ephemeroptera with similar traits that are resistant to these changes.