
    // =========================================================================
    // COURSE 1 — Professional Certificate in Health Project Management
    // =========================================================================
    private function seedCourse1(): void
    {
        $cat = CourseCategory::where('slug','health-management')->first();
        $c = $this->course([
            'title'          => 'Professional Certificate in Health Project Management',
            'category_id'    => $cat?->id,
            'fee_amount'     => 12000.00,
            'duration_hours' => 45,
            'description'    => 'This professional certificate equips health professionals with practical skills to plan, implement, monitor, and evaluate health projects in South Sudan and similar resource-limited settings.',
            'objectives'     => "Upon completion, participants will be able to:\n- Apply the project management cycle to health interventions\n- Develop comprehensive project proposals and logical frameworks\n- Manage project budgets, timelines, and human resources\n- Conduct monitoring, evaluation, and learning (MEL) activities\n- Write professional project reports for donors and stakeholders\n- Apply risk management principles to health projects",
            'prerequisites'  => 'At least one year of experience in the health sector. Basic computer literacy required.',
        ]);

        // Topic 1
        $t1 = $this->topic($c,'Foundations of Health Project Management','Introduction to project management concepts and frameworks.',1);
        $this->sub($t1,'What is a Health Project?','<h2>Defining Health Projects</h2><p>A health project is a time-bound, goal-oriented set of activities designed to achieve specific health outcomes within defined resources.</p><h3>Key Characteristics</h3><ul><li><strong>Defined objectives:</strong> Specific, measurable health outcomes</li><li><strong>Time-bound:</strong> Clear start and end dates</li><li><strong>Resource-constrained:</strong> Fixed budget and human resources</li></ul><h3>The Project Management Triangle</h3><p>Every project operates within three constraints: <strong>Scope</strong>, <strong>Time</strong>, and <strong>Cost</strong>. Changing one constraint affects the others.</p>',1);
        $this->sub($t1,'The Project Management Cycle','<h2>The Project Management Cycle (PMC)</h2><p>The PMC provides a structured approach from conception to closure:</p><ol><li><strong>Initiation:</strong> Problem analysis, stakeholder identification, project charter</li><li><strong>Planning:</strong> Logframe, schedule, budget, risk plan</li><li><strong>Implementation:</strong> Execute activities, manage teams and resources</li><li><strong>Monitoring and Evaluation:</strong> Track progress, collect data, report</li><li><strong>Closure:</strong> Final reports, lessons learned, resource release</li></ol>',2);
        $this->sub($t1,'Stakeholder Analysis and Engagement','<h2>Understanding Stakeholders</h2><p>Stakeholders are individuals or organisations affected by a project. Effective stakeholder management is critical to success.</p><h3>Stakeholder Analysis Matrix</h3><ul><li><strong>High influence, high interest:</strong> Manage closely</li><li><strong>High influence, low interest:</strong> Keep satisfied</li><li><strong>Low influence, high interest:</strong> Keep informed</li><li><strong>Low influence, low interest:</strong> Monitor</li></ul>',3);

        // Topic 2
        $t2 = $this->topic($c,'Project Planning and Logical Framework','Developing comprehensive project plans using logical frameworks.',2);
        $this->sub($t2,'Problem Analysis and Needs Assessment','<h2>Problem Analysis</h2><p>Before designing a project, conduct a thorough problem analysis to understand root causes.</p><h3>Problem Tree Analysis</h3><p>The problem tree maps causes and effects. The trunk is the core problem, roots are causes, branches are effects.</p><h3>Needs Assessment Methods</h3><ul><li>Household surveys</li><li>Focus group discussions</li><li>Key informant interviews</li><li>Facility assessments</li><li>HMIS data review</li></ul>',1);
        $this->sub($t2,'Developing the Logical Framework','<h2>The Logical Framework (Logframe)</h2><p>The logframe is the cornerstone of health project planning, showing the logical relationship between inputs, activities, outputs, outcomes, and impact.</p><h3>SMART Indicators</h3><p>Each logframe level requires SMART indicators: <strong>S</strong>pecific, <strong>M</strong>easurable, <strong>A</strong>chievable, <strong>R</strong>elevant, <strong>T</strong>ime-bound.</p>',2);
        $this->sub($t2,'Work Breakdown Structure and Gantt Charts','<h2>Work Breakdown Structure (WBS)</h2><p>The WBS decomposes project scope into manageable work packages, providing the foundation for scheduling and budgeting.</p><h3>Gantt Charts</h3><p>A Gantt chart shows project activities against time. Key elements include activity names, timeline, duration bars, dependencies, and milestones.</p><h3>Critical Path Method</h3><p>The critical path is the longest sequence of dependent activities. Delays on the critical path delay the entire project.</p>',3);

        // Topic 3
        $t3 = $this->topic($c,'Budget Management and Financial Reporting','Planning, managing, and reporting on project finances.',3);
        $this->sub($t3,'Health Project Budgeting','<h2>Principles of Health Project Budgeting</h2><p>A project budget estimates costs of all activities and serves as the financial baseline.</p><h3>Budget Categories</h3><ul><li>Personnel costs</li><li>Consultancy fees</li><li>Travel and transport</li><li>Supplies and equipment</li><li>Training costs</li><li>Indirect costs/overheads</li></ul><h3>Budget Preparation Steps</h3><ol><li>Review the workplan</li><li>Estimate costs using market rates</li><li>Apply unit costs to quantities</li><li>Add contingency (5-10%)</li><li>Validate with finance team</li></ol>',1);
        $this->sub($t3,'Financial Monitoring and Variance Analysis','<h2>Financial Monitoring</h2><p>Financial monitoring tracks actual expenditure against the approved budget.</p><h3>Types of Variance</h3><ul><li><strong>Favourable variance:</strong> Actual spending less than budgeted</li><li><strong>Adverse variance:</strong> Actual spending exceeds budget</li></ul><h3>Burn Rate Formula</h3><p>Burn Rate = (Actual Expenditure / Budget) x 100</p>',2);

        // Topic 4
        $t4 = $this->topic($c,'Monitoring, Evaluation, and Learning (MEL)','Designing and implementing MEL systems for health projects.',4);
        $this->sub($t4,'MEL Framework Design','<h2>Monitoring, Evaluation, and Learning</h2><p>MEL is a systematic process for tracking progress, assessing effectiveness, and generating learning.</p><h3>Key Components</h3><ul><li><strong>Theory of Change:</strong> Causal logic linking activities to outcomes</li><li><strong>Results Framework:</strong> Hierarchy from outputs to impact</li><li><strong>Indicator Reference Sheets:</strong> Detailed indicator definitions</li><li><strong>Data Collection Plan:</strong> Who collects what, when, and how</li></ul>',1);
        $this->sub($t4,'Data Collection Methods','<h2>Data Collection in MEL</h2><h3>Quantitative Methods</h3><ul><li>Surveys</li><li>Facility records review</li><li>Observation checklists</li></ul><h3>Qualitative Methods</h3><ul><li>Focus Group Discussions (FGDs)</li><li>Key Informant Interviews (KIIs)</li><li>Case studies</li></ul><h3>Digital Tools</h3><p>KoBoToolbox, ODK, and CommCare are widely used in South Sudan health projects for mobile data collection.</p>',2);
        $this->sub($t4,'Report Writing for Health Projects','<h2>Professional Report Writing</h2><h3>Types of Reports</h3><ul><li>Progress reports (monthly/quarterly)</li><li>Annual reports</li><li>Evaluation reports</li><li>Financial reports</li></ul><h3>Standard Report Structure</h3><ol><li>Executive Summary</li><li>Project Background</li><li>Progress Against Activities</li><li>Results Against Indicators</li><li>Challenges and Lessons Learned</li><li>Financial Summary</li><li>Plans for Next Period</li></ol>',3);

        // Topic 5
        $t5 = $this->topic($c,'Risk Management and Project Closure','Identifying risks and closing projects professionally.',5);
        $this->sub($t5,'Risk Identification and Assessment','<h2>Risk Management</h2><p>Risk management identifies, assesses, and responds to events that could affect project success.</p><h3>Risk Assessment Matrix</h3><ul><li><strong>High likelihood + High impact = Critical risk</strong></li><li><strong>High likelihood + Low impact = Moderate risk</strong></li><li><strong>Low likelihood + High impact = Significant risk</strong></li><li><strong>Low likelihood + Low impact = Low risk</strong></li></ul>',1);
        $this->sub($t5,'Project Closure and Lessons Learned','<h2>Closing a Health Project</h2><h3>Closure Activities</h3><ul><li>Complete remaining activities</li><li>Conduct final evaluation</li><li>Submit financial reports</li><li>Hand over assets to government or community</li><li>Archive project documents</li></ul><h3>Lessons Learned</h3><p>Document what worked well, what did not work, and recommendations for future projects.</p>',2);

        // Exam questions
        $this->q($c,'Which phase of the project management cycle involves developing the logical framework?','Initiation','Planning','Implementation','Closure','B','The logframe is developed during the Planning phase.',1);
        $this->q($c,'What does SMART stand for in project indicators?','Simple, Manageable, Achievable, Realistic, Timely','Specific, Measurable, Achievable, Relevant, Time-bound','Strategic, Meaningful, Actionable, Reliable, Trackable','Systematic, Monitored, Assessed, Reviewed, Tested','B','SMART indicators are Specific, Measurable, Achievable, Relevant, and Time-bound.',2);
        $this->q($c,'How should you engage stakeholders with high influence but low interest?','Manage closely','Keep satisfied','Keep informed','Monitor with minimal engagement','B','High influence, low interest stakeholders should be kept satisfied through regular updates.',3);
        $this->q($c,'What is the critical path in project management?','The most expensive sequence of activities','The longest sequence of dependent activities determining minimum project duration','The sequence with the highest risk','The first activities to be completed','B','The critical path is the longest sequence of dependent activities. Delays on it delay the entire project.',4);
        $this->q($c,'What is the burn rate formula?','(Budget / Actual Expenditure) x 100','(Actual Expenditure / Budget) x 100','(Budget - Actual Expenditure) / Budget','(Actual Expenditure - Budget) / Time','B','Burn Rate = (Actual Expenditure / Budget) x 100.',5);
        $this->q($c,'What is the primary difference between monitoring and evaluation?','Monitoring is external; evaluation is internal','Monitoring is continuous tracking; evaluation is periodic in-depth assessment','Monitoring focuses on outcomes; evaluation on outputs','Monitoring is qualitative; evaluation is quantitative','B','Monitoring continuously tracks progress; evaluation periodically assesses effectiveness and impact.',6);
        $this->q($c,'Which tool decomposes project scope into manageable work packages?','Gantt chart','Risk register','Work Breakdown Structure (WBS)','Logical framework','C','The WBS decomposes project scope into manageable work packages.',7);
        $this->q($c,'In a problem tree, what do the roots represent?','Effects of the problem','The central problem','Causes of the problem','Project objectives','C','Roots represent causes of the central problem; branches represent effects.',8);
        $this->q($c,'What is the recommended contingency percentage for a health project budget?','1-2%','5-10%','20-25%','30-40%','B','A contingency of 5-10% is typically added to health project budgets.',9);
        $this->q($c,'Which digital data collection tool is commonly used in South Sudan health projects?','Microsoft Access','KoBoToolbox','SPSS','Tableau','B','KoBoToolbox is widely used in humanitarian and health settings including South Sudan.',10);
        $this->q($c,'What is the purpose of a risk register?','To record project expenditure','To document identified risks, their likelihood, impact, and responses','To track stakeholder engagement','To record project milestones','B','A risk register documents all identified risks, their likelihood, impact, and planned responses.',11);
        $this->q($c,'Which logframe level represents the long-term development objective?','Output','Activity','Purpose/Outcome','Goal/Impact','D','The Goal/Impact level represents the long-term development objective.',12);
        $this->q($c,'What should a lessons learned session capture?','Only successes','What worked well, what did not work, and recommendations','Financial details only','Staff performance evaluations','B','Lessons learned sessions capture successes, failures, and recommendations for future projects.',13);
        $this->q($c,'What is the primary purpose of a Theory of Change?','To calculate the project budget','To describe the causal logic linking activities to outcomes','To identify project risks','To assign responsibilities','B','The Theory of Change describes how project activities are expected to lead to desired outcomes.',14);
        $this->q($c,'What type of variance occurs when actual spending exceeds the budget?','Favourable variance','Neutral variance','Adverse variance','Positive variance','C','An adverse variance occurs when actual spending exceeds the budgeted amount.',15);
        $this->q($c,'Which report provides a comprehensive review of a full year of project activities?','Progress report','Annual report','Evaluation report','Inception report','B','Annual reports provide a comprehensive review of the year\'s achievements and challenges.',16);
        $this->q($c,'What are the three constraints of the project management triangle?','Quality, Risk, and Communication','Scope, Time, and Cost','Planning, Implementation, and Evaluation','Inputs, Outputs, and Outcomes','B','The project management triangle consists of Scope, Time, and Cost.',17);
        $this->q($c,'Which is a qualitative data collection method used in health project MEL?','Household survey','HMIS data review','Focus Group Discussion','Observation checklist','C','Focus Group Discussions (FGDs) are qualitative methods involving group discussions.',18);
        $this->q($c,'What is the logframe level that represents direct results of project activities?','Goal/Impact','Purpose/Outcome','Outputs','Inputs','C','Outputs are the direct results of project activities.',19);
        $this->q($c,'Which stakeholder engagement strategy applies to low influence, low interest stakeholders?','Manage closely','Keep satisfied','Keep informed','Monitor with minimal engagement','D','Low influence, low interest stakeholders require minimal engagement.',20);
    }
