Talk about pivoting.

With Hillary Clinton and Donald Trump trading charges of racism, lunacy, deceit and incompetence, their past friendship raises intriguing questions that neither candidate is likely to answer with any candor.

The cordiality seems to have lasted a remarkably long time, which may be worth remembering as the current drama escalates.

It has been widely noted Trump and his son Donald Jr. contributed to Clinton campaigns in 2002, 2005, 2006 and 2007, records show. That was a period when she was running for New York senator, then president.

Only a little more than a year ago, Trump defended his contributions to Clinton and other Democrats, including Sen. Charles Schumer, by telling his now-ally Sean Hannity on Fox News: “The fact is, that I think it is time maybe that we all do get along.”

He also gave Clinton’s performance as secretary of state positive reviews. She reportedly sat in a front pew at his 2005 wedding to Melania Trump, where he and his new bride were photographed schmoozing at the reception with both Clintons.

And, of course, there was the $100,000 he contributed to the Clinton Foundation.

Sign up for The Classroom newsletter. Education on Long Island is changing. Find out how. By clicking Sign up, you agree to our privacy policy.

And that phone call: Late in the spring of 2015 — weeks before he declared his candidacy — Trump chatted genially on the phone with the ex-president, both camps confirmed last summer.

So the questions run both ways.

Given his recent road-show invective, the billionaire must have been awfully shocked and disappointed to discover what he did not know about his opponent.

If he knew she was a “bigot,” as he charged, would he have revered her as a guest at his glitzy Florida nuptials?

Was the invitation formally addressed to “lying, crooked” Hillary Clinton and “sexual predator” Bill Clinton?

If as Clinton now says, “Donald Trump’s business model is basically fraud and abuse,” why didn’t she send back the campaign checks? Or maybe do the feds a favor and wear a wire to the wedding?

If Trump had a “long history of racial discrimination,” as Clinton alleged Thursday, did she take him aside during their friendship and advise him to make amends?

If Trump believed the Clinton foundation was a “vast criminal enterprise” worse than Watergate, what did he think would result from his tax-deductible gift?

And what did Bill and Donald talk about on the phone last summer? Golf? Anything else?

We may never know for certain. But this transition from benevolence to malevolence adds unique flavor to one tabloid opera of an election.