/* ============================================================================
   publicNav.css — "new top navigation" ported from the area pages to the
   public pages (childCare / salesTrends / benchmarks / etc).

   Makes the shared white top nav a DARK, transparent-over-hero bar that turns
   navy on scroll, with white menu links and the animated AREASEARCH wordmark —
   matching newAreaHTML.php (body.cfa). SELF-CONTAINED: not scoped to body.cfa,
   does NOT touch the shared aaAsCustomCss.css, and is linked ONLY by the target
   public pages. Pair with publicNav.js (navbar-scrolled toggle).

   Requires: an .eco-hero-wrapper as the first content block (the dark hero the
   transparent nav overlays). The page's nav is already position:fixed and the
   body reserves space via padding-top:80px — we drop that so the dark hero
   reaches y=0 behind the nav, and pad the hero content to clear the bar.
   ============================================================================ */

/* hero reaches the top, behind the fixed nav */
body { padding-top: 0 !important; }
.eco-hero-wrapper { margin-top: 0 !important; }
.eco-hero-wrapper .eco-hero { padding-top: 116px !important; }
@media (max-width: 991px) {
    .eco-hero-wrapper .eco-hero { padding-top: 96px !important; }
}

/* transparent at top → navy on scroll (publicNav.js toggles .navbar-scrolled) */
.topNav-navbar {
    background: transparent !important;
    transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.topNav-navbar.navbar-scrolled {
    background: rgba(10, 17, 25, 0.94) !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 18px rgba(0, 0, 0, .28);
}
/* the shared CSS forces a solid-white navbar at <=768px (higher specificity);
   match that specificity here (loaded later) to keep the dark theme on phones */
@media (max-width: 768px) {
    .topNav-header .topNav-navbar { background: transparent !important; }
    .topNav-header .topNav-navbar.navbar-scrolled { background: rgba(10, 17, 25, 0.94) !important; }
}

/* white menu links + controls on the dark bar — DESKTOP only. At <992px the menu
   collapses into the shared full-screen WHITE panel which keeps its dark links +
   orange search button (exactly like newAreaHTML.php); forcing white there was wrong. */
@media (min-width: 992px) {
    .topNav-menu .nav-link { color: #fff !important; }
    .topNav-menu .nav-link:hover,
    .topNav-menu .nav-link:focus { color: #1ABC9C !important; }
    .topNav-search-icon { color: #fff !important; }
    .topNav-search-icon:hover { color: #1ABC9C !important; }
}

/* mobile controls (hamburger + section-spy button) legible on dark */
.topNav-navbar .navbar-toggler { border-color: rgba(255, 255, 255, .4) !important; }
.topNav-navbar .navbar-toggler-icon { filter: invert(1) brightness(2); }
.topNav-navbar .btn-outline-secondary {
    color: #fff !important;
    border-color: rgba(255, 255, 255, .4) !important;
}
.topNav-navbar .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, .12) !important;
}

/* Expanded mobile menu (<992px): full-screen white panel with full-width rows,
   dividers, left-aligned dark links, collapsible submenus, and a full-width
   ORANGE search button — ported verbatim from newAreaCss26CF.css so it matches
   newAreaHTML.php exactly (the public pages don't load that stylesheet). */
@media (max-width: 991px) {
    .topNav-header #navbarNavDropdown {
        background: white !important; box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        padding: 0 !important; overflow-x: hidden !important;
    }
    #navbarNavDropdown .navbar-nav { flex-direction: column !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
    #navbarNavDropdown .nav-item { width: 100% !important; margin: 0 !important; border-bottom: 1px solid rgba(0,0,0,0.08); }
    #navbarNavDropdown .nav-link {
        padding: 18px 20px !important; font-size: 17px !important; color: #333 !important;
        display: flex !important; justify-content: space-between !important; align-items: center !important;
        text-decoration: none !important; background: transparent !important; border: none !important;
        width: 100% !important; text-align: left !important; cursor: pointer !important;
    }
    #navbarNavDropdown .nav-link:hover, #navbarNavDropdown .nav-link:focus { background-color: rgba(237,139,0,0.08) !important; color: #333 !important; outline: none !important; }
    #navbarNavDropdown .dropdown-toggle::after {
        content: '+' !important; border: none !important; font-size: 24px !important; font-weight: 300 !important;
        color: #999 !important; margin-left: auto !important; width: auto !important; height: auto !important; vertical-align: unset !important;
    }
    #navbarNavDropdown .dropdown.show .dropdown-toggle::after { content: '\2212' !important; transform: none !important; }
    #navbarNavDropdown .dropdown-menu {
        position: static !important; float: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important;
        border: none !important; border-radius: 0 !important; background: rgba(0,0,0,0.02) !important; box-shadow: none !important;
        transform: none !important; display: none !important; max-height: 0 !important; overflow: hidden !important;
        transition: max-height 0.3s ease-out !important; inset: auto !important;
    }
    #navbarNavDropdown .dropdown.show .dropdown-menu { display: block !important; max-height: 600px !important; transition: max-height 0.3s ease-in !important; }
    #navbarNavDropdown .dropdown-item {
        padding: 14px 20px 14px 40px !important; font-size: 16px !important; color: #666 !important;
        border-bottom: 1px solid rgba(0,0,0,0.05) !important; background: transparent !important; border-radius: 0 !important; white-space: normal !important;
    }
    #navbarNavDropdown .dropdown-item:last-child { border-bottom: none !important; }
    #navbarNavDropdown .dropdown-item:hover, #navbarNavDropdown .dropdown-item:focus { background-color: rgba(237,139,0,0.1) !important; color: #333 !important; }
    /* the search control becomes a full-width orange button */
    #navbarNavDropdown .topNav-search-icon {
        margin: 20px !important; width: calc(100% - 40px) !important; display: flex !important;
        justify-content: center !important; align-items: center !important;
        background: #ED8B00 !important; color: #fff !important; border: none !important;
        padding: 12px !important; border-radius: 8px !important; font-size: 16px !important;
    }
}

