/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 全局样式 */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  background-color: #f9fafb;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #0a66c2;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: #004182;
  transform: translateY(-2px);
}

section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title span {
  display: inline-block;
  color: #0a66c2;
  font-weight: 600;
  margin-bottom: 10px;
}

.section-title h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.section-title p {
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}



/* 导航栏样式 */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 100;
  transition: all 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px; /* 图片与文字间距，如需保留文字 */
  text-decoration: none;
}

.logo-image {
  height: 40px; /* 根据需要调整高度 */
  width: auto; /* 保持宽高比 */
  object-fit: contain; /* 确保图片完整显示 */
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 500;
  color: #666;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #0a66c2;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #0a66c2;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
}

/* 移动端菜单样式 */
.mobile-menu {
  position: fixed;
  top: 80px; /* 与导航栏高度一致 */
  left: 0;
  right: 0;
  background-color: white;
  box-shadow: 0 10px 10px rgba(0,0,0,0.1);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 99;
}

.mobile-menu.active {
  max-height: 400px; /* 足够容纳所有菜单项 */
}

.mobile-links {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 15px;
}

.mobile-links a {
  padding: 10px 15px;
  font-weight: 500;
  color: #666;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.mobile-links a:hover,
.mobile-links a.active {
  color: #0a66c2;
  background-color: #f0f7ff;
}

/* 在768px以下显示移动端菜单 */
@media (min-width: 769px) {
  .mobile-menu {
    display: none;
  }
}



/* 页面标题区域 */
.hero {
  margin-top: 80px;
  padding: 100px 0;
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #333;
}

.hero h1 span {
  color: #0a66c2;
}

.hero p {
  font-size: 1.2rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 30px;
}

/* 新闻分类 */
.news-categories {
  padding: 30px 0;
  background-color: #fff;
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.category-tab {
  padding: 8px 20px;
  background-color: #f5f7fa;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.category-tab.active,
.category-tab:hover {
  background-color: #007bff;
  color: white;
}

/* 新闻列表 */
.news-list {
  padding: 60px 0;
  background-color: #f9f9f9;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title span {
  color: #007bff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section-title h2 {
  font-size: 32px;
  margin: 10px 0 20px;
}

.section-title p {
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.news-item {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.news-image {
  height: 200px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-item:hover .news-image img {
  transform: scale(1.05);
}

.news-content {
  padding: 25px;
}

.news-meta {
  display: flex;
  gap: 15px;
  color: #888;
  font-size: 14px;
  margin-bottom: 15px;
}

.news-meta i {
  margin-right: 5px;
}

.news-title {
  font-size: 18px;
  margin-bottom: 15px;
  line-height: 1.4;
}

.news-title a:hover {
  color: #007bff;
}

.news-desc {
  color: #666;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  color: #007bff;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.read-more:hover {
  color: #0056b3;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid #ddd;
  background-color: white;
}

.page-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.page-btn:hover:not(.active) {
  border-color: #007bff;
  color: #007bff;
}

.page-ellipsis {
  padding: 0 10px;
  color: #888;
}

/* 订阅区域 */
.news-subscribe {
  padding: 60px 0;
  background-color: #007bff;
  color: white;
  text-align: center;
}

.subscribe-content {
  max-width: 700px;
  margin: 0 auto;
}

.subscribe-content h2 {
  font-size: 28px;
  margin-bottom: 15px;
}

.subscribe-content p {
  margin-bottom: 30px;
  opacity: 0.9;
}

.subscribe-form {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.subscribe-form input {
  flex: 1;
  padding: 12px 15px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
}

.subscribe-form .btn {
  background-color: #333;
}

.subscribe-form .btn:hover {
  background-color: #555;
}



/* 页脚样式 */
footer {
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 60px 0 30px;
  margin-top: 80px;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

/* 公司信息部分 */
.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.footer-logo-icon {
  font-size: 28px;
  margin-right: 12px;
  color: #4cc9f0;
}

.footer-logo span {
  font-size: 22px;
  font-weight: 700;
}

.footer-desc {
  color: #b0b0c3;
  max-width: 350px;
  line-height: 1.6;
  margin-bottom: 25px;
}

/* 微信二维码样式 */
.footer-social {
  position: relative;
  display: inline-block; /* 确保容器能正确包裹内容 */
}

.wechat-container {
  position: relative;
  display: inline-block;
  vertical-align: top;
}

/* 微信图标样式 */
.wechat-container img {
  width: 110px;  /* 从40px增大到50px */
  height: 110px; /* 从40px增大到50px */
  border-radius: 10%;
  object-fit: contain; /* 确保图片完整显示 */
}

/* 鼠标悬停显示二维码 */
.wechat-container:hover .wechat-qrcode {
  opacity: 1;
  visibility: visible;
}

.wechat-qrcode {
  position: absolute;
  top: 0; /* 与微信图标顶端对齐 */
  left: calc(100% + 10px); /* 微信图标右侧，距离10px */
  width: 120px;
  height: 120px;
  padding: 5px;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
}

/* 调整三角指示位置，使其指向微信图标 */
.wechat-container {
  position: relative;
  display: inline-block;
  vertical-align: top; /* 确保图标垂直对齐 */
}

/* 三角指示位置调整到二维码左上角，指向微信图标 */
.wechat-qrcode::after {
  content: '';
  position: absolute;
  right: 100%; /* 二维码左侧 */
  top: 10px; /* 距离顶部10px */
  border-width: 8px 8px 8px 0;
  border-style: solid;
  border-color: transparent #fff transparent transparent;
}

/* 在现有样式基础上添加以下代码 */
@media (max-width: 768px) {
  .footer-social {
    display: flex;
    justify-content: center;
    width: 100%;
  }
  
  .wechat-container {
    /* 确保微信图标在移动设备上居中显示 */
    margin: 0 auto;
  }
}


.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background-color: #4cc9f0;
  transform: translateY(-3px);
}

/* 快速链接部分 */
.footer-links {
  min-width: 200px;
}

.footer-links h3 {
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: #4cc9f0;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #b0b0c3;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a.active {
  color: #4cc9f0;
  padding-left: 5px;
}

.footer-links li i {
  margin-right: 8px;
  color: #4cc9f0;
  width: 16px;
  text-align: center;
}

/* 版权信息 */
.copyright {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #8a8a9c;
  font-size: 14px;
}



/* 响应式设计 */
@media (max-width: 992px) {
  .news-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .mobile-menu.active {
    display: block;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .subscribe-form {
    flex-direction: column;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 60px 0;
  }
  
  .hero h1 {
    font-size: 26px;
  }
  
  .section-title h2 {
    font-size: 24px;
  }
  
  .news-item {
    max-width: 100%;
  }
}