File size: 26,019 Bytes
9540a98
32f3c41
fd1c160
c836092
9540a98
32f3c41
9540a98
f414da4
 
9540a98
c836092
fd1c160
9540a98
32f3c41
 
 
 
 
 
b012666
c836092
32f3c41
 
 
 
 
 
b012666
32f3c41
 
b012666
 
 
 
32f3c41
 
f414da4
b012666
 
16f64f6
b012666
16f64f6
bf3ec9b
16f64f6
b012666
 
 
 
 
 
f414da4
 
b012666
 
f414da4
b012666
f414da4
 
 
b012666
f414da4
 
b012666
f414da4
 
 
b012666
 
 
 
 
 
 
32f3c41
b012666
 
32f3c41
b012666
 
 
 
32f3c41
b012666
 
 
 
c836092
16f64f6
b012666
 
 
 
 
c836092
820a120
b012666
 
 
820a120
b012666
820a120
 
b012666
 
 
 
5d86a10
b012666
 
 
30ec6cb
 
 
 
 
16f64f6
b012666
 
 
16f64f6
b012666
 
1c257a3
2283d76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32f3c41
 
fd1c160
32f3c41
 
 
b012666
1c257a3
32f3c41
 
9dc9f53
32f3c41
f414da4
 
 
 
c836092
f414da4
 
 
 
 
 
 
 
 
 
77aa597
30ec6cb
88b363c
f414da4
77aa597
 
 
 
 
 
 
 
d94586e
88b363c
 
f414da4
 
 
 
 
 
 
 
 
d94586e
88b363c
 
f414da4
 
 
 
 
 
 
 
 
d94586e
88b363c
 
f414da4
 
 
 
 
 
 
 
 
88b363c
 
f414da4
 
 
 
 
 
 
 
 
88b363c
 
f414da4
 
 
 
 
 
 
 
 
d94586e
88b363c
 
f414da4
 
 
 
 
 
 
 
 
88b363c
 
f414da4
 
 
 
 
 
 
 
 
88b363c
 
f414da4
 
 
 
 
 
 
 
 
d94586e
88b363c
 
9dc9f53
f414da4
32f3c41
f414da4
88b363c
f414da4
32f3c41
f414da4
 
32f3c41
f414da4
 
 
 
 
 
 
32f3c41
f414da4
 
 
 
 
 
 
 
 
 
 
 
 
88b363c
 
 
 
 
 
b012666
88b363c
b012666
88b363c
 
f414da4
 
77aa597
 
 
f414da4
77aa597
 
f414da4
 
 
 
 
 
 
 
 
1c257a3
 
 
 
 
 
 
 
 
 
f414da4
 
 
 
 
 
 
 
 
 
 
 
 
 
b012666
f414da4
1c257a3
b012666
 
 
 
 
f414da4
 
 
 
 
 
 
32f3c41
f414da4
5066bf1
f414da4
32f3c41
 
 
b012666
32f3c41
f414da4
 
b012666
f414da4
 
 
 
 
 
 
 
 
 
1c257a3
f414da4
 
 
 
b012666
f414da4
 
 
 
 
88b363c
 
b012666
88b363c
 
 
 
 
 
 
1c257a3
88b363c
 
f414da4
 
b012666
f414da4
 
 
 
 
 
 
 
 
32f3c41
1c257a3
 
 
f414da4
b012666
f414da4
1c257a3
 
 
 
 
 
 
 
 
 
f414da4
1c257a3
32f3c41
 
b012666
f414da4
b012666
f414da4
b012666
 
 
 
 
 
f414da4
1c257a3
f414da4
c836092
f414da4
 
b012666
f414da4
 
 
 
 
 
 
b012666
f414da4
1c257a3
 
f414da4
32f3c41
1c257a3
5d86a10
b012666
32f3c41
b012666
f414da4
2283d76
 
32f3c41
 
f414da4
b012666
f414da4
b012666
c836092
f414da4
c836092
b012666
c836092
bf3ec9b
 
 
f414da4
b012666
f414da4
1c257a3
f414da4
 
 
88b363c
f414da4
32f3c41
f414da4
 