/* ----------------------------------------------------------------------------
   AREASEARCH wordmark — white "AREA" + palette-cycling "SEARCH" beside the logo.
   Letters write on at load via CSS (these pages have no GSAP); the area page's
   GSAP write-on degrades to exactly this static-with-palette behaviour.
   ---------------------------------------------------------------------------- */
.cfa-wordmark {
    display: inline-block;
    margin-left: 7px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.12em;
    line-height: 1;
    vertical-align: middle;
    user-select: none;
    white-space: nowrap;
}
/* phones: hide the wordmark by default (it would wrap the nav next to the
   section-spy button). When the in-page nav is active (body.cfa-inpage-on) the
   section-spy button is replaced by the pill bar, freeing room → wordmark shows. */
@media (max-width: 767px) { body:not(.cfa-inpage-on) .cfa-wordmark { display: none; } }
@media (max-width: 359px) { .cfa-wordmark { display: none; } }
@media (min-width: 1200px) { .cfa-wordmark { font-size: 1.45rem; letter-spacing: 0.14em; } }
.cfa-wm-area { color: #fff; }
.cfa-wm-search { color: #1ABC9C; animation: cfaSearchPalette 28s ease-in-out infinite; }
.cfa-wm-l { display: inline-block; animation: cfaWmReveal .5s ease both; }
.cfa-wm-area .cfa-wm-l:nth-child(1) { animation-delay: .20s; }
.cfa-wm-area .cfa-wm-l:nth-child(2) { animation-delay: .27s; }
.cfa-wm-area .cfa-wm-l:nth-child(3) { animation-delay: .34s; }
.cfa-wm-area .cfa-wm-l:nth-child(4) { animation-delay: .41s; }
.cfa-wm-search .cfa-wm-l:nth-child(1) { animation-delay: .48s; }
.cfa-wm-search .cfa-wm-l:nth-child(2) { animation-delay: .55s; }
.cfa-wm-search .cfa-wm-l:nth-child(3) { animation-delay: .62s; }
.cfa-wm-search .cfa-wm-l:nth-child(4) { animation-delay: .69s; }
.cfa-wm-search .cfa-wm-l:nth-child(5) { animation-delay: .76s; }
.cfa-wm-search .cfa-wm-l:nth-child(6) { animation-delay: .83s; }
@keyframes cfaWmReveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cfaSearchPalette {
    0%   { color: #1ABC9C; }
    20%  { color: #0E6E7C; }
    40%  { color: #ED8B00; }
    60%  { color: #999967; }
    80%  { color: #6E0F31; }
    100% { color: #1ABC9C; }
}
@media (prefers-reduced-motion: reduce) {
    .cfa-wm-search { animation: none; }
    .cfa-wm-l { animation: none; }
}

/* ============================================================================
   IN-PAGE SECTION NAV — ported from the area pages (newAreaHTML.php):
   a right-edge floating DOCK (>=1200px) + a horizontal-scrolling PILL BAR
   (<1200px). Built by publicNav.js from each page's section links; it adds
   body.cfa-inpage-on only when it successfully builds, so pages without a
   section nav are untouched. The original left .sideNav nav-pills become the
   hidden scrollspy model; the mobile section-spy dropdown is replaced by the bar.
   ============================================================================ */

/* --- right-edge dock (desktop >=1200px) --- */
#cfaDockWrap {
    position: fixed; top: calc(50% + 12px); right: 14px; width: 72px; z-index: 1028;
    padding: 16px 0; border-radius: 36px;
    background: radial-gradient(140% 60% at 50% 0%, rgba(26,188,156,0.14), transparent 60%),
                linear-gradient(170deg, rgba(9,15,23,0.94) 0%, rgba(17,29,41,0.92) 55%, rgba(21,35,51,0.90) 100%);
    -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(26,188,156,0.22);
    box-shadow: 0 18px 48px rgba(4,10,18,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
    transform: translateY(-50%) translateX(calc(100% + 70px));
    transition: transform .55s cubic-bezier(.22,.8,.3,1);
    max-height: calc(100vh - 118px); display: flex; flex-direction: column; align-items: stretch;
}
#cfaDockWrap.cfa-dock-in { transform: translateY(-50%) translateX(0); }
#cfaDock { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0; padding: 0; }
.cfa-dock-node {
    position: relative; width: 72px; height: 34px; display: flex; align-items: center; justify-content: center;
    background: transparent; border: none; padding: 0; cursor: pointer;
}
.cfa-dock-node i {
    font-size: 16px; line-height: 1; color: rgba(255,255,255,0.6);
    transition: color .22s ease, transform .2s ease; pointer-events: none;
}
.cfa-dock-node:hover i, .cfa-dock-node:focus-visible i { color: #1ABC9C; transform: scale(1.16); }
.cfa-dock-node.active i { color: #ED8B00; transform: scale(1.2); }
.cfa-dock-node:focus-visible { outline: 2px solid rgba(26,188,156,0.6); outline-offset: -6px; border-radius: 5px; }
.cfa-dock-label {
    position: absolute; right: 84px; top: 50%; transform: translateY(-50%) translateX(10px);
    opacity: 0; pointer-events: none; white-space: nowrap;
    font-family: 'Raleway', sans-serif; font-weight: 600; font-size: .72rem; letter-spacing: .11em; text-transform: uppercase;
    color: rgba(255,255,255,0.92);
    background: linear-gradient(165deg, rgba(13,22,32,0.96) 0%, rgba(17,29,41,0.96) 100%);
    border: 1px solid rgba(26,188,156,0.25); border-right: 2px solid #ED8B00; border-radius: 5px;
    padding: 7px 13px; box-shadow: 0 10px 24px rgba(4,10,18,0.4);
    transition: opacity .2s ease, transform .2s ease;
}
.cfa-dock-label .cfa-dock-num { color: rgba(237,139,0,0.9); margin-right: 7px; font-size: .85em; font-variant-numeric: tabular-nums; }
.cfa-dock-node:hover .cfa-dock-label, .cfa-dock-node:focus-visible .cfa-dock-label, .cfa-dock-node.active .cfa-dock-label {
    opacity: 1; transform: translateY(-50%) translateX(0);
}
@media (max-height: 829px) { .cfa-dock-node { height: 30px; } #cfaDockWrap { padding: 12px 0; } }
@media (max-width: 1199px) { #cfaDockWrap { display: none !important; } }
@media (prefers-reduced-motion: reduce) { #cfaDockWrap { transition: none; } }

/* the left section pills become the hidden scrollspy model; keep the ad/guide card */
body.cfa-inpage-on .sideNav .nav-pills { display: none !important; }

/* reserve room on the right so content doesn't slide under the floating dock */
@media (min-width: 1200px) {
    body.cfa-inpage-on #content { padding-right: 100px; }
}

/* --- mobile horizontal pill bar (<1200px) --- */
@media (max-width: 1199px) {
    #mobileBottomNav.mobile-bottom-nav {
        position: fixed; top: 69px; left: 0; right: 0; bottom: auto; z-index: 1029; display: none;
        background: rgba(255,255,255,0.96);
        -webkit-backdrop-filter: saturate(180%) blur(8px); backdrop-filter: saturate(180%) blur(8px);
        border-bottom: 1px solid rgba(0,0,0,0.08); box-shadow: 0 6px 18px rgba(0,0,0,0.06); padding: 0;
    }
    #mobileBottomNav.mobile-bottom-nav.show { display: block; }
    #mobileBottomNav .nav-scroll-container {
        display: flex; gap: 6px; padding: 12px 12px 9px;
        overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none;
    }
    #mobileBottomNav .nav-scroll-container::-webkit-scrollbar { display: none; }
    #mobileBottomNav .nav-link {
        display: inline-flex; flex-direction: row; align-items: center; gap: 6px; flex-shrink: 0; min-width: 0;
        padding: 9px 14px 7px; background: transparent; border: 1px solid rgba(0,0,0,0.1); border-radius: 999px;
        color: #475569; scroll-snap-align: center;
        transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    }
    #mobileBottomNav .nav-link i { font-size: 11px; margin: 0; opacity: 0.6; }
    #mobileBottomNav .nav-link span {
        font-family: 'Raleway', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: .02em;
        text-transform: none; white-space: nowrap;
    }
    #mobileBottomNav .nav-link.active { background: #ED8B00; color: #fff; border-color: #ED8B00; box-shadow: 0 2px 6px rgba(237,139,0,0.25); }
    #mobileBottomNav .nav-link.active i { opacity: 1; color: #fff; }
    /* replace the section-spy dropdown with the pill strip + push the hamburger right */
    body.cfa-inpage-on .topNav-navbar .dropdown.d-lg-none { display: none !important; }
    body.cfa-inpage-on .topNav-navbar .navbar-toggler { margin-left: auto; }
    /* anchor jumps clear the fixed nav + bar */
    body.cfa-inpage-on [id] { scroll-margin-top: 150px; }
}

/* ============================================================================
   TOP-NAV DROPDOWN PANELS — dark glass, matching newAreaHTML.php. Desktop only
   (>=992px, where the menu is inline with hover/click dropdowns). Re-scoped from
   newAreaCfA.css; !important defeats Bootstrap's white panel AND the legacy
   aaAsCustomJS2025 hover handlers that write inline white backgrounds + padding.
   ============================================================================ */
@media (min-width: 992px) {
    .topNav-navbar .dropdown-menu {
        background: linear-gradient(165deg, rgba(13,22,32,0.97) 0%, rgba(17,29,41,0.97) 100%) !important;
        -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
        border: 1px solid rgba(26,188,156,0.22) !important;
        border-top: 2px solid #ED8B00 !important;
        border-radius: 0 0 6px 6px !important;
        box-shadow: 0 24px 48px rgba(4,10,18,0.55) !important;
        padding: 0.45rem 0 !important; margin-top: 0 !important; min-width: 230px;
        animation: cfaDropIn 0.2s ease-in-out;
    }
    /* legacy hover handler writes inline white bg onto the LI — kill at li level */
    .topNav-navbar .dropdown-menu li { background: transparent !important; color: inherit !important; }
    .topNav-navbar .dropdown-menu .dropdown-item {
        color: rgba(255,255,255,0.82) !important;
        font-family: 'Raleway', sans-serif; font-weight: 600; font-size: 0.73rem;
        letter-spacing: 0.11em; text-transform: uppercase;
        padding: 0.68rem 1.3rem !important; border-left: 2px solid transparent;
        background: transparent !important;
        transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, padding-left 0.18s ease;
    }
    .topNav-navbar .dropdown-menu .dropdown-item:hover,
    .topNav-navbar .dropdown-menu .dropdown-item:focus {
        color: #1ABC9C !important; background: rgba(26,188,156,0.08) !important;
        border-left-color: #ED8B00; padding-left: 1.55rem !important;
    }
    .topNav-navbar .dropdown-menu .dropdown-divider { border-color: rgba(255,255,255,0.1); opacity: 1; }
    /* the injected animated .dropdown-border sweep reads as a stray orange dash — hide it */
    .topNav-navbar .dropdown-menu .dropdown-border { display: none !important; }
    /* scrolled: panel reads as a seamless extension of the navy bar */
    .topNav-navbar.navbar-scrolled .dropdown-menu {
        border-top: none !important; margin-top: 0 !important;
        background: radial-gradient(160% 120% at 85% -30%, rgba(26,188,156,0.10), transparent 55%),
                    linear-gradient(165deg, rgba(11,18,27,0.97) 0%, rgba(17,29,41,0.97) 100%) !important;
    }
}
@keyframes cfaDropIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
