/* ================================
   LA LUPA - MODERN REDESIGN 2025
   Clean, Professional, Engaging
   ================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ================================
   CSS VARIABLES
   ================================ */
:root {
    /* Primary Colors */
    --primary: #1a1f36;
    --primary-light: #2d3555;
    --secondary: #6366f1;
    --secondary-light: #818cf8;
    --accent: #f43f5e;
    --accent-light: #fb7185;

    /* Status Colors */
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --danger: #ef4444;

    /* Neutrals */
    --background: #f8fafc;
    --background-alt: #f1f5f9;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --gradient-dark: linear-gradient(135deg, #1a1f36 0%, #2d3555 100%);
    --gradient-hero: linear-gradient(135deg, #1a1f36 0%, #312e81 50%, #4c1d95 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);

    /* Effects */
    --blur: blur(10px);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ================================
   RESET & BASE
   ================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }
}

/* ================================
   HEADER
   ================================ */
.header {
    background: var(--gradient-hero);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
    backdrop-filter: var(--blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

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

.header-content {
    text-align: center;
    padding: 32px 0 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: var(--blur);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.logo-icon i {
    font-size: 1.75rem;
    color: white;
}

.logo:hover .logo-icon {
    transform: rotate(-10deg) scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Navigation */
.nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 0 20px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-link i {
    font-size: 0.85rem;
}

/* Special Nav Buttons */
.btn-sugerir {
    background: var(--gradient-accent) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}

.btn-sugerir:hover {
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
    transform: translateY(-3px) !important;
}

.btn-medios {
    background: var(--gradient-secondary) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-medios:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-violencia {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.btn-violencia:hover {
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

/* ================================
   MAIN CONTENT
   ================================ */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 300px);
}

/* ================================
   STATS SECTION
   ================================ */
.stats-section {
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px 16px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card i {
    font-size: 1.5rem;
    margin-bottom: 12px;
    display: block;
    color: var(--secondary);
    transition: var(--transition);
}

.stat-card:hover i {
    transform: scale(1.15);
    color: var(--secondary-light);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    display: block;
    color: var(--primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Colored stat cards */
.stat-card[data-category="mentiras"] i { color: #ef4444; }
.stat-card[data-category="corrupcion"] i { color: #f59e0b; }
.stat-card[data-category="nepotismo"] i { color: #8b5cf6; }
.stat-card[data-category="contratos"] i { color: #06b6d4; }
.stat-card[data-category="conflicto-interes"] i { color: #ec4899; }
.stat-card[data-category="recursos-publicos"] i { color: #14b8a6; }

/* ================================
   FILTERS SECTION
   ================================ */
.filters-section {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius-xl);
    margin-bottom: 32px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-box input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--background);
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-box input:focus + i,
.search-box:focus-within i {
    color: var(--secondary);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--background);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

.filter-group select:hover {
    border-color: var(--secondary-light);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* ================================
   CASOS SECTION
   ================================ */
.casos-section {
    margin-bottom: 48px;
}

.casos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.casos-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.casos-header h2 i {
    color: var(--secondary);
}

.casos-count {
    background: var(--gradient-secondary);
    color: white;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.casos-grid {
    display: grid;
    gap: 20px;
}

/* ================================
   CASO CARD
   ================================ */
.caso-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border-light);
    position: relative;
}

.caso-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-secondary);
    opacity: 0;
    transition: var(--transition);
}

.caso-card:hover {
    transform: translateY(-4px) translateX(2px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.caso-card:hover::before {
    opacity: 1;
}

.caso-card-header {
    padding: 20px 24px 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.caso-categoria {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Category Colors */
.caso-categoria.mentiras { background: linear-gradient(135deg, #ef4444, #dc2626); }
.caso-categoria.corrupcion { background: linear-gradient(135deg, #f59e0b, #d97706); }
.caso-categoria.nepotismo { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.caso-categoria.contratos { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.caso-categoria.conflicto-interes { background: linear-gradient(135deg, #ec4899, #db2777); }
.caso-categoria.recursos-publicos { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.caso-categoria.abuso-poder { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.caso-categoria.diplomaticos { background: linear-gradient(135deg, #a855f7, #9333ea); }
.caso-categoria.sanciones { background: linear-gradient(135deg, #f43f5e, #e11d48); }

.caso-fecha {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.caso-fecha i {
    font-size: 0.8rem;
}

.caso-card-body {
    padding: 0 24px 20px;
}

.caso-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary);
    line-height: 1.4;
    transition: var(--transition);
}

.caso-card:hover .caso-titulo {
    color: var(--secondary);
}

.caso-descripcion {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.caso-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.caso-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.caso-meta-item i {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.caso-gravedad {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.caso-gravedad.alta {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    border: 1px solid #fecaca;
}
.caso-gravedad.media {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #d97706;
    border: 1px solid #fde68a;
}
.caso-gravedad.baja {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.caso-estado {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.caso-estado.comprobado {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #059669;
    border: 1px solid #a7f3d0;
}
.caso-estado.investigacion {
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    color: #ca8a04;
    border: 1px solid #fef08a;
}
.caso-estado.desmentido {
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
    color: #db2777;
    border: 1px solid #fbcfe8;
}

/* ================================
   NO RESULTS
   ================================ */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
    color: var(--secondary);
}

.no-results p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* ================================
   TEMAS DE INTERES SECTION
   ================================ */
.temas-section {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 2px solid var(--border);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    color: var(--warning);
    font-size: 1.75rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.temas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
}

@media (max-width: 480px) {
    .temas-grid {
        grid-template-columns: 1fr;
    }
}

/* Tema Card */
.tema-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.tema-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.tema-card-wide {
    grid-column: 1 / -1;
}

.tema-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--gradient-dark);
    color: white;
}

.tema-header.institucionalidad {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

.tema-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: var(--blur);
}

.tema-icon.salario { background: var(--gradient-success); }
.tema-icon.gasolina { background: var(--gradient-warning); }
.tema-icon.dolar { background: linear-gradient(135deg, #10b981, #059669); }
.tema-icon.institucionalidad { background: rgba(255, 255, 255, 0.25); }

.tema-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.tema-content {
    padding: 28px;
}

.tema-pregunta {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
    line-height: 1.5;
}

.tema-datos {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.dato-item {
    background: var(--background);
    padding: 16px 20px;
    border-radius: var(--radius);
    flex: 1;
    min-width: 140px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.dato-item:hover {
    border-color: var(--secondary-light);
}

.dato-item.highlight {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.dato-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dato-item.highlight .dato-label {
    color: rgba(255, 255, 255, 0.8);
}

.dato-valor {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.dato-item.highlight .dato-valor {
    color: white;
}

/* Analysis Sections */
.tema-analisis {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.analisis-seccion {
    padding: 20px;
    border-radius: var(--radius);
    background: var(--background);
    border: 1px solid var(--border-light);
}

.analisis-seccion h4 {
    font-size: 1rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.analisis-seccion.beneficios h4 { color: var(--success); }
.analisis-seccion.perjuicios h4 { color: var(--danger); }
.analisis-seccion.contexto h4 { color: var(--secondary); }
.analisis-seccion.destino h4 { color: var(--warning); }
.analisis-seccion.impacto h4 { color: #8b5cf6; }
.analisis-seccion.criticas h4 { color: var(--accent); }

.analisis-seccion ul {
    padding-left: 20px;
    margin: 0;
}

.analisis-seccion li {
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.6;
}

.analisis-seccion li:last-child {
    margin-bottom: 0;
}

.analisis-seccion p {
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.7;
}

.analisis-seccion p:last-child {
    margin-bottom: 0;
}

/* FEPC Table */
.fepc-tabla {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.fepc-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    align-items: center;
}

.fepc-row:last-child {
    border-bottom: none;
}

.fepc-row.header {
    background: var(--gradient-dark);
    color: white;
    font-weight: 700;
}

.fepc-row.destacado {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    font-weight: 700;
}

.fepc-row .positivo {
    color: var(--success);
    font-weight: 700;
}

/* Promesas */
.promesa-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.promesa-item:last-of-type {
    margin-bottom: 0;
}

.promesa-item.incumplida {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fecaca;
}

.promesa-item.incumplida > i {
    color: var(--danger);
    font-size: 1.2rem;
    margin-top: 2px;
}

.promesa-item div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.promesa-item strong {
    color: var(--text);
    font-weight: 600;
}

.promesa-item span {
    font-size: 0.85rem;
    color: #dc2626;
}

/* Control Grid */
.institucionalidad-section {
    margin-bottom: 28px;
}

.institucionalidad-section > h4 {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.control-item {
    background: white;
    padding: 18px;
    border-radius: var(--radius);
    border-left: 4px solid var(--secondary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.control-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.control-item strong {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.control-item strong i {
    color: var(--secondary);
}

.control-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Alert Box */
.alerta-institucional {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 2px solid var(--danger);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.alerta-institucional > i {
    font-size: 1.5rem;
    color: var(--danger);
    flex-shrink: 0;
}

.alerta-institucional p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Reform Balance */
.reforma-balance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.reforma-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
}

.reforma-item:hover {
    transform: translateX(4px);
}

.reforma-item.aprobada {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.reforma-item.aprobada i {
    color: var(--success);
}

.reforma-item.hundida {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.reforma-item.hundida i {
    color: var(--danger);
}

.reforma-item small {
    font-weight: 500;
    opacity: 0.8;
}

/* Tema Fuentes */
.tema-fuentes {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

.tema-fuentes h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tema-fuentes a {
    color: var(--secondary);
    text-decoration: none;
    margin-right: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.tema-fuentes a:hover {
    color: var(--secondary-light);
    text-decoration: underline;
}

/* ================================
   MODALS
   ================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: var(--blur);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s var(--transition);
    box-shadow: var(--shadow-xl);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--background);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
}

.modal-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.modal-header .caso-categoria {
    margin-bottom: 16px;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.modal-header .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-section {
    margin-bottom: 28px;
}

.modal-section h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.modal-section p {
    line-height: 1.8;
    color: var(--text);
}

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

.fuentes-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.fuentes-list li:last-child {
    border-bottom: none;
}

.fuentes-list a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.fuentes-list a:hover {
    color: var(--secondary-light);
    text-decoration: underline;
}

.fuentes-list .fuente-fecha {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 12px;
}

.personas-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.persona-tag {
    background: var(--background);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.persona-tag:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* ================================
   MEDIOS MODAL
   ================================ */
.modal-medios {
    max-width: 1000px;
}

.medios-header {
    margin-bottom: 28px;
    text-align: center;
}

.medios-header h2 {
    font-size: 1.75rem;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.medios-header h2 i {
    color: var(--secondary);
}

.medios-disclaimer {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid var(--success);
    border-radius: var(--radius);
    padding: 18px 24px;
    font-size: 0.9rem;
    color: #065f46;
    text-align: left;
    line-height: 1.6;
}

.medios-disclaimer i {
    color: var(--success);
    margin-right: 8px;
}

.medios-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.medios-stat-card {
    background: var(--background);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.medios-stat-card:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.medios-stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.medios-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

.medios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 8px;
}

.medio-card {
    background: var(--background);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 16px;
    transition: var(--transition);
    border-left: 4px solid var(--secondary);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--secondary);
}

.medio-card:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow);
    background: white;
}

.medio-card.internacional { border-left-color: #8b5cf6; }
.medio-card.verificador { border-left-color: var(--success); }
.medio-card.oficial { border-left-color: var(--danger); }

.medio-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--secondary);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.medio-card.internacional .medio-icon { color: #8b5cf6; }
.medio-card.verificador .medio-icon { color: var(--success); }
.medio-card.oficial .medio-icon { color: var(--danger); }

.medio-info {
    flex: 1;
}

.medio-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text);
}

.medio-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.medio-count {
    background: var(--gradient-secondary);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.medio-card.internacional .medio-count { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.medio-card.verificador .medio-count { background: var(--gradient-success); }
.medio-card.oficial .medio-count { background: var(--gradient-accent); }

.medios-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.legend-color.nacional { background: var(--secondary); }
.legend-color.internacional { background: #8b5cf6; }
.legend-color.verificador { background: var(--success); }
.legend-color.oficial { background: var(--danger); }

/* ================================
   VIOLENCIA MODAL
   ================================ */
.modal-violencia {
    max-width: 1000px;
}

.violencia-header {
    text-align: center;
    margin-bottom: 32px;
}

.violencia-header h2 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 800;
}

.violencia-header h2 i {
    color: var(--danger);
    margin-right: 12px;
}

.violencia-periodo {
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 16px;
    font-size: 1rem;
}

.violencia-disclaimer {
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: #854d0e;
    border: 1px solid #fef08a;
}

.violencia-disclaimer i {
    margin-right: 10px;
}

.violencia-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.violencia-stat-card {
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.violencia-stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.violencia-stat-card.masacres { border-left: 4px solid #dc2626; }
.violencia-stat-card.desplazamiento { border-left: 4px solid #f59e0b; }
.violencia-stat-card.lideres { border-left: 4px solid #8b5cf6; }
.violencia-stat-card.secuestros { border-left: 4px solid #2563eb; }
.violencia-stat-card.reclutamiento { border-left: 4px solid #14b8a6; }
.violencia-stat-card.homicidios { border-left: 4px solid #374151; }

.violencia-stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: white;
}

.violencia-stat-card.masacres .stat-icon { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.violencia-stat-card.desplazamiento .stat-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.violencia-stat-card.lideres .stat-icon { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.violencia-stat-card.secuestros .stat-icon { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.violencia-stat-card.reclutamiento .stat-icon { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.violencia-stat-card.homicidios .stat-icon { background: linear-gradient(135deg, #374151, #1f2937); }

.violencia-stat-card .stat-info {
    margin-bottom: 16px;
}

.violencia-stat-card .stat-number {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.violencia-stat-card .stat-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 6px;
}

.violencia-stat-card .stat-detail {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-breakdown {
    background: white;
    padding: 14px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.stat-breakdown p {
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text);
    line-height: 1.5;
}

.stat-breakdown p:last-child {
    margin-bottom: 0;
}

.stat-source {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.violencia-contexto {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.violencia-contexto h3 {
    color: var(--danger);
    font-size: 1.15rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.violencia-contexto h3 i {
    margin-right: 10px;
}

.violencia-contexto p {
    margin-bottom: 16px;
    color: var(--text);
    line-height: 1.7;
}

.violencia-contexto ul {
    padding-left: 20px;
}

.violencia-contexto li {
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.5;
}

.violencia-fuentes {
    text-align: center;
    padding-top: 24px;
    border-top: 2px solid var(--border);
}

.violencia-fuentes h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.fuentes-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.fuentes-lista a {
    background: var(--background);
    padding: 10px 18px;
    border-radius: var(--radius-full);
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.fuentes-lista a:hover {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.fuentes-lista a i {
    margin-right: 6px;
}

/* ================================
   FOOTER
   ================================ */
.footer {
    background: var(--gradient-dark);
    color: white;
    padding: 48px 0 32px;
    margin-top: 64px;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-info {
    flex: 1;
    min-width: 300px;
}

.footer-info p {
    margin-bottom: 12px;
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    font-weight: 500;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

.footer-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.9rem;
    opacity: 0.7;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animate elements on load */
.stat-card,
.caso-card,
.tema-card {
    animation: fadeInUp 0.5s ease-out forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }
.stat-card:nth-child(5) { animation-delay: 0.3s; }
.stat-card:nth-child(6) { animation-delay: 0.35s; }

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 1024px) {
    .temas-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 24px 0 16px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo-icon {
        width: 48px;
        height: 48px;
    }

    .logo-icon i {
        font-size: 1.5rem;
    }

    .nav {
        gap: 6px;
        padding-bottom: 16px;
    }

    .nav-link {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px 12px;
    }

    .stat-card .stat-number {
        font-size: 1.5rem;
    }

    .stat-card .stat-label {
        font-size: 0.7rem;
    }

    .filters-section {
        padding: 20px;
    }

    .filters {
        grid-template-columns: 1fr 1fr;
    }

    .casos-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .casos-header h2 {
        font-size: 1.25rem;
    }

    .caso-card-header {
        flex-direction: column;
        gap: 12px;
        padding: 16px 20px 10px;
    }

    .caso-card-body {
        padding: 0 20px 16px;
    }

    .modal-body {
        padding: 24px;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .tema-content {
        padding: 20px;
    }

    .tema-datos {
        flex-direction: column;
    }

    .dato-item {
        min-width: auto;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
    }

    .footer-info {
        min-width: auto;
    }

    .violencia-stats-grid {
        grid-template-columns: 1fr;
    }

    .control-grid {
        grid-template-columns: 1fr;
    }

    .reforma-balance {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .nav-link span {
        display: none;
    }

    .caso-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .medios-grid {
        grid-template-columns: 1fr;
    }

    .fepc-row {
        font-size: 0.8rem;
        padding: 10px 12px;
    }

    .fuentes-lista {
        flex-direction: column;
        align-items: center;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
    border: 2px solid var(--background);
}

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

/* ================================
   SELECTION
   ================================ */
::selection {
    background: var(--secondary);
    color: white;
}

/* ================================
   FOCUS STATES
   ================================ */
:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* ================================
   PRINT STYLES
   ================================ */
@media print {
    .header,
    .footer,
    .nav,
    .filters-section {
        display: none;
    }

    .caso-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
