<div class="hero-cix">
    <div class="hero-circuit"></div>
    <div class="container hero-content">
        <h1>Learn. <span class="gradient-text">Build.</span> Automate. <span class="gradient-text">Grow.</span></h1>
        <p>From Beginner to Builder. AI Skills for the New Economy. Join CIX Orbit Academy and master artificial intelligence, prompt engineering, and automation.</p>
        <div class="d-flex justify-content-center gap-3 flex-wrap">
            <a href="<?= base_url('apply') ?>" class="btn-cix btn-cix-accent btn-cix-lg"><i class="fas fa-rocket"></i> Apply Now</a>
            <a href="<?= base_url('courses') ?>" class="btn-cix btn-cix-outline btn-cix-lg"><i class="fas fa-book"></i> View Courses</a>
        </div>
    </div>
</div>
<section class="features-section">
    <div class="container">
        <div class="text-center mb-4">
            <h2>Why <span style="color:var(--secondary)">CIX Orbit</span> Academy?</h2>
            <p class="text-secondary">The most practical AI education platform for the new economy</p>
        </div>
        <div class="row g-4">
            <div class="col-md-3"><div class="card-cix feature-card"><div class="feature-icon"><i class="fas fa-brain"></i></div><h5>AI Skills</h5><p>Master artificial intelligence from basics to advanced applications.</p></div></div>
            <div class="col-md-3"><div class="card-cix feature-card"><div class="feature-icon"><i class="fas fa-laptop-code"></i></div><h5>CBT Assessment</h5><p>Computer-based testing with instant results and certificates.</p></div></div>
            <div class="col-md-3"><div class="card-cix feature-card"><div class="feature-icon"><i class="fas fa-award"></i></div><h5>Certificates</h5><p>Verified certificates with QR code authentication.</p></div></div>
            <div class="col-md-3"><div class="card-cix feature-card"><div class="feature-icon"><i class="fas fa-users"></i></div><h5>Expert Teachers</h5><p>Learn from experienced AI practitioners and educators.</p></div></div>
        </div>
    </div>
</section>
<?php if (!empty($courses)): ?>
<section class="features-section" style="background:var(--surface)">
    <div class="container">
        <div class="text-center mb-4">
            <h2>Featured Courses</h2>
            <p class="text-secondary">Start your AI journey today</p>
        </div>
        <div class="row g-4">
            <?php foreach ($courses as $course): ?>
            <div class="col-md-4">
                <div class="course-card">
                    <div class="course-thumb"><i class="fas fa-brain"></i><span class="course-level"><?= e($course['level_name'] ?? 'Beginner') ?></span></div>
                    <div class="course-body">
                        <h5><?= e($course['title']) ?></h5>
                        <p><?= e(substr($course['subtitle'] ?? '', 0, 100)) ?>...</p>
                        <a href="<?= base_url('course/' . $course['slug']) ?>" class="btn-cix btn-cix-primary btn-cix-sm mt-auto">Learn More <i class="fas fa-arrow-right ms-1"></i></a>
                    </div>
                </div>
            </div>
            <?php endforeach; ?>
        </div>
    </div>
</section>
<?php endif; ?>
<?php if (!empty($packages)): ?>
<section class="features-section">
    <div class="container">
        <div class="text-center mb-4">
            <h2>Course Packages</h2>
            <p class="text-secondary">Choose the plan that fits your learning goals</p>
        </div>
        <div class="row g-4">
            <?php foreach (array_slice($packages, 0, 4) as $pkg): ?>
            <div class="col-md-3">
                <div class="pricing-card">
                    <h5><?= e($pkg['name']) ?></h5>
                    <div class="price">R<?= number_format($pkg['price'], 0) ?><small>/<?= $pkg['duration_days'] > 0 ? round($pkg['duration_days']/30) . ' months' : 'course' ?></small></div>
                    <p class="text-secondary small"><?= e($pkg['description']) ?></p>
                    <a href="<?= base_url('apply') ?>" class="btn-cix btn-cix-primary mt-auto">Apply Now</a>
                </div>
            </div>
            <?php endforeach; ?>
        </div>
        <div class="text-center mt-3">
            <a href="<?= base_url('pricing') ?>" class="btn-cix btn-cix-outline">View All Packages <i class="fas fa-arrow-right ms-1"></i></a>
        </div>
    </div>
</section>
<?php endif; ?>
<section class="features-section" style="background:var(--surface)">
    <div class="container text-center">
        <h2>Ready to Start?</h2>
        <p class="text-secondary mb-3">Join thousands of students building AI skills for the future.</p>
        <a href="<?= base_url('apply') ?>" class="btn-cix btn-cix-accent btn-cix-lg"><i class="fas fa-rocket"></i> Apply Now - It's Free to Start</a>
    </div>
</section>
