Problem with pivots on the foot


Hello! I did some pivots to this foot to make it rotate as seen in the gif but when i moved the foot ctrl the pivots obviously do not move, as the ctrl is the last thing in the hierarchy.

I want to keep the pivots position relative to the foot even when the foot moves so that it rotates correctly wherever the foot is.

I tried unparenting the ctrl from the hierarchy and using matrices but i can’t seem to make them work. The pivots just rotate from the middle and I don’t know why. Using constraints is somehow worst.

I am doing something terribly wrong and don’t know what. Can anybody help me?