/* StarBioStyle Global Header V2
   Palette: Obsidian + Emerald + Amber
*/

:root{
    --sb2-bg:#fffdf8;
    --sb2-ink:#14181f;
    --sb2-ink2:#252b35;
    --sb2-muted:#777c85;
    --sb2-line:#e9e5dc;
    --sb2-green:#11856b;
    --sb2-green-dark:#0a6552;
    --sb2-green-soft:#eaf7f2;
    --sb2-gold:#e6a21a;
    --sb2-gold-soft:#fff4d8;
    --sb2-white:#ffffff;
    --sb2-shadow:0 9px 30px rgba(20,24,31,.09);
}

.sbgh2-site-header,
.sbgh2-site-header *{
    box-sizing:border-box;
}

.sbgh2-site-header{
    position:sticky;
    top:0;
    z-index:99990;
    width:100%;
    background:rgba(255,253,248,.97);
    border-bottom:1px solid var(--sb2-line);
    box-shadow:var(--sb2-shadow);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    font-family:inherit;
}

.admin-bar .sbgh2-site-header{top:32px;}

.sbgh2-inner{
    width:min(1220px, calc(100% - 32px));
    min-height:72px;
    margin:0 auto;
    display:flex;
    align-items:center;
    gap:28px;
}

.sbgh2-brand{
    display:inline-flex;
    align-items:center;
    gap:11px;
    text-decoration:none!important;
    flex:0 0 auto;
}

.sbgh2-logo{
    width:40px;
    height:40px;
    border-radius:13px;
    display:grid;
    place-items:center;
    color:#fff;
    background:linear-gradient(145deg,var(--sb2-green),var(--sb2-green-dark));
    font-size:21px;
    line-height:1;
    font-weight:850;
    box-shadow:0 7px 18px rgba(17,133,107,.23);
    position:relative;
}

.sbgh2-logo::after{
    content:"";
    position:absolute;
    width:10px;
    height:10px;
    top:-2px;
    right:-2px;
    border-radius:50%;
    background:var(--sb2-gold);
    border:2px solid var(--sb2-bg);
}

.sbgh2-brand-text{
    display:flex;
    align-items:baseline;
    white-space:nowrap;
    letter-spacing:-.35px;
}

.sbgh2-brand-text strong{
    font-size:20px;
    font-weight:850;
    color:var(--sb2-ink);
}

.sbgh2-brand-text span{
    font-size:14px;
    font-weight:800;
    color:var(--sb2-green);
}

.sbgh2-nav{
    flex:1 1 auto;
    display:flex;
    justify-content:center;
}

.sbgh2-menu{
    margin:0!important;
    padding:0!important;
    list-style:none!important;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:3px;
}

.sbgh2-menu>li{
    position:relative;
    margin:0!important;
}

.sbgh2-menu>li>a,
.sbgh2-parent-row>a{
    min-height:42px;
    display:inline-flex;
    align-items:center;
    padding:9px 11px;
    border-radius:10px;
    color:var(--sb2-ink2);
    text-decoration:none!important;
    font-size:13.5px;
    font-weight:700;
    line-height:1.2;
    white-space:nowrap;
    transition:.18s ease;
}

.sbgh2-menu>li>a:hover,
.sbgh2-parent-row>a:hover{
    color:var(--sb2-green-dark);
    background:var(--sb2-green-soft);
}

.sbgh2-parent-row{
    display:flex;
    align-items:center;
}

.sbgh2-parent-row>a{
    padding-right:5px;
}

.sbgh2-submenu-toggle{
    width:28px;
    height:34px;
    display:grid;
    place-items:center;
    padding:0;
    border:0;
    border-radius:8px;
    color:var(--sb2-muted);
    background:transparent;
    cursor:pointer;
    font-size:16px;
    line-height:1;
}

.sbgh2-submenu-toggle:hover{
    background:var(--sb2-green-soft);
    color:var(--sb2-green-dark);
}

.sbgh2-submenu-toggle span{
    display:block;
    transform:translateY(-1px);
    transition:transform .18s ease;
}

.sbgh2-has-submenu:hover .sbgh2-submenu-toggle span,
.sbgh2-has-submenu:focus-within .sbgh2-submenu-toggle span{
    transform:rotate(180deg);
}

/* Desktop dropdown */
.sbgh2-submenu{
    position:absolute;
    top:calc(100% + 10px);
    left:50%;
    transform:translate(-42%, 7px);
    width:330px;
    margin:0!important;
    padding:9px!important;
    list-style:none!important;
    border:1px solid var(--sb2-line);
    border-radius:17px;
    background:var(--sb2-bg);
    box-shadow:0 18px 45px rgba(20,24,31,.14);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .18s ease, transform .18s ease, visibility .18s;
}

.sbgh2-submenu::before{
    content:"";
    position:absolute;
    width:12px;
    height:12px;
    top:-7px;
    left:43%;
    background:var(--sb2-bg);
    border-left:1px solid var(--sb2-line);
    border-top:1px solid var(--sb2-line);
    transform:rotate(45deg);
}

