@vite(['resources/css/app.css', 'resources/js/app.js'])
@include('partials.header-upgrad')
{{-- Flash Messages --}} @if(session('error'))

{{ session('error') }}

@endif @if(session('message'))

{{ session('message') }}

@endif {{-- Hero Section --}}
{{-- Left: Content --}}
{{ $course->category->name ?? 'Course' }} @if($course->type === 'free') Free @else Premium @endif @if($course->is_featured) Featured @endif

{{ $course->title }}

{{ $course->description }}

{{-- Key Stats --}}
{{ $course->total_lessons }} Lessons
@if($course->total_duration)
{{ round($course->total_duration/60) }} Hours
@endif @if($course->level)
{{ ucfirst($course->level) }}
@endif
{{-- CTA Buttons --}}
@if($enrolled) Continue Learning @else
@csrf
@endif @if($course->demo_video_url) Watch Demo @endif
{{-- Trust Indicators --}}
Certificate Included
Lifetime Access
{{-- Right: Visual --}}
@if($course->thumbnail) {{ $course->title }} @else
@endif
{{-- Key Highlights Section --}}
{{-- Highlight Card 1: Dual Architecture --}}

Comprehensive Learning Path

{{-- Highlight Card 2: Production First --}}

Hands-on Projects - Every module ends with practical application

{{-- Highlight Card 3: Depth Learning --}}

In-Depth Content - Learn concepts step-by-step with real-world examples

{{-- Highlight Card 4: Multiple Domains --}}

Industry-Relevant Skills - Build expertise across multiple domains and use cases

{{-- Highlight Card 5: Certification --}}

Earn Professional Certification - Industry-recognized certificate upon completion

{{-- Highlight Card 6: Tools & Resources --}}

Modern Tools & Resources - Access to industry-standard tools and platforms

{{-- Course Title with Red Accent --}}

{{ $course->title }}: Build What's Next

{{-- Statistics --}}

{{ $course->total_duration ? round($course->total_duration / 60) : '100' }}+

Hours of Learning

{{ max(1, ceil($course->lessons->count() / 4)) }}+

Projects

{{ $course->total_lessons }}+

Lessons

{{-- Course Navigation Tabs --}}
@if($course->syllabus) @endif @if(!$enrolled)
@csrf
@endif
{{-- Curriculum Section with Accordion --}}

{{ $course->title }} Curriculum

@if($course->syllabus)

{{ \Illuminate\Support\Str::limit($course->syllabus, 150) }}

@endif @php // Group lessons into modules intelligently (same logic as learning page) $lessons = $course->lessons->sortBy('sort_order'); $modules = []; if ($lessons->count() > 0) { $lessonsPerModule = max(4, min(6, ceil($lessons->count() / max(4, floor($lessons->count() / 6))))); $moduleIndex = 0; $currentModuleLessons = []; foreach ($lessons as $index => $l) { // Check if this lesson starts a new section $shouldStartNewModule = empty($currentModuleLessons) || count($currentModuleLessons) >= $lessonsPerModule || (str_contains(strtolower($l->title), 'section') || str_contains(strtolower($l->title), 'module') || str_contains(strtolower($l->title), 'project') || str_contains(strtolower($l->title), 'deployment')); if ($shouldStartNewModule && !empty($currentModuleLessons)) { $moduleIndex++; $firstLessonTitle = $currentModuleLessons[0]->title; $moduleTitle = $firstLessonTitle; if (preg_match('/^(Section \d+|Module \d+)[:\-]?\s*(.+)$/i', $firstLessonTitle, $matches)) { $moduleTitle = trim($matches[1] . ': ' . $matches[2]); } elseif (strlen($firstLessonTitle) > 40) { $moduleTitle = 'Section ' . $moduleIndex . ': ' . substr($firstLessonTitle, 0, 30) . '...'; } else { $moduleTitle = 'Section ' . $moduleIndex . ': ' . $firstLessonTitle; } $modules[] = [ 'number' => $moduleIndex, 'title' => $moduleTitle, 'lessons' => $currentModuleLessons, 'weeks' => max(1, ceil(count($currentModuleLessons) / 2)), ]; $currentModuleLessons = []; } $currentModuleLessons[] = $l; } // Add remaining lessons if (!empty($currentModuleLessons)) { $moduleIndex++; $firstLessonTitle = $currentModuleLessons[0]->title; $moduleTitle = strlen($firstLessonTitle) > 40 ? 'Section ' . $moduleIndex . ': ' . substr($firstLessonTitle, 0, 30) . '...' : 'Section ' . $moduleIndex . ': ' . $firstLessonTitle; $modules[] = [ 'number' => $moduleIndex, 'title' => $moduleTitle, 'lessons' => $currentModuleLessons, 'weeks' => max(1, ceil(count($currentModuleLessons) / 2)), ]; } } @endphp
{{-- Timeline line --}}
@foreach($modules as $module)
{{-- Timeline dot --}} {{-- Module Header --}} {{-- Module Content (Accordion) --}}
@if($module['lessons'][0]->description ?? null)

{{ $module['lessons'][0]->description }}

@endif
{{-- Key Topics (Left Column) --}}

Key Topics

    @foreach($module['lessons'] as $lesson)
  • {{ $lesson->title }} @if($lesson->duration) ({{ $lesson->duration }} min) @endif
  • @endforeach
{{-- Sample Projects (Right Column) --}}

Sample Projects

@php // Generate sample project names based on module/lesson titles $projectNames = [ 'Practical assignment: ' . ($module['lessons'][0]->title ?? 'Module Project'), 'Hands-on exercise: ' . ($module['lessons'][1]->title ?? 'Case Study'), 'Real-world application', 'Capstone project component', ]; $projects = array_slice($projectNames, 0, min(3, count($module['lessons']))); @endphp @foreach($projects as $project) {{ $project }} @endforeach @if(count($module['lessons']) > 3) +{{ count($module['lessons']) - 3 }} more @endif
@endforeach
{{-- Instructor Section --}} @if($course->instructor)

Meet Your Instructor

{{ strtoupper(substr($course->instructor->name, 0, 1)) }}

{{ $course->instructor->name }}

{{ $course->instructor->email }}

Experienced instructor dedicated to your learning success.

@endif {{-- Testimonials --}} @if($testimonials->count() > 0)

What Our Learners Say

Real stories from successful graduates

@foreach($testimonials->take(6) as $testimonial)
{{ strtoupper(substr($testimonial->name, 0, 1)) }}

{{ $testimonial->name }}

{{ $testimonial->role }}

"{{ $testimonial->quote }}"

@endforeach
@endif {{-- Related Courses --}} @if($relatedCourses->count() > 0)
@endif {{-- Final CTA --}}

Ready to Start Learning?

Join thousands of learners advancing their careers with our programs

@if(!$enrolled)
@csrf
@else Continue Learning @endif
{{-- Scroll to Top Button --}} @include('partials.footer-upgrad')
@guest @include('partials.auth-modal') @endguest