/* =====================================================
   CSS/DOCUMENTOS-GESTION.CSS
   Estilos para la página de documentos de gestión
   ===================================================== */

/* Headers de Sección */
.section-header-docs {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 3px solid var(--border);
}

.header-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.header-text h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.header-text p {
    font-size: 1.0625rem;
    color: var(--text-light);
    margin: 0;
}

/* Secciones */
.documentos-estrategicos,
.documentos-organizacion {
    margin-bottom: var(--spacing-2xl);
}

/* Grid de Documentos */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: var(--spacing-lg);
}

/* Tarjetas de Documentos */
.doc-card {
    background: white;
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow: 0 4px 12px var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.doc-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px var(--shadow-md);
}

/* Ribbon de Estado */
.doc-ribbon {
    position: absolute;
    top: 1rem;
    right: -2rem;
    background: #10b981;
    color: white;
    padding: 0.375rem 2.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.doc-ribbon.destacado {
    background: #f59e0b;
}

/* Header del Documento */
.doc-header {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.doc-icono {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-card.estrategico .doc-icono {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.doc-card.organizacion .doc-icono {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

.doc-icono svg {
    width: 36px;
    height: 36px;
    color: white;
}

.doc-info-header {
    flex: 1;
}

.doc-info-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.doc-sigla {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-alt);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.05em;
}

/* Descripción y Detalles */
.doc-descripcion {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    flex: 1;
}

.doc-detalles {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--bg-alt);
    border-radius: 8px;
}

.detalle-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--text);
    font-weight: 500;
}

.detalle-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-lighter);
    flex-shrink: 0;
}

/* Acciones */
.doc-acciones {
    display: flex;
    gap: var(--spacing-xs);
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--border);
}

.btn-doc {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.btn-doc svg {
    width: 18px;
    height: 18px;
}

.btn-doc:not(.secondary) {
    background: var(--primary);
    color: white;
}

.btn-doc:not(.secondary):hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-doc.secondary {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-doc.secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Animación de entrada */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doc-card {
    animation: slideInUp 0.5s ease forwards;
}

.doc-card:nth-child(1) {
    animation-delay: 0s;
}

.doc-card:nth-child(2) {
    animation-delay: 0.1s;
}

.doc-card:nth-child(3) {
    animation-delay: 0.2s;
}

.doc-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* Responsive */
@media (max-width: 992px) {
    .docs-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .section-header-docs {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .header-icon {
        font-size: 2.5rem;
    }
    
    .header-text h2 {
        font-size: 1.875rem;
    }
    
    .header-text p {
        font-size: 1rem;
    }
    
    .docs-grid {
        grid-template-columns: 1fr;
    }
    
    .doc-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .doc-icono {
        width: 80px;
        height: 80px;
    }
    
    .doc-icono svg {
        width: 40px;
        height: 40px;
    }
    
    .doc-acciones {
        flex-direction: column;
    }
    
    .btn-doc {
        width: 100%;
    }
    
    .doc-ribbon {
        font-size: 0.6875rem;
        padding: 0.25rem 2rem;
    }
}

@media (max-width: 480px) {
    .doc-info-header h3 {
        font-size: 1.125rem;
    }
    
    .doc-descripcion {
        font-size: 0.875rem;
    }
}