Volume absorption for water


I would like my water to be darker when it’s deeper, i want to achieve a more
turquoise color near the shoreline, and darker blue in the middle. I have tried using a volume absorption but i’m not sure how to work with this.

I’ve made a cube which represent the water as you can see, a terrain landscape and a reflection plane.
Is there any way i could use a gradient texture instead, or another workaround to achieve the water colors? I have tried increasing the density of the volume absorption and it helps little, but weird lines appears and looks bad in render.