<section class="features-section">
    <div class="container">
        <div class="row">
            <div class="col-lg-8">
                <a href="<?= base_url('courses') ?>" class="text-secondary mb-3 d-inline-block"><i class="fas fa-arrow-left me-1"></i> Back to Courses</a>
                <h1><?= e($course['title']) ?></h1>
                <p class="text-secondary fs-5"><?= e($course['subtitle']) ?></p>
                <div class="d-flex gap-3 mb-3 flex-wrap">
                    <span class="badge-cix badge-active"><i class="fas fa-clock me-1"></i> <?= $course['duration_hours'] ?> hours</span>
                    <span class="badge-cix badge-pending"><i class="fas fa-signal me-1"></i> <?= e($course['level_name'] ?? 'All Levels') ?></span>
                    <span class="badge-cix badge-submitted"><i class="fas fa-layer-group me-1"></i> <?= count($modules) ?> modules</span>
                </div>
                <div class="card-cix mb-4"><h4>About This Course</h4><div class="text-secondary"><?= $course['description'] ?></div></div>
                <?php if (!empty($modules)): ?>
                <h4 class="mb-3">Course Modules</h4>
                <?php foreach ($modules as $m): ?>
                <div class="card-cix mb-2">
                    <div class="d-flex justify-content-between align-items-center">
                        <div><span class="text-orange fw-bold me-2"><?= $m['sort_order'] ?>.</span> <?= e($m['title']) ?></div>
                        <span class="badge-cix badge-active"><i class="fas fa-check-circle"></i></span>
                    </div>
                    <?php if ($m['description']): ?><p class="text-secondary small mt-1 mb-0"><?= e($m['description']) ?></p><?php endif; ?>
                </div>
                <?php endforeach; endif; ?>
            </div>
            <div class="col-lg-4">
                <div class="card-cix sticky-top" style="top:100px">
                    <h5 class="text-orange mb-2">Ready to Start?</h5>
                    <p class="text-secondary small">Apply now and begin your AI learning journey.</p>
                    <a href="<?= base_url('apply') ?>" class="btn-cix btn-cix-accent w-100 mb-2"><i class="fas fa-rocket me-1"></i> Apply Now</a>
                    <a href="<?= base_url('pricing') ?>" class="btn-cix btn-cix-outline w-100">View Pricing</a>
                </div>
            </div>
        </div>
    </div>
</section>
