{% extends 'base.html' %}
{% load static %}

{% block title %}Career Explorer - AI Career Advisor{% endblock %}

{% block content %}
<div class="career-explorer-hero">
    <div class="container">
        <h1>Explore Career Paths</h1>
        <p>Discover various career opportunities and the skills required to achieve them.</p>
    </div>
</div>

<div class="container my-5">
    <section id="career-paths">
        <h2>Available Career Paths</h2>
        <div class="row">
            {% for career_path in career_paths %}
            <div class="col-md-4 mb-4">
                <div class="card h-100">
                    <div class="card-body">
                        <h5 class="card-title">{{ career_path.title }}</h5>
                        <p class="card-text">{{ career_path.description }}</p>
                        <h6>Required Skills:</h6>
                        <ul>
                            {% for skill in career_path.required_skills.all %}
                                <li>{{ skill.name }}</li>
                            {% endfor %}
                        </ul>
                        {% if career_path.typical_roles %}
                            <h6>Typical Roles:</h6>
                            <ul>
                                {% for role in career_path.typical_roles %}
                                    <li>{{ role }}</li>
                                {% endfor %}
                            </ul>
                        {% endif %}
                        {% if career_path.salary_range %}
                            <p><strong>Salary Range:</strong> {{ career_path.salary_range }}</p>
                        {% endif %}
                    </div>
                </div>
            </div>
            {% empty %}
            <div class="col-12">
                <p>No career paths available yet.</p>
            </div>
            {% endfor %}
        </div>
    </section>

    <section id="skills" class="mt-5">
        <h2>Skills Catalog</h2>
        <div class="row">
            {% for skill in skills %}
            <div class="col-md-4 mb-4">
                <div class="card h-100">
                    <div class="card-body">
                        <h5 class="card-title">{{ skill.name }}</h5>
                        <p class="card-text">{{ skill.description }}</p>
                        {% if skill.proficiency_levels %}
                            <h6>Proficiency Levels:</h6>
                            <ul>
                                {% for level in skill.proficiency_levels %}
                                    <li>{{ level }}</li>
                                {% endfor %}
                            </ul>
                        {% endif %}
                    </div>
                </div>
            </div>
            {% empty %}
            <div class="col-12">
                <p>No skills available yet.</p>
            </div>
            {% endfor %}
        </div>
    </section>
</div>
{% endblock %}
