/* Resetando margens e fontes básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* * Corpo do Documento (Body) */
body {
    font-family: 'Montserrat', 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: #1a1a2e;
    color: #f7f4f4;
    padding: 0 20px 20px 20px;
    
    /* Padding para a nav-bar fixa (desktop) */
    padding-top: 200px; 
    transition: padding-top 0.3s ease;
}

/* * Barra de Navegação (.nav-bar) */
.nav-bar {
    background-color: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #64ffda;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    padding: 20px 20px;
    height: 220px; 
    min-height: 100px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo (dentro da nav-bar) */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #64ffda;
    font-weight: 600;
    font-size: 1.5em;
    height: 100%; 
}
.logo-link img {
    max-height: 200px; 
    width: auto;
    margin-right: 10px;
    object-fit: contain;
}
.logo-text {
    font-family: 'Poppins', sans-serif;
    color: #64ffda;
    white-space: nowrap;
    line-height: 1; 
}

/* Menu Mobile Button (hamburguer) */
.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
}
.menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #64ffda;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.menu-btn.open span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* Correção para âncoras de links (fixa o problema da barra de navegação cobrir o conteúdo) */
html {
    /* Define um preenchimento superior igual à altura da nav-bar (220px) + buffer (30px) */
    scroll-padding-top: 250px; 
    scroll-behavior: smooth; /* Opcional: Adiciona rolagem suave a todos os links */
}

/* Links do menu desktop */
.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}
.nav-links li {
    margin-left: 30px;
}
.nav-links a {
    text-decoration: none;
    color: #e4e4e4;
    font-weight: 600;
    font-size: 1.1em;
    transition: color 0.3s ease;
}
.nav-links a:hover,
.nav-links a.active {
    color: #64ffda;
}

/* Menu Mobile (desliza de baixo para cima) */
.mobile-menu {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    padding: 20px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}
.mobile-menu.open {
    transform: translateY(0);
}
.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}
.mobile-menu li {
    margin-bottom: 20px;
}
.mobile-menu a {
    text-decoration: none;
    color: #64ffda;
    font-size: 1.5em;
    font-weight: 700;
}
.mobile-menu a:hover {
    color: #e4e4e4;
}

/* * Estilos da Seção Sobre Mim (Layout Flex) */
.section-sobre {
    display: block; 
}
.sobre-conteudo {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.sobre-texto {
    max-width: 600px;
    flex: 1;
    min-width: 300px;
}

.sobre-texto p {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.sobre-imagem {
    flex: 0 0 auto;
    text-align: center;
}

.perfil-img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #64ffda;
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.7);
}

/* * HERO SECTION (H1 e P) */
.hero-section-header {
    text-align: center;
    padding: 20px 0px 20px 0px; 
    max-width: 800px;
    line-height: 1.4;
    margin: 20px auto;
}
.hero-section-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5em;
    margin-bottom: 0px;
    color: #64ffda;
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.6);
}
.hero-section-header p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5em;
    color: #e4e4e4;
}

/* * Estilos Gerais para Seções (Sobre Mim, Projetos, Contato) */
section {
    background-color: #272740;
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
    border: 1px solid #3d3d5c;
}
section h2 {
    font-family: 'Poppins', sans-serif;
    color: #64ffda;
    margin-bottom: 20px;
    font-size: 2.2em;
    text-align: center;
    text-shadow: 0 0 8px rgba(100, 255, 218, 0.4);
}

/* * Estilos para a Lista de Projetos */
.lista-projetos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 25px;
    max-width: 1200px; 
    margin: 30px auto;
    list-style: none;
    padding: 0;
}

/* * Estilo do Card Individual (.card-projeto) */
.card-projeto {
    display: flex; 
    flex-direction: column; 
    text-decoration: none;
    color: #f7f4f4;
    background-color: #272740;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #64ffda; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 400px;
}

/* * Imagem do Projeto dentro do Card */
.card-projeto img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #1a1a2e;
    display: block;
    border-bottom: 1px solid rgba(100, 255, 218, 0.3);
}

/* * Área de Informações do Card */
.card-info {
    padding: 18px;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.card-info h3 {
    font-family: 'Poppins', sans-serif;
    color: #64ffda;
    margin-bottom: 8px;
    font-size: 1.4em;
}
.card-info p {
    font-family: 'Montserrat', sans-serif;
    color: #f7f4f4;
    font-size: 0.95em;
    margin-bottom: 0; 
}

/* * Efeito Hover para os Cards */
.card-projeto:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(100, 255, 218, 0.7);
}

