/* ===========================================================
   HEADER MODERNO TECBORR
   Sobrescreve estilos legados do .site-header em style.css
   =========================================================== */

#site_header.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    z-index: 1000;
    background: rgba(255, 255, 255, .70);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-bottom: 1px solid rgba(255, 255, 255, .70);
    transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
}

/* Reserva espaço no body para o header fixo (86px desktop) */
body { padding-top: 86px; }
@media (max-width: 1099px) { body { padding-top: 78px; } }
@media (max-width: 991px)  { body { padding-top: 72px; } }

/* Hero das páginas internas: sobe para cobrir o espaço reservado ao header */
.inner-banner {
    margin-top: -86px;
    padding-top: 86px;
}
@media (max-width: 1099px) {
    .inner-banner { margin-top: -78px; padding-top: 78px; }
}
@media (max-width: 991px) {
    .inner-banner { margin-top: -72px; padding-top: 72px; }
}

#site_header.is-scrolled {
    background: rgba(255, 255, 255, .70);
    box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .25);
    border-bottom-color: rgba(255, 255, 255, .70);
}

#site_header .heder-main {
    padding: 0;
}

#site_header .heder-main > .container {
    max-width: 1320px;
}

/* Reset do row/col legado — usamos flex */
#site_header .heder-main .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    flex-wrap: nowrap;
    min-height: 86px;
    gap: 24px;
}

#site_header .heder-main .row > [class*="col-"] {
    padding: 0;
    width: auto;
    flex: 0 0 auto;
    max-width: none;
}

#site_header .heder-main .row > .col-lg-10 {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}

/* Logo */
#site_header .site-branding {
    display: flex;
    align-items: center;
    height: 86px;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

#site_header .site-branding a {
    display: inline-flex;
    align-items: center;
}

#site_header .site-branding img {
    height: 50px;
    width: auto;
    display: block;
    transition: transform .3s ease;
}

#site_header .site-branding a:hover img {
    transform: scale(1.03);
}

/* Container do menu */
#site_header .header-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 86px;
    gap: 12px;
    position: static;
}

#site_header .main-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    gap: 4px;
    height: 100%;
    position: static;
}

#site_header .header-mobile-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    gap: 4px;
    height: 100%;
    background: transparent;
    box-shadow: none;
    padding: 0;
    position: static;
}

/* Lista principal */
#site_header .main-menu {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
}

#site_header .main-menu > li {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0;
}

#site_header .main-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 14px;
    color: #1f2937;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    letter-spacing: .01em;
    position: relative;
    transition: color .25s ease;
    white-space: nowrap;
}

#site_header .main-menu > li > a::before { display: none; }

/* Indicador inferior animado */
#site_header .main-menu > li > a::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 26px;
    height: 2px;
    background: linear-gradient(90deg, #99ce2a, #7bb82a);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s ease;
}

#site_header .main-menu > li:hover > a::after,
#site_header .main-menu > li.active-menu > a::after,
#site_header .main-menu > li.menu-parent:hover > a::after {
    transform: scaleX(1);
}

#site_header .main-menu > li:hover > a,
#site_header .main-menu > li.active-menu > a {
    color: #0a0f1c;
}

#site_header .main-menu > li.active-menu > a {
    color: #6ea118;
    font-weight: 600;
}

/* Seta de dropdown */
#site_header .main-menu > li.menu-item-has-children > a::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: .55;
    transition: transform .25s ease, opacity .25s ease;
}

#site_header .main-menu > li.menu-item-has-children:hover > a::before {
    transform: rotate(-135deg) translateY(0);
    opacity: 1;
}

/* Sub-menu (dropdown) */
#site_header .main-menu .sub-menu {
    position: absolute;
    top: calc(100% - 4px);
    left: 50%;
    transform: translate(-50%, 6px);
    min-width: 250px;
    max-width: 280px;
    padding: 10px;
    margin: 0;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 14px;
    box-shadow:
        0 30px 60px -15px rgba(15, 23, 42, .25),
        0 8px 20px -10px rgba(15, 23, 42, .15);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
    z-index: 1001;
}

#site_header .main-menu .sub-menu::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid rgba(15, 23, 42, .06);
    border-top: 1px solid rgba(15, 23, 42, .06);
}

#site_header .main-menu > li:hover > .sub-menu,
#site_header .main-menu > li.menu-parent:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

#site_header .main-menu .sub-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

#site_header .main-menu .sub-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #334155;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, padding-left .25s ease;
    position: relative;
}

#site_header .main-menu .sub-menu li a::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(153, 206, 42, .3);
    flex-shrink: 0;
    transition: background .2s ease, transform .25s ease;
}

#site_header .main-menu .sub-menu li:hover a,
#site_header .main-menu .sub-menu li.active-menu a {
    background: rgba(153, 206, 42, .1);
    color: #1f2937;
    padding-left: 14px;
}

#site_header .main-menu .sub-menu li:hover a::before,
#site_header .main-menu .sub-menu li.active-menu a::before {
    background: #99ce2a;
    transform: scale(1.3);
}

/* CTA */
#site_header .header-cta {
    margin-left: 14px;
    padding-left: 18px;
    border-left: 1px solid rgba(15, 23, 42, .1);
    display: inline-flex;
    align-items: center;
    height: 100%;
}