32f3c41
f414da4
 
 
 
 
 
 
 
 
 
88b363c
f414da4
 
 
 
b012666
32f3c41
bf3ec9b
f414da4
 
 
88b363c
b012666
88b363c
 
 
f414da4
 
2283d76
b012666
f414da4
 
77aa597
 
30ec6cb
b012666
77aa597
88b363c
 
2283d76
88b363c
f414da4
b012666
f414da4
b012666
 
 
 
f414da4
b012666
f414da4
 
 
b012666
 
88b363c
b012666
88b363c
 
 
2283d76
 
b012666
16f64f6
b012666
30ec6cb
88b363c
 
b012666
88b363c
 
b012666
 
88b363c
2283d76
 
 
 
b012666
 
 
2283d76
 
 
 
 
b012666
 
bf3ec9b
 
 
 
 
 
2283d76
 
 
 
 
 
 
 
 
b05b778
 
bf3ec9b
f661694
 
 
 
 
 
bf3ec9b
 
 
 
 
 
2283d76
bf3ec9b
f661694
bf3ec9b
 
 
 
32f3c41
f414da4
b012666
 
2283d76
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
import streamlit as st
import json
import time
import random

# Set page config
st.set_page_config(
    page_title="Training Content Format Discovery",
    page_icon="🎓",
    layout="wide",
    initial_sidebar_state="collapsed"
)

# Custom CSS
st.markdown("""
<style>
    .main .block-container {
        padding-top: 2rem;
        padding-bottom: 2rem;
        max-width: 1000px;
        margin: 0 auto;
    }
    .stApp {
        background-color: #f8f9fa;
    }
    .title-area {
        text-align: center;
        margin-bottom: 2rem;
    }
    .custom-subheader {
        background-color: #f0f2f6;
        padding: 10px;
        border-radius: 5px;
        margin-bottom: 10px;
        font-weight: 600;
    }
    .results-container {
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 20px;
        background-color: white;
        margin-bottom: 20px;
        min-height: 300px;
    }
    .format-card {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        background-color: #fafafa;
    }
    .format-title {
        font-size: 1.2rem;
        font-weight: 600;
        color: #2c3e50;
        margin-bottom: 8px;
    }
    .format-description {
        color: #5a6c7d;
        margin-bottom: 10px;
    }
    .format-details {
        font-size: 0.9rem;
        color: #7f8c8d;
    }
    .match-score {
        background-color: #e8f5e8;
        color: #2d6a2d;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 0.8rem;
        font-weight: 600;
        float: right;
    }
    .stButton button {
        width: 100%;
    }
    .footnote {
        font-size: 0.8rem;
        color: #6c757d;
        margin-top: 2rem;
    }
    .settings-section {
        background-color: #f8f9fa;
        padding: 15px;
        border-radius: 5px;
        margin-bottom: 20px;
    }
    .examples-section {
        background-color: #e9f7fe;
        padding: 15px;
        border-radius: 5px;
        margin-bottom: 20px;
    }
    .placeholder-area {
        border: 2px dashed #ddd;
        border-radius: 10px;
        padding: 40px;
        text-align: center;
        background-color: #f8f9fa;
        color: #666;
    }
    .consultation-cta {
        background-color: #4CAF50;
        border: none;
        border-radius: 8px;
        padding: 15px;
        margin: 20px 0;
        text-align: center;
        color: white;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }
    .consultation-cta:hover {
        background-color: #45a049;
    }
    .consultation-cta h4 {
        color: white;
        margin-bottom: 10px;
    }
    .section-spacer {
        margin: 30px 0;
    }
    .action-buttons-container {
        margin-top: 20px;
        padding-top: 15px;
        border-top: 1px solid #e0e0e0;
    }
    .roi-metrics {
        background-color: #e8f5e8;
        padding: 8px;
        border-radius: 4px;
        margin: 8px 0;
        font-size: 0.9rem;
    }
    .additional-option {
        border: 1px solid #e0e0e0;
        border-radius: 5px;
        padding: 10px;
        margin-bottom: 10px;
        background-color: #f9f9f9;
    }
    .sample-link {
        color: #1f77b4;
        text-decoration: none;
        font-size: 0.9rem;
    }
    .sample-link:hover {
        text-decoration: underline;
    }
</style>
""", unsafe_allow_html=True)

