Species Composition and Functional Traits of Macrofauna in Different Mangrove Habitats in the Persian Gulf

Macrofauna play a key role in the functioning of mangrove ecosystems. Nevertheless, our understanding of the diversity and functional structure of macrofaunal communities across different habitats in the mangrove forests of the Persian Gulf is limited. In this study, we investigated species diversity and biological trait patterns of macrofauna in different mangrove-associated habitats, i.e., encompassing actual mangrove forests, and adjacent Beaches and Creeks, which exhibit different levels of habitat heterogeneity. Samples were collected from the different habitats in five different locations, over four seasons. A total of 122 macrofauna taxa were identified. The diversity of species was higher in summer than in winter. In the Beach habitats, species diversity showed an increasing trend from land toward the mangrove, whereas in Creek habitats diversity decreased from the Creek toward the mangrove. Multivariate community analysis showed differences in the distribution of abundant species and biological traits across all habitats. Deposit-feeding, crawlers, medium-size, and free-living were the dominant trait modalities in all habitats. The similarities within habitats over the four seasons had the same specific pattern of species and biological trait abundance in the Beach and the Creek, increasing from the non-covered habitat into the mangrove trees. Although many species shared similar traits, the abundance-driven differences in trait expression between habitats showed the importance of habitat filtering. The results of this study will be useful in the conservation of mangrove forests and they give a deeper understanding of the ecological patterns and functions of benthic macrofaunal communities in the Persian Gulf.


INTRODUCTION
Habitat complexity in vegetated areas is a key factor influencing the abundance and distribution patterns of macrofauna (Heck and Orth, 1980;Choat, 1982). Complex habitats provide different kinds of shelter and food resources for organisms (Willis et al., 2005), which facilitate high biodiversity (Kelaher, 2003), functional diversity, and stability in ecosystems. Mangrove forests are good examples of such complex habitats, since they are among the most diverse and productive habitat types in coastal areas (Alongi, 2008;Nagelkerken et al., 2008). The mangrove ecosystems are, however, under increasing threat due to human activities that reduce habitat complexity therefore also erode associated species and functional diversity (Alongi, 2008;Doney et al., 2009).
The mangrove ecosystems are one of the most productive coastal ecosystems globally (Lee, 1999;Kathiresan and Bingham, 2001), and are concentrated in the tropical and subtropical intertidal zones (Giri et al., 2011). These ecosystems experience high salinity, high temperatures, and extreme tides (Kathiresan and Bingham, 2001). Their unique characteristics make them an important provider of many ecosystem services. For example, they function as breeding grounds and nursery sites for many commercial fish and shrimp species (Carugati et al., 2018), provide shelter for many species during their seasonal migration, provide food for many species and thus indirectly affect the feeding of other animals (Samidurai et al., 2011;Thilagavathi et al., 2013). Mangrove ecosystems are very important to humans for aquaculture, forestry, and coastal erosion prevention (Nagelkerken et al., 2008), but are increasingly threatened by over-exploitation and pollution (Alongi, 2002).
Marine benthic invertebrates dominate the soft muddy sediments of the mangrove forests. The three-dimensional habitat results in distinct horizontal and vertical distributions of macrofauna in the mangrove ecosystem (Sivasothi, 2000), as they can live in the surface sediment (infauna) or on the sediment (epifauna; Carvalho et al., 2006), as well as around the pneumatophores and on the trunk of the mangrove trees. The distribution of macrofauna is affected by hydrological properties of the area (tides), water chemistry (e.g., temperature, pH, and salinity), sediment texture, competition, and human activities (Lee, 2008;Sihombing et al., 2017). The macrofauna play an important role in nutrient cycling, they are an important food source for larger organisms, and hence they constitute an important link between primary detritus at the base of the food chain and the consumers at higher trophic levels (Macintosh, 1984). They also enhance organic matter decomposition, by enhancing sediment oxygen penetration and by stimulating the activities of the microbial communities (Constable, 1999;Bremner, 2005). Any changes in the benthic communities would directly affect important ecosystem services provided by the mangrove habitat, such as primary and secondary production, production of commercial fish species and the transfer and cycling of nutrients (Herman et al., 1999;Levin et al., 2001;Austen et al., 2002).
A better understanding of the biological diversity and key functions of benthic invertebrate communities is fundamental for understanding how mangrove ecosystem functions might change due to different pressures. Moving beyond measures of basic taxonomic diversity to also consider the functional trait characteristics of macrofaunal communities is important for evaluations of potential ecosystem functions. Biological traits can describe the functions of an organism in the ecosystem (Shojaei et al., 2015), and biological trait analysis (BTA) thus explores information regarding the life cycle, morphological and behavioral characteristics of species present in a community (Bremner et al., 2006;Petchey and Gaston, 2006;Cadotte et al., 2011;Violle et al., 2014). The trait composition of benthic communities can help to understand community dynamics and their effects on ecosystem functions such as nutrient cycling, primary and secondary production, changes in sediment properties, and also the dynamics and stability of the ecosystem (Norkko et al., 2013;Goswami et al., 2017;Gammal et al., 2019). In recent years, many investigations have utilized a combination of taxonomic and functional trait diversity, which has developed our understanding of ecosystem function and supported efforts for better ecosystem management and conservation (Bremner et al., 2003;Rodil et al., 2013;Villnäs et al., 2019). Many studies on species diversity of macrofaunal communities in mangrove ecosystems have been conducted globally (Morrisey et al., 2003;Pravinkumar et al., 2013;Al-Khayat et al., 2019;Vahidi et al., 2019). There have also been many studies on macrofauna diversity of mangrove forests in the Persian Gulf (Soleimanirad et al., 2011;Keshavarz et al., 2012;Safahieh et al., 2012;Vahidi et al., 2019), as well as on the diversity of Mollusca (Ghasemi et al., 2011;Kabir et al., 2014), and Polychaeta (Soleimanirad et al., 2014). Studies on functional traits of macrofauna in mangrove habitats are, however, scarce (Leung, 2015;Chen et al., 2018), and to date, such studies have not been conducted in the Persian Gulf. Given that mangroves are such an important and diverse coastal habitat, but concurrently threatened by natural and anthropogenic pressures, such studies are needed to further develop our understanding of their biodiversity and functioning. Therefore, our aim was to investigate species diversity and functional traits of macrofaunal communities in a mangrove ecosystem in the Persian Gulf. Specifically, we explored the potential differences between mangrove-associated habitats having different habitat complexity. We sampled sediments in bare areas, areas with pneumatophores and then also areas in the mangrove forests from adjacent Beaches, and Creeks, respectively, to assess potential differences in structural and functional diversity of associated macrofaunal communities. Moreover, due to the potential for seasonal variations in environmental drivers (e.g., primarily temperature and evaporation) affecting both the structure and function of mangrove ecosystems we also sampled our habitats in winter, spring, summer, and fall.

