/* The legal pages use the same footer component as the home page.  Keep the
   phone layout in one shared stylesheet so it cannot drift from that layout. */
@media (max-width: 767.98px) {
  /* Legal pages must retain the CAD navy floating header when scrolled.
     Their earlier page-specific rule changed it to white. */
  #cadfNavbar,
  #cadfNavbar.cadf-scrolled {
    background: rgba(13, 42, 78, .94) !important;
    border-color: rgba(255, 255, 255, .22) !important;
    box-shadow: 0 10px 30px rgba(13, 42, 78, .22) !important;
  }
  #cadfNavbar.cadf-scrolled .cadf-link,
  #cadfNavbar .cadf-link { color: #fff !important; }
  #cadfNavbar .cadf-line { background: #fff !important; }

  footer.footer-new { width:100%!important; max-width:100%!important; padding:48px 20px 0!important; box-sizing:border-box!important; overflow:hidden!important; clear:both!important; position:relative!important; z-index:1!important; }
  footer.footer-new .site-container { width:100%!important; max-width:100%!important; margin:0 auto!important; padding:0!important; box-sizing:border-box!important; text-align:center!important; }
  footer.footer-new .row { display:flex!important; flex-direction:column!important; gap:32px!important; margin:0!important; width:100%!important; }
  footer.footer-new .col-md-6, footer.footer-new .col-md-12, footer.footer-new .col-lg-4 { width:100%!important; max-width:100%!important; padding:0!important; display:flex!important; flex-direction:column!important; align-items:center!important; text-align:center!important; margin-top:0!important; }
  footer.footer-new .footer-brand { align-items:center!important; justify-content:center!important; text-align:center!important; width:100%!important; margin-bottom:12px!important; }
  footer.footer-new .footer-brand a { justify-content:center!important; margin:0 auto 16px!important; }
  footer.footer-new .footer-text { margin-bottom:16px!important; }
  footer.footer-new .footer-contact { margin-bottom:8px!important; }
  footer.footer-new .footer-text, footer.footer-new .footer-contact { text-align:center!important; width:100%!important; }
  footer.footer-new .col-md-6.col-lg-4:nth-child(2) > .footer-heading { display:none!important; }
  footer.footer-new .col-md-6.col-lg-4:nth-child(2) > .d-flex { flex-direction:column!important; align-items:center!important; gap:32px!important; width:100%!important; }
  footer.footer-new .col-md-6.col-lg-4:nth-child(2) ul { text-align:center!important; width:100%!important; padding:0!important; margin:0!important; display:flex!important; flex-direction:column!important; align-items:center!important; gap:12px!important; }
  footer.footer-new .col-md-6.col-lg-4:nth-child(2) ul li { padding:0!important; }
  footer.footer-new .col-md-6.col-lg-4:nth-child(2) ul:nth-child(1)::before { content:"Useful Links"; }
  footer.footer-new .col-md-6.col-lg-4:nth-child(2) ul:nth-child(2)::before { content:"What we do"; }
  footer.footer-new .col-md-6.col-lg-4:nth-child(2) ul::before { display:block!important; color:#0d2a4e!important; font-weight:800!important; font-size:1.1rem!important; position:relative!important; padding-bottom:10px!important; margin-bottom:12px!important; text-align:center!important; background-image:linear-gradient(to right,#d7192d 26px,transparent 26px)!important; background-position:center bottom!important; background-size:26px 2px!important; background-repeat:no-repeat!important; }
  footer.footer-new .footer-heading { text-align:center!important; width:100%!important; }
  footer.footer-new .footer-heading::after { left:50%!important; transform:translateX(-50%)!important; }
  footer.footer-new .footer-links a { justify-content:center!important; }
  footer.footer-new .btn-donate-new { display:inline-flex!important; margin:0 auto!important; justify-content:center!important; }
  footer.footer-new .footer-bottom-bar { text-align:center!important; width:100%!important; padding:24px 0 40px!important; margin:32px 0 0!important; border-top:1px solid rgba(56,102,156,.18)!important; }
  footer.footer-new .footer-bottom-bar > div { width:100%!important; display:flex!important; flex-direction:column!important; justify-content:center!important; align-items:center!important; text-align:center!important; padding:0!important; gap:0!important; }
  /* Override the desktop footer paragraph alignment at phone widths. */
  footer.footer-new .footer-bottom-bar p.footer-copyright,
  footer.footer-new .footer-bottom-bar p.footer-credit {
    width:100%!important;
    max-width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-left:0!important;
    padding-right:0!important;
    text-align:center!important;
    display:block!important;
    word-break:break-word!important;
    line-height:1.5!important;
  }
}
