/* ==========================================================================
   1. VARIÁVEIS E IDENTIDADE VISUAL - SSITA
   ========================================================================== */
:root {
    --primary-green: #1b5e20;      /* Verde floresta (cor principal) */
    --dark-green: #0d3b13;         /* Verde escuro para fundos e realces */
    --light-green: #e8f5e9;        /* Verde bem claro para fundos alternativos */
    --accent-teal: #00897b;         /* Azul-esmeralda/turquesa para detalhes e bordas */
    --accent-light: #4db6ac;        /* Turquesa suave para elementos secundários */
    --gold: #fbc02d;               /* Dourado para destaques no hover do menu */
    --white: #ffffff;
    --text-main: #2c3e50;          /* Texto principal legível e escuro */
}

/* ==========================================================================
   2. RESET E ESTRUTURA BASE (ANTI-VAZAMENTO GLOBAL)
   ========================================================================== */
*, *:before, *:after { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box !important; 
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    background-color: var(--dark-green); 
    background-image: linear-gradient(135deg, #0a290d 0%, #1b5e20 50%, #004d40 100%);
    background-attachment: fixed;
    font-family: 'Droid Sans', sans-serif;
    color: var(--white);
    line-height: 1.8;
}

#wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    padding: 40px 20px;
    gap: 30px;
}

#sidebar { 
    width: 280px; 
    flex-shrink: 0; 
    transition: all 0.3s ease; 
}

#container {
    flex: 1;
    width: 100%;
    max-width: 100%;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
}

/* ==========================================================================
   3. BANNER (FEATURED)
   ========================================================================== */
#featured {
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
    border-bottom: 6px solid var(--primary-green);
}

#featured img {
    width: 100% !important;
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   4. CONTEÚDO E TIPOGRAFIA
   ========================================================================== */
#content {
    padding: 20px 60px 60px 60px;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 600px;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

#content > *:not(#copyright) {
    flex-grow: 0;
}

#content h1, #content h2, #content h3, #content h4, #content h5, #content p, #content li {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

#content h1, #content h2, #content h3, #content h4, #content h5 {
    color: var(--primary-green);
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

#content h2 { 
    font-size: 30px; 
    border-bottom: 3px solid var(--accent-teal);
    padding-bottom: 10px;
    text-transform: uppercase;
}

#content h3 { 
    font-size: 22px; 
    border-left: 5px solid var(--accent-teal);
    padding-left: 15px;
}

#content p {
    margin-bottom: 1.5em; 
    line-height: 1.8;
    text-align: justify;
}

#content p:last-child {
    margin-bottom: 0;
}

#content > *:last-child:not(#copyright) {
    margin-bottom: 40px; 
}

/* ==========================================================================
   5. LISTAS DO CONTEÚDO
   ========================================================================== */
#content ul:not(#nav ul) {
    list-style: none !important;
    margin: 20px 0;
}

#content ul:not(#nav ul) li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    color: var(--text-main);
    text-align: justify;
}

#content ul:not(#nav ul) li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--accent-teal);
    border-radius: 50%;
}

/* ==========================================================================
   6. MENU LATERAL (#nav) E ÍCONES
   ========================================================================== */
#nav ul, #nav li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-indent: 0 !important;
}

#nav li::before {
    content: none !important;
    display: none !important;
}

.nav-icon {
    display: inline-block !important; 
    width: 16px;
    height: 16px;
    margin-right: 12px;
    background-image: url('../../2024/images/nav-sprites.png');
    filter: brightness(0) invert(1); 
    vertical-align: middle;
}

#nav a {
    color: rgba(255,255,255,0.92) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    padding: 12px 18px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s all ease;
}

#nav a:hover {
    background: var(--primary-green);
    color: var(--gold) !important;
    padding-left: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.icon-home { background-position: 0 -24px; }
