/**
 * ScopeLux landing header — isolated from legacy .slx-site-header / hub-ui rules.
 * Desktop: inline nav. Mobile: hamburger + fixed panel + overlay.
 */

.slx-portal-metorik {
    --slx-ph-h: 68px;
}

.slx-ph {
    position: sticky;
    top: 0;
    z-index: 500000;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.admin-bar .slx-ph {
    top: 32px;
}

.slx-ph__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--slx-ph-h);
    position: relative;
    z-index: 500003;
}

.slx-ph__logo {
    flex-shrink: 0;
    text-decoration: none;
}

.slx-ph__toggle {
    display: none;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: 1px solid #1f2937;
    border-radius: 12px;
    background: #0a0a0a;
    cursor: pointer;
    align-content: center;
    justify-items: center;
    gap: 5px;
}

.slx-ph__toggle-line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #ffffff;
}

.slx-ph__overlay {
    display: none;
}

.slx-ph__panel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex: 1;
}

.slx-ph__nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.slx-ph__nav a {
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    color: #4b5563;
    text-decoration: none;
}

.slx-ph__nav a:hover {
    color: #7c3aed;
}

.slx-ph__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.slx-portal-metorik .slx-landing-main {
    position: relative;
    z-index: 0;
}

body.slx-ph-locked {
    overflow: hidden;
}

/* —— Desktop —— */
@media (min-width: 1101px) {
    .slx-ph__toggle,
    .slx-ph__overlay {
        display: none !important;
    }

    .slx-ph__inner {
        flex-wrap: nowrap;
    }

    .slx-ph__panel {
        display: flex !important;
        position: static;
        flex: 1;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 16px;
        padding: 0;
        margin: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
        visibility: visible;
        pointer-events: auto;
        opacity: 1;
        transform: none;
    }
}

/* —— Mobile —— */
@media (max-width: 1100px) {
    .slx-ph__toggle {
        display: grid;
    }

    .slx-ph__overlay {
        position: fixed;
        inset: 0;
        z-index: 500001;
        background: rgba(15, 23, 42, 0.55);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .slx-ph.is-open .slx-ph__overlay {
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .slx-ph__panel {
        position: fixed;
        left: 0;
        right: 0;
        top: var(--slx-ph-h);
        bottom: 0;
        z-index: 500002;
        flex: unset;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 16px 16px 32px;
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        opacity: 0;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    }

    .admin-bar .slx-ph__panel {
        top: calc(var(--slx-ph-h) + 32px);
    }

    .slx-ph.is-open .slx-ph__panel {
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        opacity: 1;
    }

    .slx-ph__nav {
        flex-direction: column;
        width: 100%;
        gap: 4px;
    }

    .slx-ph__nav a {
        display: block;
        text-align: center;
        padding: 16px;
        font-size: 16px;
        border-radius: 14px;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
    }

    .slx-ph__nav a:hover {
        color: #7c3aed;
        background: #f5f3ff;
    }

    .slx-ph__actions {
        flex-direction: column;
        width: 100%;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #e5e7eb;
    }

    .slx-ph__actions .slx-btn,
    .slx-ph__actions .slx-ghost {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
