/** Shopify CDN: Minification failed

Line 16:0 Unexpected "{"
Line 16:1 Unexpected "{"
Line 16:3 Expected identifier but found "'section-blog-post.css'"
Line 18:0 Unexpected "<"
Line 124:2 Unexpected "{"
Line 124:3 Expected identifier but found "%"
Line 128:21 Expected identifier but found whitespace
Line 128:23 Unexpected "{"
Line 128:25 Expected identifier but found "1"
Line 128:83 Expected identifier but found "%"
... and 315 more hidden warnings

**/
{{ 'section-blog-post.css' | asset_url | stylesheet_tag }}

<style>
  .article-template {
    background-color: #ffffff;
    padding-top: 4rem; /* Adds breathing room below the site header */
    padding-bottom: 4rem;
  }
  
  .article-template__title,
  .article-template__content,
  .rte {
    color: #2c2c2c;
  }
  
  /* Main article title as brand accent */
  .article-template__title {
    color: #EA7A2D;
  }
  
  /* Keep subheadings dark for a premium, editorial reading experience */
  .rte h1,
  .rte h2,
  .rte h3,
  .rte h4,
  .rte h5,
  .rte h6 {
    color: #2c2c2c;
  }

  /* Use orange for links inside the article */
  .rte a {
    color: #EA7A2D;
    text-decoration-color: rgba(234, 122, 45, 0.4);
  }

  /* --- Added for UI/UX & Dwell Time --- */
  
  /* Center the title and meta information */
  .article-template__header-wrapper {
    text-align: center;
    margin-bottom: 2rem;
  }
  
  /* Optimize reading layout: max-width prevents eye fatigue */
  .article-template__content.rte {
    max-width: 750px;
    margin: 0 auto;
  }
  
  /* Hardcode pixel size because Shopify themes often use a 10px rem base */
  .article-template__content.rte,
  .article-template__content.rte p,
  .article-template__content.rte li {
    font-size: 16px; 
    line-height: 1.8;
  }
  
  /* Break up text walls */
  .article-template__content.rte p {
    margin-bottom: 1.5em;
  }
  
  /* Create clear sections with heading spacing */
  .article-template__content.rte h2, 
  .article-template__content.rte h3 {
    margin-top: 2em;
    margin-bottom: 0.5em;
  }
  
  /* Premium aesthetic for the featured image */
  .article-template__hero-container img {
    border-radius: 12px;
  }
  
  /* Clean up the meta information layout */
  .article-template__meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    color: #555;
    font-size: 0.95rem;
    margin-top: 15px;
  }
  
  /* Ensure touch targets are easy to tap on mobile */
  .article-template__link,
  .button,
  .article-template__comment-fields input,
  .article-template__comments-fields textarea {
    min-height: 44px;
  }

  /* --- FIX: Force text selection ON + stop element-dragging on blog articles --- */
  .article-template,
  .article-template *,
  .article-template__content,
  .article-template__content.rte,
  .article-template__content.rte * {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-user-drag: none !important;
  }

  {%- if article.image -%}
  /* Force hero image to its native aspect ratio on mobile to prevent awkward cropping */
  @media screen and (max-width: 749px) {
    .article-template__hero-container .media {
      padding-bottom: {{ 1 | divided_by: article.image.aspect_ratio | times: 100 }}% !important;
      height: 0 !important;
    }
  }
  {%- endif -%}
</style>

