I use osmand on Android. Bit of a leaning curve to start as you need to download the maps you want and set up features, but then it is available offline as well and can include topographical and trails or other data if you're not just traveling in cities.
When you say "trails", you mean just forest paths in general, or marked ones? Idk about rest of the word but over here we have some unmarked paths, but there are some that are marked in color (both on hiking maps and in the actual forest as well). There is only one app I know off that has these marked paths and it's by a local "google-like" company - wonder if I can get this on some of the FOSS apps or I'm stuck with what I have