/*!
Theme Name: NormaDigital
Description: Tema WordPress acessível, responsivo e performático para pesquisar e explorar documentos normativos da UFC integrado ao Tainacan. Desenvolvido especificamente para o repositório NormaDigital com foco em resoluções do CONSUNI e CEPE.
Author: Equipe NormaDigital
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: normadigital
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.3
Requires PHP: 7.4
Tags: accessibility, responsive, tainacan, documents, repository, government, education
*/

/*
==========================================================================
NORMADIGITAL THEME - ESTILOS PRINCIPAIS
==========================================================================

Paleta de Cores (WCAG 2.1 AA):
- Principal: #356B8C
- Secundária: #6FA8BF  
- Destaque 1: #D9A84E
- Destaque 2: #BF8D50
- Neutro/Fundo: #F2F2F2
- Texto Principal: #1a1a1a
- Texto Secundário: #4a4a4a
- Branco: #ffffff

Diretrizes de Acessibilidade:
- Contraste mínimo 4.5:1 para texto normal
- Contraste mínimo 3:1 para texto grande (18pt+)
- Estados de foco visíveis
- Navegação por teclado
- Tipografia legível com unidades em rem
*/

/* Reset e Normalização */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
}

/* Skip Links para Acessibilidade */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999999;
    padding: 0.75rem 1rem;
    background: #356B8C;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 0.25rem 0.25rem;
}

.skip-link:focus {
    left: 0.5rem;
    outline: 2px solid #D9A84E;
    outline-offset: 2px;
}

/* Estados de Foco Globais */
*:focus {
    outline: 2px solid #D9A84E;
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #D9A84E;
    outline-offset: 2px;
}

/* Tipografia Base */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    line-height: 1.3;
    color: #356B8C;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin: 0 0 1rem 0;
}

/* Links */
a {
    color: #356B8C;
    text-decoration: underline;
    transition: color 0.2s ease;
}

a:hover {
    color: #f59e0b;
}


/* Listas */
ul, ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.25rem;
}

/* Imagens Responsivas */
img {
    max-width: 100%;
    height: auto;
}

/* Utilitários de Acessibilidade */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

/* Container Principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* Grid Responsivo */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Botões Base */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px; /* Tamanho mínimo para toque */
    gap: 0.5rem;
}

.btn-primary {
    background-color: #356B8C;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #6FA8BF;
    color: #ffffff;
}

.btn-secondary {
    background-color: #D9A84E;
    color: #1a1a1a;
}

.btn-secondary:hover {
    background-color: #BF8D50;
    color: #ffffff;
}

/* Alto Contraste */
.high-contrast {
    filter: contrast(200%) brightness(150%);
}

