@use 'vars.scss';
@import '_mixins';
@import '_variables';

.article-list-wrapper {
  flex: 1;
  max-width: 780px;
  min-height: inherit;
  position: relative;
  margin-bottom: 2rem;
  // margin-bottom: 5vh;

  @media (max-width: $MQMobile) {
    padding: 0 1.2rem;
    width: calc(100% - 1rem);
  }
}

.article-item-container {
  border-radius: var(--card-radius);
  overflow: hidden;
  @include card_item;

  &:not(:first-child) {
    margin-top: 2rem;
  }
  &:hover {
    // img[alt='article-cover'] {}
    .zp-img-container {
      transform: scale(1.1);
    }
  }

  .article-item-mobile-narrow {
    padding: 0.5rem !important;
  }
  .article-item {
    // padding: 0.5rem 1rem;
    @include flexBetween();
    align-items: flex-start;
    height: 100%;
    position: relative;

    .article-text {
      height: 100%;
      width: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      box-sizing: border-box;

      .article-name-ellipsis {
        @include textEllipsis(1);
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .article-name {
        display: inline-block;
        line-height: 2rem;
        font-size: 1.2rem;
        font-weight: 600;
        position: relative;
        max-width: max-content;
        margin: 0;

        // &::after {
        //   transition: width 0.2s;
        //   content: '';
        //   width: 0%;
        //   height: 0.15rem;
        //   background-color: var(--c-theme);
        //   position: absolute;
        //   bottom: 0;
        //   left: 0;
        // }
        // &:hover {
        //   &::after {
        //     width: 100%;
        //   }
        // }
        // @media (max-width: $MQMobile) {
        //   &:hover {
        //     &::after {
        //       width: 0%;
        //     }
        //   }
        // }
      }

      .cover-info-text {
        width: 100%;
        flex-grow: 1;
        font-size: 0.87rem;
        line-height: 1.7;
        padding: 5px 0;
        @include textEllipsis(4);

        @media (max-width: $MQMobileNarrow) {
          margin-right: 0 !important;
        }
        p {
          margin: 0;
          line-height: 1.6;
        }
        .custom-article-excerpt {
          margin-top: 0rem !important;
        }
      }
    }
    // .transition-zone {
    //   position: absolute;
    //   left: calc(50% - 0.4rem);
    //   top: -1%;
    //   width: 0.8rem;
    //   height: 102%;
    //   filter: blur(3px);
    //   z-index: 1;
    //   background-position: left;
    // }
    .article-cover {
      height: 100%;
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }
  }
  .mobile-article-cover-box {
    overflow: hidden;
    .zp-img-container {
      transition: transform var(--t-scale-img);
    }
    .mobile-article-cover {
      // margin-bottom: -0.5rem;
      width: 100%;
      height: 11rem;
      background-position: center;
      background-repeat: no-repeat;
      border-bottom-left-radius: 0 !important;
      border-bottom-right-radius: 0 !important;
      object-fit: cover;
    }
  }
}

.article-info-wrapper {
  margin-top: 0.3rem;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-content: stretch;
  align-items: center;
  justify-content: flex-start;

  .category-text {
    color: inherit;
    font-size: 0.9rem;
    font-weight: normal;
    &:hover {
      text-decoration: none;
    }
    &:not(&:first-child) {
      &::before {
        content: '/';
        margin: 0 0.3rem;
      }
    }

    .icon-container {
      margin-right: 0;
    }
  }
  .article-info-items {
    .icon-text {
      margin-left: 0.3rem !important;
    }
  }
}
