The role of trace elements in rheology dynamics, foaming potential, and microbial response for efficient biogas production