Study Area
The Persian Gulf is a semi-enclosed sea in the north-western Indian Ocean that is connected to the Oman Sea through the Strait of Hormuz. It is located between the longitudes of 48-57 • E and the latitude of 24-30 • N (Figure 1). The maximum depth of the Persian Gulf is 100 m in the Strait of Hormuz, while the average depth of the basin is 35 m (Barth and Khan, 2008). Iranian mangrove forests are located between longitude 25 • 19 and 27 • 84 , in the northern part of the Persian Gulf and Oman Sea (Zahed et al., 2010). The mangrove forests cover 107 km 2 of Iran's coastal areas, (Danehkar, 1996(Danehkar, , 2001. Only two species of mangrove are found in the Persian Gulf, i.e., Avicennia marina and Rhizophora mucronata, of which A. marina is the dominant species in the Iranian mangrove forests. This study was conducted in the Hara Protected Area, which is designed as a Ramsar Site, an Important International Wetland, and a UNESCO Biosphere Reserve, with a total area of 465.81 km 2 (Scott, 1995;Mahdavi, 2001). The sampling was performed in two areas, (1) Qeshm Island, which is located between longitude 55 • 63 and 55 • 80 and has a mangrove area of 38.21 km 2 , and (2) the Khamir area which is located between longitude 55 • 51 and 55 • 60 and has a mangrove area of 10.5 km 2 .
The environmental conditions in the Persian Gulf vary with season, and the weather temperature is higher than 30 • C in summer (Behrouzi Rad, 1998;Zahed et al., 2010). Evaporation is typically higher than the annual rainfall in the Iranian coastal zone (annual rainfall is less than 200 mm; Al Mamoon et al., 2016). The salinity within the Persian Gulf mangrove forests is at a maximum of 50 g/l (Salehipour-Milani, 2018) depending on the tidal zone and potential evaporation. The tide is semidiurnal, with tidal ranges from 1 to 3 m at neap tides and 3-4 m at spring tides (Reynolds, 2002).

Sampling Design
In this study, we chose to investigate two sites (Beach and Creek) encompassing six different habitats arranged along transects either from the beach-ward side or from the seaward side of the mangrove forests. We focused on three intertidal Beach habitats (Figure 1) that described increasing habitat heterogeneity (based on substrate coverage), going from bare sediments (Beach 1) to sediments with pneumatophores Frontiers in Marine Science | www.frontiersin.org (Beach 2) and into the mangrove trees (Beach 3; Figure 1). Correspondingly, three intertidal Creek habitats were also selected to describe different levels of habitat heterogeneity, from bare sediments with oysters (Creek 1) to sediments with pneumatophores and oysters (Creek 2) and finally mangrove trees (Creek 3; Figure 1). All six habitats were investigated at five different sampling locations and at four different seasons (spring, summer, fall, and winter) to explore seasonal differences throughout 1 year. Hence, replication for each of the six habitats was obtained by sampling across the five different locations within the mangrove region. At each sampling, two to three replicate samples were obtained. The geographical locations of the sampling areas are shown in Figure 1 and Supplementary Table 1.

