Semiconductor heterostructures and optimization of light-trapping structures for efficient thin-film solar cells