/* 新闻资讯页面样式 */

/* CSS变量定义 */
:root {
  --banner-height: 400px;
  --section-padding: 40px;
  --card-padding: 30px;
  --title-font-size: 24px;
  --subtitle-font-size: 18px;
  --text-font-size: 14px;
  --small-font-size: 12px;
  --card-gap: 30px;
  --image-width: 280px;
  --image-height: 180px;
  --accent-color: #ff8500;
  --container-width: 1200px;
  --card-transition: 0.3s ease;
}

/* Banner样式 */
.news-banner {
  position: relative;
  width: 100%;
  height: var(--banner-height);
  overflow: hidden;
}

.news-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 新闻列表区域样式 */
.news-section {
  padding: var(--section-padding) 0;
  max-width: var(--container-width);
  margin: 0 auto;
}

.news-section-header {
  text-align: center;
  margin-bottom: 30px;
}

.news-section-title {
  font-size: var(--title-font-size);
  font-weight: 500;
  color: #333;
  margin-bottom: 10px;
}

.news-section-underline {
  width: 40px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 0 auto;
  transition: width var(--card-transition);
}

.news-section-header:hover .news-section-underline {
  width: 60px;
}

/* 搜索和过滤区域样式 */
.news-search-container {
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.news-search-box {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.news-search-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #eee;
  border-right: none;
  font-size: var(--text-font-size);
  outline: none;
  transition: border-color var(--card-transition);
}

.news-search-input:focus {
  border-color: var(--accent-color);
}

.news-search-btn {
  width: 50px;
  background-color: var(--accent-color);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--card-transition);
}

.news-search-btn:hover {
  background-color: #e67800;
}

.news-search-btn svg {
  fill: #fff;
}

.news-filter-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-tag {
  padding: 6px 15px;
  background-color: #f5f5f5;
  border-radius: 20px;
  font-size: var(--small-font-size);
  color: #666;
  cursor: pointer;
  transition: all var(--card-transition);
}

.filter-tag:hover {
  background-color: #eaeaea;
}

.filter-tag.active {
  background-color: var(--accent-color);
  color: #fff;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

/* 新闻项样式 */
.news-item-card {
  display: flex;
  border-bottom: 1px solid #eee;
  padding: var(--card-padding);
  transition: box-shadow var(--card-transition), transform var(--card-transition);
  text-decoration: none;
  color: inherit;
  background-color: #fff;
  border-radius: 4px;
}

.news-item-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.news-item-card-image {
  width: var(--image-width);
  height: var(--image-height);
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 4px;
}

.news-item-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--card-transition);
}

.news-item-card:hover .news-item-card-image img {
  transform: scale(1.05);
}