Biological Data
Macrofauna samples were collected in the intertidal Beach habitats (Beach 1-3) and Creek habitats (Creek 1-3) in the five locations during four seasons at low tide. Two to three sediment samples per habitat were collected using a quadrat of the size 25 cm * 25 cm, with a depth of 25 cm. All the sediment from the quadrat was extracted and subsequently each sample was sieved through a 0.5 mm mesh for retrieving the macrofauna, which thereafter was preserved in 70% ethanol and transported to the laboratory for species identification, counting and weighing. The macrofauna was identified to lowest taxonomic level possible and hence all taxa are referred to as species. To obtain characteristics of the macrofaunal communities within the different habitats, species richness (number of species), abundance (ind. m −2 ), and biomass (wet weight g wwt m −2 ) were calculated.

Environmental Data
During the collection of sediment samples, salinity and temperature were measured inside the quadrat by using a HACH Multi-parameter device. Sediment samples were taken from each quadrat for total organic matter (TOM) and grain size. After sampling, all of the sediment was dried. Total organic matter was measured as a loss on ignition (6 h at 550 • C). The grain size samples were sieved through a stack of sieves (500, 250, 125, and 63 µm). After sieving, each sediment fraction was dried at 60 • C and weighed.

Data Matrices
Four biological traits were selected to describe important functional attributes of the macrofauna community in the mangrove forests. The traits included were morphological (body size) and behavioral characteristics (feeding habit, living habit, and movement), as these are known to influence ecosystem functions (cf. Table 1). Each trait was divided into several modalities, which are shown in Table 1. A fuzzy coding approach was used to classify each species to the different modalities of the functional traits (Chevene et al., 1994). Each trait modality was assigned a value of 0 up to 1 for each species, where no affinity for a modality was coded as 0 and complete affinity was coded as 1. The fuzzy coded trait expressions of individual species were scaled up by correcting each modality for species-and sample-specific abundances, creating an abundance corrected trait matrix. The traits were foremost appointed based on information from trait databases such as MarLIN BIOTIC 1 , the World Register of Marine Species 2 , and the polytraits database 3 .

Data Analysis
Data analyses focused on differences between habitats and seasons. There were six different habitats (Beach 1-3, Creek 1-3), and four different seasons (winter, spring, summer, and fall). The replication for each habitat and season was obtained by sampling across the five different locations within the mangrove region (N = 5), where the average of two to three replicates per habitat represented one sampling occasion.
A two-way ANOVA was used for identifying differences in environmental parameters (salinity and temperature) between habitats and seasons. That assumptions of normality and homogeneity was fulfilled was checked prior to the analyzes (Shapiro-Wilk normality test and the Levene's Test for homogeneity of variance), while a HSD post hoc analysis (Tukey's) was used for exploring the interaction between habitat and season, using R (version 4.0.1). Permutational ANOVA (PERMANOVA) was run for identifying differences in sediment organic matter, as the data did not fulfill requirements of ANOVA, although transformed. A principal component analysis (PCA) was run to explore and illustrate the habitat-specific differences in grain size of sediments across all habitats and seasons, using Primer v. 7 (Clarke and Gorley, 2015).
For exploring between habitat and seasonal differences in benthic abundance, biomass and traits, permutational ANOVA (PERMANOVA) was run, after checking that the data fulfilled the criteria of homogeneous dispersion (PERMDISP). As the analyses revealed significant differences in benthic community structure and function foremost between the winter and summer seasons, further temporal comparisons focused on these two seasons. Non-metric multidimensional scaling (nMDS) was used to illustrate the differences in 2-dimensional space, while the SIMPER procedure was used to identify the species and traits that contributed most to the similarities and dissimilarities within and between the different habitats, respectively. Analyses of community composition and functional traits were performed using Primer v. 7 (Clarke and Gorley, 2015) and PERMANOVA+ (Anderson et al., 2008).

