3-alarm fire rips through apartments