Investment Securities (Tables)
12 Months Ended
Dec. 31, 2021
Investments, Debt and Equity Securities [Abstract]  
Schedule of Debt Securities, Available-for-Sale, Investments Reconciliation The amortized cost and fair values of debt securities at the dates specified are summarized as follows:
 2021
(Dollars in thousands)Amortized
Cost
Unrealized
Gains
Unrealized
Losses
Fair Value
U.S. treasury securities$62,850 $— $684 $62,166 
Residential federal agency MBS(1)
412,902 2,406 9,113 406,195 
Commercial federal agency MBS(1)
99,681 3,783 52 103,412 
Taxable municipal securities272,507 5,607 2,264 275,850 
Tax-exempt municipal securities87,024 5,648 — 92,672 
Corporate bonds 8,559 441 — 9,000 
Subordinated corporate bonds7,000 135 — 7,135 
Total debt securities, at fair value$950,523 $18,020 $12,113 $956,430 
 2020
(Dollars in thousands)Amortized
Cost
Unrealized
Gains
Unrealized
Losses
Fair Value
Residential federal agency MBS(1)
$209,923 $6,339 $287 $215,975 
Commercial federal agency MBS(1)
102,468 7,726 — 110,194 
Taxable municipal securities135,117 9,293 144,407 
Tax-exempt municipal securities88,235 7,216 — 95,451 
Corporate bonds10,448 828 — 11,276 
Subordinated corporate bonds5,000 — — 5,000 
Total debt securities, at fair value$551,191 $31,402 $290 $582,303 
 __________________________________________ 
(1)These categories may include investments issued or guaranteed by government sponsored enterprises such as Fannie Mae ("FNMA"), Freddie Mac ("FHLMC"), Federal Farm Credit Bank ("FFCB"), or one of several Federal Home Loan Banks, as well as, investments guaranteed by Ginnie Mae ("GNMA"), a wholly-owned government entity.
Schedule of Unrealized Loss on Debt Securities, Available-for-Sale Investments
The following tables summarize the duration of unrealized losses for debt securities at December 31, 2021 and 2020: 
 2021
 Less than 12 months12 months or longerTotal
(Dollars in thousands)Fair
Value
Unrealized
Losses
Fair
Value
Unrealized
Losses
Fair
Value
Unrealized
Losses
# of Holdings
U.S. treasury securities$62,166 $684 $— $— $62,166 $684 
Residential federal agency MBS272,863 6,992 51,281 2,121 324,144 9,113 44 
Commercial federal agency MBS4,897 52 — — 4,897 52 
Taxable municipal securities117,388 2,023 6,727 241 124,115 2,264 118 
Total temporarily impaired debt securities$457,314 $9,751 $58,008 $2,362 $515,322 $12,113 172 

 2020
 Less than 12 months12 months or longerTotal
(Dollars in thousands)Fair
Value
Unrealized
Losses
Fair
Value
Unrealized
Losses
Fair
Value
Unrealized
Losses
# of Holdings
Residential federal agency MBS$51,396 $284 $2,107 $$53,503 $287 10 
Taxable municipal securities1,997 — — 1,997 
Total temporarily impaired debt securities$53,393 $287 $2,107 $$55,500 $290 14 
Debt Securities, Available-for-Sale Investments Classified by Contractual Maturity Date
The contractual maturity distribution at December 31, 2021 of debt securities was as follows:
(Dollars in thousands)Amortized CostFair Value
Due in one year or less$13,398 $13,478 
Due after one, but within five years189,626 195,778 
Due after five, but within ten years271,354 276,528 
Due after ten years476,145 470,646 
Total debt securities$950,523 $956,430 
Schedule of Realized Gain (Loss) on Sales of Debt Securities, Available-for-Sale Investments
Sales of debt securities, for the years ended December 31, 2021, 2020, and 2019 are summarized as follows: 
(Dollars in thousands)202120202019
Amortized cost of debt securities sold(1)
$2,931 $5,680 $11,621 
Gross realized gains on sales128 227 149 
Gross realized losses on sales— — (3)
Total proceeds from sales of debt securities$3,059 $5,907 $11,767 
__________________________________________
(1)     Amortized cost of investments sold is determined on a specific identification basis and includes pending trades based on trade date, if applicable.
Gain (Loss) on Equity Securities
Gains and losses on equity securities at December 31, 2021 and December 31, 2020 are summarized as follows:
(Dollars in thousands)20212020
Net (losses) gains recognized during the period on equity securities $246 $(49)
Less: Net (losses) gains realized on equity securities sold during the period57 (11)
Unrealized gains (losses) recognized during the reporting period on equity securities still held at the end of the period (included in other income)$189 $(38)