Environmental Variation Between Habitats
The environmental data showed that while parameters such as salinity differed both between habitats and seasons. Temperature showed stronger seasonal variation, which were habitatdependent ( Table 2 and Supplementary Table 2). For example, the highest salinity value was observed at Beach 1, while Feeding types contribute to production and trophic support, and play a role in nutrient uptake and re-cycling (Norling et al., 2007).
Move on the sediment surface. Live in burrows within the sediments. Sessile or very limited movement.
Evasion of physical disturbance, predatory-prey activities or the creation of biological structures (Hinchey et al., 2006).
Lives in burrow constructed by other organisms or themselves. Free-living in the sediment. Lives in a tube of its own construction.
Attached on the surface to hard substrates or on the bodies of other creatures.
The trait affects habitat complexity and can influence nutrient recycling and trophic support (Bremner et al., 2006).
Represents biomass and biovolume, also affects the activity and function in the ecosystem (Brown et al., 2004).  Creek 1 had the lowest salinity ( Table 2 and Supplementary  Figure 1). The seasonal variation in salinity was lowest at Creek 2 and Creek 3 (Supplementary Figure 1). Temperatures were fairly similar across habitats, whereas there was more variation over the seasons (Supplementary Figure 1), ranging from a minimum of 19.3 • C in winter and maximum 35.6 • C in summer. The interaction between habitat and season was significant for temperature and salinity (two-way ANOVA; Supplementary Table 2). There were differences in sediment organic matter content between the six habitats (Figure 2 and Supplementary Table 2), but the results showed no difference between seasons, nor interactions between seasons and habitats. (PERMANVOA, Supplementary Table 2 and Figure 2). The highest average values of total sediment organic content were observed in the mangroves in Beach 3 and Creek 3, 12.4 ± 3.6% and 11.4 ± 2.9% (±SD), respectively. According to the pairwise test, these habitats differ from the outer habitats (i.e., B3 vs. B2 and B1 and C3 vs. C2 and C1; p < 0.05). The lowest average organic matter content was observed in Creek 1 (Figure 2) and this habitat was significantly different from the other habitats, except from Creek 2 (PERMANOVA; p < 0.05).
The PCA analysis of sediment grain size showed that Beach 3 and Creek 2 and 3 were similar in terms of grain size (Figure 3). All habitats had muddy sediments, but these three sites (B3, C2, and C3) had an average mud fraction (i.e., <0.063 mm) of >88% (Supplementary Figure 2), whereas the other sites had slightly higher proportions of sand and their mud contents varied between 69 and 78%. The PCA also indicated that the grain size was more similar throughout the year in Beach 3, Creek 2 and 3, since all four data points of each habitat were relatively well clustered.

Species Diversity
A total of 122 species that belong to 71 families were observed in the six habitats over the four seasons, consisting of crustaceans (14 species of Decapoda, 1 species of Isopoda, 1 species of Stomatopoda, and 1 species of Sessilia), Mollusca (56 species of Gastropoda and 24 species of Bivalvia) and Annelida (24 FIGURE 2 | Sediment total organic matter content (TOM%, average ± SD) per habitat and in the different habitats across seasons. species of Polychaeta and 1 species of Sipuncula). Each species showed different distribution patterns depending on habitat and season, and some of the species were only observed during one season. The largest contrasts in species diversity were observed between winter and summer (Supplementary Tables 3-5). In winter a total of 56 species, including Crustacea (13 species of Decapoda, 1 species of Isopoda, 1 species of Stomatopoda, and 1 species of Sessilia), Mollusca (16 species of Gastropoda and 4 species of Bivalvia) and Annelida (19 species of Polychaeta and 1 species of Sipuncula) was observed. Whereas, in summer a total of 78 species were recorded, including Crustacea (11 species of Decapoda and 1 species of Sessilia), Mollusca (30 species of Gastropoda and 19 species of Bivalvia), and Annelida (16 species of Polychaeta and 1 species of Sipuncula; Supplementary Table 3). The results showed that the species diversity in summer was higher than in winter except at Beach 1 and Creek 3. During both seasons, Mollusca was the most abundant group in the communities, making up 35.7 and 62.8% of the total abundance in winter and summer, respectively.

Abundance and Biomass
The abundance of species in the six habitats across all seasons was on average, 1119 ± 113 ind. m −2 (avg. ± SE) and the biomass was 180 ± 20 g m −2 (avg. ± SE). Significant differences were found in both benthic abundance and biomass between habitats as well as seasons, but their interaction was non-significant (Table 3 and Supplementary Table 6). When including all seasons, MDS of abundance ( Figure 4A) and biomass ( Figure 4B) illustrate the differences between the habitats. The habitats Beach 2 and Creek 3 had the highest and lowest abundances and biomass, respectively. Interestingly, when including all seasons, the SIMPER analysis showed that similarities within habitats showed a corresponding pattern when comparing the Beach and the Creek habitats (Table 4). In both the Beach and the Creek, within similarity values increased from the outer sites (Beach 1 and Creek 1) toward the mangrove (i.e., Beach 3 and Creek 3). The highest dissimilarity between habitats was found between Beach 1 and Creek 1 and the lowest dissimilarity between Beach 2 and Beach 3 ( Table 4). For abundance, the species Pirenella cingulata consistently contributed the most to within-habitat similarity as well as between-habitat dissimilarities in the Beach habitats. However, in Creek habitat 1, the species Opusia indica contributed the most to within-habitat similarity, while in Creek 2 and 3 Assiminea sp. had the highest contribution to both withinhabitat similarity and between-habitat dissimilarities. Overall, these species (P. cingulata, O. indica, and Assiminea sp.) were the ones that contributed the most to differences within and between habitats.
As the clearest divergences were observed between winter and summer (PERMANOVA ; Table 3 and Supplementary Table 6), we focused on comparing habitat differences during these two seasons. The total abundance of species across the habitats in winter and summer were 817 ± 170 ind. m −2 and 1211 ± 260 ind. m −2 , respectively, while the total biomass was 165 ± 47 g m −2 and 177 ± 34 g m −2 , respectively.
In winter, different patterns in similarity within the Beach and Creek habitats were observed, as there was a rising trend from Beach 1 to Beach 3, while in the Creek, the gradient was not clear and the lowest similarity values were noted at Creek 3 (Table 4). Regarding the dissimilarity between habitats, the highest value was observed between Beach 1 and Creek 1, while the lowest value was detected between Beach 2 and 3 ( Table 4).
In summer, the within-habitat similarity values increased from Creek 1 to 3, while for the Beach, they increased from Beach 1 to 2 but dropped drastically at Beach 3 ( Table 4). The highest dissimilarity between habitats was noted between Beach 1 and Creek 2, and the lowest dissimilarity between Beach 3 and Creek 3 ( Table 4). Considering the high similarity of species composition in the mangrove trees (B3, C3), these habitats showed a more stable species composition during the seasons. The dominant species across all habitats included the crustaceans O. indica (Alcock, 1900), species of gastropods P. cingulata (Gmelin, 1791) and Assiminea sp., the bivalve Dosinia sp. and polychaetes belonging to Capitellidae and Nereididae (Supplementary Table 4), and differences in similarities and dissimilarities within and between habitats were foremost determined by changes in species abundance and biomass.