.icon-info-sign { background-position: -120px -96px; }
.icon-map-marker { background-position: -24px -72px; }
.icon-calendar { background-position: -192px -120px; }
.icon-file { background-position: -24px -24px; }
.icon-folder-open { width: 16px; background-position: -408px -120px; }
.icon-inbox { background-position: -168px -24px; }
.icon-check { background-position: -144px -72px; }
.icon-book { background-position: -48px -48px; }
.icon-user { background-position: -168px 0; }
.icon-envelope { background-position: -72px 0; }

/* ==========================================================================
   7. RESPONSIVIDADE DO MENU E CONTAINER (MOBILE E TABLET)
   ========================================================================== */
#menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 19px;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 9999;
    cursor: pointer;
    background-color: var(--primary-green);
    padding: 10px;
    box-sizing: content-box !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

#menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#menu-toggle.open span:nth-child(2) { opacity: 0; }
#menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 950px) {
    #menu-toggle { 
        display: flex !important; 
    }

    #wrapper { 
        padding: 15px 10px; 
        flex-direction: column;
        gap: 0;
    }

    #container { 
        width: 100% !important; 
        max-width: 100% !important;
    }
    
    #content { 
        padding: 20px 15px 30px 15px !important; 
        width: 100% !important;
        max-width: 100% !important;
    }
    
    #content h2 { 
        font-size: 22px; 
    }

    #sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        width: 280px;
        height: 100vh;
        background: var(--dark-green);
        z-index: 9998;
        padding: 70px 20px 40px 20px;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
        overflow-y: auto; 
        -webkit-overflow-scrolling: touch;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #sidebar.active { 
        left: 0 !important; 
    }
}

/* ==========================================================================
   8. COMPONENTES, TABELAS E RODAPÉ
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    margin: 10px 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none !important;
    background-color: var(--primary-green);
    color: var(--white) !important;
    border: 2px solid var(--primary-green);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--accent-teal);
    border-color: var(--accent-teal);
}

table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    background-color: var(--white);
}

table th, table td {
    padding: 10px;
    border: 1px solid #e0e0e0;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

#copyright {
    margin-top: auto;
    margin-left: -60px; 
    margin-right: -60px;
    margin-bottom: -60px; 
    width: calc(100% + 120px);
    padding: 30px 60px;
    background-color: #f4f6f4;
    border-top: 2px solid var(--light-green);
    display: block;
    clear: both;
    text-align: center;
    border-radius: 0 0 12px 12px; 
}

#copyright p { 
    margin: 0 !important; 
    color: #666 !important; 
    font-size: 13px; 
}

@media (max-width: 950px) {
    #copyright {
        margin-left: -15px !important;
        margin-right: -15px !important;
        margin-bottom: -30px !important;
        width: calc(100% + 30px) !important;
        padding: 20px 10px !important;
        border-radius: 0;
    }
}

/* ==========================================================================
   9. PARCEIROS E APOIADORES
   ========================================================================== */
.sponsor-section {
    margin-bottom: 40px;
    width: 100%;
}

.sponsor-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    width: 100%;
}

.sponsor-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: calc(33.333% - 14px);
    height: 180px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.sponsor-item img {
    max-width: 90%;
    max-height: 90px;
    object-fit: contain;
    margin-bottom: 15px;
}

.sponsor-item span {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
}

.grid-large .sponsor-item {
    width: calc(50% - 10px);
    height: 200px;
}

@media screen and (max-width: 850px) {
    .sponsor-item {
        width: calc(50% - 10px);
        height: 170px;
        padding: 15px;
    }
    .grid-large .sponsor-item { height: 180px; }
}

