/* 0. NEW TRANSPLANTED HEADER (The Rewrite) */
#sgs-glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 80px;
    z-index: 999999;
    /* Supreme Intergalactic Layer */

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;

    /* ATOMIC GLOSS (Liquid Glass V2) */
    background: transparent !important;
    background-color: rgba(15, 15, 15, 0.4) !important;
    /* More transparent = More Glossy */

    backdrop-filter: blur(30px) saturate(250%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(250%) !important;

    /* LIQUID EDGES */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        /* Top Highlight */
        0 4px 30px rgba(0, 0, 0, 0.1) !important;

    overflow: visible !important;
    height: 50px !important;
    /* ULTRA THIN GLASS BAR (-20%) */
}

/* ORGAN WASHING */
#sgs-glass-header *,
#sgs-glass-header .sgs-glass-inner *,
#sgs-glass-header .edgtf-logo-wrapper * {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* 1. LOGO FIX (50% Overhang Ratio) */
#sgs-glass-header .edgtf-logo-wrapper img {
    height: auto !important;
    max-height: 100px !important;
    /* 2x Header Height */
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

#sgs-glass-header .edgtf-logo-wrapper {
    position: absolute !important;
    top: -10px;
    /* Pull up slightly */
    left: 40px;
    /* Far Left */
    height: auto !important;
    max-height: none !important;
    width: auto !important;
    z-index: 9999999;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    /* Shadow for the Logo specifically */
}

/* 2. MENU FIX (Centered) */
#sgs-glass-header .edgtf-main-menu {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    /* Center vertically in the 60px bar */
}

/* 3. RECURSIVE SUBMENU GLASS FIX (All Levels) */
/* Target ANY nested list inside the main menu */
#sgs-glass-header .edgtf-main-menu ul li ul,
#sgs-glass-header .edgtf-drop-down .second,
#sgs-glass-header .edgtf-drop-down .second .inner ul,
#sgs-glass-header .edgtf-drop-down ul.sub-menu {
    background: transparent !important;
    background-color: rgba(15, 15, 15, 0.5) !important;
    /* Liquid Glass */

    backdrop-filter: blur(30px) saturate(250%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(250%) !important;

    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    /* border-top: none !important; Remove this, sub-submenus need full border */

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 10px 40px rgba(0, 0, 0, 0.6) !important;

    border-radius: 4px !important;
    /* Unified radius */
    padding: 10px 0 !important;

    /* RESET PARENTS to avoid double-glass */
    box-sizing: border-box !important;
}

/* Ensure intermediate wrappers are invisible */
#sgs-glass-header .edgtf-drop-down .second .inner {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* LEVEL 3 FIX (Sub-Submenus) - Positioning */
#sgs-glass-header .edgtf-main-menu ul li ul li ul {
    position: absolute !important;
    left: 100% !important;
    top: -10px !important;
    /* Align with parent item */
    margin-left: 5px !important;
}

/* Fix triangle arrows if they exist */
#sgs-glass-header .edgtf-drop-down .second .inner ul li,
#sgs-glass-header li {
    background: transparent !important;
    border: none !important;
}

/* FORCE WHITE TEXT on Organs */
#sgs-glass-header h1,
#sgs-glass-header h2,
#sgs-glass-header h3,
#sgs-glass-header span,
#sgs-glass-header p,
#sgs-glass-header a,
#sgs-glass-header i,
#sgs-glass-header li a {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#sgs-glass-header li a:hover {
    color: #ff0055 !important;
    /* Slight hover pop */
    background: rgba(255, 255, 255, 0.1) !important;
    /* Highlight item row */
}


#sgs-glass-header .sgs-glass-inner {
    width: 100%;
    max-width: 1200px;
    /* Standard container width */
    margin: 0 auto;
    /* CENTER IT */
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Pseudo-Elements for the Gloss (Attached to new header) */
#sgs-glass-header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.4) 45%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: overlay;
}