#site_header .header-cta .sec-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #99ce2a, #7bb82a);
    color: #0a0f1c;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .02em;
    box-shadow: 0 8px 20px -6px rgba(153, 206, 42, .55);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
    white-space: nowrap;
    border: none;
    line-height: 1;
}

#site_header .header-cta .sec-btn::after {
    content: '\2192';
    font-size: 15px;
    transition: transform .25s ease;
    line-height: 1;
    /* Anula o ::after legado (SVG mask em style.css) */
    -webkit-mask-image: none !important;
            mask-image: none !important;
    background: transparent !important;
    width: auto;
    height: auto;
    animation: none !important;
}

#site_header .header-cta .sec-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -8px rgba(153, 206, 42, .6);
    filter: brightness(1.05);
    color: #0a0f1c;
}

#site_header .header-cta .sec-btn:hover::after {
    transform: translateX(3px);
}

/* Menu mobile toggle */
#site_header .menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    background: rgba(15, 23, 42, .06);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background .2s ease;
}

#site_header .menu-toggle:hover { background: rgba(15, 23, 42, .1); }

#site_header .menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1f2937;
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
}

#site_header.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
#site_header.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
#site_header.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

#site_header .black-shadow { display: none; }

/* Garante que nada estoure horizontalmente */
#site_header .main-menu > li > a,
#site_header .header-cta .sec-btn {
    white-space: nowrap;
}
#site_header .main-navigation,
#site_header .header-mobile-menu,
#site_header .main-menu {
    min-width: 0;
}

/* ============== RESPONSIVE — escala progressiva ============== */
/* Telas grandes, mas abaixo de 1320px */
@media (max-width: 1319px) {
    #site_header .main-menu > li > a { padding: 0 12px; font-size: 14px; }
}

@media (max-width: 1199px) {
    #site_header .main-menu > li > a { padding: 0 9px; font-size: 13px; }
    #site_header .header-cta { margin-left: 8px; padding-left: 12px; }
    #site_header .header-cta .sec-btn { padding: 9px 16px; font-size: 12.5px; }
    #site_header .site-branding img { height: 44px; }
    #site_header .heder-main .row { gap: 16px; }
}

@media (max-width: 1099px) {
    #site_header .main-menu > li > a { padding: 0 7px; font-size: 12px; letter-spacing: 0; }
    #site_header .header-cta { margin-left: 6px; padding-left: 10px; }
    #site_header .header-cta .sec-btn { padding: 8px 14px; font-size: 11.5px; }
    #site_header .header-cta .sec-btn i { font-size: 11px; }
    #site_header .site-branding img { height: 40px; }
    #site_header .heder-main .row { gap: 10px; min-height: 78px; }
    #site_header .site-branding,
    #site_header .header-menu { height: 78px; }
    #site_header .menu-item-has-children > a { padding-right: 14px; }
}

@media (max-width: 1023px) {
    #site_header .main-menu > li > a { padding: 0 5px; font-size: 11.5px; }
    #site_header .header-cta { margin-left: 4px; padding-left: 8px; }
    #site_header .header-cta .sec-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    #site_header .header-cta .sec-btn::after {
        margin-left: 4px;
        font-size: 12px;
    }
}

@media (max-width: 991px) {
    #site_header .heder-main .row { min-height: 72px; gap: 16px; }
    #site_header .heder-main .row > .col-lg-10 { justify-content: flex-end; }
    #site_header .site-branding,
    #site_header .header-menu { height: 72px; }
    #site_header .site-branding img { height: 40px; }
    #site_header .menu-toggle { display: inline-flex; }

    #site_header .header-mobile-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 24px 20px 40px;
        gap: 0;
        height: auto;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity .25s ease, transform .25s ease, visibility .25s;
        box-shadow: 0 20px 40px -10px rgba(15,23,42,.2);
    }

    #site_header.menu-open .header-mobile-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    #site_header .main-navigation {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        flex: 0 0 auto;
        gap: 0;
    }

    #site_header .main-menu {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        gap: 0;
        width: 100%;
    }

    #site_header .main-menu > li {
        height: auto;
        border-bottom: 1px solid rgba(15,23,42,.06);
    }

    #site_header .main-menu > li > a {
        height: auto;
        padding: 14px 8px;
        font-size: 15px;
        width: 100%;
        justify-content: space-between;
    }

    #site_header .main-menu > li > a::after { display: none; }

    #site_header .main-menu .sub-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        box-shadow: none;
        border: none;
        background: rgba(15,23,42,.03);
        border-radius: 8px;
        margin: 0 0 12px;
        padding: 8px;
        max-width: none;
        min-width: 0;
    }

    #site_header .main-menu .sub-menu::before { display: none; }

    #site_header .header-cta {
        margin: 18px 0 0;
        padding: 0;
        border-left: none;
        width: 100%;
        height: auto;
    }

    #site_header .header-cta .sec-btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
        font-size: 14px;
    }
}

@media (max-width: 575px) {
    #site_header .site-branding img { height: 36px; }
    #site_header .heder-main > .container { padding-left: 16px; padding-right: 16px; }
}
