.article-template > *:first-child:not(.article-template__hero-container) {
  margin-top: 5rem;
}

@media screen and (min-width: 750px) {
  .article-template > *:first-child:not(.article-template__hero-container) {
    margin-top: calc(5rem + var(--page-width-margin));
  }
}

.article-template__hero-container {
  max-width: 130rem;
  margin: 0 auto;
}

.article-template__hero-small {
  height: 11rem;
}

.article-template__hero-medium {
  height: 22rem;
}

.article-template__hero-large {
  height: 33rem;
}

@media screen and (min-width: 750px) and (max-width: 989px) {
  .article-template__hero-small {
    height: 22rem;
  }

  .article-template__hero-medium {
    height: 44rem;
  }

  .article-template__hero-large {
    height: 66rem;
  }
}

@media screen and (min-width: 990px) {
  .article-template__hero-small {
    height: 27.5rem;
  }

  .article-template__hero-medium {
    height: 55rem;
  }

  .article-template__hero-large {
    height: 82.5rem;
  }
}

.article-template header {
  margin-top: 4.4rem;
  margin-bottom: 2rem;
  line-height: calc(0.8 / var(--font-body-scale));
}

@media screen and (min-width: 750px) {
  .article-template header {
    margin-top: 5rem;
  }
}

.article-template__title {
  margin: 0;
}

.article-template__title:not(:only-child) {
  margin-bottom: 1rem;
}

