Preheat the oven to 190ºC/375ºF/gas 5. Grease two springform cake tins (roughly 20cm) with the margarine, then line the bottom with greaseproof paper and dust the sides with gluten-free flour.
In a bowl, beat the margarine and sugar for around 5 minutes, or until light and fluffy.
Halve the vanilla pods lengthways then, using the tip of a sharp knife, scrape out the seeds. Add the seeds to the margarine mixture, along with the yoghurt and lemon zest, then mix until combined.
Sieve the flour, baking powder and xanthan gum into the bowl, then fold through. If it’s a little thick, add a splash of rice milk and stir briefly until you have a nice, smooth batter.
Carefully divide the mixture between the cake tins, then place on the middle shelf of the hot oven for 15 to 20 minutes, or until golden and an inserted skewer comes out clean.
Leave to cool for 5 minutes, before turning the cakes out onto a wire cooling rack, then leave to cool completely while you make the icing.
Sieve the icing sugar into a large bowl, then add the margarine and beat until smooth. If it’s a little thick, add a splash of milk to loosen.
Once cooled, place one of the sponges on a plate or cake stand. Carefully spread the butter icing on top and scatter over most of the raspberries.
Spread the jam onto the second sponge and place, jam side down, on top of the iced sponge, pressing down slightly. Dust the top with a little icing sugar and decorate with a few raspberries, if you like, then serve.