/* =========================================
   Nexus Header
   ========================================= */

:root {
    --anex-hf-bg: rgba(255, 255, 255, 0.95);
    --anex-hf-border: rgba(66, 66, 66, 0.1);
    --anex-hf-text: #424242;
    --anex-hf-accent: #0A4D92;
    --anex-hf-radius: 50px;
    --anex-hf-blur: 20px;
}

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

.nexus-site-header {
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    z-index: 9999;
    position: relative;
}

/* JS-driven fixed header on scroll */
.nexus-site-header.nexus-header--fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin-top: 0 !important;
    animation: nexusHeaderSlideDown 0.3s ease forwards;
}

@keyframes nexusHeaderSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anex-header-grid {
    background: var(--anex-hf-bg);
    backdrop-filter: blur(var(--anex-hf-blur));
    -webkit-backdrop-filter: blur(var(--anex-hf-blur));
    border: 1px solid var(--anex-hf-border);
    border-radius: var(--anex-hf-radius);
    height: 70px;
    width: 80vw;
    margin: 0 auto;
    padding: 0 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    gap: 20px;
}

.anex-header-col {
    display: flex;
    align-items: center;
    height: 100%;
}

.anex-header-logo {
    flex: 0 0 25%;
    max-width: 25%;
    justify-content: flex-start;
    overflow: hidden;
}

.anex-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--anex-hf-text);
}

.anex-logo-link img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.anex-logo-text {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.anex-header-menu {
    flex: 0 0 50%;
    max-width: 50%;
    justify-content: center;
}

.anex-main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.anex-main-nav ul li {
    margin: 0;
    position: relative;
}

.anex-main-nav ul li a {
    color: var(--anex-hf-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.anex-main-nav ul li a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.anex-header-actions {
    flex: 0 0 25%;
    max-width: 25%;
    justify-content: center;
}

.anex-desktop-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.04);
    padding: 5px 6px 5px 20px;
    border-radius: 40px;
}

.anex-link-signin {
    font-weight: 600;
    color: var(--anex-hf-text);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.anex-btn-primary {
    background-color: #0078D4;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.1s;
    display: inline-block;
}

.anex-btn-primary:hover {
    transform: scale(1.02);
    background-color: #106EBE;
}

.anex-mobile-toggle,
.anex-mobile-menu-overlay {
    display: none;
}

.anex-main-nav ul li.menu-item-has-children>a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
    opacity: 0.6;
}

.anex-main-nav ul li ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    flex-direction: column;
}

.anex-main-nav ul li:hover>ul.sub-menu {
    display: flex;
}

.anex-main-nav ul li ul.sub-menu li a {
    width: 100%;
    border-radius: 8px;
    justify-content: space-between;
}

@media (max-width: 1100px) {

    .anex-header-menu,
    .anex-desktop-actions {
        display: none;
    }

    .nexus-site-header {
        padding: 0 10px;
    }

    .anex-header-grid {
        padding: 0 20px;
        height: 60px;
        justify-content: space-between;
        gap: 0;
    }

    .anex-header-logo {
        flex: 1;
        max-width: 80%;
        justify-content: flex-start;
    }

    .anex-logo-link img {
        height: 30px;
    }

    .anex-logo-text {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .anex-header-actions {
        flex: 0 0 40px;
        max-width: 40px;
        justify-content: flex-end;
    }

    .anex-mobile-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 26px;
        cursor: pointer;
        align-items: flex-end;
    }

    .anex-mobile-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #000;
        border-radius: 2px;
        transition: 0.3s;
    }

    .anex-mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .anex-mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .anex-mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .anex-mobile-menu-overlay.active {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        z-index: 10000;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 80px 20px 40px 20px;
        overflow-y: auto;
        animation: fadeIn 0.2s ease;
    }

    .anex-mobile-nav-container {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .anex-mobile-nav {
        width: 100%;
    }

    .anex-mobile-nav ul {
        list-style: none;
        padding: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .anex-mobile-nav ul li {
        width: 100%;
    }

    .anex-mobile-nav ul li a {
        font-size: 18px;
        font-weight: 600;
        color: #000;
        text-decoration: none;
        display: block;
        padding: 10px;
        justify-content: center;
    }

    .anex-mobile-nav ul.sub-menu {
        display: none;
        background: rgba(0, 0, 0, 0.03);
        border-radius: 10px;
        padding: 10px 0;
        margin-top: 5px;
        gap: 5px;
    }

    .anex-mobile-nav ul li.submenu-open>a {
        color: var(--anex-hf-accent);
    }

    .anex-mobile-nav ul.sub-menu li a {
        font-size: 16px;
        font-weight: 500;
        opacity: 0.8;
    }

    .anex-mobile-actions-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-top: 40px;
        width: 100%;
        max-width: 300px;
    }

    .anex-mobile-actions-list .anex-btn-primary {
        text-align: center;
        width: 100%;
        display: block;
        padding: 12px;
    }

    .anex-mobile-actions-list .anex-btn-outline {
        text-align: center;
        color: #000;
        font-weight: 600;
        text-decoration: none;
        display: block;
    }

    .anex-mobile-close {
        display: block;
        position: absolute;
        top: 25px;
        right: 25px;
        font-size: 30px;
        background: none;
        border: none;
        cursor: pointer;
        color: #000;
        padding: 5px;
    }
}

/* =========================================
   Nexus Notice Bar — Microsoft Fluent UI
   ========================================= */

.nx-notice-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80vw;
    max-width: 1100px;
    margin: 0 auto 0 auto;
    background: #eff6fc;
    /* Microsoft Info MessageBar */
    border: 1px solid #c7e0f4;
    border-radius: 50px;
    color: #004578;
    font-family: 'Segoe UI', -apple-system, Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    padding: 10px 20px;
    min-height: 46px;
    box-sizing: border-box;
    position: relative;
    z-index: 10000;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease, border-width 0.3s ease;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.nx-notice-bar.nx-notice-bar--hidden {
    max-height: 0 !important;
    min-height: 0 !important;
    opacity: 0;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    pointer-events: none;
}

.nx-notice-bar__inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding-right: 0;
}

.nx-notice-bar__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: #0078d4;
}

.nx-notice-bar__text {
    color: #004578;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
}

.nx-notice-bar__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0078d4;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s, text-decoration 0.15s;
    flex-shrink: 0;
    margin-left: 8px;
}

.nx-notice-bar__link:hover,
.nx-notice-bar__link:focus {
    opacity: 0.85;
    text-decoration: underline;
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.nx-notice-bar__dismiss {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    color: #0078d4 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: background 0.15s, color 0.15s !important;
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
    outline: none !important;
    line-height: 1 !important;
    text-decoration: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.nx-notice-bar__dismiss svg {
    width: 10px;
    height: 10px;
    display: block;
}

.nx-notice-bar__dismiss:hover,
.nx-notice-bar__dismiss:focus {
    background: rgba(0, 120, 212, 0.1) !important;
    color: #005a9e !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

@media (max-width: 1024px) {
    .nx-notice-bar {
        width: 100%;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
    }
}

@media (max-width: 600px) {
    .nx-notice-bar {
        font-size: 13px;
        padding: 8px 16px;
    }

    .nx-notice-bar__inner {
        flex-wrap: wrap;
        padding-right: 32px;
        justify-content: flex-start;
    }

    .nx-notice-bar__text {
        white-space: normal;
    }
}