<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
  
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" />
  <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script>
   <style>
        .container {
            max-width: 500px;
        }
    </style>

<div class="section-area section-sp1 ovpr-dark bg-fix online-cours" style="background-image:url(assets/images/home.jpg);">
        <div class="container">
          <div class="row">
            <div class="col-md-12 text-center text-white">
              <h2> Courses To Learn</h2>
              <h5>Own Your Feature Learning New Skills Online</h5>
              <form class="cours-search">
                <div class="input-group">

                  <select class="search form-control" name="search"><a href="../course/<?php echo $course->courseID;?>"></a></select>
                  <div class="input-group-append">
                    <button class="btn" type="submit">Search</button> 
                  </div>
                </div>
              </form>
            </div>
          </div>
          <div class="mw800 m-auto">
            <div class="row">
              <div class="col-md-4 col-sm-6">
                <div class="cours-search-bx m-b30">
                  <div class="icon-box">
                    <h3><i class="ti-user"></i><span class="counter">5</span>M</h3>
                  </div>
                  <span class="cours-search-text">Over 5 million student</span>
                </div>
              </div>
              <div class="col-md-4 col-sm-6">
                <div class="cours-search-bx m-b30">
                  <div class="icon-box">
                    <h3><i class="ti-book"></i><span class="counter">300</span>K</h3>
                  </div>
                  <span class="cours-search-text">300,000 Courses.</span>
                </div>
              </div>
              <div class="col-md-4 col-sm-12">
                <div class="cours-search-bx m-b30">
                  <div class="icon-box">
                    <h3><i class="ti-layout-list-post"></i><span class="counter">20</span>K</h3>
                  </div>
                  <span class="cours-search-text">Learn Anything Online.</span>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>


    <!-- Section: About -->
    <section id="about " class="">
      <div class="container">
        <div class="section-content">
          <div class="row">
            <div class="col-md-12 text-center">
              <h2 class="title font-42 text-theme-colored mt-30 mb-20">About us</h2>
              <p class="mb-20">Skills For Africa Training Institute is a global center that offers state of the art training services. We offer training services designed for individuals and groups from organizations working in public, non-profit organizations and the private sectors.</p>
              <a class="btn btn-colored btn-theme-colored btn-lg text-uppercase font-13 mt-30" href="<?php echo base_url('about-us');?>">Institute Details</a>
              <a class="btn btn-theme-color-2 btn-lg text-uppercase text-white font-13 mt-30" href="<?php echo base_url('allcourses');?>">Register Now</a>
            </div>
          </div>
        </div>
      </div>
    </section>

<script>
   
    $('.search').select2({
        placeholder: '--- What do you want to learn today? ---',
        ajax: {
            url: '<?php echo base_url('Home/ajaxSearch');?>',

            dataType: 'json',
            delay: 250,
            processResults: function(data){
                return {
                    results: data
                };
            },
            cache: true
        }
    });
</script>


