/* 文章列表页样式 */

/* Banner图片高度限制 */
.page-banner {
  overflow: hidden;
  max-height: 250px;
}

.page-banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 250px;
}

/* 页面整体容器 */
.page-content {
  background-color: #f5f5f5;
  padding: 30px 0 60px;
}

.page-content .container {
  width: 1200px;
  margin: 0 auto;
}

/* 内容包装器 */
.content-wrapper {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* 左侧边栏 */
.sidebar {
  width: 220px;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  margin-top: -112px;
}

.sidebar-title {
  background: linear-gradient(135deg, #0e458a 0%, #1a5dad 100%);
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  padding: 20px 20px;
  text-align: center;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav li {
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-nav li:last-child {
  border-bottom: none;
}

.sidebar-nav li a {
  display: block;
  padding: 16px 20px;
  color: #333;
  font-size: 18px;
  font-weight: 500;
  transition: all 0.3s;
  position: relative;
}

.sidebar-nav li a:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 100%;
  background: #0e458a;
  transition: width 0.3s;
  z-index: 0;
}

.sidebar-nav li a span {
  position: relative;
  z-index: 1;
}

.sidebar-nav li:hover a {
  color: #0e458a;
  background-color: #f0f5fa;
  padding-left: 32px;
}

.sidebar-nav li:hover a:before,
.sidebar-nav li.active a:before {
  width: 4px;
}

.sidebar-nav li.active a {
  background-color: #f0f5fa;
  color: #0e458a;
  font-weight: 500;
  padding-left: 32px;
}

/* 右侧文章列表容器 */
.article-list-container {
  flex: 1;
  background: #fff;
  border-radius: 4px;
  padding: 30px 40px;
  padding-top: 15px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 面包屑导航 */
.breadcrumb {
  font-size: 14px;
  color: #666;
  margin-bottom: 25px;
  /* padding-bottom: 15px; */
  border-bottom: 2px solid #0e458a;
}

.breadcrumb a {
  color: #0e458a;
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: #1a5dad;
  text-decoration: underline;
}

.breadcrumb span {
  color: #333;
  font-weight: 500;
}

/* 文章列表 */
.article-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list li {
  border-bottom: 1px dashed #e0e0e0;
  transition: background-color 0.3s;
}

.article-list li:last-child {
  border-bottom: none;
}

.article-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 10px;
  transition: all 0.3s;
  position: relative;
}

.article-list li a:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 0;
  background: #0e458a;
  transition: height 0.3s;
}

.article-list li:hover {
  background-color: #f9fbfd;
}

.article-list li:hover a:before {
  height: 60%;
}

.article-title {
  flex: 1;
  font-size: 19px;
  font-weight: 500;
  color: #333;
  padding-left: 18px;
  transition: all 0.3s;
  position: relative;
  line-height: 1.7;
}

.article-title:before {
  content: "●";
  position: absolute;
  left: 0;
  color: #0e458a;
  font-size: 20px;
  transition: transform 0.3s;
}

.article-list li:hover .article-title {
  color: #0e458a;
  padding-left: 23px;
  font-weight: 500;
}

.article-list li:hover .article-title:before {
  transform: translateX(3px);
}

.article-date {
  color: #0e458a;
  font-size: 15px;
  margin-left: 20px;
  flex-shrink: 0;
  transition: color 0.3s;
}

.article-list li:hover .article-date {
  color: #0e458a;
}

/* 分页 */
.pagination {
  margin-top: 40px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 14px;
  color: #333;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  transition: all 0.3s;
  font-size: 14px;
}

.pagination a:hover {
  background: #0e458a;
  color: #fff;
  border-color: #0e458a;
}

.pagination a.active {
  background: #0e458a;
  color: #fff;
  border-color: #0e458a;
  font-weight: bold;
}

.pagination a.disabled {
  color: #ccc;
  cursor: not-allowed;
  background: #f5f5f5;
}

.pagination a.disabled:hover {
  background: #f5f5f5;
  color: #ccc;
  border-color: #ddd;
}

.pagination span {
  border: none;
  background: transparent;
  padding: 8px 5px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .page-content .container {
    width: 96%;
    padding: 0 2%;
  }
}

@media (max-width: 991px) {
  .content-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    margin-bottom: 20px;
    margin-top: 0;
  }

  .sidebar-title {
    cursor: pointer;
    position: relative;
    user-select: none;
  }
  .sidebar-nav li a {
    padding: 16px 15px;
    font-size: 15px;
  }
  .sidebar-title {
    background: linear-gradient(135deg, #0e458a 0%, #1a5dad 100%);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    padding: 10px 10px;
    text-align: center;
  }

  .sidebar-title:after {
    content: "▲";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: transform 0.3s;
  }

  .sidebar.collapsed .sidebar-title:after {
    transform: translateY(-50%) rotate(180deg);
  }

  .sidebar-nav {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }

  .sidebar.collapsed .sidebar-nav {
    max-height: 0;
  }

  .sidebar-nav li {
    flex: 0 0 50%;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
  }

  .sidebar-nav li:nth-child(2n) {
    border-right: none;
  }

  .article-list-container {
    padding: 20px 25px;
  }
}

@media (max-width: 767px) {
  .sidebar-nav li {
    flex: 0 0 100%;
    border-right: none;
  }

  .article-list li a {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 10px;
  }

  .article-date {
    margin-left: 15px;
    margin-top: 8px;
    font-size: 13px;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .pagination a,
  .pagination span {
    padding: 6px 10px;
    font-size: 13px;
  }
}