# Title and description
st.markdown("""
<div class="title-area">
    <h1>Training Content Format Discovery</h1>
    <p>Find the perfect training content format for your audience, budget, and goals. Get personalized recommendations in minutes!</p>
</div>
""", unsafe_allow_html=True)

# Initialize session state
if "recommendations" not in st.session_state:
    st.session_state["recommendations"] = None
if "analysis_history" not in st.session_state:
    st.session_state["analysis_history"] = []

# Training content formats database
TRAINING_FORMATS = {
    "video_tutorials": {
        "name": "Video Tutorials",
        "description": "Engaging visual content with step-by-step demonstrations",
        "best_for": ["Visual learners", "Technical skills", "Software training"],
        "budget": "Medium",
        "production_time": "High",
        "engagement": "High",
        "scalability": "High",
        "interaction": "Low",
        "sample_link": "https://youtu.be/HPUWGE9B_UQ?si=a4vr6BL43eMCR9Th",
        "roi_metrics": "85% knowledge retention, 60% faster skill acquisition"
    },
    "powerpoint_presentations": {
        "name": "PowerPoint Presentations",
        "description": "Slide-based presentations for structured information delivery",
        "best_for": ["Information sharing", "Concepts explanation", "Quick updates"],
        "budget": "Very Low",
        "production_time": "Low",
        "engagement": "Low",
        "scalability": "High",
        "interaction": "Low",
        "sample_link": "https://motivace.sharepoint.com/sites/FileStorage/Shared%20Documents/CreativeSP/Other-Clients/NewClient_Samples/PPT_Samples/202312PD-CoreUltra.pdf",
        "roi_metrics": "Quick deployment, 70% cost savings vs. live training"
    },
    "microlearning_modules": {
        "name": "Microlearning Modules",
        "description": "Bite-sized content focused on specific skills or concepts",
        "best_for": ["Busy professionals", "Just-in-time learning", "Skill reinforcement"],
        "budget": "Low",
        "production_time": "Low",
        "engagement": "Medium",
        "scalability": "Very High",
        "interaction": "Medium",
        "sample_link": "http://www.motechhq.com/contentdemos",
        "roi_metrics": "40% higher completion rates, 50% less time investment"
    },
    "elearning_courses": {
        "name": "E-Learning Courses",
        "description": "Comprehensive online courses with structured learning paths",
        "best_for": ["Certification programs", "Comprehensive training", "Self-paced learning"],
        "budget": "Medium",
        "production_time": "High",
        "engagement": "Medium",
        "scalability": "Very High",
        "interaction": "Medium",
        "sample_link": "http://www.motechhq.com/contentdemos",
        "roi_metrics": "90% completion rates, 25% faster time-to-competency"
    },
    "simulation_training": {
        "name": "Simulation Training",
        "description": "Virtual environments for safe practice of real-world scenarios",
        "best_for": ["High-risk training", "Technical skills", "Safety training"],
        "budget": "Very High",
        "production_time": "Very High",
        "engagement": "Very High",
        "scalability": "Medium",
        "interaction": "Very High",
        "roi_metrics": "95% skill transfer, 80% reduction in safety incidents"
    },
    "gamified_learning": {
        "name": "Gamified Learning",
        "description": "Game elements integrated into training content for motivation",
        "best_for": ["Engagement challenges", "Younger audiences", "Skill practice"],
        "budget": "High",
        "production_time": "High",
        "engagement": "Very High",
        "scalability": "High",
        "interaction": "High",
        "roi_metrics": "3x higher engagement, 65% better knowledge retention"
    },
    "mobile_learning": {
        "name": "Mobile Learning",
        "description": "Training content optimized for smartphones and tablets",
        "best_for": ["Remote workforce", "Field training", "Accessibility"],
        "budget": "Medium",
        "production_time": "Medium",
        "engagement": "Medium",
        "scalability": "Very High",
        "interaction": "Medium",
        "sample_link": "http://www.motechhq.com/contentdemos",
        "roi_metrics": "Mobile access increases completion by 45%"
    },
    "blended_learning": {
        "name": "Blended Learning",
        "description": "Combination of online and in-person training methods",
        "best_for": ["Comprehensive programs", "Varied learning styles", "Flexibility"],
        "budget": "High",
        "production_time": "High",
        "engagement": "High",
        "scalability": "Medium",
        "interaction": "High",
        "roi_metrics": "Best of both worlds: 80% satisfaction + flexibility"
    },
    "webinar_series": {
        "name": "Webinar Series",
        "description": "Live or recorded online presentations with Q&A sessions",
        "best_for": ["Expert knowledge sharing", "Large audiences", "Thought leadership"],
        "budget": "Low",
        "production_time": "Low",
        "engagement": "Medium",
        "scalability": "Very High",
        "interaction": "Medium",
        "roi_metrics": "Reach thousands simultaneously, 60% cost reduction"
    },
    "pdf_guides": {
        "name": "PDF Guides & Manuals",
        "description": "Downloadable documents with detailed instructions and references",
        "best_for": ["Reference materials", "Policy training", "Quick deployment"],
        "budget": "Very Low",
        "production_time": "Low",
        "engagement": "Low",
        "scalability": "Very High",
        "interaction": "Very Low",
        "sample_link": "https://www.motechhq.com/contentdemos/BunzleBrochure_SinglePg_Digital_Abbreviated.pdf",
        "roi_metrics": "Instant deployment, 90% cost savings, evergreen content"
    }
}

