/*
 * INVISTU — CABEÇALHO DESKTOP CENTRAL v2
 * Usa o menu WordPress "menu", o mesmo selecionado no Elementor.
 */

:root {
    --invistu-header-dark: #001629;
    --invistu-header-blue: #0f2458;
    --invistu-header-accent: #fca311;
    --invistu-header-line: #dfdfdf;
    --invistu-header-bg: #ffffff;
}

.invistu-global-header {
    display: none;
}

@media (min-width: 769px) {
    .invistu-global-header {
        display: block;
        width: 100%;
        position: relative;
        z-index: 99;
        background: var(--invistu-header-bg);
        border-bottom: 1px solid var(--invistu-header-line);
    }

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

    .invistu-global-header__inner {
        width: min(1180px, calc(100% - 48px));
        min-height: 76px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 32px;
    }

    .invistu-global-header__logo {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        text-decoration: none;
        line-height: 0;
    }

    .invistu-global-header__logo img {
        display: block;
        width: auto;
        height: 46px;
        max-width: 190px;
        object-fit: contain;
    }

    .invistu-global-header__nav {
        flex: 1 1 auto;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .invistu-global-header__menu,
    .invistu-global-header__menu .sub-menu {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .invistu-global-header__menu {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .invistu-global-header__menu > li {
        position: relative;
        margin: 0;
        padding: 0;
    }

    .invistu-global-header__menu > li > a {
        position: relative;
        display: flex;
        align-items: center;
        min-height: 76px;
        padding: 0 15px;
        color: var(--invistu-header-dark);
        text-decoration: none;
        font-size: 16px;
        line-height: 1;
        font-weight: 800;
        white-space: nowrap;
        transition: color .18s ease;
    }

    .invistu-global-header .invistu-global-header__menu > li > a::before,
    .invistu-global-header .invistu-global-header__menu > li > a::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        left: 15px !important;
        right: 15px !important;
        width: auto !important;
        height: 2px !important;
        background: var(--invistu-header-accent) !important;
        border: 0 !important;
        opacity: 0 !important;
        transform: scaleX(0) !important;
        transform-origin: center !important;
        transition:
            opacity .20s ease,
            transform .20s ease !important;
        pointer-events: none !important;
        z-index: 3 !important;
    }

    .invistu-global-header .invistu-global-header__menu > li > a::before {
        top: 20px !important;
        bottom: auto !important;
    }

    .invistu-global-header .invistu-global-header__menu > li > a::after {
        top: auto !important;
        bottom: 20px !important;
    }

    .invistu-global-header .invistu-global-header__menu > li:hover > a,
    .invistu-global-header .invistu-global-header__menu > li:focus-within > a {
        color: var(--invistu-header-accent) !important;
    }

    .invistu-global-header .invistu-global-header__menu > li:hover > a::before,
    .invistu-global-header .invistu-global-header__menu > li:hover > a::after,
    .invistu-global-header .invistu-global-header__menu > li:focus-within > a::before,
    .invistu-global-header .invistu-global-header__menu > li:focus-within > a::after {
        opacity: 1 !important;
        transform: scaleX(1) !important;
    }

    /* Item atual: mantém o texto escuro; o efeito fica só no hover. */
    .invistu-global-header .invistu-global-header__menu > li.current-menu-item > a,
    .invistu-global-header .invistu-global-header__menu > li.current-menu-ancestor > a {
        color: var(--invistu-header-dark) !important;
    }

    .invistu-global-header__menu > li.menu-item-has-children > a {
        padding-right: 30px;
    }

    .invistu-global-header__menu > li.menu-item-has-children > a {
        background-image:
            linear-gradient(45deg, transparent 50%, currentColor 50%),
            linear-gradient(135deg, currentColor 50%, transparent 50%);
        background-position:
            calc(100% - 16px) 36px,
            calc(100% - 11px) 36px;
        background-size: 5px 5px, 5px 5px;
        background-repeat: no-repeat;
    }

    .invistu-global-header__menu .sub-menu {
        position: absolute;
        top: calc(100% - 1px);
        left: 0;
        width: 220px;
        padding: 8px 0;
        background: #ffffff;
        border: 1px solid rgba(0, 22, 41, .10);
        border-radius: 0 0 10px 10px;
        box-shadow: 0 14px 34px rgba(0, 22, 41, .13);
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        pointer-events: none;
        transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    }

    .invistu-global-header__menu > li:hover > .sub-menu,
    .invistu-global-header__menu > li:focus-within > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .invistu-global-header__menu .sub-menu li {
        margin: 0;
        padding: 0;
    }

    .invistu-global-header__menu .sub-menu a {
        display: block;
        padding: 11px 15px;
        color: var(--invistu-header-dark);
        text-decoration: none;
        font-size: 14px;
        line-height: 1.25;
        font-weight: 700;
        transition: background .16s ease, color .16s ease;
    }

    .invistu-global-header__menu .sub-menu a:hover,
    .invistu-global-header__menu .sub-menu a:focus {
        background: var(--invistu-header-accent);
        color: var(--invistu-header-dark);
        outline: none;
    }
}

@media (min-width: 769px) and (max-width: 980px) {
    .invistu-global-header__inner {
        width: min(100% - 28px, 1180px);
        gap: 16px;
    }

    .invistu-global-header__logo img {
        height: 40px;
        max-width: 160px;
    }

    .invistu-global-header__menu > li > a {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 14px;
    }

    .invistu-global-header__menu > li.menu-item-has-children > a {
        padding-right: 26px;
    }
}


/* Blindagem do efeito hover contra CSS do tema/Elementor/FAQ */
@media (min-width: 769px) {
    body .invistu-global-header .invistu-global-header__menu > li > a {
        overflow: visible !important;
    }

    body .invistu-global-header .invistu-global-header__menu > li:hover > a {
        color: #fca311 !important;
    }
}
