I was thinking about this, that to some people a hug is just the same thing as a handshake. To some cultures it’s a huge difference in intimacy, others not I guess.
I do think as a gringo I get a lot more latitude because usually they know we’re not as huggy-kissy. Things get awkward when both sides try to cross cultures, them trying to guess what I’ll do and me trying to guess what they will do. But before feeling too badly about it, I just try to hope that being friendly matters more than formal conventions.