<article class="article-template">
  {%- for block in section.blocks -%}
    {%- case block.type -%}
      {%- when '@app' -%}
        <div class="page-width page-width--narrow">
          {% render block %}
        </div>
      {%- when 'featured_image' -%}
        {%- if article.image -%}
          <div
            class="article-template__hero-container{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--fade-in{% endif %}"
            {{ block.shopify_attributes }}
          >
            <div
              class="article-template__hero-{{ block.settings.image_height }} media"
              {% if block.settings.image_height == 'adapt' and article.image %}
                style="padding-bottom: {{ 1 | divided_by: article.image.aspect_ratio | times: 100 }}%;"
              {% endif %}
            >
              <img
                srcset="
                  {% if article.image.width >= 350 %}{{ article.image | image_url: width: 350 }} 350w,{% endif %}
                  {% if article.image.width >= 750 %}{{ article.image | image_url: width: 750 }} 750w,{% endif %}
                  {% if article.image.width >= 1100 %}{{ article.image | image_url: width: 1100 }} 1100w,{% endif %}
                  {% if article.image.width >= 1500 %}{{ article.image | image_url: width: 1500 }} 1500w,{% endif %}
                  {% if article.image.width >= 2200 %}{{ article.image | image_url: width: 2200 }} 2200w,{% endif %}
                  {% if article.image.width >= 3000 %}{{ article.image | image_url: width: 3000 }} 3000w,{% endif %}
                  {{ article.image | image_url }} {{ article.image.width }}w
                "
                sizes="(min-width: {{ settings.page_width }}px) {{ settings.page_width | minus: 100 }}px, (min-width: 750px) calc(100vw - 10rem), 100vw"
                src="{{ article.image | image_url: width: 1100 }}"
                loading="eager"
                fetchpriority="high"
                width="{{ article.image.width }}"
                height="{{ article.image.height }}"
                alt="{{ article.image.alt | escape }}"
              >
            </div>
          </div>
        {%- endif -%}

      {%- when 'title' -%}
        <header
          class="page-width page-width--narrow article-template__header-wrapper{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--fade-in{% endif %}"
          {{ block.shopify_attributes }}
        >
          <h1 class="article-template__title">
            {{ article.title | escape }}
          </h1>
          
          <div class="article-template__meta">
            {%- if block.settings.blog_show_date -%}
              <span class="caption-with-letter-spacing">
                {{- article.published_at | time_tag: format: 'date' -}}
              </span>
            {%- endif -%}
            
            {%- if block.settings.blog_show_author -%}
              <span class="circle-divider caption-with-letter-spacing">
                {{ article.author }}
              </span>
            {%- endif -%}

            {%- comment -%} Calculate and display reading time {%- endcomment -%}
            {%- assign word_count = article.content | strip_html | split: ' ' | size -%}
            {%- assign reading_time = word_count | divided_by: 250 | plus: 1 -%}
            <span class="circle-divider caption-with-letter-spacing">
              {{ reading_time }} min read
            </span>
          </div>
        </header>

      {%- when 'content' -%}
        <div
          class="article-template__content page-width page-width--narrow rte{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}"
          {{ block.shopify_attributes }}
        >
          {{ article.content }}
        </div>

      {%- when 'share' -%}
        <div
          class="article-template__social-sharing page-width page-width--narrow{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}"
          {{ block.shopify_attributes }}
        >
          {% assign share_url = request.origin | append: article.url %}
          {% render 'share-button', block: block, share_link: share_url %}
        </div>
    {%- endcase -%}
  {%- endfor -%}

  <div class="article-template__back element-margin-top center{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
    <a href="{{ blog.url }}" class="article-template__link link animate-arrow">
      <span class="icon-wrap">
        <span class="svg-wrapper">
          {{- 'icon-arrow.svg' | inline_asset_content -}}
        </span>
      </span>
      {{ 'blogs.article.back_to_blog' | t: title: blog.title | escape }}
    </a>
  </div>
  
  {%- if blog.comments_enabled? -%}
    <div class="article-template__comment-wrapper background-secondary">
      <div
        id="comments"
        class="page-width page-width--narrow{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}"
      >
        {%- if article.comments_count > 0 -%}
          {%- assign anchorId = '#Comments-' | append: article.id -%}

          <h2 id="Comments-{{ article.id }}" tabindex="-1">
            {{ 'blogs.article.comments' | t: count: article.comments_count }}
          </h2>
          {% paginate article.comments by 5 %}
            <div class="article-template__comments">
              {%- if comment.status == 'pending' and comment.content -%}
                <article id="{{ comment.id }}" class="article-template__comments-comment">
                  {{ comment.content }}
                  <footer class="right">
                    <span class="circle-divider caption-with-letter-spacing">{{ comment.author }}</span>
                  </footer>
                </article>
              {%- endif -%}

              {%- for comment in article.comments -%}
                <article id="{{ comment.id }}" class="article-template__comments-comment">
                  {{ comment.content }}
                  <footer class="right">
                    <span class="circle-divider caption-with-letter-spacing">{{ comment.author }}</span
                    ><span class="caption-with-letter-spacing">
                      {{- comment.created_at | time_tag: format: 'date' -}}
                    </span>
                  </footer>
                </article>
              {%- endfor -%}
              {% render 'pagination', paginate: paginate, anchor: anchorId %}
            </div>
          {% endpaginate %}
        {%- endif -%}
        
        {% form 'new_comment', article %}
          {%- liquid
            assign post_message = 'blogs.article.success'
            if blog.moderated? and comment.status == 'unapproved'
              assign post_message = 'blogs.article.success_moderated'
            endif
          -%}
          <h2>{{ 'blogs.article.comment_form_title' | t }}</h2>
          {%- if form.errors -%}
            <div class="form__message" role="alert">
              <h3 class="form-status caption-large text-body" tabindex="-1" autofocus>
                <span class="svg-wrapper">
                  {{- 'icon-error.svg' | inline_asset_content -}}
                </span>
                {{ 'templates.contact.form.error_heading' | t }}
              </h3>
            </div>
            <ul class="form-status-list caption-large">
              {%- for field in form.errors -%}
                <li>
                  <a href="#CommentForm-{{ field }}" class="link">
                    {%- if form.errors.translated_fields[field] contains 'author' -%}
                      {{ 'blogs.article.name' | t }}
                    {%- elsif form.errors.translated_fields[field] contains 'body' -%}
                      {{ 'blogs.article.message' | t }}
                    {%- else -%}
                      {{ form.errors.translated_fields[field] }}
                    {%- endif -%}
                    {{ form.errors.messages[field] }}
                  </a>
                </li>
              {%- endfor -%}
            </ul>
          {%- elsif form.posted_successfully? -%}
            <div class="form-status-list form__message" role="status">
              <h3 class="form-status" tabindex="-1" autofocus>
                <span class="svg-wrapper">
                  {{- 'icon-success.svg' | inline_asset_content -}}
                </span>
                {{ post_message | t }}
              </h3>
            </div>
          {%- endif -%}

          <div
            {% if blog.moderated? == false %}
              class="article-template__comments-fields"
            {% endif %}
          >
            <div class="article-template__comment-fields">
              <div class="field field--with-error">
                <input
                  type="text"
                  name="comment[author]"
                  id="CommentForm-author"
                  class="field__input"
                  autocomplete="name"
                  value="{{ form.author }}"
                  aria-required="true"
                  required
                  {% if form.errors contains 'author' %}
                    aria-invalid="true"
                    aria-describedby="CommentForm-author-error"
                  {% endif %}
                  placeholder="{{ 'blogs.article.name' | t }}"
                >
                <label class="field__label" for="CommentForm-author">
                  {{- 'blogs.article.name' | t }}
                  <span aria-hidden="true">*</span></label
                >
                {%- if form.errors contains 'author' -%}
                  <small id="CommentForm-author-error">
                    <span class="form__message">
                      <span class="svg-wrapper">
                        {{- 'icon-error.svg' | inline_asset_content -}}
                      </span>
                      {{- 'blogs.article.name' | t }}
                      {{ form.errors.messages.author }}.</span
                    >
                  </small>
                {%- endif -%}
              </div>
              <div class="field field--with-error">
                <input
                  type="email"
                  name="comment[email]"
                  id="CommentForm-email"
                  autocomplete="email"
                  class="field__input"
                  value="{{ form.email }}"
                  autocorrect="off"
                  autocapitalize="off"
                  aria-required="true"
                  required
                  {% if form.errors contains 'email' %}
                    aria-invalid="true"
                    aria-describedby="CommentForm-email-error"
                  {% endif %}
                  placeholder="{{ 'blogs.article.email' | t }}"
                >
                <label class="field__label" for="CommentForm-email">
                  {{- 'blogs.article.email' | t }}
                  <span aria-hidden="true">*</span></label
                >
                {%- if form.errors contains 'email' -%}
                  <small id="CommentForm-email-error">
                    <span class="form__message">
                      <span class="svg-wrapper">
                        {{- 'icon-error.svg' | inline_asset_content -}}
                      </span>
                      {{- 'blogs.article.email' | t }}
                      {{ form.errors.messages.email }}.</span
                    >
                  </small>
                {%- endif -%}
              </div>
            </div>
            <div class="field field--with-error">
              <textarea
                rows="5"
                name="comment[body]"
                id="CommentForm-body"
                class="text-area field__input"
                aria-required="true"
                required
                {% if form.errors contains 'body' %}
                  aria-invalid="true"
                  aria-describedby="CommentForm-body-error"
                {% endif %}
                placeholder="{{ 'blogs.article.message' | t }}"
              >{{ form.body }}</textarea>
              <label class="form__label field__label" for="CommentForm-body">
                {{- 'blogs.article.message' | t }}
                <span aria-hidden="true">*</span></label
              >
            </div>
            {%- if form.errors contains 'body' -%}
              <small id="CommentForm-body-error">
                <span class="form__message">
                  <span class="svg-wrapper">
                    {{- 'icon-error.svg' | inline_asset_content -}}
                  </span>
                  {{- 'blogs.article.message' | t }}
                  {{ form.errors.messages.body }}.</span
                >
              </small>
            {%- endif -%}
          </div>
          {%- if blog.moderated? -%}
            <p class="article-template__comment-warning caption">{{ 'blogs.article.moderated' | t }}</p>
          {%- endif -%}
          <input type="submit" class="button" value="{{ 'blogs.article.post' | t }}">
        {% endform %}
      </div>
    </div>
  {%- endif -%}
