Investigating the effect of Na$^+$, Ca$^{2+}$, and Cu$^{2+}$ sorption in montmorillonite using density functional theory and molecular dynamics simulations