The temperature structure and pressure balance of magnetic loops in active regions