<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>421</ContextCount>
  <ElementCount>366</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>91</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>8</UnitCount>
  <MyReports>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>995200090 - Document - Document And Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document And Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>995200100 - Statement - CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/StatementConsolidatedBalanceSheets</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>995200105 - Statement - CONSOLIDATED BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>995200200 - Statement - CONSOLIDATED STATEMENTS OF INCOME</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/StatementConsolidatedStatementsOfIncome</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF INCOME</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>995200300 - Statement - CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/StatementConsolidatedStatementsOfComprehensiveIncome</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>995200400 - Statement - CONSOLIDATED STATEMENTS OF EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/StatementConsolidatedStatementsOfEquity</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>995200405 - Statement - CONSOLIDATED STATEMENTS OF EQUITY (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/StatementConsolidatedStatementsOfEquityParenthetical</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF EQUITY (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>995200500 - Statement - CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>995210101 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureSummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>995210201 - Disclosure - Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureSecurities</Role>
      <ShortName>Securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>995210301 - Disclosure - Loans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureLoans</Role>
      <ShortName>Loans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>995210401 - Disclosure - Allowance for Credit Losses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureAllowanceForCreditLosses</Role>
      <ShortName>Allowance for Credit Losses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>995210501 - Disclosure - Goodwill and Other Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureGoodwillAndOtherIntangibleAssets</Role>
      <ShortName>Goodwill and Other Intangible Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>995210601 - Disclosure - Equity, Other Comprehensive Income and Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureEquityOtherComprehensiveIncomeAndEarningsPerShare</Role>
      <ShortName>Equity, Other Comprehensive Income and Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>995210701 - Disclosure - Share-Based Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureShareBasedPlans</Role>
      <ShortName>Share-Based Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>995210801 - Disclosure - Employee Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureEmployeeBenefitPlans</Role>
      <ShortName>Employee Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>995210901 - Disclosure - Fair Value of Assets and Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureFairValueOfAssetsAndLiabilities</Role>
      <ShortName>Fair Value of Assets and Liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>995211001 - Disclosure - Business Segments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureBusinessSegments</Role>
      <ShortName>Business Segments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>995211101 - Disclosure - Commitments and Contingent Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureCommitmentsAndContingentLiabilities</Role>
      <ShortName>Commitments and Contingent Liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>995211201 - Disclosure - Derivative Financial Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureDerivativeFinancialInstruments</Role>
      <ShortName>Derivative Financial Instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>995211301 - Disclosure - Other Noninterest Expenses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureOtherNoninterestExpenses</Role>
      <ShortName>Other Noninterest Expenses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>995410 - Disclosure - Pay vs Performance Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/PvpDisclosure</Role>
      <ShortName>Pay vs Performance Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>99920102 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureSummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>99930203 - Disclosure - Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureSecuritiesTables</Role>
      <ShortName>Securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureSecurities</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>99930303 - Disclosure - Loans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureLoansTables</Role>
      <ShortName>Loans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureLoans</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>99930403 - Disclosure - Allowance for Credit Losses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureAllowanceForCreditLossesTables</Role>
      <ShortName>Allowance for Credit Losses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureAllowanceForCreditLosses</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>99930503 - Disclosure - Goodwill and Other Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureGoodwillAndOtherIntangibleAssetsTables</Role>
      <ShortName>Goodwill and Other Intangible Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureGoodwillAndOtherIntangibleAssets</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>99930603 - Disclosure - Equity, Other Comprehensive Income and Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureEquityOtherComprehensiveIncomeAndEarningsPerShareTables</Role>
      <ShortName>Equity, Other Comprehensive Income and Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureEquityOtherComprehensiveIncomeAndEarningsPerShare</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>99930703 - Disclosure - Share-Based Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureShareBasedPlansTables</Role>
      <ShortName>Share-Based Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureShareBasedPlans</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>99930803 - Disclosure - Employee Benefit Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureEmployeeBenefitPlansTables</Role>
      <ShortName>Employee Benefit Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureEmployeeBenefitPlans</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>99930903 - Disclosure - Fair Value of Assets and Liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureFairValueOfAssetsAndLiabilitiesTables</Role>
      <ShortName>Fair Value of Assets and Liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureFairValueOfAssetsAndLiabilities</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>99931003 - Disclosure - Business Segments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureBusinessSegmentsTables</Role>
      <ShortName>Business Segments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureBusinessSegments</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>99931103 - Disclosure - Commitments and Contingent Liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureCommitmentsAndContingentLiabilitiesTables</Role>
      <ShortName>Commitments and Contingent Liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureCommitmentsAndContingentLiabilities</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>99931203 - Disclosure - Derivative Financial Instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureDerivativeFinancialInstrumentsTables</Role>
      <ShortName>Derivative Financial Instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureDerivativeFinancialInstruments</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>99931303 - Disclosure - Other Noninterest Expenses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureOtherNoninterestExpensesTables</Role>
      <ShortName>Other Noninterest Expenses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureOtherNoninterestExpenses</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>99940101 - Disclosure - Summary of Significant Accounting Policies - Nature of Operations and Derivative Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureSummaryOfSignificantAccountingPoliciesNatureOfOperationsAndDerivativeFinancialInstrumentsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Nature of Operations and Derivative Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>99940201 - Disclosure - Securities - Available for sale Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureSecuritiesAvailableForSaleSecuritiesDetails</Role>
      <ShortName>Securities - Available for sale Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>99940202 - Disclosure - Securities - Amortized Cost and Fair Value, Realized Gains, Losses and Proceeds (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureSecuritiesAmortizedCostAndFairValueRealizedGainsLossesAndProceedsDetails</Role>
      <ShortName>Securities - Amortized Cost and Fair Value, Realized Gains, Losses and Proceeds (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>99940203 - Disclosure - Securities - Pledged as Collateral (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureSecuritiesPledgedAsCollateralDetails</Role>
      <ShortName>Securities - Pledged as Collateral (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>99940204 - Disclosure - Securities - Unrealized Loss Positions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureSecuritiesUnrealizedLossPositionsDetails</Role>
      <ShortName>Securities - Unrealized Loss Positions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>99940205 - Disclosure - Securities - Restricted Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureSecuritiesRestrictedStockDetails</Role>
      <ShortName>Securities - Restricted Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>99940301 - Disclosure - Loans - Balance of Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureLoansBalanceOfLoansDetails</Role>
      <ShortName>Loans - Balance of Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>99940302 - Disclosure - Loans - Loan Portfolio by Class (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureLoansLoanPortfolioByClassDetails</Role>
      <ShortName>Loans - Loan Portfolio by Class (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>99940303 - Disclosure - Loans - Balance of loans on nonaccrual status (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureLoansBalanceOfLoansOnNonaccrualStatusDetails</Role>
      <ShortName>Loans - Balance of loans on nonaccrual status (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>99940304 - Disclosure - Loans - Amortized cost basis of loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureLoansAmortizedCostBasisOfLoansDetails</Role>
      <ShortName>Loans - Amortized cost basis of loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>99940305 - Disclosure - Loans - Loan Modifications (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureLoansLoanModificationsDetails</Role>
      <ShortName>Loans - Loan Modifications (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>99940401 - Disclosure - Allowance for Credit Losses - Allowance for Credit Losses activity by Loan Portfolio (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureAllowanceForCreditLossesAllowanceForCreditLossesActivityByLoanPortfolioDetails</Role>
      <ShortName>Allowance for Credit Losses - Allowance for Credit Losses activity by Loan Portfolio (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>99940402 - Disclosure - Allowance for Credit Losses - Provision for Credit Losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureAllowanceForCreditLossesProvisionForCreditLossesDetails</Role>
      <ShortName>Allowance for Credit Losses - Provision for Credit Losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>99940403 - Disclosure - Allowance for Credit Losses - By Loan Rating and Year of Origination (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureAllowanceForCreditLossesByLoanRatingAndYearOfOriginationDetails</Role>
      <ShortName>Allowance for Credit Losses - By Loan Rating and Year of Origination (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>99940404 - Disclosure - Allowance for Credit Losses - By Credit Rating and Year of Origination (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureAllowanceForCreditLossesByCreditRatingAndYearOfOriginationDetails</Role>
      <ShortName>Allowance for Credit Losses - By Credit Rating and Year of Origination (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>99940405 - Disclosure - Allowance for Credit Losses - Gross Charge-offs of Loans by Year of Origination (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureAllowanceForCreditLossesGrossChargeOffsOfLoansByYearOfOriginationDetails</Role>
      <ShortName>Allowance for Credit Losses - Gross Charge-offs of Loans by Year of Origination (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>99940501 - Disclosure - Goodwill and Other Intangible Assets - Goodwill (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureGoodwillAndOtherIntangibleAssetsGoodwillDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets - Goodwill (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>99940502 - Disclosure - Goodwill and Other Intangible Assets - Other Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureGoodwillAndOtherIntangibleAssetsOtherIntangibleAssetsDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets - Other Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>99940601 - Disclosure - Equity, Other Comprehensive Income and Earnings Per Share - Equity and Noncontrolling Interest (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureEquityOtherComprehensiveIncomeAndEarningsPerShareEquityAndNoncontrollingInterestDetails</Role>
      <ShortName>Equity, Other Comprehensive Income and Earnings Per Share - Equity and Noncontrolling Interest (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>99940602 - Disclosure - Equity, Other Comprehensive Income and Earnings Per Share - Changes in Accumulated Other Comprehensive Income (Loss), Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureEquityOtherComprehensiveIncomeAndEarningsPerShareChangesInAccumulatedOtherComprehensiveIncomeLossNetDetails</Role>
      <ShortName>Equity, Other Comprehensive Income and Earnings Per Share - Changes in Accumulated Other Comprehensive Income (Loss), Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>99940603 - Disclosure - Equity, Other Comprehensive Income and Earnings Per Share - Reclassification of Accumulated Other Comprehensive Loss, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureEquityOtherComprehensiveIncomeAndEarningsPerShareReclassificationOfAccumulatedOtherComprehensiveLossNetDetails</Role>
      <ShortName>Equity, Other Comprehensive Income and Earnings Per Share - Reclassification of Accumulated Other Comprehensive Loss, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>99940604 - Disclosure - Equity, Other Comprehensive Income and Earnings Per Share - Earnings Per Share (EPS) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureEquityOtherComprehensiveIncomeAndEarningsPerShareEarningsPerShareEpsDetails</Role>
      <ShortName>Equity, Other Comprehensive Income and Earnings Per Share - Earnings Per Share (EPS) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>99940701 - Disclosure - Share-Based Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureShareBasedPlansDetails</Role>
      <ShortName>Share-Based Plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureShareBasedPlansTables</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>99940801 - Disclosure - Employee Benefit Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureEmployeeBenefitPlansDetails</Role>
      <ShortName>Employee Benefit Plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureEmployeeBenefitPlansTables</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>99940901 - Disclosure - Fair Value of Assets and Liabilities - Investments in Other Investment Company Funds (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureFairValueOfAssetsAndLiabilitiesInvestmentsInOtherInvestmentCompanyFundsDetails</Role>
      <ShortName>Fair Value of Assets and Liabilities - Investments in Other Investment Company Funds (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>99940902 - Disclosure - Fair Value of Assets and Liabilities - Financial Assets and Liabilities Measured at Fair Value on a Recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureFairValueOfAssetsAndLiabilitiesFinancialAssetsAndLiabilitiesMeasuredAtFairValueOnRecurringBasisDetails</Role>
      <ShortName>Fair Value of Assets and Liabilities - Financial Assets and Liabilities Measured at Fair Value on a Recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>99940903 - Disclosure - Fair Value of Assets and Liabilities - Assets Measured at Fair Value on a Nonrecurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureFairValueOfAssetsAndLiabilitiesAssetsMeasuredAtFairValueOnNonrecurringBasisDetails</Role>
      <ShortName>Fair Value of Assets and Liabilities - Assets Measured at Fair Value on a Nonrecurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>99940904 - Disclosure - Fair Value of Assets and Liabilities - Carrying Value and Estimated Fair Value of Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureFairValueOfAssetsAndLiabilitiesCarryingValueAndEstimatedFairValueOfFinancialInstrumentsDetails</Role>
      <ShortName>Fair Value of Assets and Liabilities - Carrying Value and Estimated Fair Value of Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>99941001 - Disclosure - Business Segments - Narratives (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureBusinessSegmentsNarrativesDetails</Role>
      <ShortName>Business Segments - Narratives (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>99941002 - Disclosure - Business Segments - Segment Reporting (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureBusinessSegmentsSegmentReportingDetails</Role>
      <ShortName>Business Segments - Segment Reporting (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>99941003 - Disclosure - Business Segments - Consolidation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureBusinessSegmentsConsolidationDetails</Role>
      <ShortName>Business Segments - Consolidation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>99941101 - Disclosure - Commitments and Contingent Liabilities - Loan Commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureCommitmentsAndContingentLiabilitiesLoanCommitmentsDetails</Role>
      <ShortName>Commitments and Contingent Liabilities - Loan Commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>99941102 - Disclosure - Commitments and Contingent Liabilities - Corporation's Reserve for Unfunded Commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureCommitmentsAndContingentLiabilitiesCorporationSReserveForUnfundedCommitmentsDetails</Role>
      <ShortName>Commitments and Contingent Liabilities - Corporation's Reserve for Unfunded Commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>99941103 - Disclosure - Commitments and Contingent Liabilities - Other (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureCommitmentsAndContingentLiabilitiesOtherDetails</Role>
      <ShortName>Commitments and Contingent Liabilities - Other (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureCommitmentsAndContingentLiabilitiesTables</ParentRole>
      <Position>70</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>99941201 - Disclosure - Derivative Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureDerivativeFinancialInstrumentsDetails</Role>
      <ShortName>Derivative Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureDerivativeFinancialInstrumentsTables</ParentRole>
      <Position>71</Position>
    </Report>
    <Report instance="cffi-20250331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>99941301 - Disclosure - Other Noninterest Expenses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://cffc.com/role/DisclosureOtherNoninterestExpensesDetails</Role>
      <ShortName>Other Noninterest Expenses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://cffc.com/role/DisclosureOtherNoninterestExpensesTables</ParentRole>
      <Position>72</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>cffi-20250331.xsd</File>
    <File>cffi-20250331_cal.xml</File>
    <File>cffi-20250331_def.xml</File>
    <File>cffi-20250331_lab.xml</File>
    <File>cffi-20250331_pre.xml</File>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="cffi-20250331x10q.htm">cffi-20250331x10q.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2024</BaseTaxonomy>
    <BaseTaxonomy items="1822">http://fasb.org/us-gaap/2024</BaseTaxonomy>
    <BaseTaxonomy items="29">http://xbrl.sec.gov/dei/2024</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2024</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
