Why did “gay” used to be an insult but isn’t nowadays?

Back when I was in high school boys would insult each other by saying you’re gay or use the f word but haven’t seen this as much lately.

Why did “gay” used to be an insult but isn’t nowadays?
Post Opinion