Our inspector cost $300 ten years ago, for looking at the whole house: foundations, roof, dry-rot, does-everything-work-such-as-faucets-and-stove-burners, chimney, electrical, plumbing. He gave a written report (as well as being informative as you walked through it with him).
We used the report to negotiate price, ie the estimated amounts for items the lender would not allow unrepaired got taken off the asking price and put into escrow instead of being paid the sellers. The contractors were paid from the escrow account.
It would not be surprising for that inspector to recommend a specialist to look at the foundation, or to have contractor(s) give an estimate.
We felt it well worth the money. Our broker (a large broker’s office) had a list of contractors of all sorts.