Pennsylvania is not a slam dunk for Donald Trump’s re-election next year.

That’s one takeaway from Tuesday’s elections, which turned the Philadelphia suburbs even bluer, as Republicans suffered additional congressional losses following last year’s midterms. The Democrats have gone from a 13-5 minority in the House to a 9-9 split.

These results in the eastern part of the state “are not helpful to Trump’s re-election prospects in Pennsylvania,” said Jeff Brauer, a political science professor at Keystone College.

“The big question will be the extent of enthusiasm of his non-supporters in the state,” Brauer added. “If that outweighs his base support, that will swing the election against him. It’s something he shouldn’t underestimate.”

Trump won Pennsylvania by just 44,000 votes in 2016, the first Republican to take the state since 1988. That margin is so thin, the state could easily be won by a Democrat in 2020.

But if the Democrats want a victory, they must hone their message. Because here’s the other takeaway from last week’s statewide elections: the Western suburbs around Pittsburgh are deepening their allegiance to the GOP.

As Mike Mikus, a Democratic strategist in Western Pennsylvania, puts it: “Philadelphia got bluer and Western Pennsylvania got redder.”

In short, not all suburban voters are alike.

“Go too far left on policy positions like banning fracking or Medicare for All or taking people’s guns away anywhere outside of the counties of Philadelphia, and they might repeat the same mistakes of 2016,” said G. Terry Madonna, political-science professor at Franklin and Marshall College.

Plus, voters in Pennsylvania are fickle, which is one reason why it — along with Wisconsin — remains the country’s most important swing state. Bucks County, just north of Philadelphia, proves just how easily voters can switch.

In 2016, Bucks County voters favored both Republican Pat Toomey for senator and Democrat Hillary Clinton for president. In 2018, they chose a Republican for Congress, and now this year the county went blue in its municipal elections.

“Voting isn’t as cut and dry as outsiders imagine it is,” Madonna said. “It can depend on economics, personality, community issues. There are a lot of variables people forget to calculate about what drives a person’s vote.”

This year, Democrats crushed Republican candidates in the suburban Philadelphia counties of Delaware, Chester and Bucks. But Democratic municipal office holders in the traditionally blue suburban counties around Pittsburgh, such as Beaver, Westmoreland, Washington and Greene, were swept out of county government in favor of Republican candidates. And in commissioners’ races across the state, Republicans actually flipped more counties than Democrats — six went from Democrat to Republican while five went from Republican to Democrat.

Overall, the results were a mixed bag for both parties. But one thing’s for sure: Pennsylvania remains the Keystone State to the presidency.

In 2016, Hillary Clinton did what all Democratic presidential nominees have done since 1992: creamed the Republican opponent in Philadelphia and its suburbs. She even flipped then-Republican stronghold Chester County by over 20,000 votes, a spot Barack Obama was unable to win in 2012.

But she essentially lost the rest of the state.

Typically, this is not a problem in any other year, but in 2016 voters in all of the other counties turned out bigly for Trump, handing him the state’s total 20 electoral votes.

This deepening Republican support outside of the Philadelphia suburbs remains a threat to the Democratic nominee, one that many political professionals ignored in 2016 and continue to ignore to this day.

“The Democrats still have to choose a palatable presidential candidate who has a measured message as an alternative,” Brauer said. They must “appeal to working-class Trump voters in order to win the state in 2020.”

Salena Zito is the author of “The Great Revolt: Inside the Populist Coalition Reshaping American Politics” (Crown Forum).