/* * Estilos para Contato (COM FLEXBOX PARA CENTRALIZAÇÃO) */
#contato {
    /* Centraliza todos os filhos (H2, Form, Info Extra) */
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center;
    /* Manter o restante dos estilos da seção: */
    background-color: #272740;
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
    border: 1px solid #3d3d5c;
}
#contato p {
    font-size: 1.1em;
    margin-bottom: 15px;
}
#contato a {
    color: #64ffda;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
#contato a:hover {
    text-decoration: underline;
    text-shadow: 0 0 5px rgba(100, 255, 218, 0.5);
}

/* * Estilos para o Formulário de Contato (CENTRALIZADO) */
.form-contato {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: auto; 
    margin: 30px auto; 
}

.form-contato input,
.form-contato textarea {
    padding: 15px;
    border: 1px solid #64ffda;
    border-radius: 20px;
    background-color: #1a1a2e;
    color: #f7f4f4;
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-contato input:focus,
.form-contato textarea:focus {
    outline: none;
    border-color: #50e3c2; 
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.8);
}

.form-contato textarea {
    resize: vertical;
}

.submit-btn {
    background-color: #64ffda;
    color: #1a1a2e;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.submit-btn:hover {
    background-color: #50e3c2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.7);
}

/* * Estilos para o Contêiner de Info Extra (Email) */
.contato-info-extra {
    display: flex;
    align-items: center;
    justify-content: center; /* NOVO: Centraliza o conteúdo dentro deste contêiner */
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; 
}

/* * Estilos para o Botão WhatsApp Flutuante */
.whatsapp-flutuante {
    position: fixed;
    bottom: 90px;
    right: 30px;
    z-index: 900; /* Z-index alto para ficar sobre as seções */
    
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.5);
    transition: transform 0.2s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.whatsapp-flutuante img {
    width: 30px;
    height: 30px;
    margin: 0;
    /* NÃO usar !important aqui, o seletor é forte o suficiente */
}

.whatsapp-flutuante:hover {
    background-color: #1DA851;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.8);
}


/* * Botão Voltar ao Topo */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 901; /* Ligeiramente maior que o WhatsApp */
    background-color: #64ffda;
    color: #1a1a2e;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1.6em;
    transition: background-color 0.3s, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.5);
}
#backToTopBtn:hover {
    background-color: #50e3c2;
    transform: translateY(-4px);
    box-shadow: 0 8px 8px rgba(100, 255, 218, 0.8);
}
/* * Rodapé */
footer {
    text-align: center;
    padding: 20px;
    font-size: 1em;
    color: #a0a0a0;
    margin-top: 40px;
    border-top: 1px solid rgba(100, 255, 218, 0.2);
}

/* * MEDIA QUERIES (PARA RESPONSIVIDADE) */
@media (max-width: 768px) {
    
    body {
        padding: 0 15px 15px 15px;
        padding-top: 80px; 
    }

    .nav-bar {
        padding: 10px 15px;
        height: auto; 
        min-height: 60px;
    }

    .nav-links {
        display: none;
    }

    .menu-btn {
        display: flex;
    }

    /* Ajuste da Seção Sobre Mim para empilhamento vertical */
    .sobre-conteudo {
        flex-direction: column;
    }
    .perfil-img {
        width: 180px; 
        height: 180px;
        margin-top: 20px;
    }

    html {
        /* Altura da nav-bar no mobile é cerca de 60px, usamos 80px por segurança */
        scroll-padding-top: 80px; 
    }

    /* Ajuste do Formulário de Contato no mobile */
    .form-contato {
        margin: 20px auto; 
        width: 100%;
    }

    /* Ajuste de Texto/Hero */
    .hero-section-header h1 {
        font-size: 2.2em; 
    }
    .hero-section-header p {
        font-size: 1.1em;
    }

    /* Ajuste da Lista de Projetos */
    .lista-projetos {
        grid-template-columns: 1fr; 
        width: 100%;
        margin: 20px auto;
        gap: 20px;
    }

    .card-projeto {
        height: auto; 
    }
    
    .card-projeto img {
        height: 180px;
        object-fit: contain;
    }

    section {
        padding: 25px 20px;
    }
    section h2 {
        font-size: 1.8em;
    }

    /* Ajuste dos Botões Flutuantes no mobile */
    .whatsapp-flutuante {
        bottom: 75px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-flutuante img {
        width: 24px;
        height: 24px;
    }
    
    #backToTopBtn {
        bottom: 20px;
        right: 20px;
        padding: 12px 16px;
        font-size: 1.2em;
    }
}