Trait Composition
The combination of traits in different habitats and seasons revealed that trait modalities such as medium size, depositfeeding, crawler, and free-living dominated. Non-metric multidimensional scaling (nMDS) of the abundance-corrected trait expression ( Figure 4C) showed differences between habitats, which were confirmed by PERMANOVA (p = 0.0001; Table 3). However, there were no clear difference in trait composition across seasons (Table 3). In all habitats, the composition of trait modalities for each trait was almost the same, but the percentage contribution differed, which led to the observed differences between habitats. The similarities within habitats in the Beach and the Creek, over the four seasons, had the same specific pattern as noted for abundance, increasing from the non-covered habitat (Beach 1 and Creek 1) to the mangrove trees (Beach 3 and Creek 3; Table 5). The highest dissimilarity between habitats was found between Creek 1 and Beach 1 and the lowest dissimilarity between Creek 1, 2, and 3 (cf. Table 5 and Supplementary  Table 6). The main modalities of the traits that contributed similarities and dissimilarities within and between habitats were "medium size, " "free-living, " and "crawler." Regarding the similarity between habitats during the winter season, the highest value was observed between Creek 3 and 2, and the lowest value between Beach 1 and Creek 1 (Figure 4C and Table 5). In summer, the similarity within habitats increased from Beach 1 to 2, and dropped toward Beach 3, while an increase in similarities was observed from Creek 1 to Creek 3. The highest dissimilarity between habitats was observed between Beach 1 and TABLE 3 | Two-way PERMANOVA testing differences in benthic community abundance, biomass and traits between the four seasons (n = 5) and the six habitats (n = 5). Creek 1, and the lowest dissimilarity between Beach 3 and Creek 3 ( Table 5).
Of the trait body size, medium and small sizes were highly abundant in all habitats over all seasons. Very small, small, medium, and large modalities showed similar patterns in the Beach habitats, characterized by an increasing trend in size from Beach 1 to 2 while they decreased toward Beach 3 ( Figure 5A). The Creek showed a decreasing abundance-directed prevalence of body size modalities from outer to inner habitats (Creek 1 to 3). An exception was observed for large size, which increased toward the inner habitats ( Figure 5A). The trait feeding habit was dominated by deposit feeders and scrapers/grazers, which were highly abundant in the Beach habitats over all seasons, whereas the Creek habitats were dominated by deposit feeders and suspension/filter feeders. All feeding modalities expressed the same pattern across the Creek habitats, indicating a decreasing abundance-directed prevalence across the transect into the mangrove forest. In the Beach habitats, suspension/filter feeders were the least abundant at Beach 2, while all the other modalities showed the opposite pattern ( Figure 5B). Regarding species movement and living habit, both the Beach and the Creek habitats were dominated by crawlers and free-living organisms (Figures 5C,D). Interestingly, burrowers and sessile and/or attached invertebrates were more dominant in the Creek compared to the Beach (Figure 5C).

DISCUSSION
In this study, we explore the biodiversity of macrofauna across different mangrove-associated habitats, i.e., mangrove forests, Beaches and Creeks, and provide the first quantification of functional traits for the mangrove ecosystems in the Persian Gulf. We show habitat-specific differences in community structure and biological traits. We further demonstrate that species and functional diversity remains reasonably consistent between the different habitats but that there are marked changes in environmental variables and biodiversity between summer and winter.

