yet , within its limited space , costa rica had a remarkable diversity of biological habitats : seacoasts on both the atlantic and the pacific ; four separate mountain ranges , including twelve-thousand-foot peaks and active volcanoes ; rain forests , cloud forests , temperate zones , swampy marshes , and arid deserts .