/* =======================================================
   HEADER GO COMPARTILHADO (archive + buscar)
   Prefixo: invgo-
   ======================================================= */

.invgo-header {
    background: #000;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
}
/* Respeita admin bar do WP quando logado */
body.admin-bar .invgo-header {
    top: 32px;
}
@media (max-width: 782px) {
    body.admin-bar .invgo-header {
        top: 46px;
    }
}
.invgo-header * {
    box-sizing: border-box;
}
.invgo-header__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
    min-width: 0;
}
.invgo-header__logo {
    display: block;
    flex-shrink: 0;
    line-height: 0;
}
.invgo-header__logo img,
.invgo-header .invgo-header__logo img {
    width: 219px !important;
    height: 45px !important;
    max-width: 219px !important;
    max-height: 45px !important;
    min-width: 219px !important;
    min-height: 45px !important;
    object-fit: contain;
    display: block;
}

/* Nav (ul gerada pelo wp_nav_menu) */
.invgo-header__nav,
.invgo-header ul.invgo-header__nav {
    flex: 1;
    display: flex;
    gap: 22px;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 0;
    flex-wrap: nowrap;
}
.invgo-header__nav li {
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0;
    border: none;
}
.invgo-header__nav > li > a {
    color: rgba(255,255,255,0.9) !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 10px 0;
    transition: color 0.2s;
    display: inline-block;
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    background: none !important;
    box-shadow: none !important;
}
.invgo-header__nav > li > a::before,
.invgo-header__nav > li > a::after {
    display: none !important;
    content: none !important;
}
.invgo-header__nav > li > a:hover,
.invgo-header__nav > li.current-menu-item > a,
.invgo-header__nav > li.current-menu-parent > a,
.invgo-header__nav > li.menu-item-has-children:hover > a {
    color: #d4af37 !important;
}
.invgo-header__nav > li.menu-item-has-children > a::after {
    content: ' ▾' !important;
    display: inline !important;
    font-size: 0.7rem;
    margin-left: 4px;
}

/* Sub-menu */
.invgo-header__nav .sub-menu,
.invgo-header__nav ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: #111;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    list-style: none;
    margin: 0;
    z-index: 10;
}
/* Ponte invisivel entre link pai e dropdown (evita perder hover no gap) */
.invgo-header__nav > li.menu-item-has-children::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 14px;
    background: transparent;
}
.invgo-header__nav li.menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
}
.invgo-header__nav .sub-menu li {
    display: block;
}
.invgo-header__nav .sub-menu a {
    display: block;
    padding: 8px 12px;
    color: rgba(255,255,255,0.85) !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.15s;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: none !important;
    border: none !important;
}
.invgo-header__nav .sub-menu a:hover {
    background: rgba(212,175,55,0.1);
    color: #d4af37 !important;
}

/* WhatsApp CTA */
.invgo-header__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #25d366 !important;
    color: #ffffff !important;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.2s;
    text-decoration: none !important;
    border: none !important;
    line-height: 1;
    flex-shrink: 0;
}
.invgo-header__cta:hover {
    background: #1ebe5d !important;
    color: #ffffff !important;
}
.invgo-header__cta svg {
    fill: #ffffff;
    flex-shrink: 0;
}

/* Mobile toggle (hamburger 3 tracinhos) */
.invgo-header__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: #d4af37;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
}
.invgo-header__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Drawer mobile lateral */
.invgo-mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    max-width: 85vw;
    background: #111;
    z-index: 10000;
    padding: 80px 30px 40px;
    transition: right 0.4s ease;
    display: none;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
    overflow-y: auto;
}
@media (max-width: 900px) {
    .invgo-mobile-drawer {
        display: flex;
    }
}
.invgo-mobile-drawer.active {
    right: 0;
}
.invgo-mobile-drawer__close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Nav dentro do drawer */
.invgo-mobile-drawer__nav {
    flex: 1;
}
.invgo-mobile-drawer__list,
.invgo-mobile-drawer ul.invgo-mobile-drawer__list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.invgo-mobile-drawer__list li {
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: static;
}
.invgo-mobile-drawer__list a {
    display: block;
    padding: 14px 0;
    color: #fff !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    transition: color 0.2s, padding 0.2s;
}
.invgo-mobile-drawer__list a:hover {
    color: #d4af37 !important;
    padding-left: 6px;
}
/* Submenu inline dentro do drawer */
.invgo-mobile-drawer__list .sub-menu {
    list-style: none;
    padding: 0 0 10px 12px;
    margin: 0;
    background: rgba(255,255,255,0.03);
}
.invgo-mobile-drawer__list .sub-menu li {
    border-bottom: none;
}
.invgo-mobile-drawer__list .sub-menu a {
    padding: 10px 0;
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.75) !important;
}
.invgo-mobile-drawer__list .sub-menu a:hover {
    color: #d4af37 !important;
}

/* CTA WA no drawer */
.invgo-mobile-drawer__cta {
    margin-top: 20px;
}
.invgo-mobile-drawer__wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: #25d366 !important;
    color: #fff !important;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background 0.2s;
    border: none;
}
.invgo-mobile-drawer__wa:hover {
    background: #1ebe5d !important;
    color: #fff !important;
}
.invgo-mobile-drawer__wa svg {
    fill: #fff;
    flex-shrink: 0;
}

/* Overlay */
.invgo-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    backdrop-filter: blur(2px);
}
.invgo-drawer-overlay.active {
    display: block;
}

/* Body lock quando drawer aberto */
html.invgo-drawer-open,
body.invgo-drawer-open {
    overflow: hidden !important;
    touch-action: none;
    -ms-touch-action: none;
    overscroll-behavior: contain;
}
body.invgo-drawer-open {
    height: 100%;
    width: 100% !important;
}

/* Header fica no topo tambem quando drawer aberto (iOS fix) */
.invgo-header {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
    .invgo-header__inner {
        gap: 10px;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    /* Esconde nav e cta no mobile (com specificidade alta pra vencer) */
    .invgo-header .invgo-header__nav,
    .invgo-header ul.invgo-header__nav,
    .invgo-header .invgo-header__cta {
        display: none !important;
    }

    /* Mostra toggle hamburger */
    .invgo-header .invgo-header__toggle {
        display: flex !important;
    }
}

@media (max-width: 600px) {
    .invgo-header {
        overflow-x: hidden;
    }
    .invgo-header__inner {
        padding: 10px 16px;
    }
    .invgo-header__logo img,
    .invgo-header .invgo-header__logo img {
        width: 180px !important;
        height: 37px !important;
        max-width: 180px !important;
        min-width: 180px !important;
        max-height: 37px !important;
        min-height: 37px !important;
    }
}
