/* ==========================================================================
   1. VARIÁVEIS E IDENTIDADE VISUAL (MOSTRA ECT UNISC 2026)
   ========================================================================= */
:root {
    --primary-blue: #165c96;       /* Azul oficial UNISC do logotipo */
    --accent-red: #b81414;          /* Vermelho carmim para destaques e bordas */
    --accent-red-light: #d62828;   /* Vermelho vibrante para efeitos de hover */
    --gold-unisc: #f2c000;          /* Amarelo ouro para botões e detalhes do menu */
    --bg-light: #f4f7f9;            /* Fundo cinza azulado claro para tabelas/rodapé */
    --white: #ffffff;
    --text-main: #2b303a;          /* Cinza escuro para máxima legibilidade no fundo branco */
    --alert-bg: #fff3cd;           /* Amarelo claro para fundo de avisos */
    --alert-border: #ffc107;       /* Borda de destaque para avisos */
}

/* ==========================================================================
   2. RESET E ESTRUTURA BASE
   ========================================================================= */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    background-color: #0f3d66; 
    background-image: linear-gradient(135deg, #0f3d66 0%, #1c527f 50%, #b81414 100%);
    background-attachment: fixed;
    font-family: 'Droid Sans', sans-serif;
    color: var(--white);
    line-height: 1.8;
}

#wrapper {
    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;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    overflow: hidden;
}

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

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

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

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

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

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

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

#content p, 
#content td, 
#content li {
    color: var(--text-main) !important;
    font-size: 15px;
    line-height: 1.8;
}

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

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

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

.info-evento {
    margin-bottom: 40px;
}

small {
    color: #555;
    font-size: 13px;
    line-height: 1.5;
    display: block;
    margin-top: 10px;
}

/* ==========================================================================
   5. LISTAS DO CONTEÚDO (Bullets Personalizados)
   ========================================================================= */
#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;
    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-red);
    border-radius: 50%;
}

#content ol {
    margin: 20px 0 20px 25px; 
    padding: 0;
    list-style: none;
    counter-reset: li; 
}

#content ol li {
    position: relative;
    margin-bottom: 15px;
    padding-left: 10px;
    text-align: justify;
}

#content ol li::before {
    content: counter(li) "."; 
    counter-increment: li;
    position: absolute;
    left: -25px; 
    color: var(--primary-blue);
    font-weight: bold;
    width: 20px;
}

/* ==========================================================================
   6. MENU LATERAL (#nav)
   ========================================================================= */
#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('../images/nav-sprites.png');
    filter: brightness(0) invert(1); 
    vertical-align: middle;
}

#nav a {
    color: rgba(255,255,255,0.95) !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;
    border-left: 0px solid var(--gold-unisc);
}

#nav a:hover {
    background: var(--primary-blue);
    color: var(--gold-unisc) !important;
    padding-left: 25px;
    border-left: 4px solid var(--gold-unisc);
}

/* Posições dos Ícones (Sprites) */
.icon-envelope { background-position: -72px 0; }
.icon-star { background-position: -120px 0; }
.icon-user { background-position: -168px 0; }
.icon-home { background-position: 0 -24px; }
.icon-file { background-position: -24px -24px; }
.icon-inbox { background-position: -168px -24px; }
.icon-book { background-position: -48px -48px; }
.icon-facetime-video { background-position: -432px -48px; }
.icon-pencil { background-position: 0 -72px; }
.icon-map-marker { background-position: -24px -72px; }
.icon-backward { background-position: -240px -72px; }
.icon-calendar { background-position: -192px -120px; }

/* ==========================================================================
   7. CABEÇALHO MOBILE E MENU HAMBÚRGUER
   ========================================================================= */
header {
    display: none;
}

@media (max-width: 950px) {
    header {
        display: block;
        background-color: #ffffff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        z-index: 9999;
    }

    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        height: 100%;
    }

    /* Botão Hambúrguer */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10000;
    }

    .menu-toggle span {
        width: 100%;
        height: 3px;
        background-color: var(--primary-blue);
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    /* Transformação para o ícone fechar (X) */
    .menu-toggle.open span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* ==========================================================================
   8. TABELAS
   ========================================================================= */
#content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 14px;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden; 
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

#content table thead tr {
    background-color: var(--primary-blue) !important;
}

#content table th {
    color: var(--white) !important;
    padding: 14px 18px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#content table td {
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
}

#content table tbody tr:nth-of-type(even) {
    background-color: #f8fafc;
}

#content table tbody tr:hover {
    background-color: var(--bg-light);
}

/* ==========================================================================
   9. BLOCO DE ATENÇÃO / REGULAMENTOS
   ========================================================================= */
.alerta-atencao {
    background-color: var(--alert-bg);
    border-left: 5px solid var(--alert-border);
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.alerta-atencao h3 {
    color: #c48b02 !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    font-size: 18px;
    border-left: none !important;
    padding-left: 0 !important;
}

.alerta-atencao ul {
    margin: 0 !important;
}

.alerta-atencao ul li {
    margin-bottom: 8px !important;
    color: #664d03 !important;
}

.alerta-atencao ul li::before {
    background-color: var(--alert-border) !important;
}

/* ==========================================================================
   10. BOTÕES GERAIS
   ========================================================================= */
.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;
    letter-spacing: 0.5px;
    background-color: var(--gold-unisc);
    color: #2b303a !important; 
    border: 2px solid var(--gold-unisc);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-blue) !important;
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* ==========================================================================
   11. RODAPÉ (#copyright)
   ========================================================================= */
#copyright {
    margin-top: auto;
    margin-left: -60px; 
    margin-right: -60px;
    margin-bottom: -60px; 
    width: calc(100% + 120px);
    padding: 30px 60px;
    background-color: #f4f7f9;
    border-top: 2px solid #e2e8f0;
    display: block;
    clear: both;
    text-align: center;
    border-radius: 0 0 12px 12px; 
}

#copyright p {
    margin: 0 !important; 
    padding: 0 !important;
    text-align: center !important;
    color: #333333 !important;
    font-size: 14px !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
}

/* ==========================================================================
   12. RESPONSIVIDADE E GAVETA MOBILE (Ajuste de Eixos)
   ========================================================================= */
@media (max-width: 950px) {
    #wrapper { 
        padding: 20px 10px; 
        margin-top: 60px !important; /* Libera espaço para o header fixo */
        flex-direction: column;
    }
    
    /* Configuração Unificada da Gaveta Deslizante (Padrão Direita) */
    #sidebar {
        position: fixed;
        right: -300px; /* Esconde para o lado direito combinando com o footer.php */
        left: auto;
        top: 0;
        width: 280px;
        height: 100vh;
        background: #0f3d66;
        z-index: 9998;
        padding: 80px 20px 40px 20px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        overflow-y: auto; 
    }
    
    #sidebar.active { 
        right: 0 !important; 
    }
    
    #container { 
        width: 100%; 
    }
    
    #content { 
        padding: 20px; 
    }
    
    #content h2 { 
        font-size: 24px; 
    }
    
    #copyright {
        margin-left: -20px;
        margin-right: -20px;
        margin-bottom: -20px;
        width: calc(100% + 40px);
        padding: 20px;
    }
    
    #content table { 
        display: block;
        overflow-x: auto; 
    }
}