{# minify #}

{% extends '_layouts/_global-variables' %}

{% block htmlPage -%}
  <!DOCTYPE html>
  <html lang="{{ craft.app.language|slice(0, 2) }}">
    <head>
      {% include '_layouts/_global-head' %}
      {% block customHead %}

      {% endblock %}
      {{ sprig.script }}
    </head>
    <body>
      {% include 'components/_header' -%}

      {% block main -%}
        <main>
          {% set masterHead = entry.masterHead[0] ?? null %}

          {% if not masterHead %}
            <div class="header-spacing"
              style="background-color: var(--b-medianoche);"></div>
          {% endif %}
          {% if entry is defined and entry is not empty and entry.type == 'pressReleases' %}
              {% if entry.fieldSwitch is same as true %}
                  {% include "components/_masterHead-press" only %}
              {% else %}
                  {% if masterHead %}
                      {% set typeSlider = masterHead.type %}
                      {% include 'components/_masterHead' with {
                        component: masterHead,
                        type: typeSlider
                      } only %}
                  {% endif %}
              {% endif %}
          {% else %}
          {% if masterHead %}
            {% set typeSlider = masterHead.type %}
            {% include 'components/_masterHead' with {
              component: masterHead,
              type: typeSlider
            } only %}
          {% endif %}
          {% endif %}

          {% block content %}

          {% endblock %}
        </main>
      {% endblock %}

      {% block modals -%}

      {% endblock %}

      {% include 'components/_sideBar' with {
        megaMenuLength: megaMenu_length,
        megaMenu: megaMenu
      } only -%}

      {% include 'components/_footer' only -%}

      {% block customJs %}

      {% endblock %}

      {% include 'components/_load-js' -%}
    </body>
  </html>
{% endblock %}
{# endminify #}
