Doesn’t surprise me - Croatia is full of surprises like this. For example (though not quite as impressive), there’s a 9th century church in Zadar called The Church of St. Donatus that was built on ancient Roman ruins. I attended a concert there and it was astonishingly beautiful to see and to hear.
"ancient Roman ruins" You might find that the Roman presence was built upon an even earlier site. That happens very often - the Romans were very good at colonizing, whilst fitting in. They would often embrace the local religions and simply add them to their pantheon.
Croatia was the Dalmatia province of the Roman Empire as well.
It is fascinating that Italy and Croatia have more in common than a nearby Italian neighbor with a shared common language and a long border, such as Switzerland.
Croatia was under Venice Republic ruling afterwards, for a couple centuries, so naturally they end up having more things in common, including the gastronomy around Croatian coastline.
Additionally, Italy shares two languages with Switzerland, given the mountain area shared between Switzerland, Austria and Italy, where German is also an official language.
In my hometown in Istria you can find the lion of Venice on many buildings. And pretty much everyone to this day will rather speak in the Venetian dialect, than Croatian.
The sea was a highway rather than a barrier. Communities along the coast would be in intense contact.
It was the mountains that rise beyond the coast that were the real obstacle. Even in the 21st century, it takes a lot of money and upkeep to make them passable for modern transport.
The projected Beograd-Bar highway slightly south of Croatia is basically a white elephant project.