Environmental Variability and Species Community in Different Habitats Across Seasons
Knowledge of environmental conditions is crucial for understanding the ecological processes within ecosystems and for understanding the temporal and spatial distribution of biodiversity of organisms and traits. The ranges of temperature and salinity within this study were similar to other studies in mangrove forests in other areas in the Persian Gulf and Indian Ocean ( Table 6). The grain size did not change seasonally, but there was a significant difference between habitats, which was similar to observations in Nayband Bay mangroves (Hamzavi et al., 2012), while in Hara Biosphere Reserve, no spatial changes in the sediment characteristics were reported between stations and habitats (Vahidi et al., 2019). The measured values of organic matter in our study were highest in habitats associated with mangrove trees. Sediments among the mangrove trees and roots (habitats B3 and C3 in this study) had higher organic matter content than habitats without vegetation, which can be due to increased retention of organic matter and, for example, the decomposition of mangrove leaves in the soil, which subsequently increases the organic matter content (Chen and Twilley, 1998). In our study, sediment OM content did not show seasonal differences. In contrast, differences in OM between winter and spring have been reported in the Nayband Bay mangrove forest (Hamzavi et al., 2012).
Altogether we identified 122 macrofauna species in the different habitats, and the observed species composition (Supplementary Tables 3, 4) was similar to the one earlier reported from Hara Biosphere Reserve [with Gastropoda dominating (39%), together with Bivalvia (25%), Crustacea (24%), Polychaeta (11%), and Oligochaeta (2%; Vahidi et al., 2019)]. We found that species diversity and abundance in the habitats were clearly different from one another, most likely due to tidal differences and habitat complexity. The habitat Beach 1 showed the lowest species diversity of all habitats, because it was located at the upper limit of the tide and was most of the time without water. The low immersion time and high evaporation (as evidenced from high salinity) in combination with a lack of mangrove trees and other seagrasses make it a stressful habitat. It has been shown that this habitat is not a good refuge for a number of organisms (Méndez, 2002), if they are not specially adapted to the specific environmental conditions. Crabs, however, were more abundant in places where the immersion time was less. Immersion of mangrove plants in water can reduce the number of associated crabs (Choy and Booth, 1994), which can be one of the reasons why the crabs are more commonly found at the top of the tidal limit in the Beach habitats. The habitat Beach 2 was covered with pneumatophores or seagrass that provided good shelter for many organisms, which resulted in increased species diversity. For example, more species of polychaetes were observed in Beach 2 than in Beach 1. In the habitat Beach 3, the mangrove vegetation structure affected the epifaunal community, as the number of decapod species decreased, while species of bivalves, gastropods, and polychaetes increased. This was the most diverse Beach habitat. The molluscs are a key component of the mangrove food webs and they play an important role in the abundance of sea birds (Al-Sayed et al., 2008). For example, families of Gastropoda, Assimineidae, Potamididae, and Stenothyridae dominate the mangrove forest and occur in high abundances in the Persian Gulf (Rouhipour, 2008;Ghasemi et al., 2011), which is also what we found in our study.
The habitat Creek 1 was, however, the most diverse in terms of species across all seasons. This habitat included the presence of oysters, which facilitated a high diversity of bivalves and gastropods (cf. Lam and Morton, 2004). The substrate of Creek 2 was covered with oysters and pneumatophores. The habitat Creek 3 was located in the upper limit of the tide and the substrate of this habitat was covered with mangrove trees. This provided an important refuge, especially for species belonging to Decapoda, which showed the highest diversity here.
Globally, many studies regarding the diversity of macrofauna species in mangrove environments have been performed, but the reported species diversity vary markedly between studies. One of the reasons behind differing species diversity between different areas might be the varying sampling methods and sampled habitats. The structure of the macrofauna communities was different in this study, compared to other mangrove studies focusing on trees only (Lee, 2008;Leung, 2015), due to the wide range of examined habitats in this study (i.e., among mangrove trees, pneumatophores, oyster banks, and mud across the full tidal range).
The seasonal variation may also affect the biodiversity in mangrove habitats. We showed that during summer, the species diversity was higher than winter, potentially because of the seasonal migration of species into the mangroves (Barletta et al., 2003). However, a study in the Bardestan mangroves reported a higher species diversity in winter than in summer (Vazirizadeh et al., 2011). Studies in Mundra, Kharo, Kachchh, and Gujarat mangroves reported a higher species abundance and richness during summer monsoon periods. Higher levels of abundance and diversity were likely facilitated by the large input of freshwater, which reduced the salinity (Thivakaran and Sawale, 2016). It is clear that different mangroves have different effects on the diversity of macrofauna communities and result in the formation of distinctly different communities that vary seasonally. For example, in Indian mangrove forests, polychaetes were the dominant species, followed by molluscs and crustaceans. Their population density showed seasonal variation, as the maximum densities were recorded in summer and during the pre-monsoon while the minimum was recorded during the monsoon (Samidurai et al., 2011). One of the reasons for the high abundance and diversity of polychaetes among the mangrove trees is the stability of the sediments that are created by the trees and their roots combined with higher levels of organic matter. The mangroves thus provide suitable areas for recruitment and protect the polychaetes from drying out (Divakaran et al., 1981). The predominance of molluscs in the mud habitat can, on the other hand, be attributed to the tidal currents that provide food (Little, 2000).