@media screen and (max-width: 576px) {
    .sponsor-grid { gap: 10px; }
    .sponsor-item {
        width: calc(50% - 5px);
        height: 150px;
        padding: 10px 5px;
    }
    .grid-large .sponsor-item {
        width: 100%;
        height: 160px;
    }
    .sponsor-item img {
        max-width: 90%;
        max-height: 70px;
    }
    .sponsor-item span {
        font-size: 11px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ==========================================================================
   10. ESTRUTURA DA PROGRAMAÇÃO (SSITA)
   ========================================================================== */
.container-programacao {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    box-sizing: border-box;
    overflow: hidden;
}

.title-programacao {
    color: var(--primary-green);
    border-bottom: 3px solid var(--accent-teal);
    padding-bottom: 10px;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-size: 22px;
    font-weight: 700;
    word-break: break-word;
}

.btn-container-responsive {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--light-green);
    padding-bottom: 15px;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.btn-prog {
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.card-dia {
    margin-bottom: 30px;
    background: #fff;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.header-dia-congresso {
    background: var(--primary-green);
    color: #fff;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 15px;
    border-left: 5px solid var(--accent-teal);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    box-sizing: border-box;
}

.header-dia-espaco {
    background: var(--accent-teal);
    color: #fff;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 15px;
    border-left: 5px solid var(--primary-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    box-sizing: border-box;
}

.card-body {
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.turno-title {
    color: var(--primary-green);
    text-transform: uppercase;
    margin-top: 5px;
    margin-bottom: 12px;
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 700;
}

.turno-title-espaco {
    color: var(--accent-teal);
    text-transform: uppercase;
    margin-top: 5px;
    margin-bottom: 12px;
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 700;
}

.table-prog {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-size: 14px;
    box-sizing: border-box;
}

.table-prog th, .table-prog td {
    padding: 10px;
    text-align: left;
    vertical-align: top;
    word-break: break-word !important;
    box-sizing: border-box;
}

.table-prog thead tr {
    background: var(--light-green);
    border-bottom: 2px solid var(--primary-green);
    color: var(--primary-green);
    font-weight: 600;
}

.col-horario { width: 22%; font-weight: bold; color: var(--primary-green); }
.col-horario-espaco { width: 22%; font-weight: bold; color: var(--accent-teal); }
.col-atividade { width: 53%; color: #333; line-height: 1.5; }
.col-local { width: 25%; color: #555; }

.tr-trabalhos {
    border-bottom: 1px solid #e8f5e9;
    background: #f1f8e9;
    border-left: 3px solid var(--accent-teal);
}

.tr-coffee {
    border-bottom: 1px solid #e8f5e9;
    background: #fffde7;
}

/* ==========================================================================
   11. ALTERNÂNCIA DE ABAS / CLASSES AUXILIARES
   ========================================================================== */
.is-hidden {
    display: none !important;
}

.btn-congresso-active {
    background: var(--primary-green) !important;
    color: #fff !important;
    border: 1px solid var(--primary-green) !important;
    box-shadow: 0 4px 6px rgba(27,94,32,0.2) !important;
}

.btn-congresso-inactive {
    background: #f9fbf9 !important;
    color: var(--primary-green) !important;
    border: 1px solid #c8e6c9 !important;
    box-shadow: none !important;
}

.btn-espaco-active {
    background: var(--accent-teal) !important;
    color: #fff !important;
    border: 1px solid var(--accent-teal) !important;
    box-shadow: 0 4px 6px rgba(0,137,123,0.2) !important;
}

.btn-espaco-inactive {
    background: #f9fbf9 !important;
    color: var(--accent-teal) !important;
    border: 1px solid #b2dfdb !important;
    box-shadow: none !important;
}

.txt-green { color: var(--primary-green); }
.txt-teal { color: var(--accent-teal); }
.txt-gold { color: #d4a017; font-weight: bold; }
.txt-sub { font-size: 13px; color: #666; }
.txt-muted { color: #777; }
.txt-italic { color: #777; font-style: italic; }
.uppercase { text-transform: uppercase; }
.font-500 { font-weight: 500; }
.font-600 { font-weight: 600; }
.font-bold { font-weight: bold; }