.new-article,
.popular-article,
.other-article {
  display: block;
  text-decoration: none;
  background: var(--secondary-bgc);
  color: var(--primary-txt);
}

h3.heading-category {
  width: fit-content;
  margin: 0;
  margin-bottom: 1rem;
  padding: 0.5rem 1.25rem;
  color: var(--primary-txt);
  font-size: 1.75rem;
  background: var(--secondary-bgc);
  border-left: 0.25rem solid var(--primary-txt);
}

.new-article {
  height: fit-content;
  padding: 1rem;
  background: var(--secondary-bgc);
  border-bottom: 1px solid #ccc;
  border-radius: 0.5rem;
  border: 2px solid var(--border-clr);
  color: var(--primary-txt);
  line-height: 1.5;
  letter-spacing: 1px;
  transition: all 0.5s;
  margin-bottom: 0.5rem;
  break-inside: avoid;
}

.content-wrap {
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  display: block;
  line-height: 1.5;
}

.content-wrap * {
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box;
  word-wrap: break-word;
}

.content-wrap img,
.content-wrap iframe,
.content-wrap video,
.content-wrap table {
  display: none !important;
}

.content .content-left a:hover {
  background: var(--card-hover);
}

.new-article .top,
.popular-article .top {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 0.8em;
  color: gray;
}

.new-article .top > img,
.popular-article .top > img {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.3rem;
}

.new-article > h2 {
  margin: 0.5rem 0;
}

.new-article .icon-group {
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem;
}

.new-article .icon-group i {
  font-size: 1.25rem;
  cursor: pointer;
}

.new-article .icon-group .icon-group-left {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.new-article .icon-group .icon-group-left .fa-thumbs-up {
  margin-right: 0.2rem;
}
.new-article .icon-group .icon-group-left p {
  margin: 0;
  color: rgb(187, 184, 184);
}
.new-article .icon-group .icon-group-right {
  display: flex;
  gap: 1rem;
}
.new-article .icon-group .icon-group-right i:hover {
  color: rgba(226, 32, 32, 0.849);
}
.bookmark-icon.fa-solid {
  color: rgba(226, 32, 32, 0.849);
}
.popular-article-wrap,
.other-article-wrap {
  display: flex;
  flex-direction: column;
  margin-top: 2.5rem;
  padding: 1.5rem 1rem;
}

.popular-article-group {
  display: flex;
  padding-block: 1rem;
  padding-right: 0.625rem;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  color: var(--primary-txt);
  user-select: none;
}

.popular-article {
  flex-shrink: 0;
  width: 100%;
  max-width: 400px;
  padding: 1rem;
  background: var(--secondary-bgc);
  border: 2px solid var(--border-clr);
  border-radius: 0.5rem;
  line-height: 1.5;
  letter-spacing: 1px;
  transition: 300ms ease-in-out;
  cursor: pointer;
}

.popular-article:last-child {
  margin-right: 0;
}

.popular-article:hover {
  box-shadow: 0 0.25rem 0 var(--border-clr);
  transform: scale(1.05) translate(10px, -8px);
}

.popular-article-group::-webkit-scrollbar {
  height: 0.25rem;
}

.popular-article-group::-webkit-scrollbar-track {
  border-radius: 10px;
  margin: 20px 130px;
}

.popular-article-group::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: var(--border-clr);
  cursor: grab;
}

.other-article-group {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.125rem;
  /* padding: 3.125rem 1rem; */
}

/* .see-all {
	position: absolute;
	top: 1rem;
	right: 1rem;
	color: #333;
	border-bottom: 2px solid transparent;
	cursor: pointer;
}

.see-all:hover {
	border-bottom: 2px solid #333;
} */

.other-article {
  padding: 1rem;
  background: var(--secondary-bgc);
  color: var(--primary-txt);
  border: 2px solid var(--border-clr);
  border-radius: 0.5rem;
  transition: all 500ms ease-in-out;
  cursor: pointer;
  line-height: 1.5;
  letter-spacing: 1px;
}

.new-article h2,
.popular-article h2,
.other-article h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.new-article p,
.popular-article p,
.other-article p {
  position: relative;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.new-article p,
.other-article p {
  -webkit-line-clamp: 3;
}

.popular-article p {
  -webkit-line-clamp: 2;
}

/* =============================================== */
/* ====================       ==================== */
/* ==================== media ==================== */
/* ====================       ==================== */
/* =============================================== */
@media screen and (max-width: 768px) {
  /* 恢復圓角效果 */
  .new-article {
    /* border-radius: 0; */
    margin: 2px 5px;
  }

  .new-article:hover {
    background: var(--secondary-bgc);
  }

  .new-article:active {
    background: #ffeeee;
  }

  .popular-article-group .popular-article {
    width: 100%;
  }

  .popular-article-group .popular-article:hover {
    box-shadow: none;
    transform: none;
  }

  .popular-article-group .popular-article:active {
    box-shadow: 0 0.25rem 0 #ccc;
    transform: scale(1.05) translateY(-8px);
  }

  .other-article-group {
    grid-template-columns: repeat(1, 1fr);
    padding: 3.125rem 0;
  }

  .other-article-group .see-all:hover {
    border-bottom: none;
  }

  .other-article-group .see-all:active {
    border-bottom: 2px solid #333;
  }

  /* 恢復圓角效果並且增加外距 */
  .other-article-group .other-article {
    /* border-radius: 0; */
    margin: 2px 5px;
  }

  .other-article-group .other-article:hover {
    box-shadow: none;
  }
}
