Spanish firms trail global competition