/* =========================================================
   CONFORMITÀ CHILD — HEADER PREMIUM
   Arquivo: assets/css/header.css
   ========================================================= */

:root {
    --cf-dark: #0B1B26;
    --cf-dark-2: #233037;
    --cf-gray: #434D53;
    --cf-yellow: #F8E20E;
    --cf-blue: #013266;
    --cf-white: #FFFFFF;
    --cf-text: #E0E6E9;
    --cf-border: rgba(255, 255, 255, 0.10);
    --cf-glass: rgba(11, 27, 38, 0.82);
}

/* HEADER */

.cf-site-header {
    width: 100%;
    height: 82px;
    position: sticky;
    top: 0;
    z-index: 9999;
    background:
        linear-gradient(180deg, rgba(11, 27, 38, 0.96), rgba(11, 27, 38, 0.88));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: "Montserrat", "Arimo", Arial, sans-serif;
}

.cf-site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(248, 226, 14, 0.35),
        transparent
    );
    pointer-events: none;
}

.cf-header-container {
    max-width: 1240px;
    height: 82px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}

/* LOGO */

.cf-header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.cf-header-logo img {
    display: block;
    height: 38px;
    width: auto;
}

/* MENU DESKTOP */

.cf-main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.cf-menu,
.cf-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cf-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* item principal */

.cf-menu > li {
    position: relative;
}

.cf-menu > li > a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 82px;
    padding: 0 14px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cf-menu > li > a::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 22px;
    height: 1px;
    background: var(--cf-yellow);
    opacity: 0;
    transform: scaleX(0.4);
    transform-origin: center;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.cf-menu > li > a:hover,
.cf-menu > li > a:focus {
    color: #FFFFFF;
}

.cf-menu > li > a:hover::before,
.cf-menu > li:focus-within > a::before {
    opacity: 1;
    transform: scaleX(1);
}