.high-contrast * {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

.high-contrast a {
    color: #ffff00 !important;
}

/* Controles de Fonte */
.font-size-small {
    font-size: 0.875rem;
}

.font-size-normal {
    font-size: 1rem;
}

.font-size-large {
    font-size: 1.125rem;
}

/* Responsividade */
@media (max-width: 767px) {
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* ESTILO DO INDEX */

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    :root {
        --primary-color: #2563eb;
        --primary-dark: #1d4ed8;
        --primary-light: #3b82f6;
        --secondary-color: #64748b;
        --accent-color: #f59e0b;
        --text-primary: #1e293b;
        --text-secondary: #64748b;
        --text-muted: #94a3b8;
        --background: #ffffff;
        --surface: #f8fafc;
        --surface-elevated: #f1f5f9;
        --border: #e2e8f0;
        --border-light: #f1f5f9;
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
        --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
        --radius-sm: 0.375rem;
        --radius-md: 0.5rem;
        --radius-lg: 0.75rem;
        --radius-xl: 1rem;
        --spacing-xs: 0.5rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
        --spacing-3xl: 4rem;
    }
    
    body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        font-size: 16px;
        line-height: 1.6;
        color: var(--text-primary);
        background: var(--background);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 var(--spacing-md);
    }
    
    /* Header Minimalista - PADRÃO UNIFICADO */
    .site-header {
        background: var(--background);
        border-bottom: 1px solid var(--border-light);
        padding: var(--spacing-md) 0;
        position: sticky;
        top: 0;
        z-index: 100;
        backdrop-filter: blur(8px);
        background: rgba(255, 255, 255, 0.95);
    }
    
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .site-logo {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        text-decoration: none;
        color: var(--text-primary);
        transition: transform 0.2s ease;
    }
    
    .site-logo:hover {
        transform: translateY(-1px);
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
        background: var(--primary-color);
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: 700;
        font-size: 14px;
        box-shadow: var(--shadow-sm);
    }
    
    .logo-text {
        font-size: 20px;
        font-weight: 700;
        color: var(--text-primary);
        letter-spacing: -0.01em;
    }
    
    .header-nav {
        display: flex;
        align-items: center;
        gap: var(--spacing-md);
        height: 40px;
    }
    
    .nav-links {
        display: flex;
        gap: var(--spacing-md);
        list-style: none;
        align-items: center;
        height: 100%;
    }
    
    .nav-links li {
        display: flex;
        align-items: center;
    }
    
    /* Links do menu padronizados como botões */
    .nav-link {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 500;
        font-size: 14px;
        font-family: inherit;
        transition: all 0.2s ease;
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: var(--radius-sm);
        background: transparent;
        border: 1px solid transparent;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }
    
    .nav-link:hover {
        color: var(--primary-color);
        background: var(--surface);
        border-color: var(--border-light);
        transform: translateY(-1px);
    }
    
    /* Botão de acessibilidade padronizado com o menu */
    .accessibility-btn {
        background: var(--surface);
        border: 1px solid var(--border);
        color: var(--text-secondary);
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: var(--radius-sm);
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        font-family: inherit;
    }
    
    .accessibility-btn:hover {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        transform: translateY(-1px);
        box-shadow: var(--shadow-sm);
    }
    
    .hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: var(--spacing-sm);
    border-radius: 9999px;
    margin-bottom: var(--spacing-md);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.hero-badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.hero-badge-logo {
    width: 400px;
    height: 150px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.hero-badge-nd {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.hero-badge:hover .hero-badge-logo {
    transform: scale(1.05);
}

/* Ajuste para dispositivos de alta resolução */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-badge-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .hero-badge-logo {
        width: 360px;
        height: 90px;
    }
    
        .hero-badge {
        padding: var(--spacing-md); /* Aumenta o padding do container */
        margin-bottom: var(--spacing-lg); /* Mais espaço abaixo */
    }
}

/* Para telas muito pequenas (smartphones pequenos) */
@media (max-width: 480px) {
    .hero-badge-logo {
        width: 100px; /* Ligeiramente menor para telas muito pequenas */
        height: 38px;
    }
}

/* Para tablets em modo retrato */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-badge-logo {
        width: 160px; /* Tamanho intermediário para tablets */
        height: 60px;
    }
}

    /* Hero Section - ESPAÇAMENTO REDUZIDO */
    .hero-section {
        padding: var(--spacing-xl) 0;
        background: var(--background);
        position: relative;
        overflow: hidden;
    }
    
    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(59, 130, 246, 0.03) 100%);
        z-index: 1;
    }
    
    .hero-content {
        text-align: center;
        max-width: 800px;
        margin: 0 auto;
        position: relative;
        z-index: 2;
    }
    
    .hero-badge {
        display: inline-flex;
        align-items: center;
        gap: var(--spacing-xs);
        background: var(--surface);
        border: 1px solid var(--border);
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: 9999px;
        font-size: 14px;
        color: var(--text-secondary);
        margin-bottom: var(--spacing-md);
        font-weight: 500;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 5vw, 4rem);
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: var(--spacing-sm);
        line-height: 1.1;
        letter-spacing: -0.02em;
    }
    
    .hero-subtitle {
        font-size: 20px;
        color: var(--text-secondary);
        margin-bottom: var(--spacing-md);
        line-height: 1.5;
        font-weight: 400;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Sistema de Busca - ESPAÇAMENTO MÍNIMO */
    .search-section {
        background: var(--surface);
        padding: var(--spacing-md) 0;
        border-top: 1px solid var(--border-light);
        border-bottom: 1px solid var(--border-light);
    }
    
    .search-container {
        max-width: 900px;
        margin: 0 auto;
    }
    
    .search-form {
        position: relative;
        margin-bottom: var(--spacing-sm);
    }
    
    .search-input {
        width: 100%;
        padding: var(--spacing-lg) var(--spacing-xl);
        padding-right: 140px;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        font-size: 16px;
        font-family: inherit;
        font-weight: 400;
        background: var(--background);
        transition: all 0.3s ease;
        outline: none;
        box-shadow: var(--shadow-sm);
        color: var(--text-primary);
    }
    
    .search-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--shadow-md);
        transform: translateY(-1px);
    }
    
    .search-input::placeholder {
        color: var(--text-muted);
        font-weight: 400;
    }
    
    .search-btn {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: var(--radius-md);
        font-weight: 600;
        font-size: 14px;
        font-family: inherit;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: var(--shadow-sm);
    }
    
    .search-btn:hover {
        background: var(--primary-dark);
        transform: translateY(-50%) translateY(-1px);
        box-shadow: var(--shadow-md);
    }
    
       /* Filtros na mesma linha com estatísticas */
    .filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xs);
    flex-wrap: nowrap; /* Impede quebra de linha */
    margin-bottom: 0;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--background);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    min-height: 40px;
}
    
    .filters-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex-wrap: nowrap; /* Impede quebra de linha */
    flex: 1;
    min-width: 0; /* Permite compressão */
}
    
    .filters-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-shrink: 0; /* Não permite compressão */
    white-space: nowrap; /* Impede quebra do texto */
}
    
    .filter-select {
    appearance: none;
    background: var(--background);
    border: 1px solid var(--border);
    padding: var(--spacing-xs) var(--spacing-sm);
    padding-right: 1.5rem;
    border-radius: var(--radius-md);
    font-size: 13px; /* Reduzido para economizar espaço */
    font-family: inherit;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-width: 120px; /* Reduzido */
    max-width: 130px; /* Limita o tamanho máximo */
    box-shadow: var(--shadow-sm);
}
    
    .filter-select:hover {
        border-color: var(--primary-color);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }
    
    .filter-select:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--shadow-md);
    }
    
    .filter-wrapper {
        position: relative;
    }
    
    .filter-wrapper::after {
        content: '▼';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        pointer-events: none;
        font-size: 10px;
    }
    
    .filter-input {
    background: var(--background);
    border: 1px solid var(--border);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    font-size: 12px; /* Reduzido */
    font-family: inherit;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    width: 130px; /* Reduzido */
}
    
    .filter-input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--shadow-md);
        transform: translateY(-1px);
    }
    
    .date-inputs {
        display: flex;
        gap: var(--spacing-xs);
            }
            
    /* Wrapper para inputs de data com ícones */
