/* ==========================================================================
   1. RESET, VARIÁVEIS E CONFIGURAÇÕES GERAIS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

:root {
    --bg-main: #fcfdfe;         /* Fundo claro, limpo e confortável */
    --bg-section: #f4f7f5;      /* Variação sutil para seções e tabelas */
    --border-color: #e2e8e5;    /* Bordas finas e suaves */
    --primary: #1e3d2f;         /* Verde floresta corporativo/acadêmico da logo */
    --accent: #3b7051;          /* Verde médio para links e realces */
    --text-dark: #1a2420;       /* Texto principal quase preto */
    --text-muted: #62726a;      /* Texto secundário/apoio */
    --red-alert: #cc3333;       /* Vermelho sutil para avisos e cancelamentos */
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ==========================================================================
   2. NAVBAR E BANNER DE IDENTIDADE VISUAL (SUPORTE ATÉ 3 NÍVEIS)
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo-img {
    height: 90px; /* Logo ampliada para ter muito mais destaque */
    width: auto;
    object-fit: contain;
    display: block;
}

/* Menu de Navegação Principal */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-menu li {
    position: relative; /* Base essencial para posicionar os submenus */
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.nav-menu a:hover, 
.nav-menu a.active {
    color: var(--accent);
}

.arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

/* --- SUBMENU NÍVEL 1 --- */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    list-style: none;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    display: flex;
    justify-content: space-between;
}

.dropdown-menu a:hover {
    background-color: var(--bg-section);
    color: var(--primary);
}

/* --- SUBMENU NÍVEL 2 (Dentro do primeiro) --- */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%; /* Empurra o menu nível 2 para a direita */
    margin-left: 2px;
}

/* GATILHOS DE EXIBIÇÃO NO DESKTOP (HOVER) */
@media (min-width: 769px) {
    .dropdown:hover > .dropdown-menu,
    .dropdown-submenu:hover > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Botão de Destaque na Navbar */
.btn-nav {
    border: 1px solid var(--primary);
    padding: 0.5rem 1.2rem !important;
    border-radius: 6px;
    background-color: var(--primary);
    color: #fff !important;
    font-weight: 600 !important;
}

.btn-nav:hover {
    background-color: var(--accent) !important;
}

/* Ajuste do Banner para não colar na barra que ficou um pouquinho mais alta */
.event-banner-header {
    position: relative;
    margin-top: 102px; /* Ajustado para compensar a nova altura da navbar */
    padding: 6rem 8%;
    background-image: url('../imagens/fundo.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 260px;
}

/* Camada escura para dar excelente contraste ao texto branco */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 61, 47, 0.9) 0%, rgba(26, 36, 32, 0.75) 100%);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
}

