/* Custom css, added by dev */
.main-blog {
  @media screen and (min-width: 1921px) {
    max-width: var(--page-width) !important;
    margin: 0 auto !important;
  }
}
.main-blog,
.article-template-wrapper {
  .breadcrumbs__list {
    a {
      background: linear-gradient(to right, #6b7177, #6b7177) 0 0.1rem / 0
        0.1rem no-repeat;
      background-position-x: right;
      background-position-y: bottom;
      transition:
        background-size 0.3s cubic-bezier(0.7, 0, 0.3, 1),
        color 0.3s cubic-bezier(0.7, 0, 0.3, 1);
      &:hover {
        background-size: 100% 0.1rem !important;
      }
    }
  }
}
.blog-articles--custom-grid {
  .blog-articles__article {
    @media screen and (max-width: 749px) {
      margin-bottom: 24px !important;
    }
  }
  > .blog-articles__article:first-child {
    .article-card-wrapper {
      @media (min-width: 750px) {
        width: 100%;
      }
      .article-card {
        @media (min-width: 990px) {
          column-gap: 50px;
        }
        @media screen and (min-width: 750px) and (max-width: 989px) {
          column-gap: 30px;
        }
        @media screen and (min-width: 750px) {
          flex-direction: row;
        }
        .card__inner {
          @media (min-width: 750px) {
            width: 50%;
          }
          @media screen and (min-width: 990px) {
            &::before{
              padding-bottom: 54rem !important;
            }
          }
        }
        .card__content {
          @media (min-width: 750px) {
            width: 50%;
          }
          .card__information {
            @media screen and (min-width: 750px) and (max-width: 989px) {
              padding: 1.3rem 1rem;
            }
            .card__heading {
              font-size: 24px;
            }
          }
          .article-card__excerpt{
            @media screen and (min-width: 750px) and (max-width: 989px) {
              margin-bottom: 14px;
            }
          }
        }
      }
    }
    margin-bottom: 40px;
  }

  .blog-remaining-grid {
    display: grid;
    grid-template-columns: 1fr;
    padding-top: 40px;
    border-top: 1px solid #e2e2e2;

    @media screen and (min-width: 750px) {
      grid-template-columns: repeat(3, 1fr);
      gap: 40px 20px;
    }
    @media screen and (max-width: 749px) {
      padding-top: 24px;
    }
  }
}

/* Article */
.article-template-wrapper {
  padding-top: 24px !important;
  .page-width {
    max-width: 96rem;
  }
  padding-top: 6.4rem;
  .article-breadcrumbs {
    max-width: 130rem;
    margin: 0 auto;
    .breadcrumbs__list {
      justify-content: center;
    }
  }
  .article-template {
    @media screen and (min-width: 750px) {
      padding-top: 2rem;
    }
    header {
      margin-top: 0 !important;
      text-align: center;
      .article-template__title {
        text-align: center;
        font-weight: 500;
      }
    }
    header > span:nth-of-type(2) {
      text-transform: none;
    }
    hr {
      margin: 30px 0;
    }
    a {
      color: #6b7177 !important;
    }
    h1,
    h2 {
      font-size: 32px;
      @media screen and (max-width: 989px) {
        font-size: 22px;
      }
    }
    h3 {
      font-size: 24px;
      @media screen and (max-width: 989px) {
        font-size: 22px;
      }
    }
    h2 {
      margin-top: 0;
      margin-bottom: 20px;
    }
    .media {
      img {
        margin-top: 0;
      }
    }
    img {
      margin-top: 1rem;
      margin-bottom: 0;
    }
    /* div {
      &:has(table) {
        overflow-x: auto;
      }
    } */
    table {
      table-layout: fixed;
      width: 100%;
      border-collapse: collapse;
      /* min-width: 720px; */
      text-align: center;
      border: 1px;
      @media (max-width: 749px) {
        display: block;
        overflow: auto;
      }
      thead {
        th {
          background-color: #f2f2f2;
          color: #6b7177;
          font-weight: 700;
        }
      }
      tbody {
        th {
          text-align: left;
          font-weight: 600;
          background-color: #f7f7f7;
          color: #6b7177;
          width: 18%;
        }
      }
      th,
      td {
        border: 1px solid #6b7177;
        padding: 14px 16px;
        vertical-align: middle;
        font-size: 16px;
        line-height: 1.5;
        @media (max-width: 749px) {
          font-size: 14px;
          padding: 12px;
        }
        p {
          text-align: left;
          margin: 0;
        }
      }
      td {
        padding-inline: 1.2rem;
        color: #6b7177;
        background-color: #ffffff;
      }
    }
    ul, 
    ol{
      padding: 0;
      li {
        text-align: left;
        margin-bottom: 14px;
        p {
          display: contents;
        }
      }
    }
    .article-template__excerpt {
      margin-top: 30px;
      .article-template__excerpt-inner {
        border: 1px solid #6b7177;
        padding: 14px 30px;
      }
    }
  }
  .article-share {
    margin: 2rem auto;
    .article-share__wrapper {
      display: flex;
      align-items: center;
      gap: 15px;
    }
    .article-share__label {
      text-transform: uppercase;
      font-weight: normal;
      font-size: 1.4rem;
      letter-spacing: 0.1rem;
      color: #6b7177;
    }
    .article-share__buttons {
      display: flex;
      gap: 10px;
      .article-share__link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 1px solid #e2e2e2;
        color: #6b7177;
        text-decoration: none;
        transition:
          transform 0.2s ease,
          border-color 0.2s ease;

        &:hover {
          transform: scale(1.05);
        }
        .article-share__icon {
          width: 20px;
          height: 20px;
        }
      }
    }
  }
  .blog-collection-grid-wrapper {
    padding-top: 15px;
    padding-bottom: 40px;
    margin: 0 auto;
    font-family: inherit;
    .blog-collection-grid__title {
      font-size: 28px;
      color: rgb(var(--color-foreground));
      margin-top: 0;
      margin-bottom: 20px;
      font-weight: 600;
      @media (max-width: 749px) {
        font-size: 22px;
      }
    }
    .blog-collection-grid__description {
      font-size: 14px;
      line-height: 1.6;
      color: #6b7177;
      margin-bottom: 36px;
      p {
        margin-bottom: 15px;
      }
    }
    .blog-collection-grid {
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: 260px;
      overflow-x: auto;
      gap: 20px;
      @media (min-width: 750px) {
        margin: 0 20px;
      }
      @media screen and (min-width: 990px) {
        align-self: center;
        scrollbar-width: thin;
        scrollbar-color: #b0b0b0 transparent;
      }
    }
    .blog-collection-card {
      .blog-collection-card__link {
        text-decoration: none;
        text-align: center;
        display: block;
        .blog-collection-card__image-wrapper {
          border: 1px solid rgb(229 160 96);
          border-radius: 4px;
          overflow: hidden;
          aspect-ratio: 1 / 1;
          display: flex;
          align-items: center;
          justify-content: center;
          background: #fff;
          padding: 8px;
          box-sizing: border-box;
          img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            transition: transform 0.4s ease-in-out;
            margin-top: 0;
            border-radius: 4px;
          }
        }
        .blog-collection-card__title {
          margin-top: 15px;
          font-size: 14px;
          font-weight: bold;
          color: rgb(229 160 96);
          letter-spacing: 1px;
        }
        &:hover {
          .blog-collection-card__image-wrapper img {
            transform: scale(1.06);
          }
        }
      }
    }
  }
}

