using OnMouseEnter and OnMouseExit are stuck when position is changed

hi all,
I am making a 2D board game, and I have several cards shown where the leftmost is shown fully, and any additional card is to it’s right and half behind the previous one (the one left to it) so only half of it is shown.
I want to make any card be shown fully when the mouse hovers over it, so I used OnMouseEnter\Exit like so:
private void OnMouseEnter()
transform.Translate(0, 0, -5f);

private void OnMouseExit()
    transform.Translate(0, 0, 5f);

and it works, but the problem is that OnMouseDown makes the card move to a different position, and in the new position it is still in the front or back (the z axis is still 5 or -5) and it stays like this.
notice that the new position assigned has 0 as z axis explicitly.
please help!

Translate moves your transform in LocalSpace by default. If you rotate your transform between actions, it will not come back to the original position.