.blog-page {
  h1 {
    margin-bottom: 30px;
    ~ p {
      max-width: 730px;
      margin: auto;
      line-height: 1.8;
      text-align: center;
      color: #292984;
      @include breakpoint(min-xsmall) {
        font-size: 16px;
        margin-bottom: 75px;
      }
      @include breakpoint(xsmall) {
        font-size: 12px;
        margin-bottom: 60px;
        padding-left: 15px;
        padding-right: 15px;
      }
    }
  }
  .blog-articles {
    article {
      display: flex;
      flex-wrap: wrap;
      position: relative;
      width: 100%;
      transition: 0.3s;
      border-top: 1px solid #eaeaf3;
      &:nth-child(3n-2) {
        &:before {
          background-color: #8f68fc;
        }
      }
      &:nth-child(3n-1) {
        &:before {
          background-color: #05d2dd;
        }
      }
      &:nth-child(3n) {
        &:before {
          background-color: #292984;
        }
      }
      &:last-child {
        border-bottom: 1px solid #eaeaf3;
      }
      &:before {
        content: "";
        height: 64px;
        position: absolute;
        top: -1px;
        @include breakpoint(min-small) {
          width: 6px;
          left: 60px;
        }
        @include breakpoint(small) {
          width: 4px;
          left: 0;
        }
      }

      &:hover {
        z-index: 2;
        box-shadow: 0 0 0 1px #8f68fc, 0px 2px 12px rgba(41, 41, 132, 0.24);
        &:before {
          left: 0;
        }
      }

      .date {
        position: absolute;
        line-height: 1.8;
        top: 20px;
        color: #292984;
        opacity: 0.6;
        @include breakpoint(min-small) {
          font-size: 14px;
          left: 95px;
        }
        @include breakpoint(small) {
          font-size: 10px;
          left: 15px;
        }
      }
      .header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        margin-bottom: 30px;
        h2 {
          @include breakpoint(min-medium) {
            width: 70%;
          }
          @include breakpoint(medium) {
            width: 100%;
            margin-bottom: 25px;
          }
        }
        .author-item {
          display: flex;
          align-items: center;
          padding-left: 30px;
          @include breakpoint(medium) {
            padding-left: 0;
          }
          span {
            font-size: 14px;
            line-height: 1.8;
            color: #292984;
            opacity: 0.6;
            &.author {
              font-size: 16px;
              line-height: 1.8;
              color: #8f68fc;
              padding: 0;
              margin: 0;
              border-top: 0;
            }
          }
          img {
            max-width: 60px;
            max-height: 60px;
            border-radius: 50%;
            margin-right: 15px;
          }
        }
      }
      h2,
      h3,
      h4,
      h5,
      h6 {
        text-transform: none;
        letter-spacing: normal;
      }

      > a {
        display: block;
        width: 100%;
        text-decoration: none;
        color: _color(main-color);
        @include breakpoint(min-small) {
          padding: 65px 95px;
        }
        @include breakpoint(small) {
          padding: 60px 15px 45px 15px;
        }
        > :last-child {
          margin: 0;
        }

        h2 {
          margin: 0;
          font-size: 42px;
          font-family: _add-font(second-family);
          text-transform: none;
          letter-spacing: 0;
          @include breakpoint(medium) {
            font-size: 30px;
          }
          line-height: 1.2;
        }
        .content {
          max-width: 730px;
          overflow: hidden;
          text-overflow: ellipsis;
          p {
            line-height: 1.8;
            margin-bottom: 0;
            @include breakpoint(min-small) {
              font-size: 20px;
            }
            @include breakpoint(small) {
              font-size: 16px;
            }
          }
        }
        &:hover {
          h2 {
            color: _color(purple-color);
          }
        }
      }
      .tags {
        @include breakpoint(min-small) {
          position: absolute;
          left: 95px;
          bottom: 65px;
          + a {
            padding-bottom: 125px;
          }
        }
        @include breakpoint(small) {
          order: 2;
          margin: 0 -20px 0 15px;
          padding-bottom: 38px;
          + a {
            padding-bottom: 25px;
          }
        }
      }
    }
  }
  .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    @include breakpoint(min-small) {
      padding-top: 75px;
    }
    @include breakpoint(small) {
      padding-top: 45px;
    }
    .button {
      font-weight: 400;
      line-height: 1.6;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #ffffff;
      margin: 0;
      height: auto;
      &:not(:last-child) {
        margin-right: 15px;
      }
      @include breakpoint(min-small) {
        font-size: 18px;
        min-width: 160px;
        padding: 12px 0;
      }
      @include breakpoint(small) {
        font-size: 14px;
        min-width: 130px;
        padding: 9px 0;
      }
    }
  }
  #tag-cloud {
    margin-bottom: 75px;
  }
}

