If you want your foundation to be resistant to water, then it is best to use not ordinary foam, but extruded polystyrene foam. It is better not to use mineral wool for insulation, since due to the porous structure it will pass water. Keramzit is well suited for the insulation of the foundation, since it is enough to the formation of fungus and mold and it has the property of frost resistance.