{#- Three groups, first 3 labels, then More (REV-061 / REV-060). Labels do nothing when tapped. -#}
<section class="ob-sec ob-crs">
  <div class="ob-hrow"><h2 class="ob-h">Courses</h2></div>
  <div class="ob-crscard">
    {% if not course_groups %}
    <p class="ob-gap">Courses not listed on the SACAA record.</p>
    {% else %}
    <div class="ob-cr-groups is-grid">
    {% for g in course_groups %}
      {% set more = g['items']|length > 3 %}
      <div class="ob-cr-g">
        <div class="ob-cr-gt"><h3 class="ob-cr-gh">{{ g.name }}</h3>
          {% if more %}<button type="button" class="ob-cr-more" aria-expanded="false" aria-controls="ob-cr-r{{ loop.index0 }}"><span class="a">More</span><span class="b">Less</span></button>{% endif %}
        </div>
        <ul class="ob-cr-pills ob-cr-row" id="ob-cr-r{{ loop.index0 }}">
        {% for name in g['items'] %}
          <li class="ob-cr-pill{% if loop.index0 >= 3 %} is-more{% endif %}"{% if loop.index0 >= 3 %} hidden{% endif %}>{{ name }}</li>
        {% endfor %}
        </ul>
      </div>
    {% endfor %}
    </div>
    {% endif %}
  </div>
</section>
