The prime geodesic theorem in arithmetic progressions