  We investigate electromagnetic propagation in uniaxial dielectrics with a
transversely varying orientation of the optic axis, the latter staying
orthogonal everywhere to the propagation direction. In such a geometry, the
field experiences no refractive index gradients, yet it acquires a
transversely-modulated Pancharatnam-Berry phase, that is, a geometric phase
originating from a spin-orbit interaction. We show that the periodic evolution
of the geometric phase versus propagation gives rise to a
longitudinally-invariant effective potential. In certain configurations, this
geometric phase can provide transverse confinement and waveguiding. The
theoretical findings are tested and validated against numerical simulations of
the complete Maxwell's equations. Our results introduce and illustrate the role
of geometric phases on electromagnetic propagation over distances well
exceeding the diffraction length, paving the way to a whole new family of
guided waves and waveguides which do not rely on refractive index tailoring.
