/* =========================================
   INSIDE INVOMIZE — GLOBAL HEADER
========================================= */

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

.iv-header {
    --iv-header-bg: #16232B;
    --iv-header-accent: #F5C842;
    --iv-header-glass: rgba(22, 35, 43, 0.82);

    width: 100%;
    max-width: 1425px;

    height: 60px;
    min-height: 54px;

    margin: 10px auto 0;
    padding: 7px 10px;

    position: sticky;
    top: 10px;
    z-index: 9999;

    background: var(--iv-header-bg);
    border: 1px solid transparent;
    border-radius: 10px;

    font-family: 'Inter', Arial, sans-serif;

    isolation: isolate;

    transition:
        background-color 450ms ease,
        border-color 450ms ease,
        box-shadow 450ms ease;
}

/* =========================================
   SCROLLED — GLASS HEADER
========================================= */

.iv-header.is-scrolled {
    background: var(--iv-header-glass);

    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);

    border-color: rgba(255, 255, 255, 0.13);

    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.16),
        0 2px 10px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Fallback when backdrop filters are unsupported */
@supports not (
    (backdrop-filter: blur(1px)) or
    (-webkit-backdrop-filter: blur(1px))
) {
    .iv-header.is-scrolled {
        background: rgba(22, 35, 43, 0.96);
    }
}

/* =========================================
   INNER CONTAINER
========================================= */

.iv-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    height: 100%;
    min-height: 0;
    gap: 24px;
}

/* =========================================
   BRAND / LOGO
========================================= */

.iv-header__brand {
    display: flex;
    align-items: center;
    gap: 6px;

    width: 181px;
    height: 33px;

    flex: 0 0 181px;
    text-decoration: none;
}

.iv-header__logo-icon {
    display: block;

    width: 33px;
    height: 33px;

    flex: 0 0 33px;
    object-fit: contain;
}

.iv-header__logo-text {
    display: block;

    width: 142px;
    height: auto;
    max-height: 33px;

    object-fit: contain;
    object-position: left center;
}

/* =========================================
   DESKTOP NAVIGATION
========================================= */

.iv-header__nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
}

.iv-header__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    font-style: normal;
    line-height: 1;
    letter-spacing: -0.04em;

    text-align: center;
    text-decoration: none;
    white-space: nowrap;

    color: #FFFFFF;

    transition:
        color 200ms ease,
        opacity 200ms ease;
}

.iv-header__link:hover {
    color: #FFFFFF;
    opacity: 0.75;
}

.iv-header__link:focus-visible,
.iv-header__cta:focus-visible,
.iv-header__toggle:focus-visible {
    outline: 2px solid #F5C842;
    outline-offset: 4px;
}

/* =========================================
   JOIN OUR TEAM BUTTON
========================================= */

.iv-header__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;
    min-height: 36px;
    padding: 0 18px;

    border: 0;
    border-radius: 999px;

    background: #F5C842;
    color: #16232B;

    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    font-style: normal;
    line-height: 1;
    letter-spacing: -0.04em;

    text-align: center;
    text-decoration: none;
    white-space: nowrap;

    transition:
        background-color 200ms ease,
        transform 200ms ease;
}

.iv-header__cta:hover {
    color: #16232B;
    background: #FFDA61;
    transform: translateY(-1px);
}

.iv-header__cta svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* =========================================
   MOBILE MENU BUTTON
========================================= */

.iv-header__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;

    width: 40px;
    height: 40px;
    padding: 0;

    border: 0;
    background: transparent;
    cursor: pointer;
}

.iv-header__toggle span {
    display: block;

    width: 22px;
    height: 2px;

    background: #FFFFFF;
    border-radius: 2px;

    transition:
        transform 200ms ease,
        opacity 200ms ease;
}

/* =========================================
   WORDPRESS ADMIN BAR
========================================= */

body.admin-bar .iv-header {
    top: 42px;
}

/* =========================================
   TABLET / MOBILE
========================================= */

@media (max-width: 900px) {

    .iv-header {
        height: 54px;
        min-height: 54px;
        margin-top: 10px;
        padding: 7px 14px;
        border-radius: 10px;
    }

    .iv-header__toggle {
        display: flex;
    }

    .iv-header__nav {
        display: none;

        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;

        padding: 18px;
        border-radius: 10px;

        background: #16232B;

        box-shadow:
            0 12px 30px rgba(0, 0, 0, 0.18);

        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .iv-header__nav.is-open {
        display: flex;
    }

    /* Glass dropdown when header is scrolled */
    .iv-header.is-scrolled .iv-header__nav {
        background: rgba(22, 35, 43, 0.94);

        -webkit-backdrop-filter: blur(18px) saturate(150%);
        backdrop-filter: blur(18px) saturate(150%);

        border: 1px solid rgba(255, 255, 255, 0.12);

        box-shadow:
            0 16px 35px rgba(0, 0, 0, 0.20);
    }

    .iv-header__link {
        justify-content: flex-start;

        width: 100%;
        padding: 15px 4px;

        text-align: left;
    }

    .iv-header__cta {
        width: 100%;
        min-height: 44px;
        margin-top: 12px;
    }

    .iv-header__toggle.is-active span:first-child {
        transform: translateY(7px) rotate(45deg);
    }

    .iv-header__toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .iv-header__toggle.is-active span:last-child {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

       .iv-header {
        width: calc(100% - 32px);

        height: 54px;
        min-height: 54px;

        margin-top: 6px;
        top: 6px;
        padding: 7px 12px;

        border-radius: 10px;
    }

    .iv-header__brand {
        width: 160px;
        height: 33px;
        flex-basis: 160px;
    }

    .iv-header__logo-text {
        width: 121px;
    }

    .iv-header__nav {
        padding: 14px;
    }
}

/* =========================================
   MOBILE WORDPRESS ADMIN BAR
========================================= */

@media (max-width: 782px) {

    body.admin-bar .iv-header {
        top: 56px;
    }
}

/* =========================================
   REDUCED MOTION ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {

    .iv-header,
    .iv-header *,
    .iv-header *::before,
    .iv-header *::after {
        transition: none !important;
    }
}
