/* ARQUIVO: assets/css/style.css (Versão Mobile First Corrigida) */

/* =========================================
   1. VARIÁVEIS E RESET
   ========================================= */
:root {
    /* Paleta Dark Theme */
    --bg-main: #0f172a;       /* Azul escuro fundo principal */
    --bg-secondary: #1e293b;  /* Cinza azulado para cartões */
    --primary: #8b5cf6;       /* Roxo principal */
    --primary-hover: #7c3aed; /* Roxo mais escuro hover */
    --text-main: #f8fafc;     /* Branco gelo */
    --text-muted: #94a3b8;    /* Cinza claro */
    
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { 
    scroll-behavior: smooth; 
    overflow-x: hidden; /* Evita rolagem lateral indesejada */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Utilitários */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 1.5rem; /* Padding lateral padrão ajustado */
}

.section { padding: 5rem 0; }
.bg-darker { background-color: #0b1120; }

/* Títulos de Seção */
.section-title {
    font-size: 2rem;
    margin: 0 auto 3rem;
    text-align: center;
    position: relative;
    display: table;
}
.section-title::after {
    content: ''; display: block; width: 100%; height: 4px;
    background-color: var(--primary); margin-top: 10px; border-radius: 2px;
}

/* Botões */
.btn-primary, .btn-secondary {
    display: inline-block; padding: 0.8rem 1.5rem; border-radius: 6px;
    font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: var(--transition);
    text-align: center;
}
.btn-primary { background-color: var(--primary); color: white; border: none; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); }

.btn-secondary { background-color: transparent; border: 1px solid var(--text-muted); color: var(--text-main); }
.btn-secondary:hover { border-color: var(--text-main); background-color: rgba(255,255,255,0.05); }


/* =========================================
   2. NAVBAR (OVAL FLUTUANTE)
   ========================================= */
#header {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 1000;
    pointer-events: none; /* Permite clicar fora */
    background: transparent;
    padding: 0;
    height: 70px; /* Altura reservada para evitar saltos */
}

.navbar {
    background: rgba(15, 23, 42, 0.9); /* Um pouco mais opaco para leitura */
    backdrop-filter: blur(12px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.5rem 1.5rem; /* Padding interno mais justo */
    pointer-events: auto;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Para posicionamento absoluto do menu mobile se necessário */
}

.logo img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}
.logo:hover img { transform: scale(1.05); }

/* Menu Desktop */
.nav-list { display: flex; gap: 2rem; align-items: center; }
.nav-list a { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; }
.nav-list a:hover, .nav-list a.active { color: var(--primary); }
.nav-list .btn-primary { color: white !important; padding: 0.5rem 1.2rem; border-radius: 50px; }

.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: white; }

/* Seletor de Idioma */
.lang-switch { display: flex; align-items: center; gap: 12px; margin-right: 20px; }
.lang-btn { background: none; border: none; padding: 0; cursor: pointer; opacity: 0.5; filter: grayscale(100%); transition: all 0.3s; }
.lang-btn img { width: 24px; height: 24px; border-radius: 50%; display: block; }
.lang-btn:hover, .lang-btn.active { opacity: 1; filter: grayscale(0%); transform: scale(1.1); }


/* =========================================
   3. HERO SECTION
   ========================================= */
