All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu 'alyhi wa sallam, is His slave and Messenger.
The majority of scholars are of the view that making water reach all parts of the body including the parts under long nails is a condition for the validity of Ghusl (ritual bathing). If one thinks that water has most probably reached those parts, then that is enough. However, if you think that water has most probably not reached the parts under the nails, then it is an obligation to make it reach those parts. Since you trimmed your nails and made water reach the parts under the nails, then your Ghusl is correct because the close sequence (i.e. washing the parts of the body in sequence without separation) is not a condition for the validity of Ghusl according to most scholars .
For further details, please refer to Fatwa 85909.
Allaah Knows best.