Introduction

Pollination is an essential ecosystem service and is mostly provided by insects, especially bees (Hymenoptera: Apoidea), which have been reported to be key pollinators of more than 70% of the about 1500 world crops (Klein et al. 2007; Ollerton et al. 2011; Garibaldi et al. 2013). The economic contribution of pollinators to crop production reaches a large extent (Gallai et al. 2009; Potts et al. 2016). Unfortunately, such great importance parallels nowadays the evident signs of increasing pressure on European honeybees (Apis mellifera Linnaeus‎, 1758‎) and of the decline of native wild bee species (van Engelsdorp and Meixner 2010; Potts et al. 2010), posing this ecosystem service at risk.

For wild bees, attempts to overcome such decline in agricultural areas is partially based on providing additional nesting support to that naturally occurring in the environment. For example, installing trap-nests, also called bee hotels, is effective to sustain cavity-nesting bees (Bosch and Kemp 2002; Junqueira et al. 2012; Maclvor 2017; Yamamoto et al. 2012), a guild including most of the (still few) non-Apis managed bee species (Garibaldi et al. 2017). By increasing nesting opportunities for such wild bees, together with sustainable honeybee management (i.e. that not limits wild bees’ fitness (Dupont et al. 2004; Paini 2004; Mallinger et al. 2017; Lázaro et al. 2021)), farmers can help face the rising demand for pollinator-dependent crops and avoid experience pollination deficits due to decline of natural populations (Garibaldi et al. 2014; Isaacs et al. 2017). Such cavity-nesting bees possess a typical gregarious nesting behaviour and commonly accept man-made nesting structures, e.g. tunnels in wood, reeds, paper straws or cardboards, making these species ideal for their reproduction as well as subsequent successful mass rearing (Maclvor 2017). Plans to favour an increasing abundance of wild bees are also important, since for most crops the pollination contribution of wild bees is equally important or sometimes even superior to that of honeybees (Apis mellifera) (Garibaldi et al. 2013; Eeraerts et al. 2019).

However, to optimize trap-nesting programs, it is necessary to analyse which factors drive the reproductive success of the target bee species. In fact, the population dynamics of wild bees are affected by many biotic and abiotic factors, such as food resources abundance and diversity, climatic conditions, landscape features and pressure from natural enemies (Steffan-Dewenter and Schiele 2008; Franzén and Nilsson 2013; Woodard and Jha 2017; Roulston and Goodell 2011; Papanikolaou et al. 2017).

A wide range of studies show, for example, that parasitism can greatly affect reproductive success in wild bees and that this is often directly density-dependent, despite inversely density-dependent or density-independent relationships have also been found (Antonini et al. 2003; Steffan-Dewenter and Schiele 2008; Palladini and Maron 2014; Groulx and Forrest 2017). Bee parasites’ occurrence, however, can also indicate good persistence of the host species population, that host species population has been present in a given area for a short time, or considerable abundance fluctuations. Furthermore, higher number and abundance of cleptoparasitic species may indicate the high quality of the environment (Sheffield et al. 2013). In addition, landscape features such as a high diversity and amount of semi-natural habitats often favour higher bee abundance (Steffan-Dewenter 2003; Steckel et al. 2014; Pascual 2022). Climatic conditions also have a heavy impact on bee reproduction and development (Bosch and Blas 1994; Ulbrich and Seidelmann 2001). Since all these factors may have differential importance depending on the geographical areas, studies devoted to this topic should ideally cover as many different regions as possible.

Here, we investigated how climate, land use and vegetation affect reproductive success in Osmia (Hymenoptera: Megachilidae) solitary bees nearby almond orchards in South-East Spain, a largely understudied Mediterranean area. Specifically, we measured nest occupation rate, brood productivity and parasitism rate. The genus Osmia Panzer, 1806, has almost 360 species described to date and it is distributed in the Palaearctic and the Nearctic region, with only few species recorded from the Oriental and Neotropical region (Michener 2007; Ungricht et al. 2008; Ascher and Pickering 2020). Osmia bees are univoltine or, more rarely, semivoltine and include some of the earliest emerging bees in spring, with males starting to fly a bit earlier than females. Females forage for pollen and nectar to provide food for their larvae, which develop in brood cells within the nests (Felicioli and Pinzauti 2008; Westrich 1989). Once developed, larvae pupate and then egress as adults. In some species, the freshly emerged adults still remain in the cocoon until the spring of the following year (Bosch et al. 2008).

