/* =========================================
   1. VARIÁVEIS E RESET (Configurações Globais)
   ========================================= */
:root {
    --primary-color: #0066cc;       /* Azul principal */
    --secondary-color: #004c99;     /* Azul escuro para hover */
    --accent-color: #ff914d;        /* Cor de destaque (laranja) para botões */
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f4f7f9;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Garante que o footer fique embaixo */
}

/* Classe utilitária para centralizar conteúdo e limitar largura */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. CABEÇALHO (Header)
   ========================================= */
.main-header {
    background-color: #fff;
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.main-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* =========================================
   3. BARRA DE NAVEGAÇÃO (Navbar)
   ========================================= */
.navbar {
    background-color: var(--primary-color);
    box-shadow: var(--shadow);
    position: sticky; /* Menu gruda no topo ao rolar */
    top: 0;
    z-index: 1000;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-link {
    display: block;
    padding: 18px 25px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    background-color: var(--secondary-color);
}

/* =========================================
   4. DROPDOWN (Submenu Melhorado)
   ========================================= */
.dropdown {
    position: relative;
}

/* Seta indicativa no menu */
.dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.7em;
    margin-left: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff; /* Fundo branco para legibilidade */
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 0 0 5px 5px;
    
    /* Lógica de visualização */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px); /* Efeito de subida */
    transition: var(--transition);
    
    /* TRUQUE DE MESTRE: Scroll para listas longas */
    max-height: 400px; 
    overflow-y: auto; /* Cria barra de rolagem se a lista for grande */
}

/* Estilizando a barra de rolagem do menu */
.dropdown-menu::-webkit-scrollbar {
    width: 8px;
}
.dropdown-menu::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

/* Mostrar o menu ao passar o mouse */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Links dentro do dropdown */
.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.dropdown-menu li a:hover {
    background-color: #f0f8ff; /* Azul bem claro */
    color: var(--primary-color);
    padding-left: 25px; /* Efeito de deslizar p/ direita */
}

/* Títulos de categorias dentro do dropdown */
.dropdown-group {
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #999;
    background-color: #fafafa;
    pointer-events: none; /* Não é clicável */
}

/* =========================================
   5. CONTEÚDO PRINCIPAL E BOTÕES
   ========================================= */
.main-content {
    flex: 1; /* Empurra o footer para baixo */
    padding: 60px 20px;
    text-align: center;
}

.welcome-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.welcome-section p {
    margin-bottom: 40px;
    color: #555;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Botão de Ação (CTA) */
.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 145, 77, 0.4);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #e67e3c;
    transform: translateY(-3px); /* Sobe um pouquinho */
    box-shadow: 0 6px 20px rgba(255, 145, 77, 0.6);
}

/* =========================================
   6. RODAPÉ (Footer)
   ========================================= */
.main-footer {
    background-color: var(--text-dark);
    color: #aaa;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    font-size: 0.9rem;
}

/* =========================================
   7. RESPONSIVIDADE (Mobile)
   ========================================= */
@media (max-width: 768px) {
    .nav-list {
        flex-direction: column;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* No celular, o dropdown não flutua, ele empurra o conteúdo */
    .dropdown-menu {
        position: static; /* Volta ao fluxo normal */
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        width: 100%;
        max-height: 0; /* Escondido por padrão */
        overflow: hidden;
        transition: max-height 0.5s ease;
    }
    
    /* Mostra o submenu ao passar o mouse ou clicar (comportamento simples) */
    .dropdown:hover .dropdown-menu {
        max-height: 300px; /* Abre no celular */
        overflow-y: auto;
    }
    
    .dropdown-menu li a {
        background-color: #f9f9f9;
        text-align: center;
    }
}