I'm really sorry that you're having to deal with arthritis, especially at such a young age. I've had several family members with psoriatic and rheumatoid arthritis and I've seen (but can't truly know) how difficult it can be.
I've given some thought to your question and I've came up with quite a few suggestions. I'm making the assumption that the ride quality of your 2012 Mazda3 is the main problem causing you discomfort....let me know if that's not that case. But based on that, I think your best bet is to go with a mid-size sedan that is still fun to drive, but also has good ride quality (and comfortable seats).
I also don't know exactly what you're wanting in terms of features/tech and performance. But here goes-
1- Is the 2016 Mazda3 an option? When the 2014 debuted, it was a signficant improvement in all areas over the 2nd gen model (2010-2013). If so, you could go compare the 'i' Grand Touring (with 16" wheels and 2.0L engine) and the 's' Touring/Grand Touring (18" wheels and 2.5L). They all come in under $25k on TrueCar.com.
2- The 2016 Mazda6 Touring is another idea. The ride is slightly better than the Mazda3, but the 19" wheels aren't ideal (and the only way to get the smaller 17" is on the base i Sport). But still a great (and gorgeous car).
3- My other favorite mid-size is the Honda Accord. The ride quality is very good, but handling and overall performance aren't too shabby either. The 'Sport' model is the looker, but it has 19" wheels/tires that might make the EX/EX-L a better choice with more conservative 17" wheels. The EX also adds some nice features like Honda LaneWatch, power moonroof and several other convenience features. If you want leather, you'll need to go with the EX-L or there is a 'Sport Special Edition' for 2017 that is simplly the Sport with heated, leather seats.
* Honda offers the 'Honda Sensing' package for $1000 on most trim levels and it's an exceptional value, IMO. It includes Adaptive Cruise Control with Low-Speed Follow (great for commuting in traffic), Forward Collision and Road Departure Mitigation (auto-braking) as well as Lane Keeping Assist.
4- The new Honda Civic is another idea. The EX-T or EX-L should fall under the $25k mark and the 1.5L Turbo and 6.8sec 0-60 time are pretty cool. Fuel economy is very good and the ride quality, based on several reviews, is also top notch. Note- Honda Sensing is also a $1k option on most Civic trim levels also.
5- If the lack of leather and moonroof are deal breakers, then this option is off the table. But the 2016 Kia Optima LX Turbo (1.6L turbo, used in Hyundai Sonata/Tucson 'Eco' models) is a very interesting vehicle. I think the Optima is very nice looking inside and out. The LX Turbo has 16" wheels (although they look okay on the car, more like 17s) but the handling and ride quality are both very good. The only option is a Technology Package (Blind Spot Info System w/ Rear-Cross Traffic Alert, Navigation, Rear Park Assist, LED tail lights, 12-position power driver's seat with 2-position memory and a handful of other features) and it still comes in under $25k (TrueCar). Oddly, the 1.6T performs almost as well as the significantly more expensive and far less economical 2.0T used in the top-level SX and SX-L. The 100k Powertrain Warranty is also reassuring.
6- The Ford Fusion is another great option. The Fusion's only real problem is the EcoBoost engines which aren't that powerful and don't deliver exceptional fuel econony. But the 1.5L EcoBoost is adequate, if not quick, and is the better choice than the pricier and thirstier 2.0L version. The 2016 Fusion SE (with 1.5L EcoBoost, Leather (Luxury Pkg) and Ford MyTouch/Tech Pkgs) comes in under $25k. The more interesting choice, IMO, is the Fusion SE Hybrid (quicker than the 1.5L EcoBoost and fuel economy is in the high 30s overall. The Fusion got a 'mid-cycle update' for 2017 and the 2017 SE also appears to be in your price range if you are conservative with the options. My best friend just got a 2017 Fusion Titanium (2.0L EcoBoost and AWD) and it rides and drives great, although acceleration from a stop is nothing special (0-60 in the low-mid 7sec range). But the rest of the car is so good that it still merits consideration.
Moving on to some pre-owned (ideally Certified Pre-Owned) suggestions-
7- A CPO 2014-2015 Volvo S60. If you stick with the standard 17" wheels (a Sport Pkg with 19" and a 'Sport' chassis were popular and it looks great but will shake the fillings from your teeth on less than perfect pavement), it rides and handles well. Volvo has the best seats in the business, they're more like thrones. The fuel economy isn't especially great on the 2.5L turbo 5cyl, but it's not bad either. A 0-60 time in the low-mid 6sec range more than makes up for it.
8- The Acura TSX was one of my favorite cars (the TL was an abomination and the TLX isn't much better). A 2010-2014 TSX could be a good fit. It's very sporty but the ride isn't harsh. It also gets decent gas mileage and it's about as reliable as a car can be. The 201hp 2.4L 4cyl was used in the overwhelming majority of these, but a 3.5L V6 was optional and is more common on 2010-2011 models than later ones.
I feel like I've just recommended half of the cars on the market, but they're all cars that I would personally buy and I'm not easy to please! I just tried to think of cars that weren't dull as dishwater to drive (any Toyota) but still had great quality, reliability and a ride less harsh than your Mazda3. BTW, I still have a 2006 Mazda3 s 5-door (bought new in 12/2015) so I can relate to the excessive road noise and less than ideal ride quality. I also have a 2012 CX-9 and, compared to its competitors, it's at the bottom of the list for ride quality. I love them both but my next car will be a little more comforable overall (and a new Mazda may accomplish that).
Good luck, I hope this helps and please let me know your thoughts or questions about any of these!