Rotating camera around point based on target rotation

Hello community, i want to rotate camera around point based on target rotation, with this line transform.rotation = target.transform.rotation; it works perfectly if i set my camera at 0:0:0 but i want a little offset, finally i became to this solution:

if (transform.rotation.eulerAngles.z < target.rotation.eulerAngles.z)
        {
            transform.RotateAround(Vector3.zero, Vector3.forward, target.rotation.eulerAngles.z * Time.DeltaTime);
        }

but it’s not smooth…
P.S. pics below illustrate my desired behavior


Found the solution:
I created empty object and place inside it camera with desired offset then just rotate him with this line:

transform.rotation = target.transform.rotation;