</article>

<script>
  (function () {
    var SELECTOR = '.article-template';

    function inArticle(node) {
      return node && node.closest && node.closest(SELECTOR);
    }

    // 1) Stop blocker scripts (which listen on document/body) from killing
    //    selection — but only for events that start inside the blog article.
    ['selectstart', 'mousedown', 'contextmenu', 'copy', 'cut'].forEach(function (evt) {
      window.addEventListener(evt, function (e) {
        if (inArticle(e.target)) e.stopPropagation();
      }, true); // capture phase = runs before the blocker's listeners
    });

    // 2) Kill the native element-dragging (the ghost image + red no-drop cursor).
    window.addEventListener('dragstart', function (e) {
      if (inArticle(e.target)) {
        e.stopPropagation();
        e.preventDefault();
      }
    }, true);

    // 3) Clear property-based blockers and draggable flags, and re-apply a few
    //    times in case the app sets them again after the page loads.
    function unlock() {
      try {
        document.onselectstart = null;
        document.onmousedown = null;
        document.ondragstart = null;
        document.oncontextmenu = null;
      } catch (err) {}

      var article = document.querySelector(SELECTOR);
      if (!article) return;
      article.onselectstart = null;
      article.onmousedown = null;
      article.ondragstart = null;

      var all = article.querySelectorAll('*');
      for (var i = 0; i < all.length; i++) {
        all[i].setAttribute('draggable', 'false');
        all[i].style.setProperty('user-select', 'text', 'important');
        all[i].style.setProperty('-webkit-user-select', 'text', 'important');
        all[i].style.setProperty('-webkit-user-drag', 'none', 'important');
      }
      article.style.setProperty('user-select', 'text', 'important');
      article.style.setProperty('-webkit-user-select', 'text', 'important');
    }

    if (document.readyState !== 'loading') unlock();
    document.addEventListener('DOMContentLoaded', unlock);
    setTimeout(unlock, 500);
    setTimeout(unlock, 1500);
    setTimeout(unlock, 3500);
  })();