.post {
  h1 {
    font-size: 66px;
    line-height: 1.2;
    margin-bottom: 30px;
  }
  .latest {
    display: flex;
    flex-wrap: wrap;
    max-width: 1140px;
    margin: 0 auto 75px auto;
    padding: 0 15px;
    article {
      background-color: #ffffff;
      box-shadow: 0px 0px 8px rgba(41, 41, 132, 0.12);
      position: relative;
      transition: all 0.3s;
      display: flex;
      @include breakpoint(min-medium) {
        width: calc(50% - 15px);
        &:nth-child(2n-1) {
          margin-right: 30px;
        }
      }
      @include breakpoint(medium) {
        width: 100%;
      }
      @include breakpoint(min-small) {
        margin-bottom: 30px;
      }
      @include breakpoint(small) {
        margin-bottom: 15px;
        p {
          font-size: 12px;
          & .title {
            font-size: 22px;
          }
        }
      }
      &:before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 6px;
        height: 100%;
        background-color: #05d2dd;
      }
      &:nth-child(3) {
        &:before {
          background-color: #ff961c;
        }
      }
      &:nth-child(4) {
        &:before {
          background-color: #8b8bb8;
        }
      }
      &:hover {
        outline: 1px solid #8f68fc;
        box-shadow: 0px 8px 24px rgba(41, 41, 132, 0.12);
        transform: translateY(-8px);
      }
      a {
        background-color: #ffffff;
        display: block;
        padding: 30px;
        width: 100%;
        .title {
          font-family: "Kanit", sans-serif;
          font-size: 24px;
          font-weight: 500;
          line-height: 1.2;
          color: #292984;
          margin-bottom: 15px;
        }
      }
    }
  }
  .container {
    @media screen and (min-width: 760px) {
      max-width: 730px;
    }
    @media screen and (max-width: 759px) {
      padding: 0 15px;
    }
  }
  iframe {
    display: block;
    margin: auto;
    @include breakpoint(small) {
      width: 100%;
    }
  }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: auto;
  @include breakpoint(small) {
    margin-top: 25px;
  }
  @media screen and (min-width: 760px) {
    max-width: 730px;
  }
  @media screen and (max-width: 759px) {
    max-width: 100%;
    padding: 0 15px;
    .blog-page & {
      padding: 0;
    }
  }
  span {
    margin-right: 10px;
    @include breakpoint(min-small) {
      font-size: 16px;
    }
    @include breakpoint(small) {
      font-size: 12px;
      margin-bottom: 8px;
    }
  }
  a,
  .tag {
    position: relative;
    color: #ffffff;
    background-color: #ff961c;
    right: 0;
    line-height: 1;
    @include breakpoint(min-small) {
      font-size: 14px;
      padding: 8px 12px;
      margin: 0 8px 0 0;
    }
    @include breakpoint(small) {
      font-size: 12px;
      padding: 9px 12px;
      margin: 0 8px 8px 0;
    }
    &:hover {
      background-color: #05d2dd;
    }
  }
}