.event-title-large {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.title-divider {
    height: 3px;
    width: 60px;
    background-color: #3b7051; /* Tom verde vivo/accent */
    margin: 1rem auto;
    border-radius: 2px;
}

.event-subtitle-large {
    color: #e2e8e5;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    max-width: 700px;
    margin: 0 auto;
}

/* Botão Hambúrguer Mobile */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    flex-direction: column;
    gap: 5px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ==========================================================================
   3. HERO SECTION (HOME)
   ========================================================================== */
.hero {
    padding: 3rem 8% 3rem 8%;  /* estava 5rem e 5rem /* Sincronizado o padding superior */
    display: flex;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, #edf3ef 0%, var(--bg-main) 100%);
}

.hero-content { 
    max-width: 850px; 
}

.badge {
    background: #e1ede5;
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1.5rem 0 1rem 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-buttons a {
    padding: 0.85rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-secondary { border: 1px solid var(--border-color); color: var(--text-dark); background: #fff; }
.btn-secondary:hover { background: var(--bg-section); }

/* ==========================================================================
   4. ESTRUTURA DE CONTEÚDO EXTERNO & TABELAS DE PROGRAMAÇÃO
   ========================================================================== */
.main-content {
    padding: 1rem 8% 4rem 8%; /* estava 4rem */
    max-width: 1200px;
    margin: 0 auto;
}

.prog-header {
    text-align: center;
    margin-bottom: 1rem; /* estava 4rem */
}

.prog-header h1 { 
    font-size: 2.5rem; 
    color: var(--primary); 
    margin-bottom: 0.5rem; 
}

.dia-bloco { 
    margin-bottom: 4rem; 
}

.dia-titulo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent);
    padding-left: 0.75rem;
}

.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.prog-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.90rem; /* estava 0.95 */
}

.prog-table-compacta {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.75rem;
}

.prog-table-compacta th {
    background-color: var(--bg-section);
    color: var(--primary);
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    vertical-align: top;	
    border-bottom: 2px solid var(--border-color);
}

.prog-table th {
    background-color: var(--bg-section);
    color: var(--primary);
    font-weight: 700;
    padding: 1rem 1.5rem;
    vertical-align: top;	
    border-bottom: 2px solid var(--border-color);
}

.prog-table-compacta td {
    padding: 0.2rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.prog-table td {
    padding: 0.75rem 1.5rem; /* estava 1.25 */
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.prog-table tr:last-child td { 
    border-bottom: none; 
}

.prog-table-compacta tr:last-child td { 
    border-bottom: none; 
}

.table-time {
    font-weight: 700;
    color: var(--accent);
}

.destaque-row { 
    background-color: #f7faf8; 
}

.tag-atividade {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #e1ede5;
    color: var(--accent);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.4rem;
}

.table-muted { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
}

/* ==========================================================================
   5. FORMULÁRIOS & INSCRICÃO
   ========================================================================== */
.inscricao { 
    padding: 4rem 8% 4rem 8%; 
    background: var(--bg-section); 
    display: flex; 
    justify-content: center; 
}

/* Estrutura da Página de Inscrição Isolada */
.main-content-form {
    padding: 4rem 4% 4rem 4%;
    min-height: calc(100vh - 75px);
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, #f4f7f5 0%, var(--bg-main) 100%);
}

.form-container { 
    background: #fff; 
    padding: 3rem; 
    border-radius: 12px; 
    width: 100%; 
    max-width: 750px; 
    border: 1px solid var(--border-color); 
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); 
}

.form-container.page-form {
    box-shadow: 0 10px 30px rgba(26, 36, 32, 0.05);
    margin: 0 auto;
}

/* Elementos Internos do Formulário */
.form-header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.form-header h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.step-badge { 
    display: inline-block; 
    color: var(--accent); 
    font-size: 0.85rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    margin-bottom: 0.5rem; 
}

.form-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 1.25rem; 
}

.input-group { 
    display: flex; 
    flex-direction: column; 
}

.input-group.full-width { 
    grid-column: span 2; 
}

.input-group label { 
    font-size: 0.85rem; 
    font-weight: 600; 
    margin-bottom: 0.4rem; 
}

.input-group input, 
.input-group select { 
    background: #fff; 
    border: 1px solid #cbd5e1; 
    padding: 0.75rem; 
    border-radius: 6px; 
    font-size: 0.95rem; 
}

.input-group input:focus, 
.input-group select:focus { 
    outline: none; 
    border-color: var(--accent); 
}

/* Checkbox, Alertas e Elementos do Form legados */
.label-obs {
    color: var(--red-alert);
    font-size: 0.8rem;
    font-weight: 500;
}

.form-alert-text {
    color: var(--red-alert);
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    margin-bottom: -0.5rem;
}

.checkbox-group {
    margin-top: 1rem;
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Botões e Ações de Rodapé de Formulários */
.form-footer-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-submit,
.btn-submit-confirm { 
    width: 100%; 
    background: var(--primary); 
    color: #fff; 
    border: none; 
    padding: 1rem; 
    font-size: 1rem; 
    font-weight: 600; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: background 0.2s; 
}

.btn-submit { margin-top: 2rem; }
.btn-submit-confirm { max-width: 320px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

.btn-submit:hover,
.btn-submit-confirm:hover { 
    background: var(--accent); 
}

.btn-back {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.btn-back:hover {
    color: var(--red-alert);
}

/* ==========================================================================
   6. LOCALIZAÇÃO (GOOGLE MAPS) & RODAPÉ COMPLEXO
   ========================================================================== */
.local-evento {
    padding: 3rem 8%; /* estava 5 */
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
}

.local-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
}

.local-info h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.local-nome {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.map-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    line-height: 0;
}

/* Rodapé Base e Complexo Unificados */
footer,
.footer-complex { 
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 8%; 
}

footer { text-align: center; color: var(--text-muted); font-size: 0.85rem; }

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-event-name {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.footer-brand p:last-child {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-link {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.instagram-link { color: var(--text-dark); }
.instagram-link:hover { color: #e1306c; }

.btn-restrito {
    color: var(--accent);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: var(--bg-section);
    transition: all 0.2s;
}

.btn-restrito:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ==========================================================================
   7. MEDIA QUERIES (RESPONSIVIDADE UNIFICADA COM SUPORTE A DROPDOWN)
   ========================================================================== */
@media (max-width: 992px) {
    .header-titles {
        display: none; /* Oculta títulos secundários para não quebrar o menu */
    }
    .local-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hamburger { 
        display: flex; 
    }
    
    /* Configuração da gaveta do menu mobile */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 102px; /* Alinhado perfeitamente com a altura total da nova navbar */
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: left;
        gap: 0;
        padding: 1rem 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        transition: 0.3s ease;
        border-bottom: 1px solid var(--border-color);
        max-height: calc(100vh - 102px);
        overflow-y: auto; /* Permite scroll se os submenus abertos passarem da altura da tela */
    }

    .nav-menu.active { 
        left: 0; 
    }

    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #f8faf9;
        justify-content: space-between; /* Ajusta setas para a extremidade direita */
    }

    /* Comportamento Sanfona (Cascata) dos Dropdowns no Mobile */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background-color: #fcfdfe;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.3s ease-out;
    }

    /* Recuos estruturados para dar hierarquia visual aos subníveis abertos */
    .dropdown-menu a { padding-left: 2.5rem; }
    .dropdown-submenu .dropdown-menu a { padding-left: 3.5rem; }

    /* Classes controladas via JS para expansão fluida ao clique */
    .dropdown.open > .dropdown-menu,
    .dropdown-submenu.open > .dropdown-menu {
        max-height: 600px;
    }

    .dropdown.open > .dropdown-toggle .arrow,
    .dropdown-submenu.open > .dropdown-toggle .arrow {
        transform: rotate(180deg);
    }
    
    /* Ativação das Animações do Menu Hambúrguer (X) */
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .hero h1 { font-size: 2.2rem; }
    .form-grid { grid-template-columns: 1fr; }
    .input-group.full-width { grid-column: span 1; }
    .form-container { padding: 2rem 1.5rem; }
    .main-content-form { padding: 6rem 1rem 3rem 1rem; }
}

/* ==========================================================================
   8. SEÇÃO DE APOIO E PATROCÍNIO
   ========================================================================== */
.parcerias-section {
    background-color: #ffffff; /* Fundo estritamente branco */
    padding: 2rem 8% 2rem 8%; /* estava 4rem */
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.parcerias-container {
    max-width: 1200px;
    margin: 0 auto;
}

.parcerias-section h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Alinha os blocos em linha horizontal com espaçamento equilibrado */
.logos-parcerias-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0rem; /* estava 4 /* Espaço entre o bloco 1 e o bloco 2 */
    margin-top: 2.5rem;
    flex-wrap: wrap; /* Permite quebrar linha caso a tela seja muito pequena */
}

.logo-parceria-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Mantém o tamanho original/natural dos arquivos patrocinadores1 e patrocinadores2 */
.img-patrocinio {
    width: auto;
    height: auto;
    max-width: 100%; /* Garante que não vai estourar a tela no celular */
    display: block;
}

/* Ajuste de quebra para telas mobile */
@media (max-width: 768px) {
    .parcerias-section {
        padding: 3rem 4% 1rem 4%;
    }
    .logos-parcerias-grid {
        flex-direction: column; /* No celular, voltam a ficar um embaixo do outro */
        gap: 2.5rem;
    }
}