/* 资讯中心页面样式 */

/* 页面布局 - 确保页脚吸附底部 */
.news-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.news-section {
  flex: 1;
  padding: 20px 0;
}

/* 页面标题 */
.page-header {
  background-color: #f0f2f5;
  padding: 100px 0 30px;
  text-align: center;
}

.page-header h1 {
  font-size: 36px;
  margin-bottom: 10px;
  color: #333;
}

.breadcrumb {
  color: #666;
  font-size: 14px;
}

.breadcrumb a {
  color: #1a73e8;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* 资讯筛选 */
.news-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.news-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.news-categories .category {
  padding: 8px 16px;
  border-radius: 20px;
  background-color: #f0f2f5;
  cursor: pointer;
  transition: all 0.3s;
}

.news-categories .category:hover {
  background-color: #e0e0e0;
}

.news-categories .category.active {
  background-color: #1a73e8;
  color: white;
}

.news-search {
  display: flex;
  align-items: center;
}

.news-search input {
  width: 200px;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px 0 0 4px;
  outline: none;
}

.news-search input:focus {
  border-color: #40a9ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.news-search .search-btn {
  height: 36px;
  padding: 0 15px;
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* 资讯列表 */
.news-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.news-item {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
  display: flex;
  flex-direction: row;
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.news-item-image {
  width: 280px;
  min-width: 280px;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.news-item-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s;
}

.news-item:hover .news-item-image img {
  transform: translate(-50%, -50%) scale(1.05);
}

.news-item-content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.news-item-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #888;
  font-size: 12px;
}

.news-item-title {
  font-size: 18px;
  margin-bottom: 10px;
  line-height: 1.4;
  font-weight: 600;
  color: #333;
}

.news-item-desc {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 3.2em; /* 2行 * 1.6行高 = 3.2em */
  height: 3.2em;
}

.news-item-link {
  align-self: flex-start;
  padding: 6px 12px;
  background-color: #f0f2f5;
  color: #1a73e8;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.3s;
}

.news-item-link:hover {
  background-color: #e0e0e0;
}

/* 分页 */
.pagination-divider {
  height: 1px;
  background-color: #e8e8e8;
  margin: 30px 0 20px;
  width: 100%;
}

.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.pagination-wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.pagination-item {
  min-width: 32px;
  height: 32px;
  margin: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  padding: 0 5px;
}

.pagination-item:hover {
  background-color: #f0f2f5;
  color: #1a73e8;
}

.pagination-item.active {
  background-color: #1a73e8;
  color: white;
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(26, 115, 232, 0.2);
}

.pagination-prev,
.pagination-next {
  padding: 0 10px;
  background-color: #f9f9f9;
  border: 1px solid #e8e8e8;
}

.pagination-prev:hover,
.pagination-next:hover {
  border-color: #1a73e8;
}

.pagination-ellipsis {
  color: #999;
  cursor: default;
}

.pagination-ellipsis:hover {
  background-color: transparent;
  color: #999;
}

.pagination-info {
  color: #666;
  font-size: 13px;
  margin-bottom: 20px;
}

/* 空状态样式 */
.empty-message {
  text-align: center;
  padding: 80px 0;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin: 20px 0 60px;
}

.empty-state-icon {
  font-size: 60px;
  color: #d9d9d9;
  margin-bottom: 20px;
}

.empty-state-text {
  font-size: 18px;
  color: #999;
  margin-bottom: 15px;
}

.empty-state-subtext {
  font-size: 14px;
  color: #666;
  margin-bottom: 25px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.refresh-btn {
  display: inline-block;
  padding: 8px 20px;
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.refresh-btn:hover {
  background-color: #1558b7;
}

/* 加载中 */
.loading {
  text-align: center;
  padding: 60px 0;
  color: #999;
}

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #1a73e8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 资讯详情页样式 */
.news-detail-container {
  margin-bottom: 60px;
}

/* 文章导航 */
.article-navigation {
  display: flex;
  justify-content: space-between;
  margin: 30px 0;
  border-top: 1px solid #eee;
  padding-top: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.news-nav {
  width: 48%;
  display: flex;
  align-items: center;
  padding: 15px;
  cursor: pointer;
  transition: background-color 0.3s;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.news-nav:hover {
  background-color: #f0f2f5;
}

.news-nav.prev-news {
  margin-right: 10px;
}

.news-nav.next-news {
  margin-left: 10px;
  justify-content: flex-end;
}

.nav-arrow {
  font-size: 24px;
  color: #1a73e8;
  margin: 0 10px;
}

.nav-content {
  flex-grow: 1;
}

.nav-label {
  font-size: 12px;
  color: #888;
}

.nav-title {
  font-size: 14px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
  display: inline-block;
}

.news-detail-content {
  flex-grow: 1;
  background-color: #fff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.news-meta {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  color: #888;
  font-size: 14px;
}

.news-date,
.news-category,
.news-views {
  margin-right: 20px;
}

.news-category {
  background-color: #f0f2f5;
  padding: 2px 8px;
  border-radius: 4px;
  color: #1a73e8;
}

.news-content {
  line-height: 1.8;
  color: #333;
  margin-bottom: 30px;
}

.news-content img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 4px;
}

.news-content p {
  margin-bottom: 20px;
}

.news-content h2,
.news-content h3 {
  margin: 30px 0 15px;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.news-tag {
  padding: 4px 10px;
  background-color: #f0f2f5;
  color: #666;
  border-radius: 4px;
  margin-right: 10px;
  margin-bottom: 10px;
  font-size: 12px;
}

.news-share {
  display: flex;
  align-items: center;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.news-share span {
  margin-right: 10px;
  color: #666;
}

.share-item {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.3s;
}

.share-item:hover {
  background-color: #e0e0e0;
}

/* 相关资讯 */
.related-news {
  margin-top: 40px;
}

.related-news h3 {
  font-size: 24px;
  margin-bottom: 20px;
  position: relative;
  padding-left: 15px;
}

.related-news h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background-color: #1a73e8;
}

.related-news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.related-news-item {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.related-news-item:hover {
  transform: translateY(-5px);
}

.related-news-image {
  height: 160px;
  overflow: hidden;
}

.related-news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-news-content {
  padding: 15px;
}

.related-news-title {
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.4;
  font-weight: 500;
}

.related-news-date {
  color: #888;
  font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .article-navigation {
    flex-direction: column;
  }

  .news-nav {
    width: 100%;
    margin: 10px 0;
  }

  .news-nav.prev-news {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .news-nav.next-news {
    margin-left: 0;
    margin-top: 10px;
  }

  .nav-title {
    max-width: 80%;
  }

  .news-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .news-filter {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-search {
    width: 100%;
  }

  .news-search input {
    flex-grow: 1;
    width: auto;
  }

  .news-item {
    flex-direction: column;
  }

  .news-item-image {
    width: 100%;
    min-width: 100%;
    height: 200px;
  }

  .news-item-content {
    width: 100%;
  }

  .related-news-list {
    grid-template-columns: 1fr;
  }
}

/* 微信分享模态窗口 */
.wx-share-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.wx-share-modal.active {
  opacity: 1;
  visibility: visible;
}

.wx-share-content {
  background-color: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 360px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: scale(0.9);
  transition: transform 0.3s;
}

.wx-share-modal.active .wx-share-content {
  transform: scale(1);
}

.wx-share-header {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wx-share-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.wx-share-close {
  font-size: 24px;
  color: #999;
  cursor: pointer;
  transition: color 0.3s;
}

.wx-share-close:hover {
  color: #333;
}

.wx-share-body {
  padding: 20px;
  text-align: center;
}

.wx-qrcode-container {
  margin: 10px auto 20px;
  width: 200px;
  height: 200px;
  position: relative;
  cursor: pointer;
}

.wx-qrcode-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qrcode-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f9f9f9;
  color: #666;
  font-size: 14px;
}

.qrcode-save-tip {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 5px 0;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 12px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.wx-qrcode-container:hover .qrcode-save-tip {
  opacity: 1;
}

.wx-share-tips {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
