/**
 * Estilos del Módulo de Indicadores Sociales
 * Ubicación: /modules/sociales/assets/css/sociales.css
 * 
 * Estilos específicos para el módulo de indicadores sociales
 */

/* ========================================
   VARIABLES Y COLORES
   ======================================== */
:root {
    --social-primary: #2c3e50;
    --social-secondary: #3498db;
    --social-success: #27ae60;
    --social-warning: #f39c12;
    --social-danger: #e74c3c;
    --social-info: #17a2b8;
    --social-light: #ecf0f1;
    --social-dark: #34495e;
    --social-pink: #e91e63;
    --social-purple: #9b59b6;
}

/* ========================================
   HEADER DEL MÓDULO
   ======================================== */
.dashboard-header {
    background: linear-gradient(135deg, #010256ff 0%, #040055ff 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.dashboard-header p {
    font-size: 1rem;
    opacity: 0.9;
}

.dashboard-header .btn-light {
    background-color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dashboard-header .btn-light:hover {
    background-color: var(--social-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ========================================
   SECTION TITLE
   ======================================== */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--social-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--social-secondary);
}

.section-title i {
    margin-right: 0.5rem;
}

/* ========================================
   KPI CARDS
   ======================================== */
.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    border-left: 4px solid transparent;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.kpi-card.border-primary {
    border-left-color: var(--social-primary);
}

.kpi-card.border-secondary {
    border-left-color: var(--social-secondary);
}

.kpi-card.border-success {
    border-left-color: var(--social-success);
}

.kpi-card.border-warning {
    border-left-color: var(--social-warning);
}

.kpi-card.border-danger {
    border-left-color: var(--social-danger);
}

.kpi-card.border-info {
    border-left-color: var(--social-info);
}

.kpi-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.kpi-number.text-primary {
    color: var(--social-primary);
}

.kpi-number.text-secondary {
    color: var(--social-secondary);
}

.kpi-number.text-success {
    color: var(--social-success);
}

.kpi-number.text-warning {
    color: var(--social-warning);
}

.kpi-number.text-danger {
    color: var(--social-danger);
}

.kpi-number.text-info {
    color: var(--social-info);
}

.kpi-card small {
    font-size: 0.875rem;
    line-height: 1.4;
}

.kpi-card i {
    font-size: 1.25rem;
}

/* ========================================
   CHART CONTAINERS
   ======================================== */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: all 0.3s ease;
}

.chart-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.chart-container h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--social-primary);
    margin-bottom: 1rem;
}

.chart-container h5 i {
    margin-right: 0.5rem;
}

.chart-container canvas {
    max-height: 350px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer-responsive {
    background-color: var(--social-dark);
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
}

.footer-responsive a {
    color: var(--social-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-responsive a:hover {
    color: var(--social-info);
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .dashboard-header p {
        font-size: 0.875rem;
    }
    
    .kpi-card {
        margin-bottom: 1rem;
    }
    
    .kpi-number {
        font-size: 1.5rem;
    }
    
    .chart-container {
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kpi-card,
.chart-container {
    animation: fadeIn 0.5s ease-out;
}

/* ========================================
   LOADING STATES
   ======================================== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid var(--social-light);
    border-top-color: var(--social-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--social-light);
}

::-webkit-scrollbar-thumb {
    background: var(--social-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--social-primary);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .dashboard-header .btn-light,
    .footer-responsive {
        display: none;
    }
    
    .chart-container {
        page-break-inside: avoid;
    }
    
    .kpi-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible para navegación con teclado */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--social-secondary);
    outline-offset: 2px;
}

/* ========================================
   UTILIDADES ADICIONALES
   ======================================== */
.text-social-primary {
    color: var(--social-primary) !important;
}

.text-social-secondary {
    color: var(--social-secondary) !important;
}

.bg-social-primary {
    background-color: var(--social-primary) !important;
}

.bg-social-secondary {
    background-color: var(--social-secondary) !important;
}

.border-social-primary {
    border-color: var(--social-primary) !important;
}

.border-social-secondary {
    border-color: var(--social-secondary) !important;
}
