Unified description of nuclear shadowing of virtual photons