Here is my opinion on the matter:
In March 2022, sensing the upward pricing trajectory of car prices, i bought Yaris 1.5 Ativ X CVT. I got the invoice price of 32.66 lacs. Fast forward 10 months same vehicleās invoice price is 5 millions. Now i have decided to sell it and buy a elantra gls model due to its features and built quality.
My main point is that yes elantra is a C class sedan and a competitor to Civic X n Grande but in resale terms now its true competitor is Yaris 1.5 Ativ X CVT. so just to summarize in my own opinion: Elantra is an excellent vehicle but its resale would be always be comparable to Yaris 1.5 Ativ X CVT. If you are okay with it (like me) then go for it, otherwise play safe n stick to honda n toyota