/* ==========================================================================
   ARQUIVO: css/global.css
   DESCRIÇÃO: Variáveis da Marca, Reset, Botões, Header e Footer
   ========================================================================== */

/* ================= VARIÁVEIS ================= */
:root {
    --brand-blue: #2172FF;
    --brand-blue-hover: #1A5BCF;
    --bg-dark: #08090E; /* Azul ultraescuro da Web Lab */
    --text-main: #FFFFFF;
    --text-muted: #A8A8B3;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================= CONTAINER ================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================= BOTÕES GLOBAIS ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-header {
    padding: 10px 24px;
    font-size: 0.85rem;
}

.btn-primary {
    background-color: var(--brand-blue);
    color: #FFF;
    box-shadow: 0 4px 20px rgba(33, 114, 255, 0.4);
}

.btn-primary:hover {
    background-color: var(--brand-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(33, 114, 255, 0.6);
}

.btn-glass {
    background-color: var(--glass-bg);
    color: #FFF;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-glow {
    box-shadow: 0 0 25px rgba(33, 114, 255, 0.5);
    font-size: 1rem;
    padding: 16px 32px;
}

/* Controle de visibilidade de botões */
.btn-mobile-only { display: none; }
.btn-desktop-only { display: inline-flex; }

/* ================= HEADER (TRANSPARENTE E MINIMALISTA) ================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    z-index: 1000;
    background: transparent;
    transition: background 0.3s ease, border-bottom 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Adicionada via JS ao rolar para baixo */
.header.scrolled {
    background: rgba(8, 9, 14, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

/* Adicionada via JS para esconder o header ao descer */
.header.header-hidden {
    transform: translateY(-100%);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 32px;
    width: auto;
}

.nav-wrapper {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #E1E1E6;
    padding: 35px 0;
    transition: color 0.3s ease;
}

.nav-link i {
    color: #E1E1E6;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-link .icon-main { font-size: 1.1rem; }
.nav-link .caret { font-size: 0.75rem; margin-left: 2px; }

.nav-item:hover .nav-link,
.nav-link.active {
    color: #FFFFFF;
}

.nav-item:hover .nav-link i,
.nav-link.active i {
    color: var(--brand-blue);
}

.nav-item:hover .nav-link .caret,
.nav-link.active .caret {
    transform: rotate(180deg);
}

/* ================= DROPDOWN MENU (DESKTOP) ================= */
.dropdown-menu {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: #0D0F17;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    min-width: 240px;
    padding: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-item:hover .dropdown-menu,
.nav-item.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    color: #FFF;
    background: rgba(33, 114, 255, 0.1);
}

.dropdown-menu a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Botão Mobile (Hambúrguer) */
.mobile-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1005; /* Garantia que fica acima do menu */
    position: relative;
}

.mobile-btn .bar {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background-color: #FFF;
    transition: all 0.3s ease;
}


/* ================= CTA FINAL (COM VÍDEO) ================= */
.cta-footer {
    position: relative;
    padding: 100px 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cta-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    z-index: 0;
    opacity: 0.4;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 9, 14, 0.85);
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.cta-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    color: #FFF;
}

.text-blue { color: var(--brand-blue); }
.italic { font-style: italic; }


/* ================= FOOTER PRINCIPAL ================= */
.site-footer {
    background-color: var(--bg-dark);
    padding-top: 80px;
    color: var(--text-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--glass-border);
}

.footer-brand .footer-logo {
    height: 28px;
    width: auto;
    margin-bottom: 24px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 320px;
}

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.social-icons a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--glass-bg);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.social-icons a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFF;
    transform: translateY(-2px);
}

