
/* 新闻页面样式 */
.news-section {
  padding: 90px 0;
  position: relative;
  z-index: 10;
}

/* 页面标题 */
.news-header {
  text-align: center;
  margin-bottom: 60px;
}

.news-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 20px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Orbitron', 'Rajdhani', monospace;
  text-shadow: var(--text-shadow);
}

.news-subtitle {
  font-size: 1.2rem;
  color: rgb(34, 152, 227);
  max-width: 600px;
  margin: 0 auto;
  text-shadow: var(--text-shadow);
}

/* 新闻容器 */
.news-container {
  display: flex; /* 改为flex布局 */
  flex-wrap: wrap; /* 允许换行 */
  justify-content: center; /* 水平居中对齐 */
  gap: 25px; /* 保持相同的间距 */
  margin-bottom: 60px;
  margin-top: 40px; /* 保持相同的顶部 margin */
}

/* 新闻项 */
.news-item {
  background: rgba(10, 14, 26, 0.85); /* 保持相同的背景色 */
  backdrop-filter: blur(20px); /* 保持相同的模糊效果 */
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color); /* 保持相同的边框颜色 */
  border-radius: var(--border-radius);
  padding: 30px;
  transition: var(--transition); /* 保持相同的过渡效果 */
  box-shadow: var(--card-shadow); /* 保持相同的阴影效果 */
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-width: 280px; /* 设置最小宽度，确保卡片有合适的尺寸 */
  max-width: 350px; /* 设置最大宽度，防止卡片太宽 */
  width: calc(25% - 20px); /* 计算宽度，实现每行4个卡片（考虑gap间距） */
  display: flex; /* 保持flex布局 */
  flex-direction: column; /* 保持flex方向 */
  z-index: 1; /* 保持相同的z-index */
}
.news-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 184, 217, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}

.news-item:hover {
  transform: translateY(-10px); /* 保持相同的悬停效果 */
  box-shadow: var(--hover-shadow); /* 修改为与产品界面相同的悬停阴影效果 */
  border-color: var(--primary-blue); /* 保持相同的悬停边框颜色 */
  z-index: 10; /* 添加与产品界面相同的悬停 z-index */
}

.news-item:hover::before {
  opacity: 1;
}

.news-date {
  color: var(--primary-cyan);
  font-size: 0.9rem;
  margin-bottom: 15px;
  font-weight: 500;
  text-shadow: var(--text-shadow);
}

.news-item-title {
  font-size: 1.3rem;
  color: var(--primary-blue);
  margin-bottom: 15px;
  line-height: 1.4;
  font-weight: 600;
  text-shadow: var(--text-shadow);
}

.news-summary {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  opacity: 0.9;
  text-shadow: var(--text-shadow);
}

.read-more {
  color: var(--primary-cyan);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  text-shadow: var(--text-shadow);
}

.read-more::after {
  content: '→';
  transition: transform 0.3s ease;
}

.read-more:hover {
  gap: 10px;
  color: var(--primary-blue);
}

.read-more:hover::after {
  transform: translateX(5px);
}
.modal {
  position: fixed;
  top: 0;
  right: -100%; /* 默认隐藏在右侧 */
  width: 100%;
  height: 100%;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  right: 0; /* 显示在右侧 */
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-content {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  width: 80%;
  max-width: 800px;
  height: 100%;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%); /* 默认从右侧滑出 */
  transition: all 0.3s ease;
  overflow-y: auto;
}

.modal.active .modal-content {
  transform: translateX(0); /* 滑入视图 */
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--primary-cyan);
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(0, 184, 217, 0.1);
  color: var(--primary-blue);
  transform: rotate(90deg);
}

.modal-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0, 184, 217, 0.2);
}

.modal-title {
  font-size: 1.8rem;
  color: var(--primary-blue);
  margin-bottom: 10px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-date {
  color: var(--primary-cyan);
  font-size: 0.9rem;
  opacity: 0.8;
}

.modal-body {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
  white-space: pre-line;
}

.modal-body p {
  margin-bottom: 15px;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .news-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .news-section {
    padding: 60px 0;
  }

  .news-title {
    font-size: 2.5rem;
  }

  .news-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .news-item {
    padding: 25px;
  }

  .modal-content {
    margin: 60px auto;
    padding: 25px;
  }

  .modal-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .news-section {
    padding: 40px 0;
  }

  .news-title {
    font-size: 2rem;
  }

  .news-subtitle {
    font-size: 1rem;
  }

  .news-item {
    padding: 20px;
  }

  .news-item-title {
    font-size: 1.2rem;
  }

  .modal-content {
    margin: 40px auto;
    padding: 20px;
  }

  .modal-title {
    font-size: 1.3rem;
  }
}
