Theres no way to detect if a user is on mobile vs computer. The way I get around this is how I set up my pages. On mobile, you can choose to have the 4 main pages on the bottom as tabs. I specifically set up those first 4 pages for mobile and then either nest the other pages within those, or have the other pages below those first 4 pages.
There definitely may be a better way around this, but this is the solution I came up with.
The computer pages are accessible to mobile users still, just helps lead the user to the right pages for them.