The historic Alhambra palace closed after a 4.8-magnitude earthquake caused minor damage and injured three people in Granada.