# Scoring algorithm
def calculate_format_scores(audience_type, budget, objectives, goals, timeline, interaction_level, team_size):
    scores = {}
    
    for format_id, format_data in TRAINING_FORMATS.items():
        score = 0
        
        # Budget matching
        budget_map = {"Very Low": 1, "Low": 2, "Medium": 3, "High": 4, "Very High": 5}
        user_budget = budget_map.get(budget, 3)
        format_budget = budget_map.get(format_data["budget"], 3)
        
        if format_budget <= user_budget:
            score += 20
        else:
            score -= (format_budget - user_budget) * 5
        
        # Timeline matching
        timeline_map = {"ASAP (1-2 weeks)": 1, "1 month": 2, "2-3 months": 3, "3+ months": 4}
        user_timeline = timeline_map.get(timeline, 3)
        production_map = {"Low": 1, "Medium": 2, "High": 3, "Very High": 4}
        format_production = production_map.get(format_data["production_time"], 2)
        
        if format_production <= user_timeline:
            score += 15
        else:
            score -= (format_production - user_timeline) * 5
        
        # Team size matching - boost scalable solutions for larger teams
        size_map = {"Small team (10-50)": 1, "Medium team (51-200)": 2, "Large team (201-1000)": 3, "Enterprise (1000+)": 4}
        user_size = size_map.get(team_size, 2)
        scalability_map = {"Low": 1, "Medium": 2, "High": 3, "Very High": 4}
        format_scalability = scalability_map.get(format_data["scalability"], 2)
        
        if user_size >= 3 and format_scalability >= 3:  # Large teams need scalable solutions
            score += 15
        elif user_size <= 2 and format_scalability <= 2:  # Small teams can use less scalable solutions
            score += 10
        
        # Audience type matching
        audience_matches = {
            "Corporate employees": ["elearning_courses", "webinar_series", "blended_learning", "mobile_learning", "powerpoint_presentations"],
            "Technical professionals": ["video_tutorials", "simulation_training", "elearning_courses"],
            "Sales teams": ["gamified_learning", "mobile_learning", "powerpoint_presentations", "microlearning_modules"],
            "Remote workers": ["mobile_learning", "elearning_courses", "webinar_series", "microlearning_modules"],
            "New hires": ["blended_learning", "elearning_courses", "powerpoint_presentations", "video_tutorials"],
            "Managers/Leaders": ["webinar_series", "blended_learning", "powerpoint_presentations", "elearning_courses"],
            "External customers": ["video_tutorials", "webinar_series", "pdf_guides", "elearning_courses"],
            "Field workers": ["mobile_learning", "microlearning_modules", "video_tutorials", "pdf_guides"]
        }
        
        if format_id in audience_matches.get(audience_type, []):
            score += 25
        
        # Objectives matching
        objective_matches = {
            "Technical Skills": ["simulation_training", "video_tutorials", "gamified_learning", "elearning_courses"],
            "Leadership & Management": ["blended_learning", "webinar_series", "elearning_courses", "simulation_training"],
            "Compliance Training": ["elearning_courses", "pdf_guides", "webinar_series", "blended_learning", "powerpoint_presentations"],
            "Product Knowledge": ["video_tutorials", "elearning_courses", "webinar_series", "mobile_learning", "powerpoint_presentations"],
            "New Employee Onboarding": ["blended_learning", "elearning_courses", "video_tutorials", "powerpoint_presentations"],
            "Safety Training": ["simulation_training", "video_tutorials", "elearning_courses", "gamified_learning"],
            "Sales Training": ["gamified_learning", "video_tutorials", "mobile_learning", "simulation_training"],
            "Professional Certification": ["elearning_courses", "blended_learning", "webinar_series", "pdf_guides"],
            "Process Standardization": ["video_tutorials", "elearning_courses", "pdf_guides", "microlearning_modules"],
            "Soft Skills Development": ["blended_learning", "webinar_series", "gamified_learning", "elearning_courses"]
        }
        
        for objective in objectives:
            if format_id in objective_matches.get(objective, []):
                score += 15
        
        # Interaction level matching
        interaction_map = {"Low": 1, "Medium": 2, "High": 3, "Very High": 4}
        user_interaction = interaction_map.get(interaction_level, 2)
        format_interaction = interaction_map.get(format_data["interaction"], 2)
        
        if abs(format_interaction - user_interaction) <= 1:
            score += 10
        
        # Goals matching
        goal_matches = {
            "Cost Effectiveness": ["microlearning_modules", "pdf_guides", "webinar_series", "elearning_courses", "powerpoint_presentations"],
            "High Engagement": ["gamified_learning", "simulation_training", "video_tutorials", "mobile_learning"],
            "Scalability": ["elearning_courses", "mobile_learning", "webinar_series", "microlearning_modules"],
            "Quick Deployment": ["microlearning_modules", "pdf_guides", "webinar_series", "mobile_learning", "powerpoint_presentations"],
            "Knowledge Retention": ["gamified_learning", "simulation_training", "microlearning_modules", "video_tutorials"],
            "Measurable Results": ["elearning_courses", "gamified_learning", "simulation_training", "blended_learning"]
        }
        
        for goal in goals:
            if format_id in goal_matches.get(goal, []):
                score += 10
        
        scores[format_id] = max(0, min(100, score))
    
    return scores

