Hugging is sexual harassment.
You are legally correct, it is harassment. Third-party harassment, specifically. If some third person sees the hug, she can declare it harassment to her, even though she had nothing to do with the hug.
Don't shoot me, I'm the messenger.