/* ==========================================================================
   TechX Header & Ticker Dual-Theme Harmony System (Modular Architecture)
   Ensures seamless transitions between Light and Dark mode headers
   ========================================================================== */

/* 1. LIGHT MODE TICKER & BOT HEADER */
html:not(.site-s-dark) .smart-head-bot {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

html:not(.site-s-dark) .smart-head-bot .trending-ticker {
    color: #1e293b !important;
}

html:not(.site-s-dark) .smart-head-bot .trending-ticker .heading {
    background: #eef2ff !important;
    color: #4f46e5 !important;
    border: 1px solid #c7d2fe !important;
    font-weight: 700 !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
}

html:not(.site-s-dark) .smart-head-bot .trending-ticker a,
html:not(.site-s-dark) .smart-head-bot .trending-ticker .post-link {
    color: #334155 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

html:not(.site-s-dark) .smart-head-bot .trending-ticker a:hover,
html:not(.site-s-dark) .smart-head-bot .trending-ticker .post-link:hover {
    color: #4f46e5 !important;
}

/* 2. DARK MODE TICKER & BOT HEADER (Aurora Deep Space) */
html.site-s-dark .smart-head-bot {
    background: rgba(11, 15, 25, 0.95) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #cbd5e1 !important;
}

html.site-s-dark .smart-head-bot .trending-ticker {
    color: #cbd5e1 !important;
}

html.site-s-dark .smart-head-bot .trending-ticker .heading {
    background: rgba(99, 102, 241, 0.18) !important;
    color: #a5b4fc !important;
    border: 1px solid rgba(165, 180, 252, 0.25) !important;
    font-weight: 700 !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
}

html.site-s-dark .smart-head-bot .trending-ticker a,
html.site-s-dark .smart-head-bot .trending-ticker .post-link {
    color: #cbd5e1 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

html.site-s-dark .smart-head-bot .trending-ticker a:hover,
html.site-s-dark .smart-head-bot .trending-ticker .post-link:hover {
    color: #38bdf8 !important;
}

/* 3. MOBILE HEADER THEME SWITCHER (Aurora Polish) */
.smart-head-mobile .smart-head-mid .items-right {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.smart-head-mobile .scheme-switcher,
.smart-head-mobile .scheme-switch {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.smart-head-mobile .scheme-switcher a.toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    font-size: 1.1rem !important;
}

html.site-s-dark .smart-head-mobile .scheme-switcher a.toggle {
    color: #f1f5f9 !important;
}

html:not(.site-s-dark) .smart-head-mobile .scheme-switcher a.toggle {
    color: #1e293b !important;
}

.smart-head-mobile .scheme-switcher a.toggle:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}


/* --------------------------------------------------------------------------
   4. DESKTOP NAVIGATION DROPDOWN SUB-MENUS (Aurora Stacking & Contrast Fix)
   Fixes z-index collision with Quick Categories Bar and eliminates text bleed
   -------------------------------------------------------------------------- */
#smart-head,
.smart-head,
.smart-head-main {
    position: relative !important;
    z-index: 1000 !important;
}

.smart-head-row.smart-head-mid {
    position: relative !important;
    z-index: 100 !important;
}

.smart-head-row.smart-head-bot {
    position: relative !important;
    z-index: 1 !important;
}

.techx-quick-cats-bar {
    position: relative !important;
    z-index: 10 !important;
}

/* Dropdown Sub-Menu Geometry & Layout */
.navigation .menu .sub-menu,
.smart-head .sub-menu {
    position: absolute !important;
    z-index: 99999 !important;
    min-width: 220px !important;
    padding: 8px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

/* Dark Mode: Solid Deep Space background to ensure zero bleed-through from bars underneath */
html.site-s-dark .navigation .menu .sub-menu,
html.site-s-dark .smart-head .sub-menu {
    background-color: #0d121f !important;
    background-image: linear-gradient(180deg, #131929 0%, #0d121f 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.9), 0 0 1px 1px rgba(255, 255, 255, 0.08), 0 0 20px -5px rgba(99, 102, 241, 0.25) !important;
}

html.site-s-dark .navigation .menu .sub-menu li a,
html.site-s-dark .smart-head .sub-menu li a {
    color: #e2e8f0 !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1.4 !important;
    background: transparent !important;
}

html.site-s-dark .navigation .menu .sub-menu li:hover > a,
html.site-s-dark .navigation .menu .sub-menu li a:hover {
    background: rgba(99, 102, 241, 0.18) !important;
    color: #ffffff !important;
    padding-left: 20px !important;
}

/* Light Mode: Crisp white solid background */
html:not(.site-s-dark) .navigation .menu .sub-menu,
html:not(.site-s-dark) .smart-head .sub-menu {
    background-color: #ffffff !important;
    background-image: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

html:not(.site-s-dark) .navigation .menu .sub-menu li a,
html:not(.site-s-dark) .smart-head .sub-menu li a {
    color: #1e293b !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1.4 !important;
    background: transparent !important;
}

html:not(.site-s-dark) .navigation .menu .sub-menu li:hover > a,
html:not(.site-s-dark) .navigation .menu .sub-menu li a:hover {
    background: #eef2ff !important;
    color: #4f46e5 !important;
    padding-left: 20px !important;
}