# Main content
col1, col2 = st.columns([1, 1])

with col1:
    st.markdown('<div class="custom-subheader">Tell Us About Your Training Needs</div>', unsafe_allow_html=True)
    
    # Audience Type
    audience_type = st.selectbox(
        "Who is your target audience?",
        [
            "Corporate employees",
            "Technical professionals", 
            "Sales teams",
            "Remote workers",
            "New hires",
            "Managers/Leaders",
            "External customers",
            "Field workers"
        ],
        help="Consider their learning preferences and work environment"
    )
    
    # Budget
    budget = st.select_slider(
        "What's your budget range?",
        options=["Very Low", "Low", "Medium", "High", "Very High"],
        value="Medium",
        help="Consider development, production, and deployment costs"
    )
    
    # Team Size
    team_size = st.selectbox(
        "How many learners will this reach?",
        [
            "Small team (10-50)",
            "Medium team (51-200)", 
            "Large team (201-1000)",
            "Enterprise (1000+)"
        ],
        index=1,
        help="This helps us recommend formats that scale appropriately"
    )
    
    # Timeline
    timeline = st.selectbox(
        "When do you need this deployed?",
        [
            "ASAP (1-2 weeks)",
            "1 month",
            "2-3 months", 
            "3+ months"
        ],
        index=1,
        help="How quickly do you need the training content ready?"
    )
    
    st.markdown('<div class="section-spacer"></div>', unsafe_allow_html=True)
    
    # Simplified Objectives
    objectives = st.multiselect(
        "What type of training do you need? (Select all that apply)",
        [
            "Technical Skills",
            "Leadership & Management",
            "Compliance Training",
            "Product Knowledge",
            "New Employee Onboarding",
            "Safety Training",
            "Sales Training",
            "Professional Certification",
            "Process Standardization",
            "Soft Skills Development"
        ],
        help="What specific areas do you need to train on?"
    )
    
    # Simplified Goals
    goals = st.multiselect(
        "What's most important to you? (Select your top priorities)",
        [
            "Cost Effectiveness",
            "High Engagement",
            "Scalability",
            "Quick Deployment",
            "Knowledge Retention",
            "Measurable Results"
        ],
        help="What matters most for your training success?"
    )
    
    # Interaction Level
    interaction_level = st.select_slider(
        "How much interaction do you want?",
        options=["Low", "Medium", "High", "Very High"],
        value="Medium",
        help="Level of learner interaction and engagement"
    )
    
    # Additional Context
    additional_context = st.text_area(
        "Any additional requirements?",
        placeholder="e.g., Must work on mobile devices, need multilingual support, integration with LMS required...",
        height=60,
        help="Tell us about any special requirements"
    )
    
    st.markdown('<div class="section-spacer"></div>', unsafe_allow_html=True)
    
    # Generate recommendations button
    generate_button = st.button(
        "Get My Recommendations",
        disabled=not objectives or not goals,
        use_container_width=True,
        type="primary"
    )
    
    if not objectives:
        st.info("Please select at least one training type")
    elif not goals:
        st.info("Please select at least one priority")