#sgs-glass-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, white, transparent);
    pointer-events: none;
    z-index: 100;
    opacity: 0.8;
}

/* Transplanted Oragan Styles */
#sgs-glass-header .edgtf-logo-wrapper {
    background: transparent !important;
    height: auto !important;
    max-height: 60px;
    display: flex;
    align-items: center;
}

#sgs-glass-header .edgtf-main-menu {
    background: transparent !important;
    float: none !important;
    /* Reset float layout */
}

#sgs-glass-header .edgtf-main-menu>ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

#sgs-glass-header .edgtf-main-menu>ul>li {
    margin: 0 15px;
    display: inline-block;
}

/* OLD HEADER HIDE (Backup) */
body.sgs-header-rewritten .edgtf-page-header,
body.sgs-header-rewritten .edgtf-sticky-header,
body.sgs-header-rewritten .edgtf-fixed-wrapper,
body.sgs-header-rewritten .edgtf-mobile-header {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* 1. CONTAINER - FORCE VISIBILITY (Legacy Targets kept just in case) */
html body .edgtf-page-header,
/* ... allow legacy styles to exist but overridden by display:none above ... */
html body header.site-header,
html body header#masthead,
html body div.edgtf-sticky-header,
html body .edgtf-mobile-header,
html body .edgtf-mobile-header.edgtf-animate-mobile-header,
html body .edgtf-fixed-wrapper,
html body .edgtf-fixed-wrapper.fixed,
html body [class*="edgtf-sticky"],
html body [class*="edgtf-header"] {
    background: transparent !important;
    background-color: rgba(10, 10, 10, 0.4) !important;
    /* Semi-transparent dark base */

    /* Strong Glass Filter */
    backdrop-filter: blur(25px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(200%) !important;

    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;

    /* Allow pseudo-elements to show */
    overflow: visible !important;

    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

/* 2. DIAGONAL GLARE (The "Shiny" Part) - ::after */
html body .edgtf-page-header::after,
html body header.site-header::after,
html body .edgtf-mobile-header::after,
html body .edgtf-animate-mobile-header::after,
html body .edgtf-fixed-wrapper::after,
html body [class*="edgtf-sticky"]::after,
html body [class*="edgtf-header"]::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;

    /* Strong Diagonal White Gradient */
    background: linear-gradient(115deg,
            transparent 30%,
            rgba(255, 255, 255, 0.4) 45%,
            /* Very bright shine */
            rgba(255, 255, 255, 0.1) 50%,
            transparent 60%) !important;

    pointer-events: none;
    z-index: -1 !important;
    /* Behind text, In front of background */
    mix-blend-mode: overlay;
    animation: none;
    /* Can animate later if desired */
}

/* 3. TOP GLOW LINE - ::before */
html body .edgtf-page-header::before,
html body header.site-header::before,
html body .edgtf-mobile-header::before,
html body .edgtf-animate-mobile-header::before,
html body .edgtf-fixed-wrapper::before,
html body [class*="edgtf-sticky"]::before,
html body [class*="edgtf-header"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, white, transparent);
    z-index: 100 !important;
    opacity: 0.8 !important;
}

/* 4. FORCE TRANSPARENT CHILDREN (Nuclear Option) */
html body .edgtf-page-header *,
html body .edgtf-sticky-holder *,
html body .edgtf-logo-wrapper *,
html body .edgtf-mobile-header *,
html body .edgtf-mobile-header-inner *,
html body .edgtf-fixed-wrapper *,
html body header.site-header *,
html body header#masthead * {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* 5. ENSURE CONTENT IS ON TOP */
.edgtf-grid,
.edgtf-vertical-menu-area,
.edgtf-menu-area,
nav,
.edgtf-logo-wrapper a {
    position: relative !important;
    z-index: 1000 !important;
    /* Above the ::after glare */
}

/* 6. TEXT COLOR FORCE */
h1,
h2,
h3,
h4,
h5,
h6,
span,
a,
li,
i {
    color: #fff !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}