.date-input-wrapper {
    position: relative;
    display: inline-block;
}

.date-input-wrapper .filter-input {
    padding-left: 2rem; /* Espaço para o ícone */
}

.date-icon {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

/* Esconde o ícone quando há valor no campo */
.date-input-wrapper .filter-input:not(:placeholder-shown) + .date-icon,
.date-input-wrapper .filter-input[value]:not([value=""]) + .date-icon {
    display: none;
}

/* Estilos específicos para mobile */
@media (max-width: 768px) {
    .date-input-wrapper {
        position: relative;
        width: 150px;
    }
    
    .date-input-wrapper .filter-input {
        width: 100%;
        padding-left: 2.2rem;
        text-align: left;
    }
    
    .date-icon {
        left: 8px;
        color: var(--primary-color);
        opacity: 0.7;
    }
    
    /* Adiciona texto de ajuda visual para mobile */
    .date-input-wrapper::after {
        content: attr(data-placeholder);
        position: absolute;
        left: 2.2rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        font-size: 12px;
        pointer-events: none;
        opacity: 0.8;
    }
    
    .date-input-wrapper[data-placeholder="Data inicial"]::after {
        content: "Início";
    }
    
    .date-input-wrapper[data-placeholder="Data final"]::after {
        content: "Fim";
    }
    
    /* Esconde o texto quando há valor */
    .date-input-wrapper .filter-input:not(:placeholder-shown) + .date-icon + ::after,
    .date-input-wrapper .filter-input[value]:not([value=""]) ~ ::after {
        display: none;
    }
}

    
    .stats-info {
        color: var(--text-muted);
        font-size: 13px;
        font-weight: 500;
        padding: var(--spacing-xs) var(--spacing-sm);
        background: var(--surface);
        border-radius: var(--radius-md);
        border: 1px solid var(--border-light);
        white-space: nowrap;
    }
    
    @media (max-width: 768px) {
    .filter-select,
    .filter-input {
        min-width: 150px; /* Aumentado */
        width: 150px; /* Aumentado */
        font-size: 13px;
    }
}

    
    /* Conteúdo Principal */
    .main-content {
        padding: var(--spacing-2xl) 0;
        background: var(--background);
    }
    .content-header {
        text-align: center;
        margin-bottom: var(--spacing-2xl);
    }
    
    .content-title {
        font-size: 32px;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: var(--spacing-sm);
        letter-spacing: -0.01em;
    }
    
    .content-subtitle {
        color: var(--text-secondary);
        font-size: 16px;
        font-weight: 400;
    }
    
    /* Correção para alinhamento dos cards e botões */
    .documents-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: var(--spacing-lg);
        margin-bottom: var(--spacing-2xl);
    }
    
    .document-card {
        background: var(--background);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: var(--spacing-lg);
        transition: all 0.2s ease;
        box-shadow: var(--shadow-sm);
        display: flex;
        flex-direction: column;
        height: 100%; /* Faz todos os cards terem a mesma altura */
    }
    
    .document-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary-color);
    }
    
    /* Faz o conteúdo crescer para empurrar os botões para baixo */
    .document-content {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .document-header {
        margin-bottom: var(--spacing-sm);
    }
    
    .document-title {
        font-size: 18px;
        font-weight: 600;
        line-height: 1.4;
        margin: var(--spacing-sm) 0;
        flex-grow: 0;
    }
    
    .document-meta {
        display: flex;
        gap: var(--spacing-md);
        color: var(--text-muted);
        font-size: 14px;
        margin: var(--spacing-sm) 0;
        flex-grow: 0;
    }
    
    .document-excerpt {
        color: var(--text-secondary);
        font-size: 14px;
        line-height: 1.5;
        margin: var(--spacing-sm) 0;
        flex: 1; /* Faz a ementa ocupar o espaço disponível */
        min-height: 60px; /* Altura mínima para ementas muito curtas */
        text-align: justify;
        text-justify: inter-word; /* Melhora a distribuição dos espaços */
        hyphens: auto; /* Permite hifenização automática */
    }
    
    /* Botões sempre ficam na parte inferior */
    .document-actions {
        display: flex;
        gap: var(--spacing-sm);
        margin-top: auto; /* Empurra os botões para o final do card */
        padding-top: var(--spacing-md);
    }

    .document-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        margin-bottom: var(--spacing-md);
    }
    
    .document-badges {
        display: flex;
        gap: var(--spacing-xs);
    }
    
    .badge {
    background: var(--surface);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    }
    
    .badge-primary {
        background: rgb(37 99 235 / 0.1);
        color: var(--primary-color);
    }
    
    /* Badges para Tipos de Documento - CORES ÚNICAS */
    .badge-resolucao {
        background: rgba(53, 107, 140, 0.1) !important;
        color: #356B8C !important;
        border: 1px solid rgba(53, 107, 140, 0.2) !important;
    }
    
    .badge-provimento {
        background: rgba(217, 168, 78, 0.1) !important;
        color: #D9A84E !important;
        border: 1px solid rgba(217, 168, 78, 0.2) !important;
    }
    
    .badge-certidao {
        background: rgba(191, 141, 80, 0.1) !important;
        color: #BF8D50 !important;
        border: 1px solid rgba(191, 141, 80, 0.2) !important;
    }
    
    .badge-documento {
        background: rgba(74, 74, 74, 0.1) !important;
        color: #4a4a4a !important;
        border: 1px solid rgba(74, 74, 74, 0.2) !important;
    }
    
    /* Badges para Coleções - CORES DIFERENTES DOS TIPOS */
    .badge-consuni {
        background: var(--primary-color) !important;
        color: white !important;
        border: 1px solid rgba(111, 168, 191, 0.2) !important;
    }
    
    .badge-cepe {
        background: rgba(34, 197, 94, 0.1) !important;
        color: #16a34a !important;
        border: 1px solid rgba(34, 197, 94, 0.2) !important;
    }
    
    .badge-colecao {
        background: rgba(168, 85, 247, 0.1) !important;
        color: #9333ea !important;
        border: 1px solid rgba(168, 85, 247, 0.2) !important;
    }
    
    /* Badge de Situação do Documento */
    .badge-em-vigor {
        background: rgba(34, 197, 94, 0.1) !important;
        color: #16a34a !important;
        border: 1px solid rgba(34, 197, 94, 0.2) !important;
        font-weight: 600 !important;
    }
    
    .badge-revogado {
        background: rgba(239, 68, 68, 0.1) !important;
        color: #dc2626 !important;
        border: 1px solid rgba(239, 68, 68, 0.2) !important;
        font-weight: 600 !important;
    }
    
    .badge-situacao {
        font-size: 11px !important;
        padding: 3px 8px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
    }



    
    .document-title {
        font-size: 18px;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: var(--spacing-sm);
        line-height: 1.4;
    }
    
    .document-title a {
        color: inherit;
        text-decoration: none;
        transition: color 0.2s ease;
    }
    
    .document-title a:hover {
        color: var(--primary-color);
    }
    
    .document-meta {
        display: flex;
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-md);
        font-size: 14px;
        color: var(--text-muted);
    }
    
    .document-excerpt {
        color: var(--text-secondary);
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: var(--spacing-lg);
    }
    
    .document-actions {
        display: flex;
        gap: var(--spacing-sm);
    }
    
    .btn {
        display: inline-flex;
        align-items: center;
        gap: var(--spacing-xs);
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: var(--radius-md);
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        transition: all 0.2s ease;
        cursor: pointer;
        border: none;
    }
    
    .btn-primary {
        background: var(--primary-color);
        color: white;
    }
    
    .btn-primary:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
    }
    
    .btn-secondary {
        background: var(--surface);
        color: var(--text-secondary);
        border: 1px solid var(--border);
    }
    
    .btn-secondary:hover {
        background: var(--background);
        border-color: var(--primary-color);
        color: var(--primary-color);
    }
    
    /* Footer */
    .site-footer {
        background: var(--surface);
        border-top: 1px solid var(--border-light);
        padding: var(--spacing-2xl) 0 var(--spacing-lg) 0;
        margin-top: var(--spacing-2xl);
    }
    
    .footer-content {
        text-align: center;
        color: var(--primary-color);
        font-size: 14px;
    }
    
    .footer-links {
        display: flex;
        justify-content: center;
        gap: var(--spacing-lg);
        margin-bottom: var(--spacing-md);
    }
    
    .footer-link {
        color: var(--text-primary);
        text-decoration: none;
        transition: color 0.2s ease;
    }
    
    .footer-link:hover {
        color: var(--accent-color);
    }
    
    /* Seção de Colegiados Principais */
