The magnitude-seven quake struck the country’s Pacific coast, near the resort of Acapulco.