
  /* ===========================================
     HEADER — All styles scoped to #ai_header
     to isolate from global app.css bleed
     =========================================== */

  #ai_header {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
    border-bottom: 1px solid var(--gray-light);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }

  /* Block global app.css link styles inside header */
  #ai_header a,
  #ai_header a:visited,
  #ai_header a:hover,
  #ai_header a:active {
    text-decoration: none;
    cursor: pointer;
  }

  /* --- Desktop nav links --- */
  #ai_header .nav-link {
    display: flex;
    align-items: center;
    padding: 32px 0;
    color: var(--gray-dark);
    font-weight: 500;
    font-size: 16px;
    white-space: nowrap;
    transition: color 150ms ease;
    cursor: pointer;
    text-decoration: none;
  }

  #ai_header a.nav-link:visited {
    color: var(--gray-dark);
  }

  #ai_header .nav-link:hover {
    color: var(--brand-primary);
  }

  /* Dropdown trigger (non-clickable span) */
  #ai_header .nav-dropdown-trigger {
    cursor: default;
  }

  #ai_header .dropdown-arrow {
    margin-left: 4px;
    opacity: 0.7;
    transition: transform 200ms ease, opacity 200ms ease;
  }

  #ai_header .group:hover .dropdown-arrow {
    opacity: 1;
    transform: rotate(180deg);
  }

  /* Active state */
  #ai_header .site-navigation .active {
    color: var(--brand-primary);
    font-weight: 600;
    position: relative;
  }

  #ai_header .site-navigation .active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 2px;
    background-color: var(--brand-primary);
    border-radius: 1px;
  }

  /* --- Dropdown menus --- */
  #ai_header .dropdown-menu {
    position: absolute;
    left: 0;
    margin-top: 0;
    width: 16rem;
    border-radius: 8px;
    background: white;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid var(--gray-light);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 200ms ease, visibility 200ms ease;
    z-index: 50;
    list-style: none;
    padding: 4px 0;
  }

  #ai_header .group:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #ai_header .dropdown-menu li + li {
    border-top: 1px solid #f3f4f6;
  }

  #ai_header .dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--gray-dark);
    transition: all 150ms ease;
  }

  #ai_header .dropdown-menu a:visited {
    color: var(--gray-dark);
  }

  #ai_header .dropdown-menu a:hover {
    background: var(--brand-light);
    color: var(--brand-primary);
    padding-left: 24px;
  }

  /* --- Buttons --- */
  #ai_header .site-button {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 150ms ease;
    cursor: pointer;
  }

  #ai_header .site-button-outline,
  #ai_header .site-button-outline:visited {
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
    background: transparent;
  }

  #ai_header .site-button-outline:hover {
    background: var(--brand-primary);
    color: white;
  }

  #ai_header .site-button-ghost,
  #ai_header .site-button-ghost:visited {
    border: 1px solid var(--gray-light);
    color: var(--gray-dark);
    background: transparent;
  }

  #ai_header .site-button-ghost:hover {
    background: #f9fafb;
  }

  #ai_header .site-button-account,
  #ai_header .site-button-account:visited {
    background: var(--accent);
    color: white;
    border: none;
  }

  #ai_header .site-button-account:hover {
    background: #1f3a0f;
  }

  #ai_header .site-button:focus,
  #ai_header .nav-link:focus {
    outline: none;
  }

  #ai_header .site-button:focus-visible,
  #ai_header .nav-link:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
  }

  /* --- Search button --- */
  #ai_header .search-btn {
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 150ms ease;
  }

  #ai_header .search-btn:hover {
    color: var(--accent);
  }

  /* --- Logo --- */
  #ai_header .site-logo {
    transition: transform 300ms ease;
  }

  #ai_header .site-logo:hover {
    transform: scale(1.05);
  }

  /* --- Homepage transparent header (dark mode) --- */
  #ai_header.header-dark {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
  }

  #ai_header.header-dark .nav-link,
  #ai_header.header-dark .nav-link:visited {
    color: white;
  }

  #ai_header.header-dark .nav-link:hover {
    color: rgba(255,255,255,0.8);
  }

  #ai_header.header-dark .search-btn {
    color: white;
  }

  #ai_header.header-dark .search-btn:hover {
    color: rgba(255,255,255,0.8);
  }

  #ai_header.header-dark > .container .site-button-outline,
  #ai_header.header-dark > .container .site-button-outline:visited {
    border-color: white;
    color: white;
  }

  #ai_header.header-dark > .container .site-button-outline:hover {
    background: white;
    color: var(--brand-primary);
  }

  #ai_header.header-dark .dropdown-arrow i,
  #ai_header.header-dark .nav-link i,
  #ai_header.header-dark .nav-link svg {
    color: inherit;
  }

  /* --- Mobile nav --- */
  #ai_header .mobile-nav-link,
  #ai_header .mobile-nav-link:visited {
    color: var(--gray-dark);
    font-size: 16px;
    cursor: pointer;
  }

  #ai_header .mobile-nav-link:hover {
    color: var(--brand-primary);
  }

  #ai_header .mobile-nav-label {
    color: var(--gray-dark);
    font-size: 16px;
    cursor: default;
  }

  #ai_header .mobile-submenu-toggle {
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }

  #ai_header .mobile-submenu-toggle:hover {
    color: var(--brand-primary);
  }

  #ai_header .mobile-submenu-toggle i {
    transition: transform 200ms ease;
  }

  #ai_header .mobile-submenu-toggle.active i {
    transform: rotate(180deg);
  }

  /* Override desktop dropdown styles for mobile submenus */
  #ai_header .mobile-submenu.dropdown-menu {
    position: static;
    width: auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding: 0;
  }

  #ai_header .mobile-submenu.dropdown-menu.hidden {
    display: none;
  }

  #ai_header .mobile-submenu a,
  #ai_header .mobile-submenu a:visited {
    color: #6b7280;
    font-size: 16px;
  }

  #ai_header .mobile-submenu a:hover {
    color: var(--brand-primary);
  }

  /* --- Brand color utilities (used by icons in dropdown) --- */
  .text-brand-primary { color: var(--brand-primary) !important; }
  .text-accent { color: var(--accent) !important; }

  /* --- Responsive font sizing --- */
  @media (max-width: 1440px) {
    #ai_header .site-navigation { flex-wrap: nowrap; }
    #ai_header .nav-link { font-size: 15px; }
    #ai_header .site-button { font-size: 15px; padding: 10px 20px; }
  }

  @media (max-width: 1200px) {
    #ai_header .nav-link { font-size: 14px; }
    #ai_header .site-button { font-size: 14px; padding: 8px 16px; }
  }



