How do I rig this bridge in Blender? I'm trying to rig the following bridge, but can't wrap my head around this.



When I rotate Bone on its X-axis to hoist the bridge, the bottom part where Bone.002 is attached too comes loose from the part where Bone.001 is attached to.



Note: Bone.001 has a Copy Rotation Constraint and follows the rotation of Bone



What can I do to keep the parts connected?

Here is the .blend file:
There are several ways to do this, this is one:



The horizontal bones deform the two platforms, the two vertical bones translate the connecting vertical bars. For the vertical bones, I unchecked inherit rotation in the bone tab.
The bottom green bone copies rotations of the top right bone. This is the control bone for the whole setup, you could hide all other bones.

Take a look at the blend: