Port Allegany edges Ridgway in defensive struggle