:root {
  --footer-dark: #1a1a1a;
}

.footer-montserrat {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.footer-brand-bg {
  background-color: var(--footer-dark);
}

.footer-text-white {
  color: var(--white);
}

.footer-brand-primary-bg {
  background-color: var(--brand-primary);
}

.footer-brand-primary-bg:hover {
  background-color: var(--brand-dark);
}

.footer-accent-bg {
  background-color: var(--accent);
}

.footer-focus-brand:focus { outline: none; }
.footer-focus-brand:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.footer-focus-white:focus { outline: none; }
.footer-focus-white:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.footer-hover-brand:hover {
  color: var(--brand-primary);
}

.footer-transition {
  transition: var(--transition-fast);
}

.footer-brand-border {
  border-color: var(--brand-primary);
}

.footer-newsletter {
  display: grid;
  gap: 0.5rem;
  max-width: 32rem;
  font-size: 0.875rem;
}

.footer-newsletter__entry {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-newsletter .footer-newsletter__entry input {
  flex: 1 1 12rem;
  min-width: 0;
  color: #1f2937 !important;
}

.footer-newsletter__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.5;
}

.footer-newsletter__consent input {
  flex: none;
  margin-top: 0.2rem;
  accent-color: var(--brand-primary);
}

.footer-newsletter .footer-newsletter__error {
  color: #fecaca !important;
}

.footer-newsletter__error:empty {
  display: none;
}

.footer-eco-icon {
  color: var(--accent);
}

/* Enforce font colors */
.footer-text-white,
.footer-text-white * {
  color: var(--white) !important;
}

/* Social icons specific styling - Enforce Font Awesome */
.custom-facebook,
.custom-instagram,
.custom-threads {
  color: var(--white) !important;
  display: inline-block !important;
  font-family: "Font Awesome 6 Brands" !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  -webkit-font-smoothing: antialiased !important;
}

.custom-facebook:hover,
.custom-instagram:hover,
.custom-threads:hover {
  color: #D1D5DB !important;
}

/* Enforce Font Awesome icons specifically */
.custom-facebook i,
.custom-instagram i,
.custom-threads i {
  font-family: "Font Awesome 6 Brands" !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  -webkit-font-smoothing: antialiased !important;
  color: inherit !important;
  display: inline-block !important;
}

/* Override any conflicting text styles on social icons */
.custom-facebook i::before,
.custom-instagram i::before,
.custom-threads i::before {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 900 !important;
}

/* Visible controls over the homepage hero; light mobile panel is unchanged. */
#ai_header #mobile-menu-button,
#ai_header .search-btn,
#ai_header #close-sidebar-button {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
#ai_header.header-dark #mobile-menu-button { color: #fff; }
#ai_header.header-dark > .container .site-button-ghost,
#ai_header.header-dark > .container .site-button-ghost:visited {
  color: #fff;
  border-color: #fff;
}
#ai_header.header-dark > .container .site-button-ghost:hover {
  color: var(--gray-dark);
  background: #fff;
}
#ai_header button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
