/* ===================================================================
   PearGRN refined navbar — v1_new pages only
   Language: white translucent bar, deep-green accents, pill hover,
   soft-shadow dropdowns. Matches the homepage design system.
   =================================================================== */

/* slimmer fixed bar -> smaller page offset (overrides header2.css) */
body { padding-top: 84px; }

.navbar {
    background: linear-gradient(180deg, rgba(233, 247, 232, .90) 0%, rgba(219, 238, 220, .85) 100%);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid #dcedde;
    box-shadow: 0 1px 3px rgba(27, 33, 41, .04);
    padding: 10px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    transition: padding .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.navbar.scrolled {
    padding: 4px 0;
    background: linear-gradient(180deg, rgba(233, 247, 232, .96) 0%, rgba(219, 238, 220, .92) 100%);
    box-shadow: 0 6px 24px rgba(27, 33, 41, .08);
}

/* header2.css parks every .nav-item at opacity:0 and fades it in.  Once that
   animation has finished, Chrome can stop painting the link text altogether —
   measured on a real page: the glyphs disappear while the computed colour stays
   #454f5b and the computed opacity reads 1.  Forcing the colour does not help;
   only dropping the animation does.  The nav is primary UI on every page, so
   keep the items painted unconditionally. */
.navbar-nav .nav-item {
    opacity: 1;
    transform: none;
    animation: none;
}

/* ---------- brand ---------- */
.navbar-brand { gap: 10px; }
.navbar-brand img {
    width: 38px; height: 38px; margin-right: 0;
    border-radius: 9px;
    transition: transform .25s ease;
}
.navbar-brand:hover img { transform: scale(1.06); }
.navbar-brand span {
    font-size: 1.32rem; font-weight: 800; letter-spacing: -.02em;
    color: #245c3b; transition: color .2s ease;
}
.navbar-brand:hover span { color: #2f7a4e; }

/* ---------- top-level links ---------- */
.navbar-nav .nav-link {
    font-size: .95rem;
    font-weight: 600;
    color: #454f5b;
    padding: .45rem .85rem;
    margin-right: 2px;
    border-radius: 8px;
    position: relative;
    transition: color .2s ease, background-color .2s ease;
}
.navbar-nav .nav-link:hover {
    color: #245c3b;
    background: rgba(47, 122, 78, .08);
}
.navbar-nav .nav-link.active { color: #245c3b; }
.navbar-nav .nav-link.active::after {
    content: ""; position: absolute;
    left: .85rem; right: .85rem; bottom: 1px;
    height: 2px; border-radius: 2px; background: #2f7a4e;
}
.navbar-nav .nav-link.dropdown-toggle::after {
    opacity: .5; margin-left: .45em; vertical-align: .08em;
}

/* ---------- dropdown panels ---------- */
.navbar .dropdown-menu {
    border: 1px solid #e6e9ec;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(27, 33, 41, .12);
    padding: .45rem;
    margin-top: .55rem;
    font-size: .9rem;
}
.navbar .dropdown-item {
    border-radius: 8px;
    padding: .5rem .8rem;
    color: #454f5b;
    font-weight: 500;
    transition: background-color .15s ease, color .15s ease;
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background: rgba(47, 122, 78, .09);
    color: #245c3b;
}
.navbar .dropdown-submenu > .dropdown-toggle { color: #454f5b; }
.navbar .dropdown-submenu > .dropdown-toggle:hover { color: #245c3b; }

/* submenu flyout inherits the card look */
.navbar .dropdown-submenu > .dropdown-menu {
    margin-top: -.5rem;
    border-radius: 12px;
}

/* ---------- collapsed (mobile / narrow) menu ---------- */
@media (max-width: 1399.98px) {
    .navbar-collapse {
        background: #fff;
        border: 1px solid #e6e9ec;
        border-radius: 12px;
        padding: .75rem;
        margin-top: .75rem;
        box-shadow: 0 12px 40px rgba(27, 33, 41, .10);
        max-height: 75vh;
        overflow-y: auto;
    }
    .navbar-nav .nav-link.active::after { display: none; }
    .navbar-nav .nav-link.active {
        background: rgba(47, 122, 78, .10);
    }
}

/* ---------- toggler button ---------- */
.navbar-toggler {
    border: 1px solid #dfe4e8;
    border-radius: 8px;
    padding: .35rem .6rem;
}
.navbar-toggler:focus {
    box-shadow: 0 0 0 .2rem rgba(47, 122, 78, .18);
}
