/* Bethel brand colors; adjustable under Appearance > Customize > Bethel Brand Colors */
:root {
  --bethel-primary: #003399;
  --bethel-deep: #002466;
  --bethel-accent: #174AB2;
  --bethel-silver: #CCCCCC;
  --bethel-light: #F3F6FA;
  --bethel-text: #334155;
  --bethel-line: #DCE2EB;
  --bethel-white: #FFFFFF;
}

/* Global brand styling. Child theme inherits core layout and markup. */
body { color: var(--bethel-text); }
a { text-underline-offset: .16em; }
a:hover { color:var(--bethel-primary); }
:where(a,button,input,select,textarea,[tabindex]):focus-visible {
  outline: 3px solid var(--bethel-accent); outline-offset: 3px;
}
::selection { background: #D6E3FC; color:var(--bethel-deep); }

/* Native WordPress headings and buttons outside custom Elementor HTML. */
:where(.entry-content,.post-content,.page-content) :where(h1,h2,h3,h4,h5,h6) { color: var(--bethel-deep); }
:where(.entry-content,.post-content,.page-content) :where(a:not(.button):not(.wp-block-button__link)) { color: var(--bethel-primary); }
:where(.entry-content,.post-content,.page-content) :where(a:not(.button):not(.wp-block-button__link)):hover { color:var(--bethel-deep); }
.wp-block-button__link, .wp-element-button,
button[type="submit"], input[type="submit"] {
  background: var(--bethel-primary); color:#fff; border-color:var(--bethel-primary);
  border-radius:6px; transition:background-color .2s ease,color .2s ease;
}
.wp-block-button__link:hover,.wp-element-button:hover,
button[type="submit"]:hover,input[type="submit"]:hover {
  background:var(--bethel-deep); color:#fff;
}

/* Apply branding to common Kuara Core header/footer structures without changing layout. */
.site-header, #masthead, .main-header-bar, .kuara-header,
.header-main, .primary-header { background-color: #fff; }
.site-header .site-title a, #masthead .site-title a { color: var(--bethel-primary); }
.site-header :where(.main-navigation,.primary-navigation,.nav-menu) a,
#masthead :where(.main-navigation,.primary-navigation,.nav-menu) a {
  color: var(--bethel-deep);
}
.site-header :where(.main-navigation,.primary-navigation,.nav-menu) a:hover,
.site-header :where(.main-navigation,.primary-navigation,.nav-menu) .current-menu-item > a,
#masthead :where(.main-navigation,.primary-navigation,.nav-menu) a:hover,
#masthead :where(.main-navigation,.primary-navigation,.nav-menu) .current-menu-item > a {
  color: var(--bethel-primary);
}
.site-footer, #colophon, .kuara-footer { background-color:var(--bethel-deep); color:#f3f6fa; }
.site-footer a, #colophon a, .kuara-footer a { color:#fff; }
.site-footer a:hover,#colophon a:hover,.kuara-footer a:hover { color:#d6e3fc; }

/* New Elementor widgets will use these globals as site design tokens. */
.elementor-kit-default {
  --e-global-color-primary: var(--bethel-primary);
  --e-global-color-secondary: var(--bethel-silver);
  --e-global-color-text: var(--bethel-text);
  --e-global-color-accent: var(--bethel-accent);
}

/* ================================================================
   Legacy Advantage First page bridge (switchable from Customizer).
   It replaces the custom CSS variables of existing Elementor HTML
   without modifying content. It cannot replace hardcoded text,
   images, image links, or all one-off inline colors.
   Body class is added by functions.php when enabled.
   IMPORTANT: Keep the following block scoped to body.bethel-bridge.
   ================================================================ */