.cf-menu > li.menu-item-has-children > a::after {
    content: "";
    width: 5px;
    height: 5px;
    margin-left: 8px;
    border-right: 1px solid rgba(248, 226, 14, 0.95);
    border-bottom: 1px solid rgba(248, 226, 14, 0.95);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.cf-menu > li.menu-item-has-children:hover > a::after,
.cf-menu > li.menu-item-has-children:focus-within > a::after {
    transform: rotate(225deg) translateY(-1px);
}

/* DROPDOWN PREMIUM */

.cf-menu > li > ul {
    position: absolute;
    top: 76px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: max-content;
    min-width: 320px;
    max-width: min(920px, calc(100vw - 48px));
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 10px;

    padding: 14px;
    border-radius: 22px;

    background:
        radial-gradient(circle at top left, rgba(248, 226, 14, 0.10), transparent 32%),
        linear-gradient(135deg, rgba(35, 48, 55, 0.96), rgba(11, 27, 38, 0.98));

    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.18s ease;
}

.cf-menu > li:hover > ul,
.cf-menu > li:focus-within > ul {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* submenu como cards */

.cf-menu > li > ul > li {
    position: relative;
    min-width: 0;
}

.cf-menu > li > ul > li > a {
    display: block;
    min-height: 48px;
    padding: 14px 14px 13px 16px;
    border-radius: 15px;

    color: rgba(255, 255, 255, 0.86);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;

    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.075);

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.cf-menu > li > ul > li > a::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 9px;
    border-radius: 999px;
    background: var(--cf-yellow);
    box-shadow: 0 0 18px rgba(248, 226, 14, 0.45);
    vertical-align: 1px;
}

.cf-menu > li > ul > li > a:hover,
.cf-menu > li > ul > li > a:focus {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(248, 226, 14, 0.28);
    transform: translateY(-1px);
}

/* terceiro nível */

.cf-menu > li > ul > li > ul {
    margin: 8px 0 4px 13px;
    padding-left: 14px;
    border-left: 1px solid rgba(248, 226, 14, 0.24);
}

.cf-menu > li > ul > li > ul > li > a {
    display: block;
    padding: 7px 4px;
    color: rgba(255, 255, 255, 0.60);
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.35;
    text-decoration: none;
    transition: color 0.18s ease, padding-left 0.18s ease;
}

.cf-menu > li > ul > li > ul > li > a:hover,
.cf-menu > li > ul > li > ul > li > a:focus {
    color: var(--cf-yellow);
    padding-left: 3px;
}

/* CTA */

.cf-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;

    background: var(--cf-yellow);
    color: var(--cf-dark);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;

    box-shadow:
        0 10px 28px rgba(248, 226, 14, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.cf-header-cta:hover,
.cf-header-cta:focus {
    color: var(--cf-dark);
    transform: translateY(-1px);
    filter: brightness(0.98);
    box-shadow:
        0 14px 34px rgba(248, 226, 14, 0.24),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

/* BOTÃO MOBILE ESCONDIDO NO DESKTOP */

.cf-menu-toggle {
    display: none !important;
}

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

@media (max-width: 1024px) {

    .cf-site-header {
        height: 68px !important;
        overflow: visible !important;
    }

    .cf-header-container {
        height: 68px !important;
        min-height: 68px !important;
        max-width: none;
        padding: 0 18px !important;
        gap: 0;
        flex-wrap: nowrap !important;
    }

    .cf-header-logo img {
        height: 29px;
    }

    .cf-header-cta {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* botão hambúrguer branco e limpo */

    html body .cf-site-header button.cf-menu-toggle,
    html body .cf-site-header button.cf-menu-toggle:hover,
    html body .cf-site-header button.cf-menu-toggle:focus,
    html body .cf-site-header button.cf-menu-toggle:active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;

        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;

        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;

        margin-left: auto !important;
        padding: 0 !important;

        background: transparent !important;
        background-color: transparent !important;
        background-image: none !important;

        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;

        color: #FFFFFF !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    html body .cf-site-header button.cf-menu-toggle span {
        display: block !important;
        width: 26px !important;
        height: 2px !important;
        margin: 4px 0 !important;

        background: #FFFFFF !important;
        background-color: #FFFFFF !important;

        border: 0 !important;
        border-radius: 2px !important;
        box-shadow: none !important;

        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    html body .cf-site-header button.cf-menu-toggle.cf-active span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    html body .cf-site-header button.cf-menu-toggle.cf-active span:nth-child(2) {
        opacity: 0;
    }

    html body .cf-site-header button.cf-menu-toggle.cf-active span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    /* menu mobile em overlay */

    .cf-main-nav {
        display: none !important;
        position: fixed !important;
        top: 68px !important;
        left: 0 !important;
        right: 0 !important;

        width: 100vw !important;
        max-height: calc(100vh - 68px) !important;
        overflow-y: auto !important;

        flex: none !important;
        justify-content: flex-start !important;

        background:
            radial-gradient(circle at top left, rgba(248, 226, 14, 0.08), transparent 36%),
            rgba(11, 27, 38, 0.985) !important;

        border-top: 1px solid rgba(255, 255, 255, 0.10) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
        box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35) !important;

        padding: 8px 18px 18px !important;
        z-index: 9998 !important;
    }

    .cf-main-nav.cf-open {
        display: block !important;
    }

    .cf-menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 0 !important;
    }

    .cf-menu > li {
        width: 100% !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    }

    .cf-menu > li:last-child {
        border-bottom: 0;
    }

    .cf-menu > li > a {
        width: 100% !important;
        min-height: auto !important;
        padding: 16px 0 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;

        color: rgba(255, 255, 255, 0.88) !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
    }

    .cf-menu > li > a::before {
        display: none !important;
    }

    .cf-menu > li.menu-item-has-children > a::after {
        content: "+" !important;
        width: auto !important;
        height: auto !important;
        margin-left: 12px !important;
        border: 0 !important;
        transform: none !important;
        color: var(--cf-yellow) !important;
        font-size: 20px !important;
        line-height: 1 !important;
    }

    .cf-menu > li.cf-submenu-open.menu-item-has-children > a::after {
        content: "−" !important;
    }

    .cf-menu > li > ul {
        position: static !important;
        transform: none !important;

        display: none !important;
        grid-template-columns: none !important;

        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;

        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;

        margin: 0 0 12px !important;
        padding: 4px 0 10px 14px !important;

        background: transparent !important;
        border: 0 !important;
        border-left: 1px solid rgba(248, 226, 14, 0.32) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .cf-menu > li.cf-submenu-open > ul {
        display: block !important;
    }

    .cf-menu > li:hover > ul {
        display: none !important;
    }

    .cf-menu > li.cf-submenu-open:hover > ul {
        display: block !important;
    }

    .cf-menu > li > ul > li > a {
        min-height: auto !important;
        display: block !important;
        padding: 9px 0 !important;

        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;

        color: rgba(255, 255, 255, 0.68) !important;
        font-size: 13.5px !important;
        font-weight: 500 !important;
        line-height: 1.4 !important;
        text-decoration: none !important;
        transform: none !important;
    }

    .cf-menu > li > ul > li > a::before {
        display: none !important;
    }

    .cf-menu > li > ul > li > a:hover,
    .cf-menu > li > ul > li > a:focus {
        color: var(--cf-yellow) !important;
    }

    .cf-menu > li > ul > li > ul {
        margin: 4px 0 8px 12px !important;
        padding-left: 12px !important;
        border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
    }

    .cf-menu > li > ul > li > ul > li > a {
        display: block !important;
        padding: 6px 0 !important;
        color: rgba(255, 255, 255, 0.56) !important;
        font-size: 12.5px !important;
        line-height: 1.35 !important;
        text-decoration: none !important;
    }

    .cf-menu > li > ul > li > ul > li > a:hover,
    .cf-menu > li > ul > li > ul > li > a:focus {
        color: var(--cf-yellow) !important;
    }
}

/* DESKTOP FORÇADO */

@media (min-width: 1025px) {

    .cf-site-header {
        height: 82px !important;
    }

    .cf-header-container {
        height: 82px !important;
        min-height: 82px !important;
        flex-wrap: nowrap !important;
    }

    .cf-menu-toggle,
    button.cf-menu-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .cf-main-nav {
        display: flex !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
        padding: 0 !important;
    }

    .cf-header-cta {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

@media (max-width: 1024px) {
    .cf-site-header {
        transition: transform 0.24s ease, background 0.24s ease;
        will-change: transform;
    }

    .cf-site-header.cf-header-hidden {
        transform: translateY(-100%);
    }

    body.cf-mobile-menu-open .cf-site-header {
        transform: translateY(0) !important;
    }
}