How did Liberal Democrats used to win rural socially conservative voters?

Like if you look at pre-Trump democrats used to do significantly better in rural America. Even pro gay marriage Obama did significantly better than Biden and Harris did in rural America.

And looking at old maps, democrats as late as the 90's and 2000's were winning rural socially conservative areas with a pro choice anti bush tax cuts pro environmental record.

So many senators that retired/lost re election during the Obama years were liberals. When Obama was elected Democrats controlled the state legislatures of Alabama, North Carolina, West Virginia, Kentucky, Arkansas, Mississippi and Louisiana. They were liberal democrats. What happened?