.hero-section {
    min-height: 100vh;
    display: flex; align-items: center;
    padding-top: 120px; /* Compensa navbar fixa */
    padding-bottom: 50px;
}
.hero-content { display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
.hero-text { flex: 1; }
.hero-text h1 { font-size: 3rem; line-height: 1.2; margin-bottom: 1.5rem; font-weight: 700; }
.hero-text .highlight {
    background: linear-gradient(120deg, var(--primary), #a855f7);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-text p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 500px; }
.hero-text .badge {
    display: inline-block; background-color: rgba(139, 92, 246, 0.1); color: var(--primary);
    padding: 0.4rem 1rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-image { flex: 1; display: flex; justify-content: center; }
.hero-image img {
    width: 350px; height: 350px; object-fit: cover; border-radius: 20px;
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.2); border: 1px solid rgba(255,255,255,0.1);
}


/* =========================================
   4. SEÇÕES GERAIS (Sobre, Serviços, Projetos)
   ========================================= */
/* Sobre */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.about-text p { margin-bottom: 1rem; color: var(--text-muted); }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.skill-item {
    background-color: var(--bg-secondary); padding: 1rem; border-radius: 8px; text-align: center;
    border: 1px solid rgba(255,255,255,0.05); transition: var(--transition);
    display: flex; flex-direction: column; gap: 0.5rem; align-items: center; font-size: 0.9rem;
}
.skill-item i { font-size: 1.5rem; color: var(--primary); }
.skill-item:hover { transform: translateY(-5px); border-color: var(--primary); }

/* Serviços */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.service-card {
    background-color: var(--bg-secondary); padding: 2.5rem; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05); transition: var(--transition);
    height: 100%; /* Altura igual */
}
.service-card i { font-size: 2rem; color: var(--primary); margin-bottom: 1.5rem; }
.service-card h3 { margin-bottom: 1rem; font-size: 1.25rem; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; }
.service-card:hover { transform: translateY(-5px); background-color: #253045; }

/* Projetos */
.project-filters { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.filter-btn {
    background: transparent; border: 1px solid var(--text-muted); color: var(--text-muted);
    padding: 0.5rem 1.5rem; border-radius: 50px; cursor: pointer; transition: all 0.3s ease;
}
.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary); border-color: var(--primary); color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.project-card {
    background-color: var(--bg-secondary); border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05); transition: var(--transition);
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.project-img { height: 200px; background-color: #000; overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .project-img img { transform: scale(1.05); }
.project-info { padding: 1.5rem; }
.tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tags span { font-size: 0.75rem; background-color: rgba(139, 92, 246, 0.1); color: var(--primary); padding: 0.2rem 0.6rem; border-radius: 4px; }
.project-links a { font-size: 0.9rem; color: var(--text-main); font-weight: 600; }
.project-card.show { animation: fadeIn 0.5s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Depoimentos */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.testimonial-card {
    background-color: var(--bg-main); padding: 2rem; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05); transition: var(--transition); position: relative;
    height: 100%;
}
.testimonial-card::before { content: '"'; position: absolute; top: 10px; right: 20px; font-size: 4rem; color: rgba(139, 92, 246, 0.1); font-family: serif; }
.client-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.client-header img { width: 50px; height: 50px; border-radius: 50%; border: 2px solid var(--primary); }
.stars { color: #fbbf24; font-size: 0.9rem; }

/* FAQ */
.faq-grid { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item { background-color: var(--bg-secondary); border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); overflow: hidden; transition: all 0.3s ease; }
.faq-question { padding: 1.5rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.faq-question span i { margin-right: 10px; color: var(--primary); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; background-color: rgba(0,0,0,0.2); }
.faq-answer p { padding: 1.5rem; padding-top: 0; color: var(--text-muted); }
.faq-item.active { border-color: var(--primary); }
.faq-item.active .faq-answer { max-height: 200px; }


/* =========================================
   5. CONTATO 
   ========================================= */
.contact-wrapper {
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; margin-top: 3rem; align-items: start;
}
/* Esquerda */
.contact-info-col { display: flex; flex-direction: column; gap: 2rem; }
.info-item {
    display: flex; align-items: center; gap: 1.5rem; background: rgba(255,255,255,0.03);
    padding: 1.5rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); transition: var(--transition);
}
.info-item:hover { transform: translateX(10px); border-color: var(--primary); }
.info-item i { font-size: 1.8rem; color: var(--primary); }

/* Direita (Form) */
.contact-form {
    background: var(--bg-secondary); padding: 2.5rem; border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 10px 40px -10px rgba(0,0,0,0.3);
}
.form-group { margin-bottom: 1.5rem; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 1rem; background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: var(--text-main);
    font-family: 'Inter', sans-serif; font-size: 0.95rem; outline: none; transition: var(--transition);
}
.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}
.contact-form textarea { resize: vertical; min-height: 120px; }


/* =========================================
   6. SKILLS (ABAS)
   ========================================= */
.skills-wrapper {
    margin-top: 2rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.skills-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}
.skills-tabs::-webkit-scrollbar { display: none; } /* Chrome */

.tab-btn {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    flex: 1;
    font-family: 'Inter', sans-serif;
}

.tab-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.02); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: rgba(139, 92, 246, 0.05); }

.skills-content { padding: 2rem; min-height: 300px; }
.tab-pane { display: none; animation: fadeIn 0.4s ease; }
.tab-pane.active { display: block; }

.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 1.5rem; }
.tech-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
    padding: 1rem; background: rgba(255, 255, 255, 0.03); border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05); transition: var(--transition);
}
.tech-item:hover { transform: translateY(-5px); border-color: var(--primary); background: rgba(139, 92, 246, 0.05); }
.tech-item i { font-size: 2.5rem; transition: transform 0.3s; }
.tech-item span { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; text-align: center; }
.tech-item:hover i { transform: scale(1.1); }
.tech-item.infra:hover { border-color: #f59e0b; background: rgba(245, 158, 11, 0.05); }
.tech-item.db:hover { border-color: #3b82f6; background: rgba(59, 130, 246, 0.05); }


/* =========================================
   7. FOOTER
   ========================================= */
#main-footer {
    background-color: #020617; color: #94a3b8; font-size: 0.95rem;
    margin-top: 5rem; text-align: left;
}

.footer-cta {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #1e1b4b 100%);
    padding: 3rem 0; border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cta-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 2rem; }
.cta-content h2 { color: white; font-size: 1.8rem; margin-bottom: 0.5rem; }

.footer-middle { padding: 4rem 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 2rem; align-items: start; }
.footer-logo img { height: 50px; margin-bottom: 1.5rem; filter: brightness(1.2); }
.brand-desc { margin-top: 1rem; max-width: 280px; line-height: 1.6; }

.footer-nav h4, .footer-contact h4 {
    color: white; font-size: 1.1rem; margin-bottom: 1.5rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em; position: relative;
    display: block; text-align: left;
}
.footer-nav h4::after, .footer-contact h4::after {
    content: ''; display: block; width: 30px; height: 3px; background: var(--primary);
    margin-top: 8px; border-radius: 2px; margin-left: 0;
}

.footer-nav ul li, .footer-contact ul li { margin-bottom: 0.8rem; display: flex; align-items: center; justify-content: flex-start; }
.footer-nav a { color: #94a3b8; transition: all 0.3s ease; }
.footer-nav a:hover { color: var(--primary); padding-left: 5px; }

.footer-contact li { gap: 12px; }
.footer-contact i { color: var(--primary); font-size: 1.1rem; width: 20px; text-align: center; }
.social-links { display: flex; gap: 10px; margin-top: 1.5rem; justify-content: flex-start; }
.social-links a {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center; color: white; transition: all 0.3s;
}
.social-links a:hover { background: var(--primary); transform: translateY(-3px); }

.footer-bottom { background-color: #00020a; padding: 1.5rem 0; border-top: 1px solid rgba(255,255,255,0.05); font-size: 0.85rem; }
.bottom-flex { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }


/* =========================================
   8. UTILITÁRIOS (Popups, WhatsApp, Scroll)
   ========================================= */
.scroll-progress { position: fixed; top: 0; left: 0; width: 0%; height: 4px; background: linear-gradient(90deg, var(--primary), #a855f7); z-index: 2000; }
.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; background-color: #25d366; color: white;
    width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 30px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); z-index: 1000; animation: pulse 2s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }

/* Modal CV */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px); z-index: 10000; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background-color: var(--bg-secondary); width: 90%; max-width: 800px; border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); position: relative; transform: scale(0.8); transition: all 0.4s;
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 30px; color: var(--text-muted); cursor: pointer; z-index: 10; }
.modal-body { height: 60vh; background-color: #f3f4f6; }
.modal-header, .modal-footer { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.05); }

