{% assign rand_realty_groups = "8f637c703ec45ac5dec70ee9517155aa0d9775c2,613932dbeb1595c00b78de8d1860a3bfdb479b22,176629fa82da1d03f3d58c81e751e61b9836a46d,91ee3a2db2f3f8b71a9d6a2d664781c8ed10e5cb,e9d26fef9adb61c4b523a273aba18c35d40b7a94,a468fb6f64f5af9757d7f60891d2240c7ea43c1e,9a70c58d13cabfc6a1b3bf63f14caaaf097fc43e,32ada17825448e171287f0c7625e2ad1ed051b0f" | split:","%}
{% assign isAllenTate = false %}
{% assign isHowardHanna = false %}
{% assign isRandRealty = false %}
{% for group in current_person.groups %}
  {% if group.enrollment_code == "1817d8c96780f13abbf0f2023e3b26b3bd43d248" %}
    {% assign isAllenTate = true %}
  {% elsif group.enrollment_code == "ccd2aa2f1e41ebbac8fa878f806e3ccc20ae3f38" or 
          group.enrollment_code == "aa6fe8d22ec1e75d2e8c54c6d5452dcd585e415d" %}
    {% assign isHowardHanna = true %}
  {% elsif rand_realty_groups contains group.enrollment_code %}
    {% assign isRandRealty = true %}
  {% endif %}
{% endfor %}

{% if isRandRealty %}
  {% include "styles_rand" %}
{% elsif isAllenTate %}
  {% include "styles_at" %}
{% elsif isHowardHanna %}
  {% include "styles_hh" %}
{% endif %}

<div class="uk-padding-horizontal uk-container uk-container-center">
  <div class="uk-padding-large-vertical uk-padding-horizontal uk-border-bottom">
    {% if isHowardHanna %}
      <h2 class="heading--1 color-indigo-dark compass-margin-b" style="color: black !important">Live Virtual Workshops</h2>
    {% elsif isRandRealty %}
      <h2 class="heading--1 color-indigo-dark compass-margin-b" style="color: black !important">Training & Events Calendar</h2>
    {% elsif isAllenTate %}
      <h2 class="heading--1 color-indigo-dark compass-margin-b" style="color: black !important">Events</h2>
    {% endif %}

    <p class="text-major">Your access to scheduled, live class registration. Attend a live class delivered anywhere! Register now, right here!<br><br><br>
    </p>
  </div>

  {% if training_events.empty? %}
    {% unless isRandRealty %}
      <div class="sk-margin-xlarge-top">
        <h1 class="uk-text-center">{% t .no_events %}</h1>
        <h1 class="uk-text-center uk-margin-top-remove">{% t .check_later %}</h1>
      </div>
    {% endunless %}
  {% else %}
    <div class="uk-grid uk-grid-flex uk-margin-left-remove">
      <div class="uk-width-1-1 uk-padding">
        <ul class="uk-grid uk-grid-medium school-website-course-list uk-grid-match">
          {% for training_event in training_events %}
            {% include "training_event" training_event = training_event %}
          {% endfor %}
        </ul>
      </div>
    </div>
  {% endif %}

  {% include 'calendar' %}
</div>


<style>
  .uk-padding-large-vertical {
    padding-top: 75px !important;
  }

  .calendar {
      min-height: 1200px;
      margin-top: 2rem;
    }
</style>