.article-template__link {
  font-size: 1.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.article-template__link .icon-wrap {
  display: flex;
  margin-right: 1rem;
  transform: rotate(180deg);
}

.article-template__content {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.article-template__social-sharing {
  margin-top: 3rem;
}

.article-template__social-sharing + header,
.article-template__social-sharing + .article-template__content {
  margin-top: 1.5rem;
}

.article-template__comment-wrapper {
  margin-top: 5rem;
  padding: 2.7rem 0;
}

@media screen and (min-width: 750px) {
  .article-template__comment-wrapper {
    margin-top: 6rem;
    padding: 3.6rem 0;
  }
}

.article-template__comment-wrapper h2 {
  margin-top: 0;
}

.article-template__comments {
  margin-bottom: 5rem;
}

@media screen and (min-width: 750px) {
  .article-template__comments {
    margin-bottom: 7rem;
  }
}

.article-template__comments-fields {
  margin-bottom: 4rem;
}

.article-template__comments-comment {
  color: rgba(var(--color-foreground), 0.75);
  background-color: rgb(var(--color-background));
  margin-bottom: 1.5rem;
  padding: 2rem 2rem 1.5rem;
}

@media screen and (min-width: 750px) {
  .article-template__comments-comment {
    padding: 2rem 2.5rem;
  }
}

.article-template__comments-comment p {
  margin: 0 0 1rem;
}

.article-template__comment-fields > * {
  margin-bottom: 3rem;
}

@media screen and (min-width: 750px) {
  .article-template__comment-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-column-gap: 4rem;
  }
}

.article-template__comment-warning {
  margin: 2rem 0 2.5rem;
}

@media screen and (min-width: 990px) {
  .article-template__comments .pagination-wrapper {
    margin: 5rem 0 8rem;
  }
}

.article-template__back:last-child {
  margin-bottom: 3.2rem;
}

.article-ariane {
    .cg_ariane_string { position: relative; z-index: 2; margin: 0; padding-top: 20px; color: var(--rel-green);
        font-family: Montserrat; font-size: 14px; font-style: normal; font-weight: 400; line-height: 28px;
        > p {
            margin: 0;
            > a { color: var(--rel-green); text-decoration: none; font-family: Montserrat; font-size: 14px; font-style: normal; font-weight: 400; line-height: 28px; }
        }
        .metafield-single_line_text_field {
            color:  var(--rel-green); font-family: Montserrat; font-size: 14px; font-style: normal; font-weight: 400; line-height: 28px;
            &:last-child { color: var(--rel-green-60); }
        }
    }
}
.article-template {
    /* title */
    .article-heading {
        margin-top: 30px; margin-bottom: 50px;
        .article-template__title { margin-top: 10px; }

        .article-intro {
            margin-top: 24px;

            > p {
                color: var(--rel-body-color); font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 20px; font-style: normal; font-weight: 400; line-height: 31px; margin: 0;
                @media (max-width: 767px){ font-size: 16px; font-style: normal; font-weight: 500; line-height: 25px; }
            }
        }
    }


    /* tag and date */
    .sup-heading {
        display: flex;
        align-items: center;

        .tags-wrapper {
            margin-right: 8px;
            .article-tag { display: inline-block; padding:4px 8px; color: white; font-size: 12px; font-style: normal; font-weight: 500; line-height: 14px; letter-spacing: 0.36px; text-transform: uppercase; margin-right: 10px; background-color: var(--rel-orange-80); }
        }
        .circle-divider {
            > time { display: inline-block; margin-bottom: 4px; color: var(--rel-orange-80); font-family: Montserrat; font-size: 14px; font-style: normal; font-weight: 500; line-height: 25px; /* 178.571% */ letter-spacing: 0.84px; text-transform: uppercase; }
        }
        .article-template__reading-time {
            color: var(--rel-body-color); opacity: 0.6; text-transform: none; letter-spacing: normal; font-weight: 400;
        }
    }

    /*  */
    .article-template__content {

    }
}

/* Last Articles section */
.last-article-heading {
    margin-bottom: 32px;
    @media (max-width: 767px){ margin-bottom: 20px;}
}
.blog__posts.articles-wrapper {
    display: flex; justify-content: space-between;
    @media (max-width: 767px){ flex-direction: column; }

    /* li */
    .blog__post.article {
        width: calc((100% - 80px) / 3); max-width: calc((100% - 80px) / 3); flex-grow: unset; margin-left: 0; box-sizing: border-box;
        @media (max-width: 767px){ width: 100%; max-width: 100%; padding: 0 15px; }
        /* card-wrapper */
        .card-wrapper {
            position: relative;

            .card.article-card {
                position: static; height: auto;

                &:hover>.card__content .card__information { opacity: 1!important; }

                /* image wrapper */
                .card__inner {
                    position: relative; padding-bottom: 63%;
                    @media (max-width: 767px){ padding-bottom: 55%; }

                    &::before, &::after { display: none;}

                    .article-card__image-wrapper.card__media { position: absolute; left: 0; top: 0; bottom: 0; right: 0; border-radius: 0;
                        .article-card__image { position: absolute; left: 0; top: 0; bottom: 0; right: 0; overflow: hidden;
                            > img { position: absolute; left: 0; top: 0; bottom: 0; right: 0; object-fit: cover; height: 100%; width: 100%; }
                        }
                    }

                    /* Tags */
                    .tags-wrapper {
                         position: absolute; left: 16px; top: 16px;
                        .article-tag { display: inline-block; padding:4px 8px; color: white; font-size: 12px; font-style: normal; font-weight: 500; line-height: 14px; letter-spacing: 0.36px; text-transform: uppercase; margin-right: 10px; background-color: var(--rel-orange-80); }
                    }

                    /* in case of useless duplicate content */
                    .card__content { display: none; }
                }
                /* Article card content */
                .card__content {
                    background: var(--rel-orange-10); padding: 32px 0; width: 100%; text-align: left;
                    @media (max-width: 767px){ margin-left: 0; padding: 20px 0; transform: none; }


                    .card__information {
                        text-align: left; padding: 0; display: block; opacity: 1!important;
                        /* title */
                        .card__heading {
                            display: block; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;
                            .full-unstyled-link {
                                font-family: "Playfair Display"; color: var(--rel-green); font-size: 24px; font-style: normal; font-weight: 400; line-height: normal; text-decoration: none; letter-spacing: 0;
                                @media (max-width:767px){ font-size: 20px; }
                                /* overlay to make all the block clickable */
                                &::after { bottom: 0; content: ""; left: 0; position: absolute; right: 0; top: 0; z-index: 1; }

                                &:hover { text-decoration: none; }
                            }
                        }
                        /* date */
                        .article-card__info {
                            .circle-divider {
                                > time { display: inline-block; margin-bottom: 4px; color: var(--rel-orange-80); font-family: Montserrat; font-size: 14px; font-style: normal; font-weight: 500; line-height: 25px; /* 178.571% */ letter-spacing: 0.84px; text-transform: uppercase; }
                            }
                        }
                        /* excerpt */
                        .article-card__excerpt { display: none; }

                        /* footer (comments)*/
                        .article-card__footer { display: none; }

                        /* actions (see article) */
                        .actions {
                            text-align: left; margin-top: 20px;

                            .btn-link { color: var(--rel-green); font-size: 14px; font-style: normal; font-weight: 500; line-height: normal; letter-spacing: 0.42px; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; }
                        }
                    }
                }
            }
        }
    }
}
