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

/* Título da página */
.documents-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #523827;
    margin-bottom: 2rem;
}

/* Barra de pesquisa e filtros */
.documents-search-box {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 2px 8px rgba(82, 56, 39, 0.1);
}

.documents-search-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9f643d;
    font-size: 1rem;
}

.documents-search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 45px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.documents-search-input:focus {
    outline: none;
    border-color: #9f643d;
    box-shadow: 0 0 0 3px rgba(159, 100, 61, 0.1);
}

.search-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-clear:hover {
    color: #873b4b;
}

.tag-filter-wrapper {
    position: relative;
    flex: 0 0 auto;
    min-width: 200px;
}

.tag-filter-wrapper .tag-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9f643d;
    font-size: 1rem;
    pointer-events: none;
}

.documents-category-filter {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 45px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239f643d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.documents-category-filter:focus {
    outline: none;
    border-color: #9f643d;
    box-shadow: 0 0 0 3px rgba(159, 100, 61, 0.1);
}

.documents-type-filter {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 45px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239f643d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.documents-type-filter:focus {
    outline: none;
    border-color: #9f643d;
    box-shadow: 0 0 0 3px rgba(159, 100, 61, 0.1);
}

.documents-search-btn {
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #873b4b, #9f643d);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.documents-search-btn:hover {
    background: linear-gradient(135deg, #9f643d, #cb8659);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(159, 100, 61, 0.3);
}

/* Informações de resultados da busca */
.search-results-info {
    background: #f8f9fa;
    border-left: 4px solid #9f643d;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

.search-results-info p {
    margin: 0;
    color: #523827;
    font-size: 1rem;
}

.search-results-info strong {
    color: #873b4b;
}

/* Categorias clicáveis nos cards */
.document-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.document-category {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    background: #f0f0f1;
    color: #523827;
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.document-category:hover {
    background: linear-gradient(135deg, #873b4b, #9f643d);
    color: white;
    transform: translateY(-2px);
}

.document-category i {
    font-size: 0.75rem;
}

/* Seção de Documentos */
.documents-section {
    padding: 4rem 0;
    background: #fff3d8;
}

.documents-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #523827;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.1rem;
    color: #523827;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid de Documentos */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Lista de Documentos (um por linha) */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2rem;
}

/* Card de Documento */
.document-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(82, 56, 39, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #9f643d;
    display: flex;
    gap: 1.5rem;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Ícone do Documento */
.document-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #873b4b, #9f643d);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Conteúdo do Documento */
.document-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.document-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #523827;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.document-description {
    color: #523827;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

/* Meta informações */
.document-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.document-date,
.document-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #523827;
}

.document-date i,
.document-type i {
    color: #9f643d;
}

/* Botão de Download */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #873b4b, #9f643d);
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    align-self: flex-start;
}

.btn-download:hover {
    background: linear-gradient(135deg, #9f643d, #cb8659);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(159, 100, 61, 0.3);
}

.btn-download i {
    font-size: 0.9rem;
}

/* Botão desabilitado */
.btn-download.btn-disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-download.btn-disabled:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

/* Responsividade */
@media (max-width: 768px) {
    .documents-title {
        font-size: 2rem;
    }
    
    .documents-search-form {
        flex-direction: column;
    }
    
    .search-input-wrapper,
    .tag-filter-wrapper {
        width: 100%;
        min-width: 100%;
    }
    
    .documents-search-btn {
        width: 100%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .document-card {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .document-icon {
        align-self: center;
    }
    
    .document-meta {
        justify-content: center;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .documents-section {
        padding: 3rem 0;
    }
    
    .document-categories {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 4rem 0 2rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .document-card {
        padding: 1rem;
    }
    
    .document-title {
        font-size: 1.1rem;
    }
    
    .document-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-download {
        width: 100%;
        justify-content: center;
    }
}

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

.document-card {
    opacity: 1;
    animation: fadeInUp 0.6s ease forwards;
}

.document-card:nth-child(1) { animation-delay: 0.1s; }
.document-card:nth-child(2) { animation-delay: 0.2s; }
.document-card:nth-child(3) { animation-delay: 0.3s; }
.document-card:nth-child(4) { animation-delay: 0.4s; }
.document-card:nth-child(5) { animation-delay: 0.5s; }
.document-card:nth-child(6) { animation-delay: 0.6s; }
.document-card:nth-child(7) { animation-delay: 0.7s; }
.document-card:nth-child(8) { animation-delay: 0.8s; }

/* Estados de carregamento */
.document-card {
    opacity: 1;
}

/* Acessibilidade */
.btn-download:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.document-card:focus-within {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Alto contraste */
@media (prefers-contrast: high) {
    .document-card {
        border: 2px solid #000;
    }
    
    .btn-download {
        border: 2px solid #000;
    }
}

/* Redução de movimento */
@media (prefers-reduced-motion: reduce) {
    .document-card {
        animation: none;
        opacity: 1;
    }
    
    .document-card:hover {
        transform: none;
    }
    
    .btn-download:hover {
        transform: none;
    }
}

/* Mensagem de nenhum documento */
.no-documents {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(82, 56, 39, 0.1);
}

.no-documents i {
    font-size: 4rem;
    color: #9f643d;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-documents h3 {
    font-size: 1.8rem;
    color: #523827;
    margin-bottom: 1rem;
    font-weight: 600;
}

.no-documents p {
    font-size: 1.1rem;
    color: #523827;
    opacity: 0.7;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}