{% include "header_absolute" %}
{% include "course_version_outdated_alert", courses: courses.featured %}
<main class="np-main np-homepage">
  <div class="np-homepage-hero">
    <img class="np-homepage-hero-image np-hidden-desktop"
      src="{{ homepage.artwork_url }}"
      alt="{{ homepage.headline }}"
    />
    <div class="np-homepage-hero-content">
      <div class="np-homepage-headline np-header-font-color">
        {{ homepage.headline }}
      </div>
      <div class="np-homepage-subheadline np-header-font-color">
        {{ homepage.subheadline }}
      </div>
      <a class="np-homepage-hero-cta np-button" href="{% route catalog %}">
        {% t .discover %}
      </a>
    </div>
  </div>
  {% comment %} {% include "sub_navigation" %} {% endcomment %}
  <div class="np-homepage-featured np-max-width">
    <div class="np-homepage-featured-text">
      <div class="np-homepage-headline">
        {{ homepage.featured_courses_headline }}
      </div>
      <div class="np-homepage-subheadline">
        {{ homepage.featured_courses_subheadline }}
      </div>
    </div>
    {% if courses.featured.any? %}
      <div class="np-homepage-featured-courses row">
        {% for course in courses.featured %}
          <div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content">
            {% include "cards_course" with course %}
          </div>
        {% endfor %}
      </div>
    {% else %}
      <div class="np-homepage-featured-empty">
        <div class="np-zero-state-text">
          {% t .empty, key: current_school.course_vocabulary %}
        </div>
        <img
          class="np-zero-state-courses"
          alt="{% t .empty, key: current_school.course_vocabulary %}"
        />
      </div>
    {% endif %}
  </div>
</main>
{% include "footer" %}

<style>

  @media (min-width:768px) {
    .np-homepage-hero { 
      padding-top: 90px;
      padding-bottom:32px;
      background-image: url({{homepage.artwork_url}});
      background-size:cover;
      background-position:center;
      min-height: 550px;
      position:relative;
    }

    .np-homepage-hero:after { 
      content: "";
      position: absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      /*background: rgb(0,0,0);
      background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(0,0,0,0) 30%);*/
    }

    .np-homepage-hero-content {
      position:relative;
      z-index:1;
      max-width: 1300px;
    }

    .np-homepage-hero-cta {
      margin-top:32px;
    }
  }

  @media (min-width:1200px) {
    .np-homepage-hero .np-homepage-headline {
      font-size: 72px;
    }
  }
</style>
