/* Header fixo */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;

    background: rgba(0,0,0,0.5);
    border-bottom: 2px solid var(--surface-border);
    filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.5));
}

/* Header claro */
body.light-theme .site-header {
    background: #ffffff;
    border-bottom-color: rgba(0, 0, 0, 0.08);
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.08));
}

/* Linha principal */
.header-inner {
    max-width: 95%;
    padding: 10px 24px;
    max-height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

/* Botão hamburger */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    cursor: pointer;
    padding: 0;
    gap: 4px;
    flex-direction: column;
}

/* Barras do ícone */
.menu-toggle__line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Controles do topo */
.control-group {
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

/* Logo e marca */
.brand-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Navegação principal */
.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1vw, 12px);
    flex-wrap: wrap;
}

/* Link do menu */
.nav-link {
    color: var(--text);
    text-decoration: none;
    font-size: clamp(0.5rem, 0.6vw, 0.7rem);
    font-weight: 600;
    letter-spacing: clamp(0.08em, 0.11vw, 0.15em);
    text-transform: uppercase;
    padding: clamp(5px, 0.6vw, 7px) clamp(7px, 0.9vw, 10px);
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

/* Hover do menu */
.nav-link:hover,
.nav-link:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}


/* Página ativa */
.nav-link--highlight {
   color: #939393;
   font-weight: 900;
    font-size: clamp(0.55rem, 0.65vw, 0.75rem);

}

/* Ativa no claro */
body.light-theme .nav-link--highlight {
    /* background: rgba(0, 0, 0, 0.08); */
        font-weight: 900;
            font-size: clamp(0.55rem, 0.65vw, 0.75rem);

    color: #111111;
}


/* Links no claro */
body.light-theme .nav-link {
    color: var(--text);
}

/* Hover no claro */
body.light-theme .nav-link:hover,
body.light-theme .nav-link:focus-visible {
    background: rgba(0, 0, 0, 0.08);
}

/* Hover do hamburger */
.menu-toggle:hover,
.menu-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.14);
}

/* Hamburger no claro */
body.light-theme .menu-toggle {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.04);
}

/* Hover do hamburger no claro */
body.light-theme .menu-toggle:hover,
body.light-theme .menu-toggle:focus-visible {
    background: rgba(0, 0, 0, 0.08);
}

/* Placeholder do logo */
.logo-placeholder {

    height: 26px;
    width: 25px;


    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Nome do site */
.brand {
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


/* Controles de tema e idioma */
.control-group {
    display: inline-flex;
    align-items: right;
    gap: 15px;

}

/* Grupo de botões */
body.light-theme .lang-switcher,
body.light-theme .theme-switcher {
    display: inline-flex;
    gap: 7px;
    padding: 4px 4px;
    border-radius: 99px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.07);
}

/* Grupo de botões no escuro */
body:not(.light-theme) .lang-switcher,
body:not(.light-theme) .theme-switcher {
    display: inline-flex;
    align-items: right;
    gap: 7px;
    padding: 4px 4px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.15);
}



/* Botões internos */
.theme-switcher .theme-btn,
.lang-switcher .lang-btn {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.2);
    width: 35px;
    height: 23px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    Border: 0;
    border-radius: 99px;
    cursor: pointer;

    font-weight: 550;
    font-size: 0.7rem;

}

/* Hover dos botões */
.lang-btn:hover,
.theme-btn:hover,
body.light-theme .lang-btn:hover,
body.light-theme .theme-btn:hover {
    background: rgba(126, 126, 126, 0.787);

}

/* Botão ativo */
.lang-btn.active,
.theme-btn.active {
    background: linear-gradient(135deg, var(--highlight), #830037);
    color: #ffffff;
}

.theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
}

/* Ícones do tema */
.theme-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

}

/* Ícones claros */
theme-icon.moon,
theme-icon.sun {
    color: #fff;
    opacity: 0.8;
}

/* Ícone ativo no tema */
body.light-theme .theme-icon.sun,
body:not(.light-theme) .theme-icon.moon {
    color: #ffffff;
    opacity: 1;
}




/* ----------------------------- Mobile -----------------------------  */
@media (max-width: 1023px) {
    .header-inner {
        position: relative;
        justify-content: flex-start;
    }

    .brand-wrap {
        order: 1;
    }

    .control-group {
        order: 2;
        /* margin-left: auto; */
    }

    .menu-toggle {
        order: 3;
        /* display: inline-flex; */
        /* margin-left: 12px; */

           margin-right: auto;
    }

    .site-nav {
        order: 4;
        display: none;
        position: absolute;
        top: calc(100% + 1px);
        right: 24px;
        left: auto;
        width: fit-content;
        min-width: 220px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 12px 12px;
        background: rgba(27, 27, 27, 0.823);
        border-bottom: 1px solid var(--surface-border);
        border-radius: 16px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
        z-index: 25;

    }

    body.light-theme .site-nav {
        background: rgba(255, 255, 255, 0.98);
        border-bottom-color: rgba(0, 0, 0, 0.08);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    }

    .site-header.is-menu-open .site-nav {
        display: flex;
    }

    .site-header.is-menu-open .menu-toggle__line:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .site-header.is-menu-open .menu-toggle__line:nth-child(2) {
        opacity: 0;
    }

    .site-header.is-menu-open .menu-toggle__line:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .nav-link {
        width: 90%;
        padding: 10px 10px;
        font-size: 0.8rem;
        border-radius: 14px;
        font-weight: 700;
    }
}