Near-horizon geometry and warped conformal symmetry