/* v1.4.1 Business Card Brand System: header/footer + dark/light mode fixes */
:root,
html[data-theme="light"]{
  --ncr-brand-red:#8b2e18;
  --ncr-brand-red-2:#c94818;
  --ncr-brand-orange:#f29422;
  --ncr-brand-gold:#f4b04f;
  --ncr-brand-ink:#1a0f0c;
  --ncr-brand-ink-2:#281612;
  --ncr-brand-cream:#fff6ea;
  --ncr-brand-cream-2:#f4e2cd;
  --ncr-header-bg:rgba(255,246,234,.96);
  --ncr-header-text:#20120f;
  --ncr-header-muted:#8b2e18;
  --ncr-header-border:rgba(139,46,24,.18);
  --ncr-header-hover:#fff0dc;
  --ncr-footer-bg:#120906;
  --ncr-footer-card:rgba(255,255,255,.075);
  --ncr-footer-text:#fff6ea;
  --ncr-footer-muted:rgba(255,246,234,.78);
  --ncr-footer-border:rgba(242,148,34,.22);
  --ncr-focus:#f29422;
}
html[data-theme="dark"]{
  --color-bg:#110908!important;
  --color-surface:#1a100d!important;
  --color-surface-2:#21130f!important;
  --color-surface-offset:#281711!important;
  --color-divider:#462016!important;
  --color-border:#60301f!important;
  --color-text:#fff6ea!important;
  --color-text-muted:#ddc1aa!important;
  --color-primary:#f29422!important;
  --color-primary-hover:#ffb34e!important;
  --color-primary-active:#c94818!important;
  --color-primary-highlight:rgba(242,148,34,.15)!important;
  --color-accent:#ffcc75!important;
  --color-accent-highlight:rgba(255,204,117,.14)!important;
  --ncr-header-bg:rgba(18,9,6,.95);
  --ncr-header-text:#fff6ea;
  --ncr-header-muted:#ffc978;
  --ncr-header-border:rgba(242,148,34,.25);
  --ncr-header-hover:rgba(242,148,34,.14);
  --ncr-footer-bg:#090504;
  --ncr-footer-card:rgba(242,148,34,.09);
  --ncr-footer-text:#fff6ea;
  --ncr-footer-muted:rgba(255,246,234,.76);
  --ncr-footer-border:rgba(242,148,34,.26);
}
html[data-theme="dark"] body.ncr-theme,
body.ncr-theme[data-theme="dark"]{background:radial-gradient(circle at 85% 0%,rgba(242,148,34,.12),transparent 28rem),#110908!important;color:var(--color-text)!important;}

/* Header: high contrast in both modes */
.ncr-theme .site-header.brand-site-header{
  background:var(--ncr-header-bg)!important;
  color:var(--ncr-header-text)!important;
  border-bottom:1px solid var(--ncr-header-border)!important;
  box-shadow:0 12px 36px rgba(18,8,4,.16)!important;
}
html[data-theme="dark"] .ncr-theme .site-header.brand-site-header{box-shadow:0 18px 50px rgba(0,0,0,.42)!important;}
.ncr-theme .brand-lockup,.ncr-theme .brand-title,.ncr-theme .primary-menu .menu-item a,.ncr-theme .primary-nav .menu-item a,.ncr-theme .nav-link{color:var(--ncr-header-text)!important;}
.ncr-theme .brand-subtitle,.ncr-theme .header-phone{color:var(--ncr-header-muted)!important;}
.ncr-theme .primary-menu .menu-item a:hover,.ncr-theme .primary-nav .menu-item a:hover,.ncr-theme .nav-link:hover{background:var(--ncr-header-hover)!important;color:var(--ncr-header-muted)!important;}
.ncr-theme .brand-icon-wrap{background:#fff!important;border-color:rgba(242,148,34,.32)!important;box-shadow:0 12px 32px rgba(139,46,24,.20)!important;}
html[data-theme="dark"] .ncr-theme .brand-icon-wrap{background:#160b08!important;box-shadow:0 12px 34px rgba(242,148,34,.12)!important;}
.ncr-theme .theme-toggle,.ncr-theme .menu-btn{
  color:var(--ncr-header-text)!important;
  background:rgba(255,255,255,.55)!important;
  border:1px solid var(--ncr-header-border)!important;
  border-radius:14px!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .ncr-theme .theme-toggle,html[data-theme="dark"] .ncr-theme .menu-btn{background:rgba(255,255,255,.08)!important;}
.ncr-theme .theme-toggle:hover,.ncr-theme .menu-btn:hover{background:var(--ncr-header-hover)!important;color:var(--ncr-header-muted)!important;}
.ncr-theme .header-actions .btn-primary,.ncr-theme .header-help{background:linear-gradient(135deg,var(--ncr-brand-red),var(--ncr-brand-red-2))!important;color:#fff!important;}
html[data-theme="dark"] .ncr-theme .header-actions .btn-primary,html[data-theme="dark"] .ncr-theme .header-help{background:linear-gradient(135deg,#f29422,#c94818)!important;color:#160b08!important;}
.ncr-theme .brand-mobile-nav{background:var(--ncr-header-bg)!important;border-color:var(--ncr-header-border)!important;box-shadow:0 24px 55px rgba(0,0,0,.22)!important;}

/* Footer: business-card inspired, readable, no more pale-on-pale text */
.ncr-theme .site-footer.brand-footer,
.ncr-theme .site-footer.ncr-business-card-footer{
  position:relative;
  overflow:hidden;
  isolation:isolate;
  background:
    linear-gradient(90deg,rgba(9,5,4,.92),rgba(32,12,8,.84),rgba(9,5,4,.95)),
    url('../images/brand/next-chapter-recovery-business-card-banner.png') center/cover no-repeat!important;
  color:var(--ncr-footer-text)!important;
  border-top:1px solid var(--ncr-footer-border)!important;
  padding-top:0!important;
}
.ncr-theme .ncr-footer-brand-strip{height:8px;background:linear-gradient(90deg,#5b0f0a,#f29422,#8b2e18,#f29422,#5b0f0a);box-shadow:0 0 40px rgba(242,148,34,.45);}
.ncr-theme .ncr-footer-content-wrap{position:relative;z-index:1;padding-block:clamp(2.2rem,5vw,4.5rem) 1.5rem;}
.ncr-theme .brand-footer-grid{gap:clamp(1.25rem,3vw,2.25rem)!important;align-items:start;}
.ncr-theme .brand-footer-brand,.ncr-theme .brand-footer .footer-col{
  background:var(--ncr-footer-card)!important;
  border:1px solid var(--ncr-footer-border)!important;
  border-radius:24px;
  padding:1.2rem;
  backdrop-filter:blur(10px);
}
.ncr-theme .brand-footer .footer-logo-img{background:rgba(255,255,255,.96)!important;border:1px solid rgba(242,148,34,.28)!important;border-radius:18px!important;padding:.55rem!important;box-shadow:0 18px 42px rgba(0,0,0,.28)!important;}
.ncr-theme .brand-footer h4,.ncr-theme .brand-footer .logo-title{color:var(--ncr-footer-text)!important;font-weight:950!important;}
.ncr-theme .brand-footer p,.ncr-theme .brand-footer li,.ncr-theme .brand-footer .footer-bottom p{color:var(--ncr-footer-muted)!important;}
.ncr-theme .brand-footer a{color:#ffd09a!important;text-decoration:none!important;font-weight:850;}
.ncr-theme .brand-footer a:hover{color:#fff!important;text-decoration:underline!important;text-underline-offset:4px;}
.ncr-theme .brand-footer .crisis-pill{background:linear-gradient(135deg,#f29422,#c94818)!important;color:#160b08!important;border:0!important;box-shadow:0 14px 30px rgba(242,148,34,.16)!important;}
.ncr-theme .brand-footer .footer-help-pill{background:rgba(255,255,255,.12)!important;color:#fff6ea!important;border:1px solid rgba(255,255,255,.14)!important;}
.ncr-theme .brand-footer .footer-bottom{border-top:1px solid var(--ncr-footer-border)!important;margin-top:1.25rem;}

/* Page/card dark mode cleanup */
html[data-theme="dark"] .brand-content-card,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .resource-card,
html[data-theme="dark"] .ncr-form,
html[data-theme="dark"] .ncr-calendar-card,
html[data-theme="dark"] .ncr-tool-card,
html[data-theme="dark"] .ncr-admin-panel,
html[data-theme="dark"] .ncr-admin-card,
html[data-theme="dark"] .ncr-portal-login{
  background:var(--color-surface-2)!important;
  color:var(--color-text)!important;
  border-color:var(--color-border)!important;
  box-shadow:0 20px 60px rgba(0,0,0,.32)!important;
}
html[data-theme="dark"] .entry-content,html[data-theme="dark"] .entry-content p,html[data-theme="dark"] .section-desc,html[data-theme="dark"] .brand-path-card p{color:var(--color-text-muted)!important;}
html[data-theme="dark"] .brand-path-card{background:linear-gradient(180deg,#21130f,#180d0a)!important;border-color:var(--color-border)!important;color:var(--color-text)!important;}
html[data-theme="dark"] .brand-start-section,html[data-theme="dark"] .services-bg,html[data-theme="dark"] .contact-bg{background:var(--color-surface-offset)!important;}
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{background:#120907!important;color:var(--color-text)!important;border-color:var(--color-border)!important;}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#ab917e!important;}

@media(max-width:1180px){
  .ncr-theme .brand-header-inner{grid-template-columns:auto auto!important;justify-content:space-between;}
  .ncr-theme .header-actions{gap:.45rem;}
  .ncr-theme .primary-nav{display:none!important;}
  .ncr-theme .menu-btn{display:flex!important;}
}
@media(max-width:782px){
  .ncr-theme .site-header.brand-site-header{position:sticky!important;top:0!important;}
  .ncr-theme .brand-footer-brand,.ncr-theme .brand-footer .footer-col{padding:1rem;border-radius:18px;}
  .ncr-theme .brand-footer .footer-logo-img{width:min(180px,100%);}
  .ncr-theme .brand-header-inner{min-height:66px!important;}
  .ncr-theme .theme-toggle{display:flex!important;width:42px;height:42px;}
}
