Hi Dave, you may be interested in this. The link is to an EU initiative petition claiming the safeguarding of our citizenship. (not just for UK with Brexit but any future nation who may find themselves in this situation). It is proposed and sanctioned by the EU, needs 1 million signatures in a certain timeframe, including a percentage from each country. We can sign online from Spain, as can all other EU nationalities. Here is the link which gives you more information.
https://eci.ec.europa.eu/002/public/#/initiative, in English, Spanish and other languages.