/* =====================================================================
 * blog.css — 博客列表页样式（根据设计图）
 * 
 * 【代码规范 — 请务必遵守】
 * 1. 不重写 h1/h2/h3 标题元素（由 common.css 统一定义）
 * 2. 优先复用 common.css 工具类：.section-container / .section-content / .bgf9f9f9
 * 3. 本文件只写博客模块独有的样式
 * ===================================================================== */

.blog {
  margin-top: 85px;
}

.blog-hero-featured{
  min-height: 400px;
}

.hero-header {
  display: flex;
  align-items: center;
}

.hero-header .title{

}

/* ==================== Hero Featured Section ==================== */


.section-label {
  display: inline-block;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

/* ==================== Featured Article Card ==================== */
.featured-article-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  background: #fff;
  overflow: hidden;
  transition: all 0.4s ease;
  /* border: 1px solid #ccc; */
  align-items: center;
  margin-top: 30px;
  text-decoration: none;
}


.featured-card-image {
  position: relative;
  overflow: hidden;
  height: 100%;
  height: 300px;
  padding: 15px;
}

.featured-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.featured-article-card:hover .featured-card-image img {
  transform: scale(1.05);
}

.featured-card-content {
  padding: 50px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-feature-title{
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.article-feature-title:hover{
  color: var(--primary);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 14px;
}

.article-category {
  color: #1a1a1a;
  font-weight: 600;
}

.article-separator {
  color: #ccc;
}

.article-date {
  color: #666;
}

/* 只调整 h2 的颜色和间距，不重写字号和字重 */
.featured-card-content h2 {
  color: #1a1a1a;
  margin-bottom: 16px;
}

.article-excerpt {
  font-size: 16px;
  line-height: 1.7;
  color: #666;
  margin-bottom: 30px;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  flex-grow: 1;
}

.article-arrow {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 50%;
  color: #1a1a1a;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-left: auto;
}

.article-arrow:hover {
  background: var(--primary);
  color: #fff;
  transform: translateX(4px);
}

/* ==================== Blog Grid Section ==================== */
.blog-grid-section.section-container {
  background-color: #fff;
}

.grid-header {
  margin-bottom: 50px;
}



.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}

.blog-card {
  background: #fff;
  border-radius: 10px;
  overflow: visible;
  border: 1px solid #e5e5e5;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  text-decoration: none;
}

.blog-card:hover {
  border-color: #ddd;
}

.blog-card-image {
  position: relative;
  overflow: hidden;
  height: 280px;
  background: #f5f5f5;
  border-radius: 12px 12px 0 0;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.08);
}

.blog-card-content {
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
}

.blog-card-content .article-meta {
  font-size: 13px;
  margin-bottom: 16px;
}

