/* Estilos específicos para a página de detalhes */

.download-btn {
    background-color: #ff9100;
    color: #fff;
    border-color: #ff9100;
}.

.download-btn:hover {
    background-color: #0056b3;
}

/* Container principal */
.detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Informações do documento */
.document-info {
    margin-bottom: 2rem;
}

.document-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.document-type {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.publish-date {
    background-color: #f3e5f5;
    color: #7b1fa2;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.document-title {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* Layout do conteúdo */
.content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Barra lateral do sumário */
.summary-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.summary-section, .annexes-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.summary-section h3, .annexes-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
}

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-list li {
    margin-bottom: 0.5rem;
}

.summary-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.summary-link:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.summary-link.active {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

.annex-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    text-decoration: none;
    color: #007bff;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.annex-link:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

/* Conteúdo do documento */
.document-content {
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.official-text h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #333;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.article {
    margin-bottom: 2rem;
    scroll-margin-top: 120px;
}

.article h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.article p {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 1rem;
    text-align: justify;
}

/* Seções inferiores */
.bottom-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.related-documents, .version-history {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.related-documents h3, .version-history h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.related-item {
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    text-decoration: none;
    color: #007bff;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.related-item:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.version-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.version-item {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background-color: #fafafa;
}

.version-date {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.version-description {
    font-size: 0.9rem;
    color: #666;
}

/* Responsividade */
@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .summary-sidebar {
        position: static;
        order: 2;
    }
    
    .document-content {
        order: 1;
    }
    
    .bottom-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .detail-container {
        padding: 1rem;
    }
    
    .detail-header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .document-title {
        font-size: 1.5rem;
    }
    
    .document-content {
        padding: 1.5rem;
    }
    
    .document-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.document-info,
.summary-sidebar,
.document-content,
.bottom-sections {
    animation: fadeInUp 0.6s ease-out;
}

.summary-sidebar {
    animation-delay: 0.1s;
}

.document-content {
    animation-delay: 0.2s;
}

.bottom-sections {
    animation-delay: 0.3s;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.year-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.year-btn.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.year-btn:hover:not(.active) {
    background-color: #f8f9fa;
}

.status-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem 0;
}

.status-label.active {
    color: #28a745;
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.green {
    background-color: #28a745;
}

.status-indicator.gray {
    background-color: #6c757d;
}

/* Conteúdo principal */
.main-content {
    background-color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.results-count {
    font-size: 0.9rem;
    color: #666;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.sort-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.9rem;
}

/* Cartões de resultado */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.result-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.result-number {
    font-weight: 600;
    color: #007bff;
}

.result-type {
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
}

.result-year {
    font-size: 0.8rem;
    color: #666;
}

.status-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.result-title {
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: black;
}

.result-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: #f8f9fa;
}

.action-btn.primary {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.action-btn.primary:hover {
    background-color: #0056b3;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.primary {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #f8f9fa;
}

.pagination-btn.primary:hover {
    background-color: #0056b3;
}

/* Barra lateral da IA */
.ai-sidebar {
    background-color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    /* position: sticky; */
    top: 100px;
}

.ai-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.ai-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.ai-summary {
    margin-bottom: 1.5rem;
}

.ai-summary h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #333;
}

.ai-summary p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.related-docs h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #333;
}

.related-list {
    list-style: none;
}

.related-list li {
    margin-bottom: 0.5rem;
}

.related-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
    padding: 0.25rem 0;
}

.related-link:hover {
    text-decoration: underline;
}

/* Responsividade */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 250px 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .sidebar, .ai-sidebar {
        /* position: static; */
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-container {
        order: 2;
        max-width: none;
    }
    
    .header-actions {
        order: 1;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .result-actions {
        flex-wrap: wrap;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}



/* CSS */
.accordion {
    border: 1px solid #ececec;
    border-radius: 6px;
    margin-top: 10px;
    overflow: hidden;
}

.accordion:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    background-color: #f1f1f1;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background 0.3s;
    color: #535353; 
}

/* .accordion-header:hover {
    background-color: #f1f1f1;
} */




.accordion-indicator {
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

/* gira o ícone ao expandir */
.accordion.open .accordion-indicator {
  transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 15px;
}

.accordion-content.open {
    max-height: 1000px; /* valor grande para caber os itens */
    padding: 10px 15px;
}

.checkbox-label {
    display: block;
    margin: 5px 0;
}

.result-link {
  display: block;          /* faz ocupar o card todo */
  text-decoration: none;   /* remove sublinhado */
  color: inherit;          /* mantém a cor do texto */
}

.result-link:hover {
  background: #f9f9f9;     /* destaque ao passar o mouse */
  cursor: pointer;
}

.annex-list {
    list-style: none;
    padding: 0;
}

.annex-item + .annex-item {
    margin-top: 8px; /* espaçamento entre anexos */
}

.annex-link {
    text-decoration: none;
    color: #007bff;
}


#frm_pesquisa .form-control,
#frm_pesquisa .form-control:focus,
#frm_pesquisa .form-control:focus-visible,
#frm_pesquisa .form-control:focus-within {
  outline: none !important;
  box-shadow: none !important;
  border-color: white !important;
  transition: none !important;
}
/*


 */

:root { --header-height: 61px; }

@media (min-width: 1024px){
    #secao-filtro-leis{
        position: sticky;
        top: calc(var(--header-height) + 2rem);
        max-height: calc(100vh - var(--header-height) - 2rem);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 1;
    }

    #secao-filtro-leis.scroll-invisible{
        scrollbar-width: none; 
        -ms-overflow-style: none;
    }
    
    #secao-filtro-leis.scroll-invisible::-webkit-scrollbar{
        width: 0; height: 0;
    }
}
