A reply to /u/damir33
Whether it led to a decline is debatable, but Lepanto stopped the westward expansion of the Ottoman Empire and its agents. In that era, galley warfare dominated, and this requires supply bases in order to keep the galleys, the rowers, and the soldiers, supplied. As galleys relied mostly on human power to operate.
Significantly, Ottoman defeats at Makta and Lepanto marked the last of large naval expeditions to conquer outposts. The failure of Christian forces to take advantage of their victory meant that while the western Mediterranean was largely secure from direct Ottoman interference (although Barbary pirates continued to be a major problem), the eastern Mediterranean was effectively an Ottoman area of control.
You should pay attention to Ottoman wars on land to best understand how they shifted their strategic approach.