/* 搜索栏 */
.search-bar {
    background-color: var(--white);
    border-radius: 10px;
    padding: 20px;
    margin: 30px 0;
  }
  
  .search-container {
    display: flex;
    align-items: center;
    border: 2px solid var(--primary-blue);
    border-radius: 10px;
    overflow: hidden;
  }
  
  .search-container input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    outline: none;
  }
  
  .search-container button {
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
  }

  /* 排序筛选 */
  .filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }
  
  .sort-options {
    display: flex;
    gap: 15px;
  }

  .sort-options a {
    text-decoration: none;
  }
  
  .sort-option {
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .sort-option:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
  }
  
  .sort-option.active {
    background-color: var(--primary-blue);
    color: var(--white);
  }

  .view-options {
    display: flex;
    gap: 10px;
  }
  
  .view-option {
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    background-color: var(--white);
  }
  
  .view-option.active {
    background-color: var(--light-pink);
    color: var(--primary-pink);
  }
  
  /* 博客列表部分 - 封面靠左布局 */
  .content-wrapper {
    display: flex;
    margin-bottom: 50px;
  }
  
  .blog-list, .blog-content {
    /* flex: 3; */
  }
  
  .sidebar {
    /* flex: 1; */
  }
  
  .blog-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;  /* 使用flex布局 */
    text-decoration: none;
    cursor: pointer;
  }
  
  .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  }

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

  .blog-card-img {
    /* width: 280px;  固定宽度 */
    /* min-height: 200px; */
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;  /* 防止图片被压缩 */
    background-size: cover; /* 关键属性 */
    background-position: center; /* 图片居中显示 */
    background-repeat: no-repeat; /* 禁止重复 */
  }

  /* 响应式设计 */

  @media (min-width: 1201px) {
    .blog-card-img {
      width: 280px;
      min-height: 200px;
    }
  }

  @media (max-width: 1200px) {
    .blog-card-img {
      width: 200px;
      min-height: 142.85px;
    }
  }

  @media (max-width: 768px) {
    .blog-card-img {
      width: 140px;
      min-height: 100px;
    }
  }

  /* 响应式设计 */
  @media (max-width: 576px) {
    .blog-card-img {
      width: 100px;
      min-height: 71.5px;
    }
  }
  
  .blog-card-content {
    padding: 20px;
    flex: 1;  /* 内容区域占据剩余空间 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .blog-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .blog-tag {
    background-color: var(--light-blue);
    color: var(--primary-blue);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
  }
  
  .blog-tag.featured {
    background-color: var(--light-pink);
    color: var(--primary-pink);
  }
  
  .blog-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--dark-gray);
  }
  
  .blog-excerpt {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
  }
  
  .blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #888;
    margin-top: auto;  /* 将meta信息推到底部 */
  }
  
  .blog-meta .author {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .blog-meta .author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ddd;
  }
  
  /* 侧边栏样式 */
  .sidebar-widget {
    background-color: var(--white);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .widget-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-blue);
    color: var(--primary-blue);
  }
  
  /* 热门博客 */
  .popular-posts .post-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    text-decoration: none;
    color: rgb(33, 37, 41);
  }
  
  .popular-posts .post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }
  
  .popular-posts .post-thumb {
    width: 70px;
    height: 50px;
    border-radius: 5px;
    background-color: #ddd;
    flex-shrink: 0;
    background-size: cover; /* 关键属性 */
    background-position: center; /* 图片居中显示 */
    background-repeat: no-repeat; /* 禁止重复 */
  }
  
  .popular-posts .post-info {
    flex: 1;
  }
  
  .popular-posts .post-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
  }

  .popular-posts .post-item:hover .post-title {
    color: var(--primary-blue);
  }
  
  .popular-posts .post-meta {
    font-size: 12px;
    color: #888;
  }
  
  /* 相关博客标签 */
  .tags-widget .tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .tags-widget .tag {
    background-color: var(--light-blue);
    color: var(--primary-blue);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.3s;
  }
  
  .tags-widget .tag:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    cursor: pointer;
  }
  
  /* 分页 */
  .pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
  }
  
  .page-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
  }
  
  .page-item:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
  }
  
  .page-item.active {
    background-color: var(--primary-blue);
    color: var(--white);
  }

  .blog-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    overflow: hidden;
}