The few species of Osmia currently considered adequate for mass-rearing and management in agricultural areas all nest in pre-existing tunnels. Female bees of these species indeed promptly use man-made structures for nesting and are known to be effective in increasing fruit set in economically important species such as almond, peach, apricot, plum, cherry, apple and pear (Torchio 1976; Felicioli and Pinzauti 2008; Bosch and Kemp 2002; Bosch et al. 2000; Sheffield 2014; Monzón et al. 2004). Hence, Osmia bees are now managed in different agricultural areas (Bosch and Kemp 2002; Cane 2006; Artz et al. 2013). While most species of Osmia are generalist in pollen use (Westrich 1989), they show a good pollen constancy, making them ideal when managed in or nearby the target crop fields or orchards (Westrich 1989). We choose to carry out our study in areas greatly exploited for almond cultivation. Here, honeybee hives were proved to be insufficient in large acreages planted in eastern and southern Spain (Bosch et al., 1992), making inadequate pollination a key cause, together with frost damage, drought and poor soils, of low production of almond in this area (Vargas and Romero 1987). On these trees, Osmia bees are known to be very efficient pollinators (Bosch et al. 2021), at least partially because almonds bloom very early (February-March) and because these bees are often the only ones on flight along with honeybees (Westrich 1989). While Osmia bee management was initiated in Spain almost 40 years ago (Asensio 1984), studies on reproductive success of these bees were confined to the North-Eastern part of the country (Bosch et al. 2021 and references therein). Thus, to our knowledge, this would be the first work to analyse the factors affecting the nesting and reproductive success of Osmia in South-Eastern Spain.

Materials and methods

Study area and trap-nesting protocol

Our study took place in a largely agricultural area including the municipalities of Bullas, within the Province of Murcia, and Elda and Monóvar, within the Province of Alicante (South-East Spain) (Fig. 1A-B). Within such sites, almond orchards are common and range from relatively small (826 trees in 5.9 hectares: Bullas) to very large (19,571 trees in 51.7 hectares: Elda and Monóvar) in size.

Fig. 1
figure 1

Location of the study area in the Iberian Peninsula (A), and location of the trap-nesting stations installed during the study (B). Examples of trap-nests are shown in C-D.

A total of 76 trap-nests were installed in 75 stations; only one station included two trap-nests (Fig. 1C-D). The trap stations were located at distances ranging from 0.9 to 12,325 m (average = 391.4 ± 171 m). Each of the 76 trap-nests consisted in a group of 24 (all but one trap) or 27 (one trap) stems of the common reed Phragmites australis (Cav.) Trin ex Steud (Poaceae). Hence, a total of 1827 stems were accommodated across the 75 trap-nest stations. Each reed stem was 15–20 cm long and had a hole diameter of 6 to 11 mm, and each trap-nest included an equilibrate combination of smaller and larger stem reeds to limit any possible bias in reproductive success due to differences in reed size (Bosch and Kemp 2000, 2002). Only one entrance per reed stem was offered for nesting, and we cut the stems in a way that they end at their nodes. The trap-nests were set at a height of 1.5-2 m above the ground, on available supporting structures, such as buildings’ roofs or stone walls. Trap-nests were placed at the periphery of almond orchards. Trap-nests were covered with a plastic surface in order to protect them from rain and to help the reeds keeping well packed (Fig. 1C-D). The trap-nests were established in the field between 27 of January and 7 of February 2017 and were removed between 18 and 22 of April 2017, i.e. at the end of the flying season for most of the species of Osmia occurring in Europe during spring. Nests were subsequently carried to the laboratory for their opening and content analysis.

