hook_preprocess_page for mobile detection
You could use panels and create a variant for mobile and other for non mobile.

the mobile detect module provide a selection rule for that by using 
mobile_detect_ctools