Before Mitt Romney lost the election, the Republican Party lost its head.

The GOP started the presidential campaign in the black cold of the Iowa winter, appealing to evangelicals and other cultural conservatives. Good people though they may be, they are no more representative of the typical American voter than the equally good people of Beverly Hills’s ultra-liberal precincts. Romney pandered. He would end funding to Planned Parenthood and he recommended making things so tough on undocumented immigrants that they would “self-deport.” Goodbye, Hispanics, and goodbye, many women.

The venue for that first contest and the field of candidates was the biggest break Barack Obama got. The entire Republican field swung to the right. One stupendously unqualified candidate after another took the early lead — Michele Bachmann, Rick Perry, Newt Gingrich. They took turns proposing one simplistic program for illegal aliens after another. Moderation, even compassion, was ridiculed. Gingrich wanted to do something reasonable for illegals who had been in the country for decades — held a job, belonged to a church. Nothing doing. This was a kind of war.

The winner of the Iowa caucus, you might recall, was Rick Santorum, who had lost his race for reelection for Pennsylvania senator. He campaigned as an inquisitor, a stern and humorless champion of his own morality. He was against abortion — not just late-term. Not even in the case of rape or incest. Not even for a 14-year-old who had gotten beered up in the back of a parked car. Never! Never! If this is what he believes, fine. But don’t impose it on the rest of us.

Now it will start all over. Santorum was in Iowa at least twice last month. A GOP that might have won the presidency had it earlier steered a middle course, will once again veer to the right. Zealots of one kind or another will run — and one by one become front-runners. The early contests will be held in the most unrepresentative of states. A debacle is looming.

Possibly the Democrats will do something similar. They went off a cliff with the very liberal George McGovern, but after 1972, the party got cautious. Not since Michael Dukakis have the Democrats nominated a true — as opposed to a vilified — liberal. More than likely, a moderate will emerge. If so, he — or she — will win.

About $2 billion was spent on the 2012 race, more than half of it, certainly, on Romney. The GOP would do itself — and the nation — a favor if the fat cats who put up this money started backing moderates and rebuilding the party. They could start by knocking Iowa and New Hampshire down the campaign calendar. They could begin in New York or Illinois or even Texas. Maybe that would encourage moderates to enter the race and not feel they’d be doomed by, perhaps, wondering out loud about abortion, same-sex marriage or immigration.

It took the GOP years to come to terms with the New Deal and the Fair Deal. It has taken the party a long time to come to terms with the necessities of modern government — a certain amount of deficit spending, a realistic tax rate and the occasional need to use the government to smooth the rough edges of the free-enterprise system. The auto bailout worked. It worked for the companies and their employees, and it worked splendidly for Barack Obama.

Barack Obama never got the economy really humming. I don’t blame him for that. The unemployment rate always hovered around 8 percent. I don’t blame him for that, either. But these are the usual factors that doom a reelection effort. Mitt Romney could have won. He had the right opponent but the wrong political party.