/* Estilos gerais */
html {
    /* Define 1rem = 16px para base acessível */
    font-size: 16px; 
}

body {
    font-family: Arial, sans-serif;
    font-size: 1rem; 
    line-height: 1.6; /* Espaçamento de linha melhor para leitura */
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    /* Garante que o conteúdo ocupe a altura mínima para o rodapé não subir em páginas curtas */
    min-height: 100vh;
    display: flex; /* Permite que o footer seja empurrado para baixo */
    flex-direction: column;
}

strong {
    font-weight: 700;
}

a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #555; /* Um cinza um pouco mais escuro para um efeito minimalista */
}

/* Header e Navegação */
header {
    background-color: #333;
    color: #fff;
    padding: 0.625rem 0; /* 10px em rem */
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: center;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 0.9375rem; /* 15px em rem */
}

nav ul li a {
    color: #fff;
    padding: 0.5rem;
    display: block;
}

nav ul li a:hover {
    color: #ccc;
}

/* Corpo Principal */
main {
    padding: 1.25rem; /* 20px em rem */
    text-align: center;
    flex-grow: 1; /* Permite que o main ocupe o espaço restante */
}

ul {
    list-style-type: disc; /* Mantém os marcadores padrão para listas de conteúdo (cursos, serviços) */
    padding-left: 1.5rem;
    text-align: left;
}

/* Footer - Removido o fixed */
footer {
    background-color: #333;
    color: #fff;
    font-size: 0.875rem; /* 14px em rem */
    text-align: center;
    padding: 0.625rem 0; 
    width: 100%;
    margin-top: auto; /* Empurra o footer para o final se o conteúdo for curto */
}

/* Formulário */
form {
    display: inline-block;
    text-align: left;
    max-width: 100%;
}

form label {
    display: block;
    margin-top: 0.625rem;
}

form textarea {
    width: 100%;
    max-width: 500px;
    box-sizing: border-box; /* Garante que padding e borda não aumentem a largura */
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form button[type="submit"] {
    margin-top: 1rem;
    padding: 0.625rem 1.25rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

form button[type="submit"]:hover {
    background-color: #0056b3;
}

/* Layouts de Seções */
section {
    margin: 1.25rem 0;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.item {
    background-color: #fff; /* Fundo branco/claro para minimalismo */
    padding: 1.25rem; 
    margin: 0.625rem; /* 10px em rem */
    flex: 1 1 300px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Sombra mais sutil */
    border: 1px solid #eee; /* Borda sutil */
}

/* Estilos da Tabela (Base Desktop) */
.table-wrapper {
    margin: 1.25rem 0;
}

#table-projetos {
    width: 100%;
    /* Removido min-width: 600px; para permitir o layout responsivo total abaixo de 600px */
    border-collapse: collapse;
    margin: 0 auto;
    text-align: left;
}

#table-projetos th, #table-projetos td {
    padding: 0.75rem;
    border: 1px solid #ddd;
}

#table-projetos th {
    background-color: #f0f0f0;
    text-align: center;
    font-weight: bold;
}

/* --- Ajuste de Responsividade para Mobile --- */
@media (max-width: 600px) {
    /* 1. Transforma a tabela em blocos verticais */
    #table-projetos, #table-projetos thead, #table-projetos tbody, #table-projetos th, #table-projetos td, #table-projetos tr {
        display: block;
    }
    
    /* 2. Esconde o cabeçalho principal (thead) */
    #table-projetos thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    /* 3. Estilo de cada linha (tr) como um "card" */
    #table-projetos tr {
        border: 1px solid #ccc;
        margin-bottom: 1rem;
        border-radius: 4px;
        background-color: #fff;
    }
    
    /* 4. Estilo de cada célula (td) para mostrar o rótulo */
    #table-projetos td {
        border: none;
        border-bottom: 1px solid #eee; /* Separador entre os dados */
        position: relative;
        padding-left: 50%; /* Espaço para o rótulo */
        text-align: right;
    }
    
    /* 5. Cria o rótulo usando o atributo data-label e pseudo-elemento */
    #table-projetos td:before {
        /* Posição e estilo do rótulo */
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #333;
        content: attr(data-label); /* Aqui usamos o novo atributo HTML */
    }

    /* Ajuste para o link do GitHub que está fora da tabela */
    #projetos .item > p:last-of-type {
        margin-top: 1rem;
    }
}