# Display recommendations
with col2:
    st.markdown('<div class="custom-subheader">Your Personalized Recommendations</div>', unsafe_allow_html=True)
    
    # Always show the results container
    st.markdown('<div class="results-container">', unsafe_allow_html=True)
    
    if generate_button and objectives and goals:
        with st.spinner("Analyzing your requirements..."):
            # Simulate processing time
            time.sleep(1.5)
            
            # Calculate scores
            scores = calculate_format_scores(
                audience_type, budget, objectives, goals, timeline, interaction_level, team_size
            )
            
            # Sort by score
            sorted_formats = sorted(scores.items(), key=lambda x: x[1], reverse=True)
            
            # Store recommendations
            st.session_state["recommendations"] = {
                "formats": sorted_formats,
                "params": {
                    "audience": audience_type,
                    "budget": budget,
                    "timeline": timeline,
                    "objectives": objectives,
                    "goals": goals,
                    "interaction": interaction_level,
                    "team_size": team_size,
                    "context": additional_context
                }
            }
            
            st.success("Analysis complete! Here are your recommendations:")
    
    # Check if we have recommendations to display
    if st.session_state["recommendations"] is not None:
        recommendations = st.session_state["recommendations"]
        
        # Personalized headline
        st.markdown(f'<h3 style="color: #2c3e50; margin-bottom: 20px;">Recommended for {recommendations["params"]["audience"].lower()}:</h3>', unsafe_allow_html=True)
        
        # Show top 3 recommendations
        for i, (format_id, score) in enumerate(recommendations["formats"][:3]):
            format_data = TRAINING_FORMATS[format_id]
            
            st.markdown('<div class="format-card">', unsafe_allow_html=True)
            st.markdown(f'<div class="format-title">{format_data["name"]} <span class="match-score">{score}% Match</span></div>', unsafe_allow_html=True)
            st.markdown(f'<div class="format-description">{format_data["description"]}</div>', unsafe_allow_html=True)
            
            # Add sample link if available
            if "sample_link" in format_data:
                st.markdown(f'<a href="{format_data["sample_link"]}" target="_blank" class="sample-link">🔗 View Sample</a>', unsafe_allow_html=True)
                st.markdown("<br>", unsafe_allow_html=True)
            
            # Show ROI metrics
            if "roi_metrics" in format_data:
                st.markdown(f'<div class="roi-metrics"><strong>Expected Results:</strong> {format_data["roi_metrics"]}</div>', unsafe_allow_html=True)
            
            # Show key details
            st.markdown(f"""
            <div class="format-details">
                <strong>Best for:</strong> {', '.join(format_data['best_for'])}<br>
                <strong>Budget:</strong> {format_data['budget']} | 
                <strong>Production Time:</strong> {format_data['production_time']} | 
                <strong>Engagement:</strong> {format_data['engagement']}
            </div>
            """, unsafe_allow_html=True)
            
            st.markdown('</div>', unsafe_allow_html=True)
        
        # Expandable "View More Options" section
        with st.expander("View More Options", expanded=False):
            if len(recommendations["formats"]) > 3:
                st.markdown("**Additional Recommendations:**")
                for i, (format_id, score) in enumerate(recommendations["formats"][3:5], 4):
                    format_data = TRAINING_FORMATS[format_id]
                    
                    st.markdown('<div class="additional-option">', unsafe_allow_html=True)
                    st.markdown(f'**{format_data["name"]}** ({score}% Match)')
                    st.markdown(f'{format_data["description"]}')
                    
                    if "sample_link" in format_data:
                        st.markdown(f'<a href="{format_data["sample_link"]}" target="_blank" class="sample-link">🔗 View Sample</a>', unsafe_allow_html=True)
                    
                    if "roi_metrics" in format_data:
                        st.markdown(f'<div style="font-size: 0.85rem; color: #666; margin-top: 5px;"><strong>Expected Results:</strong> {format_data["roi_metrics"]}</div>', unsafe_allow_html=True)
                    
                    st.markdown('</div>', unsafe_allow_html=True)
            else:
                st.markdown("*All relevant options are shown above.*")
        
        # Grouped Action Buttons
        st.markdown('<div class="action-buttons-container">', unsafe_allow_html=True)
        st.markdown("**Take Action:**", unsafe_allow_html=True)
        
        col_b1, col_b2 = st.columns(2)
        
        with col_b1:
            # Get proposal button for top recommendation
            top_format = TRAINING_FORMATS[recommendations["formats"][0][0]]
            if st.button(f"Get Custom Proposal for {top_format['name']}", use_container_width=True, type="primary"):
                st.balloons()
                st.success("Excellent choice! Our learning design experts will be in touch within 24 hours.")
        
        with col_b2:
            # Fixed consultation button using st.link_button
            st.link_button(
                "Schedule Free Consultation",
                "https://www.motechhq.com/connect/",
                use_container_width=True
            )
        
        # New analysis button (full width, secondary action)
        st.markdown('<div style="margin-top: 10px;">', unsafe_allow_html=True)
        if st.button("Start New Analysis", use_container_width=True):
            st.session_state["recommendations"] = None
            st.rerun()
        st.markdown('</div>', unsafe_allow_html=True)
        
        st.markdown('</div>', unsafe_allow_html=True)
    
    else:
        # Show placeholder INSIDE the results container
        st.markdown('''
        <div class="placeholder-area">
            <h3>🎯 Your Recommendations Will Appear Here</h3>
            <p>Complete the form and click "Get My Recommendations" to see your personalized training format suggestions.</p>
        </div>
        ''', unsafe_allow_html=True)
    
    # Close the results container
    st.markdown('</div>', unsafe_allow_html=True)
    
    # Consultation CTA outside the results container - only show when no recommendations
    if st.session_state["recommendations"] is None:
        st.markdown('<div class="section-spacer"></div>', unsafe_allow_html=True)
        st.link_button(
            "Want Expert Guidance? Schedule a Free Consultation",
            "https://www.motechhq.com/connect/",
            use_container_width=True,
            type="secondary"
        )

# Footer
st.markdown('<div class="footnote">', unsafe_allow_html=True)
st.markdown('*This tool uses advanced algorithms to match your requirements with optimal training formats based on industry best practices.*')
st.markdown('</div>', unsafe_allow_html=True)