Trait Composition in Different Habitats
Biodiversity, as well as the trait expression of organisms, are affected by habitat heterogeneity (Hewitt et al., 2008), but sometimes the use of species composition does not show clear results for habitat differentiation. In such cases, trait analysis may reveal habitat differences, as organisms with compatible traits are adapted to certain habitat types and environmental conditions (environmental filtering; Poff, 1997). We found that differences in the structural complexity of the habitats affected the trait expression of the macrofaunal community, as the particular habitats had an impact on the distribution of modalities for each trait.
Feeding habit is one of the most important factors structuring invertebrate communities (Pearson and Rosenberg, 1987). It also demonstrates the adaptation of species to various hydrodynamic conditions with, for example, suspension feeders being more prevalent in high flow environments (Edgar and Moore, 1986) while deposit feeders are more common in depositional environments with lower water flow. In this study, deposit feeders were the dominant feeding group in all habitats. The most abundant deposit feeders were crabs and some species of molluscs, which showed particularly high densities in the Beach habitats. Most of the crabs are solely deposit feeders, whereas the molluscs can exhibit both deposit-feeding and grazing. The Creek habitats were different from the Beach  (24) Crustacea (17) Sipuncula (1) Observe that the area and habitats sampled are diverging between the studies.
habitats as these habitats had a high abundance of both deposit feeders and suspension feeders, caused by the high presence of bivalves. These are favored due to the highwater flow, which provides a constant supply of food due to the high concentration of suspended substances in the water (Rand et al., 2018). It has also been reported that in areas covered with algal mats and pneumatophores, surface deposit-feeding is often the dominant feeding habit, whereas carnivores are more abundant in mudflat habitats (Leung, 2015). In general, sandy sediments have been shown to be dominated by suspension feeders, whereas muddy sediments are dominated by deposit feeders (Rhoads and Young, 1970;Paganelli et al., 2012). The observed differences in feeding modalities between habitats suggest that nutrient uptake and energy flow have different pathways. For example, organisms that feed on the sediment surface cause an increase in the exchange of particles between the water column and the sediment surface, thus they play an important role in the nutrient cycle (Sandnes et al., 2000). Nutrient recycling processes and secondary production are typically high in mangrove sediments because of their high sediment organic content and fine grain sizes. Although the carbon, energy, and nutrients in the detritus/sediment of mangrove communities are derived from a variety of sources, the main source is mangrove leaf litter and roots (Alongi, 2014).
The seasonal changes between the wet and dry seasons may change the amount and composition of modalities of traits. This study indicated that the feeding modalities within the Beach habitats were the same in summer and winter, but in the Creek habitats a slight difference was observed between the two seasons, due to variation in the diversity and abundance of Mollusca. In general, the feeding groups have been associated with changes in plant density, coverage and total nitrogen content of the sediment, as well as different food resources in mangrove forests during succession. For example, Chen et al. (2018) showed that phytophages were dominant regardless of mangrove succession stage, but as succession proceeded, omnivores increased because tree density and coverage were suitable for omnivores. Macrofauna uses a wide range of relatively nutrient-rich food sources rather than fresh mangrove leaf litter in mangroves (Lee, 2000). Studies have shown that macrofauna feeds mainly on microphytobenthos in natural mangrove habitats (Nagelkerken et al., 2008), while carnivorous feeding type is more prevalent in the coarser sediment (Oug et al., 2012). Filter-feeding and deposit-feeding prevail when the organic matter in sediment increases (Sivadas et al., 2013).
The trait body size was dominated by small and medium sized species in this study across all habitats, and showed no difference between summer and winter. Body size is one of the most fundamental traits as it correlates with other traits, and their related processes (Norkko et al., 2013), such as food web structure, trophic levels, and energy flow in the ecosystem (Gerlach et al., 1985). Also, body size can be indicative of disturbance, movement of organic matter, and biological interactions in a community. Posey (1987) showed that the maximum body size decreased in the mangrove habitat with an increasing number of pneumatophores, potentially because the dense root structure may inhibit burrowing and feeding activities of the large-sized species, whereas in the mud habitat the maximum body size was larger. In contrast, our results showed that the size patterns were similar in all habitats.
In this study, trait modalities regarding "movement" and "living habit" were related to each other so that the type of movement reflects the living habit (cf. Table 1). The most abundant movement modality in our study was crawler, which was dominant in all habitats, whereas the dominant living habit was free-living. The other modalities differed between habitats, for example, Beach 1 and 3 and Creek 2 were dominated by modalities such as sessile and attached, due to the presence of molluscs, especially bivalves. Beach 2 and Creek 1 and 3 were dominated by burrow dwelling organisms, due to the presence of crabs and polychaetes. The modalities crawler and burrower overlapped one another partly because some species of crabs, worms, and bivalves were classified as both crawler and burrower. In accordance with our results, it has been reported that burrowers often are dominant in all mangrove habitats, but their abundance may decrease in habitats with algal mats, and pneumatophores (Leung, 2015). Surface crawlers are frequently found in habitats with sandy sediments (Kun et al., 2019), bare mud, algal mats, and pneumatophores (Leung, 2015). In this study the habitat Beach 1 was significantly different from the other habitats, which may be due to the stressful conditions associated with the high intertidal, resulting in lower species diversity. In comparison, Wong and Dowd (2015) showed that patterns of taxonomic and functional traits of macrobenthic invertebrates across sea grass habitats differed depending on the site, and that species diversity was lowest in non-covered habitats. They found that species diversity and the composition of species were consistent with patterns in functional trait composition, although habitat segregation was weaker based on functional traits and mainly due to differences in the relative abundance of trait expression (Wong and Dowd, 2015).
In this study, it can be concluded that functional traits were distributed in a similar manner along the Beach and Creek transects, but there were abundance-driven differences in the trait expression between the transects, showing the importance of habitat filtering (cf. Table 5). The filtering effect is supported by the dissimilarities in trait expression between the Beach and the Creek habitats (Table 5), and is also underpinned by observed changes in the number of individuals within trait modalities between habitats (Figure 5). For example, the trait "feeding habit" was dominated by deposit feeders and scrapers/grazers in the Beach habitats over all seasons, whereas the Creek habitats were dominated by deposit feeders and suspension/filter feeders. In addition, burrowers and sessile and/or attached invertebrates were more dominant in the Creek habitats compared to the Beach habitats.
It is known that a range of environmental factors affect the trait diversity of the macrofauna (Park et al., 2008). For example, the functional groups of tube-dwellers/burrowers and deposit feeders are often abundant in silty-sand habitats, whereas sandy sediments often are characterized by motile surface crawlers and carnivores/scavengers (Kun et al., 2019). Water depth often also affects trait distributions, with large-sized, long-lived epifauna being more prevalent in shallow water, whereas in deeper water small-sized, short-lived burrowing infauna is more common (Pacheco et al., 2011). In mangroves, sediment properties are highly correlated with the root structure, which can decrease oxygen penetration into the sediment and affect the distribution of macrofauna and their trait patterns. For example, Leung (2015) showed that modalities such as maximum body size and feeding habit were affected by habitat heterogeneity, so that an increase in habitat heterogeneity led to the predominance of small body size and reduction of carnivores. Indeed, vegetated habitats provide refuge for many organisms, due to a decreased predation pressure, while in non-vegetated habitats the predation pressure often is high.
Importantly, other studies have observed changes in diversity and composition of traits along environmental transects, for example, in the Laptev Sea, shallow and deep habitats were separated based on differing trait expression (Kokarev et al., 2017). Also along the Emilia-Romagna coastline, the trait expression of the community was different closer to the coastline compared to offshore (Paganelli et al., 2012) and similar results have been found in the Baltic Sea (Villnäs et al., 2019). In our case, the similarity within functional traits per habitat could reflect that the functional trait expression is often controlled by species abundance. The dense root structure of mangrove forests could lead to trait convergence (Villéger et al., 2008), and the presence of many functionally similar species in the mangroves indicates that the ecosystem functions can potentially be robust to changes in species richness. Macrofauna communities in estuarine ecosystems have high resilience to environmental variations because the macrofauna has been adapted to a high degree of variability (Dimitriadis et al., 2012). That we could show a difference in the abundance of specific modalities between habitats, shows the potential importance of habitat variation to ecosystem functioning.

CONCLUSION
This study describes the composition and diversity of macrofauna biological traits in different habitats of mangrove forests in the Persian Gulf. The results showed that the patterns of species and traits in Beach and Creek habitats differed. In the Beach habitats, the diversity of species increased when getting closer to the mangrove trees, while in the Creek habitats the diversity decreased toward the mangrove trees, due to the presence of oysters in Creek 1. The dominating body sizes (medium and small), were similar across all habitats, but feeding habit, movement and living habit preferences differed between the Creek and Beach habitats. The differences in species diversity and functional traits were due to differences in habitat heterogeneity, specifically, the habitats that provided more habitat heterogeneity and refuge often promoted the structural and functional diversity of the benthic community. That habitat variation is a driver of functional composition and diversity, shows that habitat heterogeneity should be considered in studies that examine the effect of species loss on ecosystem functioning. Such studies would help us to better understand and manage ecosystems for securing a sustainable future.

DATA AVAILABILITY STATEMENT
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation, to any qualified researcher.