What caused Ghana to decline for three reasons?

Overgrazing, internal rebellion, Morrocan invaders