.sbgh2-has-submenu:hover>.sbgh2-submenu,
.sbgh2-has-submenu:focus-within>.sbgh2-submenu{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translate(-42%, 0);
}

.sbgh2-submenu li{
    margin:0!important;
}

.sbgh2-submenu a{
    display:flex;
    align-items:center;
    gap:12px;
    padding:11px;
    border-radius:12px;
    text-decoration:none!important;
    color:var(--sb2-ink2);
    transition:background .16s ease, transform .16s ease;
}

.sbgh2-submenu a:hover{
    background:var(--sb2-green-soft);
    transform:translateX(2px);
}

.sbgh2-sub-icon{
    width:35px;
    height:35px;
    flex:0 0 35px;
    border-radius:10px;
    display:grid;
    place-items:center;
    background:var(--sb2-gold-soft);
    color:var(--sb2-ink);
    font-size:15px;
    font-weight:800;
}

.sbgh2-submenu a:nth-child(even) .sbgh2-sub-icon{
    background:var(--sb2-green-soft);
}

.sbgh2-submenu strong{
    display:block;
    color:var(--sb2-ink);
    font-size:13.5px;
    line-height:1.25;
}

.sbgh2-submenu small{
    display:block;
    margin-top:2px;
    color:var(--sb2-muted);
    font-size:11.5px;
    line-height:1.35;
    font-weight:500;
}

.sbgh2-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex:0 0 auto;
}

.sbgh2-cta{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:41px;
    padding:9px 15px;
    border-radius:11px;
    color:#fff!important;
    background:var(--sb2-ink);
    text-decoration:none!important;
    font-size:13px;
    font-weight:800;
    box-shadow:0 7px 18px rgba(20,24,31,.15);
    transition:.18s ease;
}

.sbgh2-cta:hover{
    background:var(--sb2-green-dark);
    transform:translateY(-1px);
}

.sbgh2-mobile-toggle{
    width:42px;
    height:42px;
    display:none;
    padding:8px;
    border:1px solid var(--sb2-line);
    border-radius:11px;
    background:#fff;
    cursor:pointer;
}

.sbgh2-mobile-toggle span{
    display:block;
    width:20px;
    height:2px;
    margin:4px auto;
    border-radius:10px;
    background:var(--sb2-ink);
    transition:.2s ease;
}

.sbgh2-mobile-toggle.is-open span:nth-child(1){
    transform:translateY(6px) rotate(45deg);
}
.sbgh2-mobile-toggle.is-open span:nth-child(2){
    opacity:0;
}
.sbgh2-mobile-toggle.is-open span:nth-child(3){
    transform:translateY(-6px) rotate(-45deg);
}

@media(max-width:1000px){
    .sbgh2-inner{
        min-height:65px;
        width:min(100% - 24px, 1220px);
    }

    .sbgh2-cta{display:none;}
    .sbgh2-mobile-toggle{display:block;}

    .sbgh2-nav{
        display:none;
        position:absolute;
        top:calc(100% + 1px);
        left:0;
        right:0;
        padding:10px 12px 18px;
        background:var(--sb2-bg);
        border-bottom:1px solid var(--sb2-line);
        box-shadow:0 18px 35px rgba(20,24,31,.11);
    }

    .sbgh2-nav.is-open{display:block;}

    .sbgh2-menu{
        width:min(100%,620px);
        margin:0 auto!important;
        display:flex;
        flex-direction:column;
        align-items:stretch;
        gap:3px;
    }

    .sbgh2-menu>li>a,
    .sbgh2-parent-row>a{
        width:100%;
        min-height:46px;
        justify-content:flex-start;
        padding:11px 12px;
        font-size:14px;
    }

    .sbgh2-parent-row{
        width:100%;
    }

    .sbgh2-parent-row>a{
        flex:1 1 auto;
    }

    .sbgh2-submenu-toggle{
        flex:0 0 44px;
        height:44px;
        background:#fff;
        border:1px solid var(--sb2-line);
    }

    .sbgh2-submenu{
        display:none;
        position:static;
        width:100%;
        margin:3px 0 7px!important;
        padding:7px!important;
        opacity:1;
        visibility:visible;
        pointer-events:auto;
        transform:none!important;
        border-radius:14px;
        box-shadow:none;
        background:#fff;
    }

    .sbgh2-submenu::before{display:none;}

    .sbgh2-has-submenu.submenu-open>.sbgh2-submenu{
        display:block;
    }

    .sbgh2-has-submenu.submenu-open .sbgh2-submenu-toggle span{
        transform:rotate(180deg);
    }
}

@media(max-width:782px){
    .admin-bar .sbgh2-site-header{top:46px;}
}

@media(max-width:430px){
    .sbgh2-inner{gap:12px;}
    .sbgh2-logo{width:36px;height:36px;border-radius:11px;}
    .sbgh2-brand-text strong{font-size:16px;}
    .sbgh2-brand-text span{font-size:12px;}
}
