header {
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: #020817 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

header.header-hidden {
    transform: translateY(-100%) !important;
    box-shadow: none;
}

header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 72px;
    column-gap: 2rem;
    /* Adicionado para evitar que elementos colém */
    /* Aumentado para mais elegância */
}

/* Logo */
.logo {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--color-white);
    text-decoration: none !important;
    /* Remoção de sublinhado */
}

.logo img {
    height: var(--logo-height-desktop);
    width: auto;
    display: block;
}

/* Desktop Menu Refatorado */
.nav-desktop-menu {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    /* Reduzido de 3.5rem para acomodar o novo link Blog */
}

.nav-desktop-menu a {
    color: var(--color-gray-medium);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-desktop-menu a:hover,
.nav-desktop-menu a.active {
    color: var(--color-white);
}

/* Underline Animation elegante */
.nav-desktop-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-accent-green);
    transition: width 0.3s ease;
}

.nav-desktop-menu a:hover::after,
.nav-desktop-menu a.active::after {
    width: 100%;
}

/* Right Actions */
.nav-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Fix para botão não ficar gigante no desktop */
.nav-actions .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    white-space: nowrap;
    height: auto;
    min-width: auto;
}

/* Botão Login Elegante (Enterprise Ghost) */
.nav-actions .btn-login {
    color: var(--color-gray-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.nav-actions .btn-login:hover {
    color: var(--color-accent-green);
    border-color: var(--color-accent-green);
    background: rgba(187, 255, 0, 0.05);
    box-shadow: 0 0 15px rgba(187, 255, 0, 0.1);
}

/* Botão Mobile (Sanduíche) */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
    margin-left: 1rem;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--color-white);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Animação do X */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(2, 8, 23, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    justify-content: flex-end;
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

.mobile-menu-container {
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: var(--color-primary-navy);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-links a {
    font-size: 1.25rem;
    color: var(--color-gray-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--color-accent-green);
    padding-left: 10px;
}

.mobile-actions {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
}

.btn-login-mobile {
    text-align: center;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-button);
    color: var(--color-white);
    text-decoration: none;
    font-weight: 600;
}

/* Responsividade */
@media (max-width: 1100px) {
    header .container {
        display: flex;
        justify-content: space-between;
        height: 64px;
        padding: 0 1.5rem;
        /* Garante padding lateral no container mobile */
    }

    .nav-desktop-menu {
        display: none;
    }

    .nav-actions a[data-demo-trigger],
    .nav-actions .btn-login {
        display: none;
        /* Esconde botões desktop no mobile */
    }

    .mobile-menu-btn {
        display: flex;
    }
}