/* 只调整 h3 的颜色和间距，不重写字号和字重 */
.blog-card-content .blog-item-title {
  color: var(--text-dark);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-content .blog-item-title:hover{
  color: var(--primary);
}

.blog-card-content .article-excerpt {
  margin-bottom: 10px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.read-more-link:hover {
  color: var(--primary);
  gap: 12px;
}

.read-more-link i {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.read-more-link:hover i {
  transform: translateX(4px);
}


/* .blog-card::after {
  content: '\f08e'; 
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 0px;
  bottom: 0px;
  width: 100px;
  height: 100px;
  line-height: 100px;
  text-align: center;
  background: rgba(64, 72, 208, 1);
  border-bottom-right-radius: 10px;
  border-top-left-radius: 50px;
  color: #fff;
  font-size: 28px;
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
  z-index: 10;
} */

.blog-card::after {
  content: ''; /* 清空，不用字体 */
  position: absolute;
  right: 0px;
  bottom: 0px;
  width: 100px;
  height: 100px;

  /* 背景：你的卡片底色 + 箭头图片 */
  background: rgba(64, 72, 208, 1) url("/img/right-top.png") center no-repeat;
  background-size: 28px; /* 控制箭头大小 */

  border-bottom-right-radius: 10px;
  border-top-left-radius: 50px;
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
  z-index: 10;
}

.blog-card:hover::after {
  opacity: 1;
}


.blog-card:hover::after {
  opacity: 1;
}

/* ===========================
   Pagination
   =========================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 50px 0 10px;
}

.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-dark-gray);
  text-decoration: none;
  background-color: var(--color-white);
  transition: all var(--transition-fast);
}

.pagination .page-link:hover {
  border-color: var(--color-primary-red);
  color: var(--color-primary-red);
}

.pagination .page-link.active {
  background-color: var(--color-primary-red);
  border-color: var(--color-primary-red);
  color: var(--color-white);
}

.pagination .page-nav i {
  font-size: 12px;
}

.pagination .page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 42px;
  font-size: 14px;
  color: #999;
}

/* ==================== Responsive Design ==================== */

/* Tablet */
@media (max-width: 1024px) {
  .featured-article-card {
    grid-template-columns: 1fr;
  }

  .featured-card-image {
    height: 280px;
  }

  .featured-card-content {
    padding: 40px 30px;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .grid-header {
    margin-bottom: 40px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .hero-header{
    display: flex;
    flex-direction: column;
  }

  .hero-subtitle{
    margin-top: 10px;
    color: #666;
  }
  .blog {
    margin-top: 60px;
  }

  .blog-hero-featured {
    min-height: auto;
    padding: 30px 0;
  }

  .hero-header .title {
    font-size: 24px;
  }

  .section-label {
    font-size: 13px;
    margin-bottom: 10px;
  }

  /* Featured Article */
  .featured-article-card {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .featured-card-image {
    height: 240px;
    padding: 10px;
  }

  .featured-card-content {
    padding: 25px 20px;
  }

  .article-feature-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .article-meta {
    font-size: 13px;
    gap: 8px;
    margin-bottom: 15px;
  }

  .article-excerpt {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
  }

  .article-author {
    gap: 10px;
  }

  .author-avatar {
    width: 36px;
    height: 36px;
  }

  .author-name {
    font-size: 14px;
  }

  .article-arrow {
    width: 36px;
    height: 36px;
  }

  /* Blog Grid */
  .blog-grid-section.section-container {
    padding: 40px 0;
  }

  .grid-header {
    margin-bottom: 30px;
  }

  .grid-header h2 {
    font-size: 24px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
  }

  .blog-card-image {
    height: 220px;
  }

  .blog-card-content {
    padding: 24px 18px;
  }

  .blog-card-content .article-meta {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .blog-card-content .blog-item-title {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .blog-card-content .article-excerpt {
    font-size: 14px;
    margin-bottom: 15px;
  }

  .read-more-link {
    font-size: 14px;
  }

  /* Card hover effect */
  .blog-card::after {
    width: 80px;
    height: 80px;
    background-size: 22px;
  }

  .pagination {
    gap: 6px;
    margin: 35px 0 5px;
  }

  .pagination .page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 13px;
  }

  .pagination .page-ellipsis {
    min-width: 18px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .blog {
    margin-top: 60px;
  }

  .blog-hero-featured {
    padding: 20px 0;
  }

  .hero-header .title {
    font-size: 20px;
  }

  .section-label {
    font-size: 12px;
    letter-spacing: 0.5px;
  }

  /* Featured Article */
  .featured-article-card {
    margin-top: 15px;
  }

  .featured-card-image {
    height: 200px;
    padding: 8px;
  }

  .featured-card-content {
    padding: 20px 15px;
  }

  .article-feature-title {
    font-size: 16px;
    line-height: 1.4;
  }

  .article-meta {
    font-size: 12px;
    gap: 6px;
    margin-bottom: 12px;
  }

  .article-excerpt {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
  }

  .article-author {
    gap: 8px;
  }

  .author-avatar {
    width: 32px;
    height: 32px;
  }

  .author-name {
    font-size: 13px;
  }

  .article-arrow {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  /* Blog Grid */
  .blog-grid-section.section-container {
    padding: 30px 0;
  }

  .grid-header {
    margin-bottom: 20px;
  }

  .grid-header h2 {
    font-size: 20px;
  }

  .blog-grid {
    gap: 15px;
    margin-bottom: 30px;
  }

  .blog-card {
    border-radius: 8px;
  }

  .blog-card-image {
    height: 200px;
    border-radius: 8px 8px 0 0;
  }

  .blog-card-content {
    padding: 20px 15px;
  }

  .blog-card-content .article-meta {
    font-size: 11px;
    margin-bottom: 10px;
  }

  .blog-card-content .blog-item-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .blog-card-content .article-excerpt {
    font-size: 13px;
    margin-bottom: 12px;
    -webkit-line-clamp: 2;
  }

  .read-more-link {
    font-size: 13px;
  }

  .read-more-link i {
    font-size: 11px;
  }

  /* Card hover effect */
  .blog-card::after {
    width: 70px;
    height: 70px;
    background-size: 20px;
    border-bottom-right-radius: 8px;
  }

  .pagination {
    gap: 3px;
    margin: 20px 0 2px;
  }

  .pagination .page-link {
    min-width: 28px;
    height: 28px;
    padding: 0 4px;
    font-size: 11px;
  }

  .pagination .page-ellipsis {
    min-width: 14px;
    height: 28px;
  }
}