.colegiados-section {
    background: var(--surface);
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.colegiados-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.colegiados-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.01em;
}

.colegiados-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

.colegiados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    max-width: 800px;
    margin: 0 auto;
}

.colegiado-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.colegiado-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.colegiado-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.colegiado-card:hover::before {
    transform: scaleX(1);
}

.colegiado-card.cepe::before {
    background: #16a34a;
}

.colegiado-card.consuni::before {
    background: var(--primary-color);
}

.colegiado-icon {
    width: 130px;
    height: 70px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md) auto;
    font-size: 24px;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-md);
}

.colegiado-icon.cepe {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
}

.colegiado-icon.consuni {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.colegiado-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.colegiado-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: var(--spacing-lg);
}

.colegiado-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.colegiado-stat {
    text-align: center;
    flex: 1;
}

.colegiado-stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.colegiado-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-top: var(--spacing-xs);
}

.colegiado-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.colegiado-link:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.colegiado-card.cepe .colegiado-link {
    background: #16a34a;
}

.colegiado-card.cepe .colegiado-link:hover {
    background: #15803d;
}

/* Responsivo para colegiados */
@media (max-width: 768px) {
    .colegiados-section {
        padding: var(--spacing-lg) 0;
    }
    
    .colegiados-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .colegiado-card {
        padding: var(--spacing-lg);
    }
    
    .colegiado-stats {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .colegiado-stat {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        text-align: left;
    }
    
    .colegiado-stat-number {
        font-size: 20px;
    }
}

/* Seção Mais Acessadas do Mês */
.mais-acessadas-section {
    background: var(--background);
    padding: var(--spacing-xl) 0;
    border-bottom: 1px solid var(--border-light);
}

.mais-acessadas-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.mais-acessadas-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.01em;
}

