/* ============================================================
   1. VARIÁVEIS E RESET GERAL
   ============================================================ */
:root {
    --cor-primary: #2E7D32;   /* Verde Principal (Header e Botão Verificar) */
    --cor-hover: #1B5E20;     /* Verde Escuro (Ao passar o mouse) */
    --cor-secondary: #4FC3F7; /* Azul Claro (Detalhe do Logo) */
    --cor-accent: #FFC107;    /* Amarelo (Miolo do Logo) */
    --cor-danger: #dc3545;    /* Vermelho (Botão Limpar) */
    --cor-danger-hover: #bd2130;
    --bg-color: #f0f4f8;      /* Fundo da página */
    --text-color: #333;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg-color);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   2. CABEÇALHO (HEADER) E LOGO
   ============================================================ */
.site-header {
    background: var(--cor-primary);
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative; /* Importante para o menu mobile */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Área da Marca (Logo + Texto) */
.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Container do Logo (Círculo Grande) */
.logo-container {
    width: 90px;  
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15); 
    border-radius: 50%;
    padding: 10px;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0; /* Impede o logo de amassar */
}

/* O Desenho SVG */
.logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3)); 
}

/* Cores das partes do Logo SVG */
.pill-primary { fill: white; opacity: 0.95; }
.pill-secondary { fill: var(--cor-secondary); opacity: 0.9; }
.interaction-point { fill: var(--cor-accent); opacity: 0.9; mix-blend-mode: screen; }

/* Texto do Header */
.brand-text h1 { margin: 0; font-size: 1.8rem; line-height: 1.2; }
.brand-text .tagline { margin: 0; font-size: 0.9rem; opacity: 0.9; }

/* ============================================================
   3. MENU DE NAVEGAÇÃO (PC & MOBILE)
   ============================================================ */
.main-nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}
.main-nav a:hover { text-decoration: underline; opacity: 0.8; }

/* Botão Sanduíche (Invisível no PC) */
.mobile-menu-btn {
    display: none; 
    background: none;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
}

/* ============================================================
   4. CARTÃO DE PESQUISA (DESIGN)
   ============================================================ */
.search-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.search-card h2 { color: var(--cor-primary); margin-top: 0; text-align: center; }
.lead { text-align: center; color: #666; margin-bottom: 25px; }

/* Layout dos Inputs */
.inputs-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group { display: flex; flex-direction: column; text-align: left; }
.input-group label { font-weight: bold; margin-bottom: 5px; font-size: 0.9rem; color: #555; }

input {
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}
input:focus { outline: none; border-color: var(--cor-primary); }

/* ============================================================
   5. BOTÕES (CONFIGURAÇÃO)
   ============================================================ */
.buttons-col {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center; /* Centraliza no PC */
    align-items: center;
}

button {
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    
    /* Tamanho fixo elegante no PC */
    width: 200px; 
}

/* Botão VERIFICAR (Verde) */
#btnCheck {
    background-color: var(--cor-primary); 
    color: white;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.2);
}
#btnCheck:hover { 
    background-color: var(--cor-hover); 
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.3);
}

/* Botão LIMPAR (Vermelho) */
.btn-clear {
    background-color: var(--cor-danger);
    color: white;
    box-shadow: 0 4px 6px rgba(220, 53, 69, 0.2);
}
.btn-clear:hover { 
    background-color: var(--cor-danger-hover);
    transform: translateY(-2px);
}

/* ============================================================
   6. RESULTADOS E AVISOS
   ============================================================ */
.resultado { margin-top: 30px; }

.res-box {
    padding: 20px;
    border-radius: 8px;
    border-left: 6px solid #ccc;
    background: #f9f9f9;
    animation: fadeIn 0.5s ease;
}

/* Cores por severidade */
.res-grave { background-color: #fff5f5; border-left-color: #dc3545; }
.res-moderada { background-color: #fff9e6; border-left-color: #ffc107; }
.res-leve { background-color: #f0fff4; border-left-color: #28a745; }
.res-safe { background-color: #f0fff4; border-left-color: #28a745; }

.res-title { margin-top: 0; font-size: 1.4rem; display: flex; align-items: center; gap: 10px; }
.res-detail { margin-bottom: 10px; }
.res-label { font-weight: bold; display: block; font-size: 0.9rem; opacity: 0.8; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   7. RODAPÉ E UTILITÁRIOS
   ============================================================ */
.seo-content {
    margin-top: 40px;
    font-size: 0.9rem;
    color: #777;
    text-align: center;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.site-footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #888;
    font-size: 0.9rem;
}

/* Utilitários de Acessibilidade e Ocultação */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* Oculta a "Pegadinha" do formulário */
.hidden-field { display: none; }

/* ============================================================
   8. RESPONSIVIDADE (CELULAR / TABLET)
   ============================================================ */
@media (max-width: 768px) {
    
    /* === HEADER MOBILE === */
    .mobile-menu-btn {
        display: block; /* Mostra o botão */
    }

    /* Esconde o menu padrão e prepara para virar gaveta */
    .main-nav {
        display: none; 
        width: 100%;
        background-color: var(--cor-primary);
        flex-direction: column;
        position: absolute;
        top: 100%; 
        left: 0;
        padding: 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 1000;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    /* Classe ativada pelo JS para mostrar o menu */
    .main-nav.active {
        display: flex; 
    }

    /* Links do menu mobile */
    .main-nav a {
        margin: 0;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
        text-align: center;
        display: block;
        font-size: 1.1rem;
    }
    
    .header-inner { 
        flex-wrap: wrap; /* Permite que o menu caia para baixo */
    }
    
    /* Ajuste do Logo para Mobile */
    .logo-container {
        width: 60px;
        height: 60px;
    }
    .brand-text h1 { font-size: 1.3rem; }
    .brand-text .tagline { display: none; /* Esconde tagline para economizar espaço */ }

    /* === BOTÕES MOBILE === */
    .buttons-col {
        flex-direction: column; /* Um em cima do outro */
        width: 100%;
    }
    
    button {
        width: 100%; /* Largura total */
        margin-bottom: 10px;
    }
    
    /* Ajustes gerais */
    .container { padding: 0 15px; }
    .search-card { padding: 20px; }
}