.news-item-card-content {
  flex: 1;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-item-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.news-item-card-title {
  display: flex;
  align-items: center;
}

.news-item-card-title h3 {
  font-size: var(--subtitle-font-size);
  font-weight: 500;
  color: #333;
  margin: 0;
  transition: color var(--card-transition);
  line-height: 1.4;
}

.news-item-card:hover .news-item-card-title h3 {
  color: var(--accent-color);
}

.news-item-card-date {
  color: #999;
  font-size: var(--text-font-size);
  white-space: nowrap;
}

.news-item-card-desc {
  font-size: var(--text-font-size);
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.news-item-card-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.news-tag {
  display: inline-block;
  padding: 2px 10px;
  background-color: #f5f5f5;
  color: #666;
  font-size: var(--small-font-size);
  border-radius: 2px;
  transition: background-color var(--card-transition), color var(--card-transition);
}

.news-tag:hover {
  background-color: #eaeaea;
}

.top-tag {
  background-color: var(--accent-color);
  color: #fff;
  margin-right: 10px;
}

.top-tag:hover {
  background-color: #e67800;
}

/* 分页组件样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  gap: 8px;
}

.pagination-item {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background-color: #fff;
  color: #333;
  text-decoration: none;
  font-size: var(--text-font-size);
  transition: all var(--card-transition);
  border: 1px solid #eee;
}

.pagination-item:hover {
  background-color: #f5f5f5;
  border-color: #ddd;
}

.pagination-item.active {
  background-color: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

.pagination-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.pagination-prev,
.pagination-next {
  display: flex;
  justify-content: center;
  align-items: center;
}

.pagination-prev svg,
.pagination-next svg {
  fill: currentColor;
}

.pagination-ellipsis {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  color: #999;
  font-size: var(--text-font-size);
}

/* 响应式样式 - 大屏幕 */
@media screen and (min-width: 1400px) {
  :root {
    --banner-height: 500px;
    --section-padding: 60px;
    --card-padding: 40px;
    --title-font-size: 28px;
    --subtitle-font-size: 20px;
    --text-font-size: 16px;
    --small-font-size: 14px;
    --card-gap: 40px;
    --image-width: 320px;
    --image-height: 200px;
  }
  
  .news-section-underline {
    width: 50px;
    height: 4px;
  }
  
  .news-section-header:hover .news-section-underline {
    width: 70px;
  }
}

/* 响应式样式 - 中等屏幕 */
@media screen and (max-width: 1200px) {
  :root {
    --container-width: 100%;
    --section-padding: 40px 20px;
    --card-padding: 25px;
    --image-width: 250px;
    --image-height: 160px;
  }
}

/* 响应式样式 - 平板 */
@media screen and (max-width: 992px) {
  :root {
    --banner-height: 350px;
    --section-padding: 35px 15px;
    --card-padding: 20px;
    --title-font-size: 22px;
    --subtitle-font-size: 17px;
    --card-gap: 25px;
  }
  
  .news-item-card {
    flex-direction: column;
  }
  
  .news-item-card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    margin-bottom: 15px;
  }
  
  .news-item-card-content {
    padding-left: 0;
  }
  
  .news-section-header {
    margin-bottom: 30px;
  }
  
  .news-search-container {
    margin-bottom: 25px;
    gap: 12px;
  }
  
  .news-search-input {
    padding: 10px 12px;
  }
  
  .news-search-btn {
    width: 45px;
  }
}

/* 响应式样式 - 小平板 */
@media screen and (max-width: 768px) {
  :root {
    --banner-height: 300px;
    --section-padding: 30px 15px;
    --card-padding: 15px;
    --title-font-size: 20px;
    --subtitle-font-size: 16px;
    --text-font-size: 14px;
    --card-gap: 20px;
  }
  
  .news-section-header {
    margin-bottom: 25px;
  }
  
  .news-item-card-header {
    flex-direction: column;
  }
  
  .news-item-card-date {
    margin-top: 5px;
  }
  
  .news-item-card-desc {
    -webkit-line-clamp: 4;
    margin-bottom: 10px;
  }
  
  .news-section-underline {
    width: 35px;
  }
  
  .news-search-container {
    margin-bottom: 20px;
    gap: 10px;
  }
  
  .filter-tag {
    padding: 5px 12px;
  }
  
  .pagination {
    margin-top: 30px;
    gap: 6px;
  }
  
  .pagination-item {
    width: 32px;
    height: 32px;
  }
}

/* 响应式样式 - 手机 */
@media screen and (max-width: 576px) {
  :root {
    --banner-height: 200px;
    --section-padding: 25px 10px;
    --card-padding: 15px 10px;
    --title-font-size: 18px;
    --subtitle-font-size: 15px;
    --text-font-size: 13px;
    --small-font-size: 11px;
    --card-gap: 15px;
  }
  
  .news-section-title {
    margin-bottom: 5px;
  }
  
  .news-section-underline {
    width: 30px;
    height: 2px;
  }
  
  .news-item-card-title h3 {
    font-size: var(--subtitle-font-size);
  }
  
  .news-item-card-desc {
    -webkit-line-clamp: 3;
    margin-bottom: 8px;
  }
  
  .news-tag {
    padding: 1px 8px;
  }
  
  .news-search-container {
    margin-bottom: 15px;
  }
  
  .news-search-input {
    padding: 8px 10px;
    font-size: calc(var(--text-font-size) - 1px);
  }
  
  .news-search-btn {
    width: 40px;
  }
  
  .news-search-btn svg {
    width: 16px;
    height: 16px;
  }
  
  .filter-tag {
    padding: 4px 10px;
    font-size: calc(var(--small-font-size) - 1px);
  }
  
  .pagination {
    margin-top: 25px;
    gap: 4px;
  }
  
  .pagination-item {
    width: 28px;
    height: 28px;
    font-size: calc(var(--text-font-size) - 1px);
  }
  
  .pagination-prev svg,
  .pagination-next svg {
    width: 14px;
    height: 14px;
  }
}

/* 响应式样式 - 小手机 */
@media screen and (max-width: 375px) {
  :root {
    --banner-height: 150px;
    --section-padding: 20px 10px;
    --card-padding: 12px 8px;
    --title-font-size: 16px;
    --subtitle-font-size: 14px;
    --text-font-size: 12px;
    --small-font-size: 10px;
    --card-gap: 12px;
  }
  
  .news-item-card-image {
    aspect-ratio: 3/2;
  }
  
  .news-item-card-desc {
    -webkit-line-clamp: 2;
    margin-bottom: 6px;
  }
  
  .news-search-container {
    gap: 8px;
  }
  
  .filter-tag {
    padding: 3px 8px;
  }
  
  .pagination {
    margin-top: 20px;
    gap: 3px;
  }
  
  .pagination-item {
    width: 26px;
    height: 26px;
  }
  
  /* 在小手机上隐藏部分页码 */
  .pagination-item:nth-child(4),
  .pagination-ellipsis {
    display: none;
  }
} 