.is-article-page {
  .page-width-desktop {
    padding-top: 50px;
    .title-wrapper-with-link {
      justify-content: center;
    }
    .article-card__excerpt {
      display: none;
    }
  }
  .slider-buttons {
    display: none;
  }
}

.article-card-wrapper {
  @media (max-width: 749px) {
    width: 100%;
  }
  .card {
    &:hover {
      .media.media--hover-effect {
        > img:first-child:only-child {
          @media screen and (min-width: 990px) {
            transform: scale(1);
          }
        }
      }
    }
  }
  .card__inner {
    &::before {
      padding-bottom: 44rem !important;
      @media screen and (min-width: 750px) and (max-width: 989px) {
        padding-bottom: 26rem !important;
      }
    }
    @media screen and (min-width: 990px) {
      cursor: pointer;
    }
    &:hover {
      .media.media--hover-effect {
        > img:first-child:only-child {
          @media screen and (min-width: 990px) {
            transform: scale(1.03);
            cursor: pointer;
          }
        }
      }
    }
  }
  .article-card {
    .card__content {
      .card__information {
        justify-content: center;
        text-align: left;
        padding: 20px;
        .card__heading {
          position: relative;
          font-size: 20px;
          color: #6b7177;
          @media screen and (max-width: 989px) {
            font-size: 16px;
          }
          a {
            display: inline;
            text-decoration: none;

            background-image: linear-gradient(#6b7177, #6b7177);
            background-repeat: no-repeat;
            background-position: 100% calc(100% - 0.1rem);
            background-size: 0 1px;

            transition: background-size 0.3s cubic-bezier(0.7, 0, 0.3, 1);
            &:hover {
              background-position: 0 calc(100% - 0.1rem);
              background-size: 100% 1px;
            }
          }
        }
        .card__heading {
          font-weight: normal;
        }
        .article-card__info {
          text-align: left;
          color: #6b7177;
          @media screen and (min-width: 750px) and (max-width: 989px) {
            margin-bottom: 14px;
            white-space: nowrap;
          }
        }
        .article-card__info > span:nth-of-type(2) {
          text-transform: none;
        }
        .article-card__button-wrapper {
          margin-top: 22px;
          @media screen and (min-width: 750px) and (max-width: 989px) {
            margin-top: auto;
          }
          .button {
            text-transform: uppercase;
            text-decoration: none;
          }
          .button:hover {
            background: #fff;
            border: 1px solid rgb(var(--color-foreground));
            color: rgb(var(--color-foreground));
          }
        }
      }
    }
  }
}

/* Article navigation */
.article-navigation {
  max-width: 88rem;
  margin: 0 auto;

  .article-navigation__inner {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding-top: 3rem;
    border-top: 1px solid #e2e2e2;
    @media screen and (max-width: 750px) {
      padding-top: 2.4rem;
    }
  }

  .article-navigation__link {
    flex: 1;
    max-width: 48%;

    &.article-navigation__link--next {
      text-align: right;
    }

    a {
      text-decoration: none;
      color: inherit;
      display: flex;
      flex-direction: column;

      /* &:hover {
        .article-navigation__title {
          text-decoration: underline;
        }
      } */
    }
  }

  .article-navigation__label {
    font-size: 1.3rem;
    text-transform: capitalize;
    letter-spacing: 0.05rem;
    color: #6b7177;
    margin-bottom: 0.5rem;
  }

  .article-navigation__title {
    color: #6b7177;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    @media screen and (max-width: 750px) {
      display: none;
    }
  }
}