The Cubs couldn’t quite finish the sweep. And now they have to go on the road, where they’ve struggled all year.

But a 7-2 homestand isn’t a bad building block for the trip.

“I’ll sign up for it any day of the week,” manager Joe Maddon said after the Cubs’ 5-1 loss to the Padres on Sunday. “We won seven games. That’s my takeaway. There’s still parts of the game we have to get better at, there’s no question. But I love the fight. I love the fight a lot. The energy’s been really good.

“There’s so many good intangible things going on, but we still need to clean a couple things up, whether it’s on the bases or the at-bats in general, really forcing pitchers in the strike zone.”

Now the Cubs get the chance to clean up something else: their performance on the road.

Their 36-18 home record is the second-best in the National League, behind the Dodgers. But they’re 18-27 on the road and facing a nine-game, 11-day trip through San Francisco, Milwaukee and St. Louis.

Maddon doesn’t need reminders about playing better on the road. The Cubs have lofty goals, and being well below .500 away from home won’t help.

“We need to [play better on the road],” Maddon said. “We have to do that to get where we want to be. We have to do that on this coming trip. Three really good foes, and we’ve got to be on our best behavior.”

That’s especially true for the pitching staff. At home, the group has looked like the 2016 World Series champs. On the road, it has more closely resembled teams from before the competitive window opened. The Cubs have a 3.36 ERA at home and 4.97 mark on the road.

“I would not have guessed that,” Maddon said. “Apparently, we just need to be a little bit tighter with the pitching side of things and just keep what we’re doing offensively. I didn’t realize it was that much a disparity involved. I didn’t break it down any deeper than that.”

“We’re just trying to keep that momentum going on the road,” said Kyle Hendricks, who allowed two runs in seven innings. “Not think about where we are. Just kind of embrace it, keep playing the same baseball, and it starts with us on the mound making good pitches. Set the tone on the road, be aggressive the same way we’ve been doing here and hopefully turn that around.”

On Sunday, Hendricks did his part but got little help. He allowed a run-scoring single to Fernando Tatis Jr. in the fifth and surrendered the go-ahead homer to Francisco Mejia in the seventh. That was enough to keep Hendricks from his first win since June 9 and stop the Cubs from matching a season-high 11 games over .500.

Still, the Cubs hope this homestand is the start of another second-half surge, which has been a hallmark of their time under Maddon. Hendricks sees signs that another run could be coming.

“I think our guys were really locked in all homestand, honestly,” he said. “Pitch to pitch, just worrying about winning, doing whatever they can to win that ballgame. The mindset’s there, everything’s good in the clubhouse. We can’t rely on what we’ve done in the past, but it’s a really good feel right now. We’re just focused on tomorrow.”