/* Keep the mobile reading edge consistent without narrowing section backgrounds.
   Modern loan/payment layouts already provide 16–18px exterior spacing; their
   containers and nested page-builder rows retain their own gutters. */
@media (max-width: 767px) {
  body[data-replica-page] {
    --site-mobile-gutter: 15px;
  }
  /* Legacy full-width sections and nested rows had negative margins that
     cancelled the container padding and clipped the rounded cards. */
  body[data-replica-page] .main-container .wpb-content-wrapper > section.vc_row:not(.vc_custom_1593970876086),
  body[data-replica-page] .main-container .wpb-content-wrapper .vc_inner {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body[data-replica-page] .main-container .wpb-content-wrapper > section.vc_row:not(.cs-loan-legal):not(.vc_custom_1593970876086) > .container {
    box-sizing: border-box;
    max-width: 100%;
    padding-left: max(var(--site-mobile-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--site-mobile-gutter), env(safe-area-inset-right, 0px));
  }

  /* Page-builder columns remove their own side padding on mobile. Keep only
     this outside row inside its container rather than cancelling its gutter. */
  body[data-replica-page] .main-container .wpb-content-wrapper > section.vc_row:not(.cs-loan-legal):not(.vc_custom_1593970876086) > .container > .row {
    margin-left: 0;
    margin-right: 0;
  }

  /* The footer uses Bootstrap columns, whose padding balances the negative
     row margins. Preserve that pair instead of adding a second inset. */
  body[data-replica-page] footer.footer-widget > .sub-footer > .container {
    box-sizing: border-box;
    max-width: 100%;
    padding-left: max(var(--site-mobile-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--site-mobile-gutter), env(safe-area-inset-right, 0px));
  }

  body[data-replica-page] .main-container :is(.wpb_text_column, .suc-body, .custom-accordion .content),
  body[data-replica-page] :is(.footer-links, .footer-contact-item, footer.footer-widget .sub) {
    overflow-wrap: anywhere;
  }
}
