:root {
    --bg-color: #050505;
    --card-bg: #121212;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --primary-gradient: linear-gradient(135deg, #8A2BE2 0%, #4169E1 100%);
    --accent: #8A2BE2;
    --glass-border: rgba(255, 255, 255, 0.15); 
    --glass-bg: rgba(15, 15, 15, 0.4);
    --glass-bg-active: rgba(5, 5, 5, 0.95);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- HEADER FLUTUANTE COM SHINE E MORPHING --- */
.main-header {
    /* Posicionamento */
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    height: 60px; /* Altura inicial fixa */
    z-index: 1000;
    
    /* Visual de Vidro */
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    
    /* Configuração do Efeito Shine */
    background-image: linear-gradient(
        120deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.15) 50%, 
        transparent 70%
    );
    background-size: 200% 100%;
    background-position: 100% 0; /* Posição inicial (escondido na direita) */
    
    padding: 10px 30px;
    overflow: hidden; /* Importante para o conteúdo não vazar na animação */

    /* TRANSIÇÕES SEPARADAS (O Segredo para funcionar tudo junto) */
    transition: 
        /* 1. Animação de Tamanho (Menu Mobile) */
        height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-radius 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        
        /* 2. Animação de Cor (Scroll) */
        background-color 0.4s ease,
        border-color 0.3s ease,
        
        /* 3. Animação do Shine (Hover) */
        background-position 0.7s ease-out;
}

/* Gatilho do Shine no Hover */
.main-header:hover {
    background-position: 0 0; /* Move o brilho da direita para esquerda */
    border-color: rgba(138, 43, 226, 0.4); /* Borda roxa sutil */
}

/* Estado Expandido (via JS quando clica no hambúrguer) */
.main-header.nav-open {
    height: 380px; /* Altura para caber o menu vertical */
    border-radius: 25px; 
    background-color: var(--glass-bg-active);
    border-color: rgba(138, 43, 226, 0.3);
}

.header-flex { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 40px; /* Mantém o topo alinhado mesmo com header crescendo */
    flex-wrap: wrap; 
}

/* Logos */
.logo img { 
    height: 35px; 
    vertical-align: middle;
    filter: brightness(0) invert(1); 
    transition: 0.3s;
}

.logo-mobile { display: none; }
.logo-desktop { display: block; }

/* Navegação Desktop */
nav ul { display: flex; list-style: none; gap: 30px; align-items: center; }
nav a { font-size: 0.9rem; font-weight: 500; opacity: 0.8; }
nav a:hover { opacity: 1; color: var(--accent); }

/* Botão Hambúrguer */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    position: absolute;
    transition: 0.3s;
    border-radius: 2px;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

/* Animação do X */
.menu-toggle.active span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

/* --- MOBILE STYLES --- */
@media (max-width: 768px) {
    .main-header {
        padding: 10px 20px;
        width: 95%;
    }

    /* Troca de Logos */
    .logo-desktop { display: none; }
    .logo-mobile { 
        display: block; 
        height: 30px; /* Ajuste altura se necessário */
    }

    .menu-toggle { display: block; }

    nav {
        width: 100%;
        margin-top: 30px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: 0.3s 0.1s ease;
    }

    .main-header.nav-open nav {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    nav a { font-size: 1.1rem; }

    .btn-primary, .btn-outline {
        width: 100%;
        text-align: center;
        display: block;
    }
}

/* BUTTONS */
.btn-primary {
    background: var(--primary-gradient);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    text-align: center;
    background-color: #050505;
    background-image: 
        linear-gradient(to bottom, rgba(5,5,5,0.4) 0%, rgba(5,5,5,1) 95%), 
        url('../img/FMACS_CAPA.png'); 
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
}

.hero-content { position: relative; z-index: 2; max-width: 900px; }

.hero-text-centered h1 {
    font-size: 4rem;
    margin-bottom: 25px;
    line-height: 1.1;
    font-weight: 800;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.hero-text-centered p {
    font-size: 1.3rem;
    color: #e0e0e0;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 5px 15px rgba(0,0,0,0.8);
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    display: inline-block;
    border: 1px solid rgba(138, 43, 226, 0.3);
    backdrop-filter: blur(5px);
}

.cta-group { display: flex; justify-content: center; gap: 20px; }

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.2); }

/* --- FEATURES --- */
.features { padding: 100px 0; background: var(--card-bg); }
.features h2 { text-align: center; margin-bottom: 60px; font-size: 2.5rem; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.card {
    background: #1a1a1a;
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid #2a2a2a;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
}

.card:hover { 
    transform: translateY(-10px); 
    border-color: var(--accent); 
    box-shadow: 0 10px 40px -10px rgba(138, 43, 226, 0.2);
}

.card h3 { margin-bottom: 15px; color: white; font-size: 1.5rem; }
.card p { color: #888; font-size: 0.95rem; }

/* FOOTER */
.main-footer { padding: 50px 0; background: #080808; border-top: 1px solid #222; margin-top: auto; }
.footer-content { display: flex; justify-content: space-between; align-items: center; color: #555; font-size: 0.9rem; }
.footer-links a { margin-left: 25px; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* 404 */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%);
    padding-top: 80px;
}
.error-content { max-width: 600px; margin: 0 auto; }
.glitch-text {
    font-size: 10rem;
    font-weight: 900;
    line-height: 1;
    margin: 20px 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    letter-spacing: -5px;
}
.error-page h2 { font-size: 2rem; margin-bottom: 15px; color: white; }
.error-page p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 40px; }

@media (max-width: 768px) {
    .main-header { top: 10px; }
    .hero-text-centered h1 { font-size: 2.8rem; }
    .cta-group { flex-direction: column; width: 100%; }
    .hero { background-attachment: scroll; }
    .glitch-text { font-size: 6rem; }
}