Spain declares three days of mourning after deadly attack