body.bethel-bridge .afh-home,
body.bethel-bridge .afh-hero,
body.bethel-bridge .afh-welcome,
body.bethel-bridge .afh-services,
body.bethel-bridge .afh-why,
body.bethel-bridge .afh-testimonials,
body.bethel-bridge .afh-contact {
  --afh-navy:var(--bethel-primary) !important;
  --afh-navy-dark:var(--bethel-deep) !important;
  --afh-gold:var(--bethel-accent) !important;
  --afh-gold-light:#DCE5F5 !important;
  --afh-teal:var(--bethel-primary) !important;
  --afh-ink:var(--bethel-deep) !important;
  --afh-muted:var(--bethel-text) !important;
  --afh-mist:var(--bethel-light) !important;
  --afh-cream:#FAFBFD !important;
  --afh-shadow:0 16px 36px rgba(0,36,102,.10) !important;
}
body.bethel-bridge .af-about {
  --aa-navy:var(--bethel-primary) !important;
  --aa-navy-dark:var(--bethel-deep) !important;
  --aa-gold:var(--bethel-accent) !important;
  --aa-gold-soft:#DCE5F5 !important;
  --aa-teal:var(--bethel-primary) !important;
  --aa-ink:var(--bethel-deep) !important;
  --aa-muted:var(--bethel-text) !important;
  --aa-mist:var(--bethel-light) !important;
  --aa-cream:#FAFBFD !important;
}
body.bethel-bridge .af-skilled-nursing,
body.bethel-bridge .af {
  --af-navy:var(--bethel-primary) !important;
  --af-navy-deep:var(--bethel-deep) !important;
  --af-dark:var(--bethel-deep) !important;
  --af-gold:var(--bethel-accent) !important;
  --af-gold-light:#DCE5F5 !important;
  --af-teal:var(--bethel-primary) !important;
  --af-teal-light:var(--bethel-light) !important;
  --af-green:var(--bethel-accent) !important;
  --af-cream:#FAFBFD !important;
  --af-ink:var(--bethel-deep) !important;
  --af-muted:var(--bethel-text) !important;
  --af-border:var(--bethel-line) !important;
}
body.bethel-bridge .af-companion-care {
  --af-cc-navy:var(--bethel-primary) !important;
  --af-cc-navy-deep:var(--bethel-deep) !important;
  --af-cc-gold:var(--bethel-accent) !important;
  --af-cc-gold-light:#DCE5F5 !important;
  --af-cc-teal:var(--bethel-primary) !important;
  --af-cc-ink:var(--bethel-deep) !important;
  --af-cc-muted:var(--bethel-text) !important;
  --af-cc-border:var(--bethel-line) !important;
}
body.bethel-bridge .af-seniors-care {
  --af-sc-navy:var(--bethel-primary) !important;
  --af-sc-navy-dark:var(--bethel-deep) !important;
  --af-sc-gold:var(--bethel-accent) !important;
  --af-sc-gold-soft:#DCE5F5 !important;
  --af-sc-teal:var(--bethel-primary) !important;
  --af-sc-ink:var(--bethel-deep) !important;
  --af-sc-muted:var(--bethel-text) !important;
  --af-sc-border:var(--bethel-line) !important;
}
/* Other known Advantage Free HTML/Elementor prefixes; map generic legacy tokens. */
body.bethel-bridge .af-personal-care,
body.bethel-bridge .af-about-v2,
body.bethel-bridge .af-contact,
body.bethel-bridge [class~="af-page"] {
  --navy:var(--bethel-primary) !important;
  --navy-dark:var(--bethel-deep) !important;
  --teal:var(--bethel-primary) !important;
  --gold:var(--bethel-accent) !important;
  --cream:var(--bethel-light) !important;
  --ink:var(--bethel-deep) !important;
}
/* Inline SVG fills/strokes in imported Elementor HTML with known AF literals. */
body.bethel-bridge :where(.afh-home,.af-about,.af-about-v2,.af-skilled-nursing,.af-companion-care,.af-seniors-care)
  svg :is(path,rect,circle)[fill="#082e61"] { fill:var(--bethel-primary) !important; }
body.bethel-bridge :where(.afh-home,.af-about,.af-about-v2,.af-skilled-nursing,.af-companion-care,.af-seniors-care)
  svg :is(path,rect,circle)[stroke="#d99007"] { stroke:var(--bethel-silver) !important; }

/* Old teal, gold and navy button patterns replaced with legible royal blue. */
body.bethel-bridge :is(.afh-home,.af-about,.af-about-v2,.af-skilled-nursing,.af-companion-care,.af-seniors-care)
  :is(.afh-hero__button--primary,.aa-btn--gold,.ab2-btn--gold,.af-btn--gold) {
    background:var(--bethel-primary) !important; border-color:var(--bethel-primary) !important; color:#fff !important;
}
body.bethel-bridge :is(.afh-home,.af-about,.af-about-v2,.af-skilled-nursing,.af-companion-care,.af-seniors-care)
  :is(.afh-hero__button--primary,.aa-btn--gold,.ab2-btn--gold,.af-btn--gold):hover {
    background:var(--bethel-deep) !important; border-color:var(--bethel-deep) !important;
}

/* Avoid layout shifts and respect reduced-motion preferences. */
@media(prefers-reduced-motion:reduce) {
  .wp-block-button__link,.wp-element-button,button[type="submit"],input[type="submit"] { transition:none; }
}
