Help me salvage my Spain trip

I’m in Barcelona right now for a music festival and I’m hardly enjoying my time for some reasons. I think I need a break to somewhere more rural with lots of nature, but not sure where in Spain. I’ve been looking at airbnbs too but I’m not sure which one would work for me – being a female solo traveler I need a place where I’ll be safe and it’s preferably reachable by public transport / by foot since I can’t drive. I’d love to just stay in a small cabin with a kitchen where I can cook and read my book and explore the small town. Not a huge beach person. Would be great if it’s easy to reach by train from Barcelona but will consider flying. Any suggestions of cities/towns I should look into?

In Spain besides Barcelona I’ve been to Madrid and Granada. Another alternative is to go to Portugal which I’ve never been. Many thanks!:)

Help me salvage my Spain trip