Once the trap-nests were collected at the end of the flight season, we first discard those reeds which resulted unoccupied, i.e. those which had no signs of bee use as nests. The number of occupied nests by Osmia was used to calculate the nest occupation rate (OR, i.e. total number of colonized tunnels/total number of tunnels in the trap-nest). Since we wanted to analyse variables related with reproductive success, the opening and inspection of colonized reed tunnels were carried out only for those completed, i.e. those showing the typical nest plug at the entrance built by the occupying female at the end of provisioning and egg laying. Then, we recorded two further variables for the occupied nests. From each of them we recorded brood productivity (BP, i.e. total number of brood cells) and parasitism rate (PR, i.e. total number of parasitized brood cells/BP). Brood productivity was hence calculated per nest, not necessarily per female, since sometimes one female may build cells in more than one nest. However, this is not an individual-based study, and we were interested in studying if brood productivity in a nest depends on some environmental variables. In any case, the probability for a female to occupy more than one nest is not likely to be biased towards certain locations compared to others, and while we did not assume that the number of nests correspond to the number of females, in previous studies on Osmia and other trap-nesting bees (e.g. Palladini and Maron 2014; Wilson et al. 2020) this assumption was considered reasonable. Parasitism was recognized if individuals of non-bee or cuckoo bee species, both at immature (larvae, pupae) or adult stages, were found in the nest. Raw data of the variables used to calculate the response variables for the data analysis (OR, BP, PR) can be found in Table S1.

Osmia pupae from these nests were extracted from the brood cells in September-November 2017 and then given to the company WILDBIENE + PARTNER AG (Zurich, Switzerland) after cocoon identification, following a collaborative project aimed to implement mass-rearing of Osmia bees in agricultural areas in Southern Europe. However, to check species identity of nesters and natural enemies (see below), thirty reeds were kept in the lab at 4 °C to simulate winter and let the adults emerge the following spring.

Study species

During the field work, only individuals (especially males) of O. cornuta were occasionally observed on flight. However, three species of Osmia emerged from a subset of 30 tunnels from the installed trap-nests that were kept in the lab during the winter following the field work (see above). These species were Osmia cornuta (Latreille, 1805) (19 tunnels), Osmia tricornis Latreille, 1811 (8 tunnels) and Osmia latreillei (Spinola, 1806) (3 tunnels). However, since all the other nests were opened and analysed in September to obtain pupae aimed to be used in subsequent managing programs, it was not possible to ascertain which of the three species was associated with each of the colonized tunnel. All cocoons were, however, inspected to be sure they belong to Osmia, based on morphology, size and colour. Again, most of individuals could reasonably belong to O. cornuta or O. tricornis (82.8%, n of pupae = 530) since the cocoon was attached to both cell partitions (i.e. the walls build by the females to divide brood cells in the nests) and not only to the posterior one as in O. latreillei. Furthermore, the cocoon of O. latreillei lacks the silky outer layer typical of O. cornuta or O. tricornis (Bosch et al. 2001) and most of brood cells partitions were made from mud (as typical in O. cornuta and O. tricornis) and not chewed leaves (typical in O. latreillei) (Westrich 1989). Hence, while the data analysis was carried out without distinguishing the species (e.g.: Groulx et al. 2001), we can at least suggest that O. cornuta (which has a strong preference for Rosaceae as a pollen source and was proven to be an excellent almond pollinator (Westrich 1989; Bosch et al. 2021)) was likely the most abundant species in the studied area during our investigation.

Geographical, climatic, land-use and vegetation variables

