@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;500;700&display=swap');

:root {
    --primary: #606c38;
    --accent: #bc6c25;
    --bg: #fefae0;
    --card-bg: #ffffff;
    --text: #283618;
}

/* Reset de Box-Sizing: Fundamental para que padding não aumente o tamanho do elemento */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%; /* Necessário para o cálculo de altura */
}

body {
    font-family: 'Lexend', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding-top: 100px; 
    overflow-x: hidden;
    
    /* MÁGICA DO STICKY FOOTER */
    display: flex;
    flex-direction: column;
}

/* Navbar Corrigida */
.navbar {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; /* Agora o box-sizing garante que o padding fique dentro dos 100% */
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nav-logo { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    color: white; 
    text-decoration: none; 
}

.logo-circle { 
    width: 40px; 
    height: 40px; 
    background: white; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.2rem; 
}

/* Containers */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    
    /* Faz o container ocupar todo o espaço restante entre a navbar e o footer */
    flex: 1 0 auto; 
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Cards de Listagem */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Card Corrigido */
.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 25px;
    border: 3px solid #ccd5ae;
    box-shadow: 0 8px 0px #dda15e;
    transition: transform 0.2s;
    width: 100%; /* Garante que o card não tente ser maior que o container */
}

/* Botões */
.btn {
    padding: 15px 25px;
    border-radius: 15px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    text-align: center;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary { 
    background: var(--primary); 
    color: white; 
    width: 100%; 
    display: block; /* Garante que ocupe a largura toda do card */
}

.btn-accent { background: var(--accent); color: white; }
.btn-danger { background: #ae2012; color: white; }

/* Form inputs Corrigidos */
input, textarea, select {
    width: 100%; /* Agora respeita o limite do card devido ao box-sizing */
    padding: 15px;
    margin: 10px 0 20px;
    border-radius: 12px;
    border: 2px solid #ccd5ae;
    font-size: 1rem;
    font-family: inherit; /* Garante que use a Lexend */
}

/* Ajuste específico para evitar que o arquivo selecionado quebre o layout */
input[type="file"] {
    padding: 10px;
    background: #f9f9f9;
}

footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--primary);
    font-size: 0.9rem;
    
    /* Garante que o footer não encolha */
    flex-shrink: 0; 
}

/* Responsividade para telas muito pequenas */
@media (max-width: 480px) {
    .navbar {
        padding: 10px;
    }
    .logo-circle {
        width: 30px; height: 30px; font-size: 1rem;
    }
    .nav-logo span {
        font-size: 0.9rem;
    }
}