 :root {
            --primary: #2c3e50;
            --secondary: #3498db;
            --accent: #e74c3c;
            --light: #ecf0f1;
            --dark: #34495e;
            --success: #2ecc71;
            --warning: #f39c12;
            --info: #1abc9c;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            margin: 0;
            padding: 20px;
            color: var(--dark);
            min-height: 100vh;
        }
        
        .org-chart-container {
            max-width: 1400px;
            margin: 20px auto;
            background: white;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
            padding: 30px;
            position: relative;
            overflow: hidden;
        }
        
        .org-chart-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 10px;
            background: linear-gradient(90deg, var(--accent), var(--secondary), var(--info), var(--success), var(--warning));
        }
        
        h1 {
            text-align: center;
            color: var(--primary);
            margin: 20px 0 40px;
            font-size: 2.2rem;
            position: relative;
            padding-bottom: 15px;
        }
        
        h1::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: 4px;
            background: linear-gradient(90deg, var(--accent), var(--secondary));
            border-radius: 2px;
        }
        
        .org-chart {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        
        .level-0 {
            background: linear-gradient(135deg, var(--primary), var(--dark));
            color: white;
            padding: 20px 40px;
            border-radius: 8px;
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 40px;
            box-shadow: 0 8px 15px rgba(0,0,0,0.2);
            position: relative;
            overflow: hidden;
            z-index: 1;
            transition: transform 0.3s, box-shadow 0.3s;
        }
        
        .level-0:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 20px rgba(0,0,0,0.25);
        }
        
        .level-0::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(
                to bottom right,
                rgba(255,255,255,0.3) 0%,
                rgba(255,255,255,0) 60%
            );
            transform: rotate(30deg);
            z-index: -1;
        }
        
        .level-1-container {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 30px;
            margin-bottom: 40px;
            width: 100%;
        }
        
        .level-1-wrapper {
            flex: 1;
            min-width: 250px;
            max-width: 350px;
        }
        
        .level-1 {
            background: linear-gradient(135deg, var(--secondary), #2980b9);
            color: white;
            padding: 15px 25px;
            border-radius: 8px;
            font-size: 18px;
            font-weight: 500;
            position: relative;
            text-align: center;
            box-shadow: 0 5px 15px rgba(41, 128, 185, 0.3);
            cursor: pointer;
            transition: all 0.3s ease;
            z-index: 1;
            overflow: hidden;
        }
        
        .level-1:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(41, 128, 185, 0.4);
        }
        
        .level-1::after {
            content: '';
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            width: 3px;
            height: 20px;
            background: linear-gradient(to bottom, rgba(149, 165, 166, 0.8), transparent);
        }
        
        .level-1::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                to bottom right,
                rgba(255,255,255,0.2) 0%,
                rgba(255,255,255,0) 60%
            );
            z-index: -1;
        }
        
        /* Colores diferentes para cada programa principal */
        .level-1-wrapper:nth-child(1) .level-1 {
            background: linear-gradient(135deg, #e74c3c, #c0392b);
            box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
        }
        .level-1-wrapper:nth-child(1) .level-1:hover {
            box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
        }
        
        .level-1-wrapper:nth-child(2) .level-1 {
            background: linear-gradient(135deg, #f39c12, #e67e22);
            box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
        }
        .level-1-wrapper:nth-child(2) .level-1:hover {
            box-shadow: 0 8px 20px rgba(243, 156, 18, 0.4);
        }
        
        .level-1-wrapper:nth-child(3) .level-1 {
            background: linear-gradient(135deg, #1abc9c, #16a085);
            box-shadow: 0 5px 15px rgba(26, 188, 156, 0.3);
        }
        .level-1-wrapper:nth-child(3) .level-1:hover {
            box-shadow: 0 8px 20px rgba(26, 188, 156, 0.4);
        }
        
        .level-1-wrapper:nth-child(4) .level-1 {
            background: linear-gradient(135deg, #9b59b6, #8e44ad);
            box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3);
        }
        .level-1-wrapper:nth-child(4) .level-1:hover {
            box-shadow: 0 8px 20px rgba(155, 89, 182, 0.4);
        }
        
        .level-1-wrapper:nth-child(5) .level-1 {
            background: linear-gradient(135deg, #2ecc71, #27ae60);
            box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
        }
        .level-1-wrapper:nth-child(5) .level-1:hover {
            box-shadow: 0 8px 20px rgba(46, 204, 113, 0.4);
        }
        
        .level-2-wrapper {
            text-align: center;
            margin-top: 15px;
        }
        
        .level-2-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 25px;
        }
        
        .level-2 {
            background: white;
            color: var(--dark);
            padding: 12px 15px;
            border-radius: 6px;
            font-size: 14px;
            position: relative;
            box-shadow: 0 3px 10px rgba(0,0,0,0.08);
            border-left: 4px solid var(--secondary);
            transition: all 0.3s ease;
        }
        
        .level-2:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        
        .level-2::after {
            content: '';
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            width: 2px;
            height: 20px;
            background: linear-gradient(to bottom, rgba(149, 165, 166, 0.6), transparent);
        }
        
        /* Bordes izquierdos de diferentes colores según el programa padre */
        .level-1-wrapper:nth-child(1) .level-2 {
            border-left-color: #e74c3c;
        }
        .level-1-wrapper:nth-child(2) .level-2 {
            border-left-color: #f39c12;
        }
        .level-1-wrapper:nth-child(3) .level-2 {
            border-left-color: #1abc9c;
        }
        .level-1-wrapper:nth-child(4) .level-2 {
            border-left-color: #9b59b6;
        }
        .level-1-wrapper:nth-child(5) .level-2 {
            border-left-color: #2ecc71;
        }
        
        .link {
            margin-top: 8px;
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 5px;
        }
        
        .link a {
            color: white;
            text-decoration: none;
            font-size: 12px;
            padding: 4px 10px;
            border-radius: 15px;
            margin: 2px;
            transition: all 0.2s;
            font-weight: 500;
        }
        
        .link a:first-child {
            background-color: var(--secondary);
        }
        
        .link a:last-child {
            background-color: var(--info);
        }
        
        .link a:hover {
            transform: translateY(-2px);
            box-shadow: 0 3px 8px rgba(0,0,0,0.15);
        }
        
        /* Animaciones */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .level-0 {
            animation: fadeIn 0.6s ease-out;
        }
        
        .level-1-wrapper {
            animation: fadeIn 0.6s ease-out forwards;
        }
        
        .level-1-wrapper:nth-child(1) { animation-delay: 0.1s; }
        .level-1-wrapper:nth-child(2) { animation-delay: 0.2s; }
        .level-1-wrapper:nth-child(3) { animation-delay: 0.3s; }
        .level-1-wrapper:nth-child(4) { animation-delay: 0.4s; }
        .level-1-wrapper:nth-child(5) { animation-delay: 0.5s; }
        
        /* Responsive */
        @media (max-width: 1200px) {
            .level-1-container {
                gap: 20px;
            }
        }
        
        @media (max-width: 992px) {
            .level-1-wrapper {
                min-width: 100%;
            }
            
            .level-1 {
                max-width: 400px;
                margin: 0 auto;
            }
            
            .level-2-container {
                grid-template-columns: repeat(3, 1fr);
            }
        }
        
        @media (max-width: 768px) {
            h1 {
                font-size: 1.8rem;
                margin-bottom: 30px;
            }
            
            .org-chart-container {
                padding: 20px;
            }
            
            .level-0 {
                font-size: 20px;
                padding: 15px 30px;
            }
            
            .level-2-container {
                grid-template-columns: repeat(2, 1fr);
            }
        }
        
        @media (max-width: 576px) {
            h1 {
                font-size: 1.5rem;
            }
            
            .level-0 {
                font-size: 18px;
                padding: 12px 20px;
            }
            
            .level-1 {
                font-size: 16px;
                padding: 12px 20px;
            }
            
            .level-2-container {
                grid-template-columns: 1fr;
            }
            
            .level-2 {
                font-size: 13px;
            }
        }
        
        /* Efecto de acordeón para móviles */
        @media (max-width: 768px) {
            .level-2-container {
                max-height: 0;
                overflow: hidden;
                transition: max-height 0.4s ease-out;
                margin-top: 0;
            }
            
            .level-1.active + .level-2-wrapper .level-2-container {
                max-height: 2000px;
                transition: max-height 0.6s ease-in;
                margin-top: 25px;
            }
            
            .level-1::after {
                content: '+';
                top: 50%;
                left: auto;
                right: 15px;
                transform: translateY(-50%);
                width: auto;
                height: auto;
                background: transparent;
                font-size: 20px;
                font-weight: bold;
            }
            
            .level-1.active::after {
                content: '-';
            }
        }