.mais-acessadas-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

.ranking-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.ranking-item {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.ranking-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.ranking-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.ranking-item:hover::before {
    transform: scaleY(1);
}

.ranking-position {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-md);
}

.ranking-position.pos-1 {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.ranking-position.pos-2 {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
}

.ranking-position.pos-3 {
    background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
}

.ranking-position.pos-other {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.ranking-content {
    flex: 1;
    min-width: 0;
}

.ranking-badges {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
}

.ranking-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ranking-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ranking-title a:hover {
    color: var(--primary-color);
}

.ranking-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 13px;
    color: var(--text-muted);
    align-items: center;
}

.ranking-stats {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    min-width: 80px;
}

.ranking-views {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.ranking-views-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.ranking-trend {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.ranking-trend.up {
    color: #16a34a;
    background: rgba(34, 197, 94, 0.1);
}

.ranking-trend.down {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}

.ranking-trend.stable {
    color: var(--text-muted);
    background: var(--surface);
}

/* Responsivo para ranking */
@media (max-width: 768px) {
    .mais-acessadas-section {
        padding: var(--spacing-lg) 0;
    }
    
    .ranking-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .ranking-content {
        order: 1;
    }
    
    .ranking-stats {
        order: 2;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        min-width: auto;
    }
    
    .ranking-position {
        order: 0;
        margin-bottom: var(--spacing-sm);
    }
    
    .ranking-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
}

    /* Estados Vazios */
    .empty-state {
        text-align: center;
        padding: var(--spacing-2xl);
        background: var(--surface);
        border-radius: var(--radius-lg);
        border: 1px solid var(--border-light);
    }
    
    .empty-icon {
        font-size: 48px;
        margin-bottom: var(--spacing-md);
        opacity: 0.5;
    }
    
    .empty-title {
        font-size: 20px;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: var(--spacing-sm);
    }
    
    .empty-description {
        color: var(--text-secondary);
        margin-bottom: var(--spacing-lg);
    }
    
    /* Paginação */
    .pagination {
        display: flex;
        justify-content: center;
        gap: var(--spacing-xs);
        margin-top: var(--spacing-xl);
    }
    
    .pagination a,
    .pagination span {
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: var(--radius-md);
        text-decoration: none;
        color: var(--text-secondary);
        font-size: 14px;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .pagination a:hover {
        background: var(--surface);
        color: var(--primary-color);
    }
    
    .pagination .current {
        background: var(--primary-color);
        color: white;
    }
    
    /* Responsivo otimizado */
    @media (max-width: 768px) {
        .hero-section {
            padding: var(--spacing-md) 0 var(--spacing-lg) 0;
        }
        
        .hero-title {
            margin-bottom: var(--spacing-xs);
        }
        
        .hero-subtitle {
            margin-bottom: var(--spacing-sm);
        }
        
        .search-section {
            padding: var(--spacing-sm) 0;
        }
        
        .search-form {
            margin-bottom: var(--spacing-xs);
        }
        
        .header-nav {
            gap: var(--spacing-sm);
        }
        
        .nav-links {
            display: none;
        }
        
        .accessibility-btn {
            font-size: 12px;
            padding: 6px 8px;
            height: 28px;
        }
        
        .search-input {
            padding-right: 100px;
        }
        
        .search-btn {
            padding: 8px 16px;
            font-size: 14px;
        }
        
        .filters-container {
            flex-direction: column;
            align-items: stretch;
            gap: var(--spacing-sm);
            padding: var(--spacing-sm);
        }
        
        .filters-left {
            justify-content: center;
            flex-wrap: wrap;
        }
        
        .filters-right {
            justify-content: center;
        }
        
        .filter-select,
        .filter-input {
            min-width: 140px;
            width: 140px;
        }
        
        .date-inputs {
            justify-content: center;
            flex-wrap: wrap;
        }
        
        .stats-info {
            text-align: center;
            font-size: 12px;
        }
        
        .documents-grid {
            grid-template-columns: 1fr;
        }
        
        .document-actions {
            flex-direction: column;
        }
        
        .footer-links {
            flex-direction: column;
            gap: var(--spacing-sm);
        }
    }
    /* Reponsivo para filtros*/
    @media (max-width: 480px) {
        .filters-left {
            flex-direction: column;
            align-items: center;
            gap: var(--spacing-xs);
        }
        
        .date-inputs {
            flex-direction: column;
            align-items: center;
            gap: var(--spacing-xs);
        }
    }
    
    /* Animações */
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .document-card {
        animation: fadeInUp 0.5s ease-out;
    }
    
    .document-card:nth-child(2) { animation-delay: 0.1s; }
    .document-card:nth-child(3) { animation-delay: 0.2s; }
    .document-card:nth-child(4) { animation-delay: 0.3s; }
    .document-card:nth-child(5) { animation-delay: 0.4s; }
    .document-card:nth-child(6) { animation-delay: 0.5s; }

