The way you were treated by HR is unforgivable. HR employees who align with management ( with EITHER side, actually) aren’t fit to work in that field. Their whole purpose is to remain impartial and follow procedure. I believe you were the victim of a hostile work environment and I am, for one, sick to death of that being allowed to continue. I am sorry.