Get a framing square and find out if the door is square and if the frame is square. If the door is square and the frame is not, then shimming the hinges, like other have suggested, should work. If the door is not square, i.e. sagging, you can try trimming the door, but will probably need a new door if it continues to sag. You mentioned that the hinge screws seemed to have a firm bite. If the frame is week or not properly attache to the studs, you could experience sagging. You could try longer screws that go through the frame and into studs.