.footer-links h4, .footer-contact h4 {
    color: #FFF;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.footer-links ul, .footer-contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.footer-links a:hover { color: var(--brand-blue); }

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-contact i {
    color: var(--brand-blue);
    font-size: 1.1rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    font-size: 0.85rem;
}

.developed-by strong {
    color: #FFF;
    font-weight: 700;
}


/* ================= RESPONSIVIDADE (MOBILE E TABLET - DESIGN PREMIUM) ================= */
@media (max-width: 992px) {
    .btn-desktop-only { display: none !important; }
    .header { padding: 0 24px; }
    
    /* Botão Hambúrguer */
    .mobile-btn { 
        display: block !important; 
        position: relative;
        z-index: 1005 !important;
    }
    
    /* Fundo do Menu Mobile (Efeito Glassmorphism escuro) */
    /* Fundo do Menu Mobile (Efeito Glassmorphism escuro) */
    .nav-wrapper {
        position: fixed !important;
        top: 0;
        right: -100%;
        width: 100% !important; /* <-- Troque de 100vw para 100% */
        height: 100vh !important;
        background: rgba(5, 5, 8, 0.98) !important;
        backdrop-filter: blur(15px);
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding: 100px 30px 40px 30px !important;
        transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
        overflow-y: auto;
        z-index: 1000;
        display: flex !important;
    }
    
    .nav-wrapper.active { right: 0 !important; }
    
    /* Container dos links */
    .nav-list {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        gap: 0 !important;
        margin-bottom: 40px !important;
    }
    
    .nav-item { 
        display: block !important;
        width: 100% !important; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Linha sutil separando os itens */
    }

    .nav-item:last-child { border-bottom: none; }
    
    /* O truque do alinhamento perfeito (Sem mexer no HTML) */
    .nav-link {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important; /* Força ícone e texto para a esquerda */
        gap: 16px !important; /* Espaço entre o ícone e o texto */
        padding: 24px 10px !important;
        font-size: 1.15rem !important;
        font-weight: 600 !important;
        color: #FFF !important;
        width: 100% !important;
        border: none !important;
    }

    .nav-link i.icon-main {
        font-size: 1.3rem !important;
        color: var(--brand-blue) !important;
    }

    /* A mágica que empurra SÓ a setinha pro final da tela */
    .nav-link .caret {
        margin-left: auto !important; 
        font-size: 0.85rem !important;
        color: var(--text-muted) !important;
    }
    
    /* Submenus (Estilo Árvore / Hierarquia) */
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important; /* Remove aquela caixa cinza feia */
        padding: 0 !important;
        min-width: 100% !important;
        opacity: 0;
        visibility: hidden;
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease, opacity 0.3s ease;
    }
    
    .nav-item.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        height: auto;
        padding: 0 0 20px 20px !important; /* Cria um recuo lateral */
    }

    .dropdown-menu ul {
        border-left: 2px solid rgba(255, 255, 255, 0.08); /* Linha guia lateral */
        margin-left: 10px;
        padding-left: 10px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .dropdown-menu a {
        text-align: left !important;
        font-size: 0.95rem !important;
        padding: 10px 16px !important;
        color: var(--text-muted) !important;
        display: block;
        transition: all 0.3s ease;
    }

    .dropdown-menu a:hover,
    .dropdown-menu a:active {
        color: #FFF !important;
        background: transparent !important;
        padding-left: 24px !important; /* Efeito interativo que joga o texto pra frente ao clicar */
    }

    /* Botão Iniciar Projeto */
    .btn-mobile-only { 
        display: inline-flex !important; 
        width: 100%; 
        padding: 16px !important;
        font-size: 1.05rem !important;
    }

    /* Animação do Hamburger virando X */
    .mobile-btn.active .bar:nth-child(2) { opacity: 0; }
    .mobile-btn.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .mobile-btn.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Footer Centralizado */
    .cta-content { flex-direction: column; text-align: center; gap: 32px; }
    .cta-title { font-size: 2.2rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 48px; text-align: center; }
    .footer-brand { display: flex; flex-direction: column; align-items: center; }
    .footer-brand p { max-width: 100%; }
    .social-icons { justify-content: center; }
    .footer-links ul, .footer-contact ul { align-items: center; }
    .footer-contact li { justify-content: center; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}