/* -------------------- 基本重置 -------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* -------------------- Body 样式 -------------------- */
body {
  font-family: sans-serif;
  background: #f9f9f9;
  color: #333;
}

/* -------------------- 顶部区域与轮播图 -------------------- */
.header-banner {
  position: relative;
  width: 100%;
  height: 240px;
  z-index: 100;
  overflow: hidden;
}

.slider {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 1s ease;
}

.slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 0;
}

.slider img.active {
  opacity: 1;
  z-index: 1;
}

/* -------------------- 导航栏 -------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 40px;
  display: flex;
  align-items: center;
  z-index: 200;
  background: transparent;
  transition: background 0.3s, color 0.3s;
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
}

.nav-links {
  list-style: none;
  display: flex;
  margin-left: auto;
  margin-right: 60px;
}

.nav-links li {
  margin-left: 20px;
}

.nav-links li a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.nav-links li a i {
  font-size: 1.2rem;
  margin-right: 5px;
  transition: color 0.3s;
}

.navbar.scrolled {
  background: #fff;
  border-bottom: 1px solid #fff;
}

.navbar.scrolled .logo,
.navbar.scrolled .nav-links li a {
  color: #004097;
}

.navbar.scrolled .nav-links li a i {
  color: #004097;
}

/* -------------------- 内容区域 -------------------- */
.content-container {
  background: #fff;
  max-width: 1200px;
  margin: 160px auto 20px auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* -------------------- 项目列表样式 -------------------- */
.project-list {
  margin-top: 20px;
}

.project-block {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  margin-bottom: 30px;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-block:hover {
  transform: translateY(-10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.project-link {
  display: flex;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.project-image {
  flex: 0 0 300px;
  margin-right: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.project-text {
  flex: 1;
}

.item-header {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.item-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-right: 20px;
  color: #000;
}

.item-time {
  font-size: 1rem;
  color: #999;
  margin-left: auto;
}

.item-tags {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.item-tags .tag {
  background: #eee;
  color: #4ca1f1;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.project-text p {
  font-size: 1rem;
  color: #666;
  line-height: 1.5;
  max-height: 3em;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 15px;
}

.button-wrapper {
  margin-top: 10px;
}

.detail-button {
  display: inline-block;
  background-color: #004097;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  font-size: 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.detail-button:hover {
  background-color: #003370;
}

/* -------------------- 返回按钮样式 -------------------- */
.back-btn {
  display: inline-block;
  background-color: #fff;
  color: #004097;
  border: 1px solid #004097;
  padding: 10px 20px;
  text-decoration: none;
  font-size: 1rem;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}

.back-btn:hover {
  background-color: #004097;
  color: #fff;
}

.back-btn-wrapper {
  text-align: center;
  margin-top: 20px;
}

/* -------------------- 项目详情内容 -------------------- */
.project-detail {
  font-size: inherit;
  color: inherit;
  line-height: 1.7;
  padding: 20px;
  border-radius: 8px;
}

.project-title {
  font-size: 2.5rem;
  color: #004097;
  margin-bottom: 20px;
  font-weight: bold;
  text-align: center;
}

.project-meta-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.project-meta {
  margin-left: 20px;
  font-size: 1.1rem;
  color: #888;
}

.item-tags {
  display: flex;
  gap: 10px;
  margin-left: 20px;
}

.item-tags .tag {
  background: #FFFFFF;
  color: #0162ff;
  padding: 3px 6px;
  border-radius: 10px;
  font-size: 1rem;
}

.project-section h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: bold;
}

.project-detail p {
  margin-bottom: 15px;
  font-size: inherit;
  color: inherit;
}

.project-content {
  margin-top: 20px;
  /* 取消文字居中 */
  text-align: left;
}

/* 富文本中的图片默认居中 */
.project-content img {
  background: #fff;
  border: 1px solid #f0f0f0;
  display: inline-block;
  margin: 10px auto;
  max-width: 100%;
  height: auto;
}

/* 仅当富文本设置对齐类时生效 */
.project-content img.align-center {
  display: block;
  margin: 10px auto;
}
.project-content img.align-left {
  display: inline-block;
  float: left;
  margin: 0 15px 15px 0;
}
.project-content img.align-right {
  display: inline-block;
  float: right;
  margin: 0 0 15px 15px;
}

/* 项目详情附图 */
.project-images {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  justify-content: center;
}

.project-images img {
  width: 100%;
  max-width: 800px;
  border-radius: 8px;
  object-fit: cover;
}

.video-container {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.video-container video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.project-section {
  margin-bottom: 30px;
}

/* -------------------- 响应式调整 -------------------- */
@media (max-width: 768px) {
  .project-block {
    padding: 15px;
  }

  .project-image {
    width: 100%;
    margin-bottom: 15px;
  }
}