</script>

<script type="application/ld+json">
  {{ article | structured_data }}
</script>

{% schema %}
{
  "name": "t:sections.main-article.name",
  "tag": "section",
  "class": "section",
  "blocks": [
    {
      "type": "@app"
    },
    {
      "type": "featured_image",
      "name": "t:sections.main-article.blocks.featured_image.name",
      "limit": 1,
      "settings": [
        {
          "type": "select",
          "id": "image_height",
          "options": [
            {
              "value": "adapt",
              "label": "t:sections.main-article.blocks.featured_image.settings.image_height.options__1.label"
            },
            {
              "value": "small",
              "label": "t:sections.main-article.blocks.featured_image.settings.image_height.options__2.label"
            },
            {
              "value": "medium",
              "label": "t:sections.main-article.blocks.featured_image.settings.image_height.options__3.label"
            },
            {
              "value": "large",
              "label": "t:sections.main-article.blocks.featured_image.settings.image_height.options__4.label"
            }
          ],
          "default": "adapt",
          "label": "t:sections.main-article.blocks.featured_image.settings.image_height.label"
        }
      ]
    },
    {
      "type": "title",
      "name": "t:sections.main-article.blocks.title.name",
      "limit": 1,
      "settings": [
        {
          "type": "checkbox",
          "id": "blog_show_date",
          "default": true,
          "label": "t:sections.main-article.blocks.title.settings.blog_show_date.label"
        },
        {
          "type": "checkbox",
          "id": "blog_show_author",
          "default": false,
          "label": "t:sections.main-article.blocks.title.settings.blog_show_author.label"
        }
      ]
    },
    {
      "type": "content",
      "name": "t:sections.main-article.blocks.content.name",
      "limit": 1
    },
    {
      "type": "share",
      "name": "t:sections.main-article.blocks.share.name",
      "limit": 2,
      "settings": [
        {
          "type": "text",
          "id": "share_label",
          "label": "t:sections.main-article.blocks.share.settings.text.label",
          "default": "t:sections.main-article.blocks.share.settings.text.default"
        }
      ]
    }
  ]
}
{% endschema %}