/* ============================================================

   ARTICLES PAGE - Content-Focused Design

   使用 products.css 的 Hero 区域，独立的文章列表样式

============================================================ */



/* ============================================================

   ARTICLES SECTION

============================================================ */

.articles-page {

  background: var(--white);

  padding: 52px 0 80px;

}



.articles-container {

  max-width: var(--max);

  margin: 0 auto;

  padding: 0 40px;

}



/* ============================================================

   FILTER BAR

============================================================ */

.articles-filter {

  display: flex;

  justify-content: space-between;

  align-items: flex-start;

  gap: 18px;

  padding-bottom: 18px;

  margin-bottom: 32px;

  border-bottom: 2px solid var(--line);

  flex-wrap: wrap;

}



.filter-tabs {

  display: flex;

  gap: 10px;

  flex-wrap: wrap;

  align-items: center;

}



.filter-tab {

  min-height: 38px;

  padding: 9px 22px;

  border-radius: 6px;

  font-size: 0.88rem;

  font-weight: 600;

  color: var(--ink-3);

  background: transparent;

  border: none;

  transition: all 0.25s var(--ease);

  cursor: pointer;

  position: relative;

}



.filter-tab:hover {

  color: var(--c1);

  background: var(--red-soft);

}



.filter-tab.active {

  color: var(--c1);

  background: var(--red-soft);

}



.filter-tab.active::after {

  content: '';

  position: absolute;

  bottom: -8px;

  left: 50%;

  transform: translateX(-50%);

  width: 34px;

  height: 2px;

  background: var(--c1);

  border-radius: 2px;

}



.articles-count {

  padding-top: 8px;

  font-size: 0.9rem;

  color: var(--muted);

  white-space: nowrap;

}



.articles-count strong {

  color: var(--c1);

  font-weight: 700;

  font-size: 1.1rem;

}



/* ============================================================

   ARTICLES LIST

============================================================ */

.articles-list {

  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 32px;

}



.article-item {

  display: flex;

  flex-direction: row;

  align-items: stretch;

  min-height: 150px;

  background: var(--white);

  border-radius: var(--r-md);

  overflow: hidden;

  border: 1px solid var(--line);

  transition: all 0.35s var(--ease);

  cursor: pointer;

}



.article-item:hover {

  border-color: var(--c1);

  box-shadow: 0 8px 24px rgba(155, 12, 14, 0.12);

  transform: translateY(-4px);

}



/* Article thumbnail - 更小的图片 */

.article-thumb {

  width: 180px;

  height: 180px;

  aspect-ratio: 1 / 1;

  overflow: hidden;

  background: var(--sand);

  flex-shrink: 0;

}



.article-thumb img {

  width: 100%;

  height: 100%;

  object-fit: cover;

  transition: transform 0.5s var(--ease);

}



.article-item:hover .article-thumb img {

  transform: scale(1.08);

}



/* Article body - 内容为主 */

.article-body {

  min-width: 0;

  padding: 24px 28px;

  flex: 1;

  display: flex;

  flex-direction: column;

}



.article-body h3 {

  font-family: var(--f-body);

  font-size: 1.15rem;

  font-weight: 700;

  line-height: 1.45;

  color: var(--ink);

  margin-bottom: 12px;

  display: -webkit-box;

  -webkit-line-clamp: 2;

  -webkit-box-orient: vertical;

  overflow: hidden;

  transition: color 0.3s var(--ease);

}



.article-item:hover .article-body h3 {

  color: var(--c1);

}



.article-body p {

  font-size: 0.92rem;

  line-height: 1.7;

  color: var(--muted);

  display: -webkit-box;

  -webkit-line-clamp: 3;

  -webkit-box-orient: vertical;

  overflow: hidden;

  flex: 1;

}



/* ============================================================

   PAGINATION

============================================================ */

.articles-pagination {

  display: flex;

  justify-content: center;

  align-items: center;

  gap: 10px;

  margin-top: 56px;

}



.page-btn {

  min-width: 44px;

  height: 44px;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding: 0 16px;

  border-radius: var(--r-sm);

  border: 1px solid var(--line);

  background: var(--white);

  color: var(--ink-3);

  font-size: 0.9rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.25s var(--ease);

}



.page-btn:hover {

  border-color: var(--c1);

  color: var(--c1);

  transform: translateY(-2px);

}



.page-btn.active {

  background: var(--c1);

  border-color: var(--c1);

  color: #fff;

}



.page-btn.next {

  padding: 0 20px;

  gap: 6px;

}



.page-btn.next i {

  font-size: 1.1rem;

}



/* ============================================================

   RESPONSIVE

============================================================ */

@media (max-width: 1024px) {

  .articles-container {

    padding: 0 32px;

  }



  .articles-list {

    grid-template-columns: 1fr;

    gap: 24px;

  }

}



@media (max-width: 768px) {

  .articles-page {

    padding: 40px 0 60px;

  }



  .articles-container {

    padding: 0 20px;

  }



  .articles-filter {

    flex-direction: column;

    align-items: flex-start;

    gap: 16px;

    padding-bottom: 18px;

    margin-bottom: 28px;

  }



  .filter-tabs {

    width: 100%;

    display: flex;

    flex-wrap: nowrap;

    gap: 10px;

    overflow-x: auto;

    overflow-y: hidden;

    padding-bottom: 8px;

    scrollbar-width: none;

    -ms-overflow-style: none;

    scroll-snap-type: x proximity;

  }



  .filter-tabs::-webkit-scrollbar {

    display: none;

  }



  .filter-tab {

    width: auto;

    flex: 0 0 auto;

    min-height: 36px;

    white-space: nowrap;

    padding: 8px 18px;

    font-size: 0.85rem;

    text-align: center;

    scroll-snap-align: start;

  }



  .filter-tab.active::after {

    bottom: 3px;

    width: 28px;

  }



  .articles-count {

    padding-top: 0;

  }



  .articles-list {

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 14px;

  }



  .article-item {

    flex-direction: column;

    min-height: 0;

    border-radius: 12px;

  }



  .article-thumb {

    width: 100%;

    height: auto;

    aspect-ratio: 1 / 1;

  }



  .article-body {

    padding: 12px;

  }



  .article-body h3 {

    font-size: 0.9rem;

    line-height: 1.35;

    margin-bottom: 8px;

  }



  .article-body p {

    font-size: 0.78rem;

    line-height: 1.55;

    -webkit-line-clamp: 2;

  }



}



@media (max-width: 480px) {

  .articles-container {

    padding: 0 16px;

  }



  .filter-tab {

    padding: 7px 8px;

    font-size: 0.8rem;

  }



  .article-thumb {

    width: 100%;

    height: auto;

    aspect-ratio: 1 / 1;

  }



  .article-body {

    padding: 10px;

  }



  .article-body h3 {

    font-size: 0.84rem;

    margin-bottom: 7px;

  }



  .article-body p {

    font-size: 0.74rem;

    -webkit-line-clamp: 2;

  }



  .articles-pagination {

    margin-top: 40px;

    gap: 6px;

  }



  .page-btn {

    min-width: 38px;

    height: 38px;

    font-size: 0.85rem;

  }

}

