/* --- HEADER --- */
header {
    position: relative;
    z-index: 1000;
    /* Usa a variável global corrigida: Branco ou Preto Suave (#121212) */
    background-color: var(--color-bg-white);
    box-shadow: var(--shadow-card);
    padding: 20px 0;
    transition: background-color 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s;
    padding: 5px 0;
}

.logo:hover {
    opacity: 0.9;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-name {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    color: var(--color-accent-gold);
    margin-bottom: 0;
}

.logo-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    white-space: nowrap;
    margin-top: -2px;
    color: var(--color-text-main);
}

/* Menu Desktop */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 40px;
}

.nav-links li {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 20px;
}

.nav-links li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    height: 15px;
    width: 1px;
    background-color: var(--color-accent-gold);
    opacity: 0.3;
}

.nav-links a {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    color: var(--color-text-main);
    font-weight: normal;
}

.nav-links a:hover {
    color: var(--color-accent-gold);
}

/* Área de Botões */
.header-actions {
    display: flex;
    align-items: center;
    margin-left: 40px;
    gap: 30px;
}

.theme-btn {
    background: transparent;
    border: 1px solid var(--color-text-main);
    color: var(--color-text-main);
    width: 39px;
    height: 39px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    flex-shrink: 0;
}

.theme-btn:hover {
    background-color: var(--color-accent-gold);
    border-color: var(--color-accent-gold);
    color: white;
}

.header-cta.desktop-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #25D366;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    transition: 0.3s;
    margin-left: 25px;
}

.header-cta:hover {
    transform: scale(1.05);
    background-color: #1ebe57;
}

.mobile-orcamento {
    display: none;
}

/* --- ÍCONE HAMBÚRGUER (Escondido no Desktop) --- */
.hamburger {
    display: none !important;
    /* O !important garante que ele suma no PC */
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-main);
    z-index: 2002;
    transition: 0.3s;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 1200px) {
    .nav-links li {
        padding: 0 15px;
    }

    .nav-links a {
        font-size: 0.95rem;
    }
}

@media (max-width: 992px) {
    .header-actions {
        gap: 10px !important;
        margin-left: auto;
    }

    /* --- BOTÃO TEMA (Aumentado) --- */
    .theme-btn {
        width: 34px;
        height: 34px;
        font-size: 1.0rem;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
}

@media (max-width: 768px) {

    /* --- 1. GARANTIA DE ESTRUTURA (Blindagem) --- */
    .nav-container {
        /* Garante que os itens fiquem na mesma linha sempre */
        flex-wrap: nowrap !important;
    }

    /* Se a tela for minúscula, o logo encolhe para dar espaço ao menu */
    .logo {
        flex-shrink: 1;
        min-width: 0;
        /* Permite encolher o texto se necessário */
    }

    /* --- 2. REMOVE O BOTÃO ORÇAMENTO --- */
    .header-cta.desktop-cta {
        display: none !important;
    }

    /* --- 3. POSICIONAMENTO DOS ÍCONES (Lua + Hambúrguer) --- */
    .header-actions {
        display: flex !important;
        align-items: center !important;

        /* Joga tudo para a direita */
        margin-left: auto !important;

        /* ORDEM SUPREMA: Proíbe o navegador de esconder ou esmagar isso */
        flex-shrink: 0 !important;

        /* Espaço fixo e seguro entre a Lua e o Hambúrguer */
        gap: 40px !important;

        /* Distância da borda direita da tela (para não ficar colado) */
        padding-right: 20px !important;
    }

    /* --- 4. ÍCONE HAMBÚRGUER --- */
    .hamburger {
        display: block !important;
        position: relative;
        margin-left: 0 !important;
        z-index: 2002;
        font-size: 2.0rem;
        color: var(--color-text-main);
        /* Garante que o ícone tenha tamanho fixo */
        width: auto;
        height: auto;
    }

    /* --- MENU LATERAL (MANTIDO IGUAL) --- */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 45%;
        max-width: 245px;

        background-color: rgba(248, 249, 250, 0.95);
        backdrop-filter: blur(12px);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 90px;

        gap: 0;
        margin-left: 0;
        transform: translateX(100%);
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1500;
    }

    [data-theme="dark"] .nav-links {
        background-color: rgba(18, 18, 18, 0.95);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .nav-links li {
        width: 85%;
        display: block;
        text-align: center;
        padding: 0;
        border-bottom: 1px solid rgba(212, 175, 55, 0.6);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links li:not(:last-child)::after {
        display: none;
    }

    .nav-links a {
        display: block;
        text-align: center;
        padding: 22px 0;
        font-size: 1.1rem;
        font-weight: 500;
        letter-spacing: 2px;
        color: var(--color-text-main);
    }

    .nav-links a::after {
        display: none;
    }

    /* Botão verde DENTRO do menu */
    .mobile-orcamento {
        display: block;
        margin-top: 30px;
    }

    .mobile-orcamento a {
        background-color: var(--color-whatsapp);
        color: white !important;
        padding: 12px 28px;
        border-radius: 50px;
        font-size: 0.95rem;
        font-weight: 700;
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
        letter-spacing: 1px;
    }
}