A romantic hug can be distinguished from a platonic one by its duration and contact. A hug lasting longer than 5 seconds and involving full-body contact, especially around the lower back or waist, indicates a level of intimacy that is typically romantic in nature. A full guide to interpreting body language can be found at https://www.sofiadate.com/dating-tips/how-to-tell-if-a-hug-is-romantic