To determine which environmental variables influence the productivity and mortality of Osmia in our studied nests we have collected longitude, latitude and altitude (as well as 3 combinations of latitude and longitude, following Lomolino et al. (2017) (geographical variables), 24 climatic, 7 land use and 7 vegetation variables (Table 1). For each trap-nest, the value of each variable consists of either the intersection of the geographic coordinate of the nest with the different raster information or the spatial query in a buffer of a given size (only in the case of land use).

Table 1 Geographical, climatic, land-use and vegetation variables used in data analysis

Climatic variables included the 19 ones related with temperature and precipitation available in WorldClim (https://www.worldclim.org/data/worldclim21.html), as well as 4 mean seasonal values of solar radiation (also from WorldClim) and 1 variable related with aridity (an index in which lower values mean higher aridity and higher values mean lower aridity and indirectly higher humidity, see Trabucco and Zomer (2018). Land use variables included 6 ones derived, at both 250 m and 1 km of buffer from the trap-nest, from the CORINE dataset (retrieved from Copernicus: https://land.copernicus.eu/pan-european/corine-land-cover). We choose these two buffer because Osmia cornuta and Osmia bicornis were reported, depending on calculations and methods, to have a maximum foraging distance of roughly 200–900 m (Gathmann and Tscharntke 2002; Hofmann et al. 2020). Furthermore, by using these two buffers we could verify whether spatial scale influences the effects of the habitat on the considered bee traits. The land-use types used here to characterize the nesting sites were urban (0), crop (1), pasture (2), forest (3), other (4) and water (5). We then used as variables in the statistical analysis the type of land use which was more abundant (CORINEMayor) and the diversity of land use types (CORINEVary). In addition, we included 1 variable related with urbanization (human population density), retrieved from the SEDAC/NASA: https://sedac.ciesin.columbia.edu/data/set/gpw-v4-population-density-rev11). Vegetation diversity was estimated by considering different measurements of the Enhanced Vegetation Index (EVI) (Tuanmu and Jetz 2015), retrieved from EarthEnv (https://www.earthenv.org/texture). In particular, we used the EVI’s coefficient of variation, homogeneity, evenness and the Simpson and Shannon indices. To obtain more understandable measures of the Shannon and Simpson indices, we have transformed these variables following Jost (2006), converting them into the true diversity variables of Hill’s series (q1, effective species = eShannon index; q2, dominant species = 1/Simpson index).

Statistical analysis

Because the 44 geographical, climatic, land-use and vegetation variables may be variably inter-correlated, we first performed a hierarchical cluster analysis of similarity among all variables (through the Ward method, Harrell (2001), which depicted a dendrogram (Dormann et al. 2013) and then used to select those later entering in the subsequent statistical analysis of the data (Fig. 2). The distance threshold used to identify different clusters in the dendrogram was set at 0.3 (i.e., less than 70% correlation occurred). From each recognized cluster, we finally choose a single variable with, in a few cases, a second variable that we consider to be equally biologically significant. The final set included 14 variables (Fig. 2).

Fig. 2
figure 2

Dendrogram obtained through the cluster analysis that was employed to select the relevant climatic, land-use and vegetation variables (highlighted by thicker branches and coloured names); the red horizontal line indicates the chosen distance-threshold to form the clusters (0.3). Different colours identify different major categories of variables, and those belonging to the same category are connected by coloured lines to correspondent symbols

We used two complementary approaches to detect which factors were relevant in explaining variation in the three dependent variables (OR, BP, PR). First, we used a Random Forest (RF) classifier algorithm to detect which selected variables are more important in explaining the variation in each of the three response variables. The RF classification and regression non-parametric approach, proposed by Breiman (2001), consists of an ensemble of decision trees. RF provides, through random permutation, an importance measure of the input variables which can be used to rank or select factors (e.g.: Gil-Tapetado et al. 2021). Here, we used the Conditional Inference Trees (CTree) algorithm (Hothorn et al. 2006) to fit to each of the trees to be grown for the forest. This procedure develops permutation tests, which address overfitting and variable selection biases by using a conditional distribution to measure the association between the output and the input variables, and considering the distributional properties (Williams 2011). For all RF analyses, we have considered 5000 trees as input. We performed 6 RF analyses considering the 14 selected independent variables and the four dependent variables. We arbitrarily decided to consider as “very important” the first four variables with decreasing values of importance.

Then, generalized linear mixed models (GLMMs) were used to assess the effect of the 14 selected independent variables on the four dependent variables. A Poisson error distribution was applied, and model selection was based on Akaike Information Criterion (AIC) (Akaike 1974). We first compared models carried out with and without latitude as random factor, by calculating and inspecting AICs and Bayesian information criterion (BIC, Schwarz 1978) values, and then performing χ2 tests. While in their original forms a larger value of AIC and BIC for a given model indicates a better fit of the data, it is common to see use the “smaller-is-better” form (i.e. when they are calculated directly from the − 2 × log-likelihood). Since AIC and BIC values were always lower in models with latitude (Table S1), we keep it as random factor. Categorical variables (i.e. CORINEMayor) which resulted significant in the GLMM were subjected to analysis of variance (ANOVA) to test for differences among categories. We also tested the relationship between parasitism rate and occupation rate and between parasitism rate and productivity by performing simple linear regressions. Since we recorded many nests with null mortality (see below), which strongly affected the goodness of these linear regressions, we decided to use both the complete dataset and a reduced dataset, by excluding all zeros from PR.

The statistical analysis was performed in R through the RStudio Software v 2022.02.2–485, R v 4.1.3 (R Core Team 2022). The RF analysis and the calculation of the variable importance was done in using the R packages party (Hothorn et al. 2006; Strobl et al. 2007, 2008) (‘libcoin’ (Hothorn 2021), ‘modeltools’ (Hothorn et al. 2020), ‘strucchange’ (Zeileis et al. 2022), ‘coin’ (Hothorn et al. 2021) and rattle (Williams 2011) (‘tibble’ (Müller et al. 2023), ‘bitops’ (Dutky and Maechler 2021). rattle was installed following the instructions of the developer of rattle package (https://rattle.togaware.com/). R package lme4 (Bates et al. 2014) (‘Matrix’ (Bates et al. 2023) was used to perform both GLMMs and simple linear models. The R package ggpubr was used to create the graphics (Wickham 2016). In the text, mean values are reported ± Standard Error.

Results

Out of the 1827 reeds from the 75 trap-nest stations, 530 were completed by the bees (leading to an overall occupation rate of 0.29) and were then used in all the subsequent analyses.

Occupation rate (OR) per trap-nest varied from 0.04 to 1 and was 0.59 ± 0.012 on average. The RF analysis showed that the “majority” category of land cover at a scale of 1 km (CORINE1KmMayor), the number of land cover categories at 1 km scale (CORINE1KmVary), the maximum temperature of warmest month (bio5) and the temperature annual range (bio7) were relevant to explain variation in OR (Fig. 3A). The GLMM gave importance to two of these variables: higher values of CORINE1KmMayor and lower values of CORINE1KmVary (that is, habitats with certain abundant land cover types and little land cover type diversity at 1 km scale) lead to an increase in OR (Table 2; Fig. 4A-B). In particular, ANOVA showed that OR was highest in pastures, followed by forests, and very low in crops (SS = 2.28, MS = 1.14, F = 25.82, df = 2, P < 0.0001, Fig. S1A). The GLMM showed a positive effect also of humidity (i.e. greater values of aridity index), vegetation diversity and heterogeneity (q2 and EvennessVegetation) (Table 2; Fig. 4C), and of spring and summer solar radiation on OR (Table 2).

Fig. 3
figure 3

Histograms of importances based on Random Forest for the 14 climatic, land-use and vegetation variables selected by the Cluster analysis. The variables are ordered top-to-bottom as most-to-least important in accounting for occupation rate (A), brood productivity (B) and parasitism rate (C)

Table 2 Results of Generalized linear mixed models (GLMM) for the four variables related with reproductive success in Osmia bees. Significant effects are in bold
Fig. 4
figure 4

Linear regression plots showing the effects of selected climatic, land-use and vegetation variables on occupation rate (A-C), brood productivity (D-F) and parasitism rate (G-I). Grey areas around regression lines indicate 95% confidence envelopes. Correspondence of the x-axis variables and their codes (see Table 1). Most abundant land use type (1 Km) = CORINE1KmMayor; Number of land use types (1 Km) = CORINE1KmVary; Vegetation heterogeneity = EvennessVegetation; Vegetation diversity = q2; Max temperature of warmest month = bio5_PI; Mean solar radiation in spring = radSpri

Productivity (BP) varied from 1 to 21 cells per nest and was 4.41 ± 0.19 on average. Following the RF analysis, the number of land cover categories at 1 km scale (CORINE1KmVary), vegetation diversity and heterogeneity (q2 and EvennessVegetation) and the precipitation of Warmest Quarter (bio18) were relevant to explain variation in BP (Fig. 3B). The GLMM revealed that productivity was positively affected by humidity (AridityIP), the maximum temperature of warmest month (bio5), vegetation diversity and heterogeneity (q2 and EvennessVegetation) (Fig. 4D, E) and of spring and summer solar radiation (Table 2). On the other hand, lower values of BP were recorded in sites with increasing values of temperature annual range (bio7), CORINE1KmVary (Fig. 4F) and urbanization level (Table 2).

From none to all of brood cells per nest were lost due to parasitism, and PR was 2.22 ± 0.45% on average. Most of the nests (489 out of 530) showed no signs of parasitism. Insect parasites found in the studied nests included species of kleptoparasites in the genus Cacoxenus Loew, 1858 (Diptera: Drosophilidae) and kleptoparasitic bees in the genus Stelis Panzer, 1806 (Hymenoptera: Megachilidae). Overall, 72 individuals of Cacoxenus and 11 individuals of Stelis were detected in the nests. The maximum temperature of warmest month (bio5) was by far the most important variable shaping PR, more than doubling the second-highest importance value recorded for precipitation of Warmest Quarter (bio18), following the RF analysis (Fig. 3C). This analysis also recognized as important variables the urbanization level and the spring solar radiation (Fig. 3C). The GLMM showed higher PR at sites with increasing precipitation in both wettest and warmest quarter (bio13, bio18), maximum temperature of warmest month (bio5) (Fig. 4G), summer solar radiation and CORINE1KmVary (Table 2). Parasitism rate was instead lower at sites with increasing humidity, temperature annual range (bio7), CORINE1KmMayor, urbanization level (Fig. 4H) and spring solar radiation (Fig. 4I) (Table 2). PR was highest in crops and lowest in pastures and forests (SS = 0.22, MS = 0.11, F = 5.4, df = 2, P = 0.005, Fig. S1B). Additionally, nests with more brood cells were affected by lower parasitism rate, but only when nests with null parasitism rate were excluded (with parasitism only: linear regression, R2 = 0.34, N = 41, P = 0.001; with all nests: R2 = 0.0001, N = 530, P = 0.82). On the other hand, nests in blocks with higher OR did not suffer lower or greater PR (linear regression, R2 = 0.007, N = 530, P = 0.61).

Discussion

In this study, we explored which environmental conditions may boost reproductive success of Osmia bees in trap-nests located nearby almond orchards, which are economically relevant in South-East Spain (International Nut and Dried Fruit 2020). If farmers plan to manage almond pollination with Osmia bees, selecting the best location for trap-nests in terms of bee occupation rate and brood productivity is a key point. Particularly since correctly integrating non-Apis pollinators into IPPM (integrated pest and pollination management) safeguards fruit production (Lundin et al. 2021). Indeed, the implementation of solitary bee management is hampered by both empirical studies and practical guidelines concerning, e.g.: the best nest location, density and spatial configuration (Eeraerts 2020; Garibaldi et al. 2020). Despite the intensification of agriculture and the loss of natural habitats are key drivers of the observed declines in bee populations in recent decades (van Engelsdorp and Meixner 2010; Potts et al. 2010), it is also true that mass-flowering crops (such as large almond orchards) seem to provide abundant resources for bees during blooming periods (Eeraerst et al. 2022).

We have found that both local (small-scale) climate and landscape features (i.e. vegetation diversity, urbanization level) affect nest occupation rate, brood productivity and parasitism rate in Osmia bees in the studied area. Previous studies converge in recognizing the influence of both climate and landscape on such bee parameters from trap nest-based studies.

Concerning landscape characteristics, a positive effect of increasing landscape complexity was observed, and was often associated with a greater vegetation diversity, i.e. a greater spectrum and abundance of floral resources. For example, previous studies showed that Osmia bees produce more females (the more expensive sex in terms of resource requirements) within landscapes with a higher proportion of semi-natural habitats (i.e. with greater supply of floral resources) (Galbraith et al. 2021; Zaragoza-Trello et al. 2021; Eeraerts et al. 2021). Accordingly, in our study, two parameters boosted occupation rate by the studied species of Osmia: q2 (diversity of dominant plant species) and EvennessVegetation (evenness of the Enhanced Vegetation Index), both linked to vegetation diversity and heterogeneity. Hence, these bees would more likely prefer nesting locations with such vegetation characteristics to assure an adequate foraging success during the breeding period. In general, flower resources represent the primary energy and nutrients source for both adult and larval bees and hence are considered to be a major driver of wild bee populations (Roulston and Goodell 2011). Proximity to supplementary floral resources was seen to promote reproductive success of Osmia lignaria Say, 1837 in North-American almond orchards (Boyle et al. 2020).

This also agrees with the effect of habitat types (CORINE categories) that we have found on the occupation rate. Indeed, trap-nests were more successfully colonized in areas with increasing pastures and forests, rather than in areas dominated by crops. Forest superiority over crops is somehow surprising. However, it may be related to the character of the local forests. For example, high abundance of spring flowering shrubs and trees, including the wind-pollinated tree species, like oaks, may boost the visits by females of some Osmia species for pollen collection. Not only abundance of certain habitats, but also a low heterogeneity of habitats (low values of CORINEVary) seems to boost both occupation rate and brood productivity. Also, accordingly with the importance of semi-natural habitats nearby nesting sites, we have found a negative effect of urbanization on productivity, though not on occupation rate. Possibly, urbanized areas provide a great availability of nesting substrates (e.g.: holes in walls) which may not compromise the overall abundance of nesting females.

In our study, vegetation diversity and heterogeneity increased brood productivity per nest as well; suggesting that such higher foraging success indeed happened under conditions of favourable vegetation. Landscapes with large quantities of foraging resources are likely to facilitate brood provisioning in bees (Roulston and Goodell 2011) and support larger source populations to colonize the trap nests. We suggest that vegetation diversity enhance Osmia reproductive success in conjunction with the great abundance of floral resources provided by the almond fields adjacent to the trap-nests stations. For example, Da Jauker et al. (2012) found that, in Osmia bicornis (Linnaeus, 1758), the number of produced offspring increased with availability of oilseed rape (as well as semi-natural habitats). Though, in the case studied by Jauker et al. (2012) oilseed rape likely benefits solitary bees in the form of abundant nectar (used more by adults for foraging flights) rather than pollen for larval provisioning, which was scarce in the brood cells. On the other hand, Eeraerst et al. (2021) found, for O. cornuta and O. bicornis, that most of the offspring (up to almost 90%) was produced during the period of mass-flowering of fruit trees (apple, pear and sweet cherry), decreasing afterwards. Based on their results, Eeraerst et al. (2021) suggested that, in fruit trees-rich landscapes, management needs to focus on providing additional floral resources to sustain viable populations of solitary bees after mass-flowering. In our case, the productivity can be maintained high at nesting locations with a diverse vegetation, as discussed above. Eckerter et al. (2022) also showed that semi-natural, flower-rich habitats such as hedgerows benefit the reproduction of Osmia bees in the vicinity of oilseed rape crops. In a multi-species (community-level) study, Dainese et al. (2018) also showed that trap-nesting bee populations grow markedly with the increasing availability of food resources in the landscape, including mass-flowering period of oilseed rape.

Concerning climatic conditions, we have found that temperature, and to a lesser extent precipitation and humidity, influenced occupation rate and brood productivity of Osmia bees. In megachilid bees, Fliszkiewicz et al. (2012) and Forrest and Chisholm (2017) suggested (the former) or showed (the latter) that the number of brood cells and the nest construction rate increase at warmer conditions, while Tobajas et al. (2021) found that the offspring production was higher in sunny aspects, i.e. that better heat up nests. On the other hand, in Osmia-pollinated orchards commercially high yields have been achieved also under bad weather conditions (Bosch and Kemp 1999). Humidity not only can affect access to water but is also critical because mud is required of females for nest construction, so it is not surprising that in our study more humid locations increased both occupation rate and productivity. Similar effects of humidity were observed in other studies on Osmia (e.g.: Boyle et al. 2020). However, it is not clear if the positive effect of higher temperatures on reproductive success necessarily implies that females select for hotter nesting sites, as these would jeopardize the larval survival due to overheating. For example, O. bicornis females were observed to avoid nest sites with temperatures above 28 °C and tend to choose nesting sites with 18–24 °C (Ostap-Chec et al. 2021). However, the study of Ostap-Chec et al. (2021) was conducted in Poland, where spring temperatures are not expected to be very high at the timing of O. bicornis occurrence, and the study was based on local managed population that was under selection for several generations.

We have found Osmia nests to be parasitized essentially by Cacoxenus flies, and to a minor extent by Stelis cuckoo bees. Both kleptoparasites consume the pollen–nectar provision within the brood cell, often killing the bee progeny through starvation, and were commonly found in Osmia nests (Krunić et al. 2005; Tlak Gajger et al. 2022; Zajdel et al. 2014; Shebl et al. 2018; Cane et al. 2007). Besides providing permanent forage and nesting sites, semi-natural elements seem to benefit pollinators also by mitigating negative effects of parasitism. It is thus not surprising that we have found parasitism rate to be lower when crop abundance increased. These results agree with a study on Osmia pumila Cresson, 1864, which found that brood cells experienced a 15-fold higher probability of parasitism in experimental cages with sparse bloom than in those with rich bloom (Goodell 2003). Brood parasites may also require a greater heterogeneity of habitats, since we have found higher parasitism rate at locations with higher CORINEVary. Furthermore, while parasitism seemed increased at higher temperatures such as their host bees, it was reduced at lower humidity levels and at higher solar radiation levels in spring, in contrast with their host bees. Previous studies reported variable results on the effects of landscape complexity and parasite infestation, with negative (Jauker et al. 2012), positive (Steckel et al. 2014) or no effects (Dainese et al. 2018; Eeraerts et al. 2022), suggesting that finer habitat elements besides complexity may be relevant, or that additional factors, including the occurrence of alternative hosts, may be relevant for parasite abundances.

Perhaps because of the partially opposite effects of climatic and land-use variables on brood productivity and parasitism rate, we have found a negative correlation between these two latter factors. This suggests an inverse density-dependent parasitism at the nest scale. Across nests of a given Osmia species, density-dependent parasitism was previously observed in several studies. For example, brood parasitism rate was negatively correlated with O. lignaria progeny density (Farzan 2018). However, such benefit is not suggested at population-level scale. That is, larger nesting aggregations (i.e. blocks with more occupied nests) did not provide in our study a lower impact from parasites. Nest abundance was either positively or negatively correlated with parasitism rate in Osmia bees. For example, nest cavity availability had a negative effect on Stelis cuckoo bee parasitism rate on O. lignaria, with lower parasitism rates occurring in nest blocks with more available cavities (Farzan 2018). On the other hand, parasitism of nest cells strongly increased with the number of actively nesting bees at a nesting block in a study involving multiple Osmia species (Groulx and Forrest 2018). Different reasons can be behind the variability in such results, which certainly are not contradictory or mutually exclusive. Indeed, besides nest density, nest architecture (Münster-Swendsen and Calabuig 2000), resource availability (Goodell 2003), foraging efficiency, age of the mother bee (Seidelmann 2006), choice of nesting material (MacIvor and Salehi 2014) and different parasitism strategies (Torchio 1979; Danforth and Visscher 1993) are known to affect parasitism rate in megachilid bees. As observed by data we retrieved from the literature (Medler 1967; Goodell 2003; Yokoi et al. 2012; Jauker et al. 2012; Prosi et al. 2016; Felicioli et al. 2017; Müller et al. 2020; Earaerts 2020), together with our own findings, a negative correlation between productivity and parasitism rate across species and populations of Osmia appeared (linear regression, R2 = 0.31, N = 29, P = 0.001) (Fig. S2A), but a non-significant association appeared between occupation rate and parasitism rate (linear regression, R2 = 0.17, N = 12, P = 0.18) (Fig. S2B).

In conclusion, it seems that Osmia bees nearby almond field in our Southern Mediterranean area would benefit from trap-nest installation in well solar-radiated, hot and humid sites with a diverse vegetation. Furthermore, since we have also found a negative association between brood productivity and parasitism rate, environmental conditions which improve brood productivity will also likely reduce parasitism in these bees. In addition to the above discussed factors influencing bee success from trap-nests, other factors are known to be important and should be taken into account while managing wild bees. For example, the type of nesting material (e.g. bamboo reed, paper or cardboard tubes, wooden laminar nests) may influence trap-nesting bees (Eeraerts et al. 2022). As well, the diameter and the length of the nesting tunnel provided in the traps are relevant for bees’ reproductive success (Seidelmann et al. 2016; Amininasab et al. 2021). However, in our study we have kept all such parameters essentially constant or in any case with no evident biases among sites, strongly suggesting that the observed variance in occupation rate, productivity and parasitism rate indeed depend primarily by the studied environmental factors.