/* Animações Gerais */
.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }
.cursor { display: inline-block; width: 3px; background-color: var(--primary); animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }


/* =========================================
   9. RESPONSIVIDADE (MOBILE & TABLET)
   ========================================= */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-text h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    /* Ajustes Gerais Mobile */
    .section { padding: 3rem 0; }
    .section-title { font-size: 1.75rem; margin-bottom: 2rem; }
    
    /* Navbar Mobile (Pílula Fixa) */
    #header { top: 10px; }
    .navbar { 
        width: 95%; 
        padding: 0.5rem 1rem;
        justify-content: space-between; /* Distribui itens: Lang - Logo - Hambúrguer */
    }

    .logo { 
        position: static; /* Remove absoluto para fluir no flex */
        transform: none; 
        margin: 0;
    }
    .logo img { height: 35px; }

    /* Botão Hambúrguer */
    .menu-toggle { display: block; font-size: 1.5rem; }

    /* Lang Switch */
    .lang-switch { margin-right: 0; gap: 8px; }
    .lang-btn img { width: 22px; height: 22px; }

    /* Menu Gaveta (Dropdown) */
    .nav-list {
        position: fixed;
        top: 80px; /* Logo abaixo da pílula */
        left: 0;
        width: 100%;
        height: auto;
        min-height: 50vh;
        background-color: var(--bg-secondary); /* Fundo sólido para leitura */
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        display: none;
        opacity: 0;
        visibility: hidden;
        border-bottom: 2px solid var(--primary);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    .nav-list.active { 
        display: flex; 
        opacity: 1; 
        visibility: visible; 
        animation: fadeIn 0.3s forwards;
    }

    /* Hero */
    .hero-section { padding-top: 100px; text-align: center; }
    .hero-content { flex-direction: column-reverse; gap: 2rem; }
    .hero-image img { width: 280px; height: 280px; }
    .hero-text h1 { font-size: 2.2rem; }
    .hero-buttons { justify-content: center; }

    /* Grids em Coluna Única */
    .about-grid, 
    .services-grid, 
    .projects-grid, 
    .testimonials-grid, 
    .contact-wrapper,
    .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 2rem;
    }

    /* Skills */
    .skills-tabs { justify-content: flex-start; padding-bottom: 5px; }
    .tech-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
    .tech-item { padding: 0.8rem; }
    .tech-item i { font-size: 2rem; }

    /* Footer Mobile */
    .cta-content, .bottom-flex { text-align: center; justify-content: center; }
    .footer-grid { text-align: center; }
    
    .footer-nav h4, .footer-contact h4 { text-align: center; }
    .footer-nav h4::after, .footer-contact h4::after { margin: 8px auto 0; }
    
    .footer-nav ul li, .footer-contact ul li, .social-links { justify-content: center; }
    .brand-desc { margin: 1rem auto; }
}

