A multi-scale approach for modeling mechanical behavior of 2D and 3D textile-reinforced composites