/* Página de Documentos - Estilo Minimalista */

.documentos-archive {
    background: #ffffff;
    position: relative;
}

.documentos-archive::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, rgba(255, 255, 255, 0) 50%),
                linear-gradient(225deg, rgba(245, 158, 11, 0.02) 0%, rgba(255, 255, 255, 0) 50%);
    z-index: 0;
    pointer-events: none;
}

.documentos-archive .container {
    position: relative;
    z-index: 1;
}

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

/* Card de Documento */
.documento-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(226, 232, 240, 0.8);
    height: 100%;
}

.documento-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

/* Ícone do Documento */
.documento-icon {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #02243d, #1e3a8a);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.documento-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(248, 232, 116, 0.15) 0%, transparent 70%);
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.documento-icon i {
    font-size: 3.5rem;
    color: #f8e874;
    z-index: 1;
    transition: transform 0.3s ease;
}

.documento-card:hover .documento-icon i {
    transform: scale(1.1);
}

/* Conteúdo do Card */
.documento-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.documento-titulo {
    font-size: 1.2rem;
    font-weight: 600;
    color: #02243d;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.documento-descricao {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta Informações */
.documento-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    font-size: 0.85rem;
    color: #64748b;
}

.documento-data,
.documento-categoria {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.documento-meta i {
    color: #02243d;
    font-size: 0.9rem;
}

.documento-categoria {
    background: #f8fafc;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Ações do Documento */
.documento-actions {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.documento-actions .btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.documento-actions .btn i {
    font-size: 1rem;
    transition: transform 0.25s ease;
}

.btn-download {
    background: #f8e874;
    color: #02243d;
}

.btn-download:hover {
    background: #f5d646;
    color: #02243d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 214, 70, 0.3);
}

.btn-download:hover i {
    transform: translateY(2px);
}

.btn-disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    width: 100%;
}

/* Mensagem de Sem Documentos */
.no-documentos {
    padding: 4rem 2rem;
    text-align: center;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #e2e8f0;
    margin: 2rem 0;
}

.no-documentos i {
    display: block;
    margin-bottom: 1.5rem;
}

.no-documentos h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #02243d;
    margin-bottom: 0.75rem;
}

.no-documentos p {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

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

.documento-card {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.documento-card:nth-child(1) { animation-delay: 0.1s; }
.documento-card:nth-child(2) { animation-delay: 0.15s; }
.documento-card:nth-child(3) { animation-delay: 0.2s; }
.documento-card:nth-child(4) { animation-delay: 0.25s; }
.documento-card:nth-child(5) { animation-delay: 0.3s; }
.documento-card:nth-child(6) { animation-delay: 0.35s; }
.documento-card:nth-child(7) { animation-delay: 0.4s; }
.documento-card:nth-child(8) { animation-delay: 0.45s; }
.documento-card:nth-child(9) { animation-delay: 0.5s; }

/* Responsividade */
@media (max-width: 992px) {
    .documentos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .documentos-grid {
        grid-template-columns: 1fr;
    }
    
    .documento-icon {
        height: 120px;
    }
    
    .documento-icon i {
        font-size: 3rem;
    }
    
    .documento-titulo {
        font-size: 1.1rem;
    }
    
    .documento-content {
        padding: 1.25rem;
    }
    
    .documento-actions {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .documento-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Acessibilidade */
.documento-card:focus-within {
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
    outline: 2px solid rgba(2, 36, 61, 0.5);
    outline-offset: 2px;
}

.documento-actions .btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(2, 36, 61, 0.3);
}
