/* ============= 智能隐藏导航栏 ============= */

.auto-hide-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px; /* 增加高度 */
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  transition: transform 0.3s ease-in-out;
  border-bottom: 1px solid #e0e0e0;
}

.auto-hide-header.hide {
  transform: translateY(-100%);
}

.wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: 1200px; /* 加宽内容区 */
  margin: 0 auto;
  padding: 0 1.5rem; /* 水平留白更大 */
}

/* 左侧品牌文字 */
.nav-brand a {
  font-weight: bold;
  color: #1e6cc4;
  text-decoration: none;
  font-size: 1.3em; /* 加大字号 */
}

/* 桌面端导航 - 右对齐 */
.nav-desktop {
  display: flex;
  gap: 1.8rem; /* 稍微加大间距 */
}

.nav-link {
  font-family: "Open Sans", sans-serif;
  font-size: 16px; /* 加大字体 */
  font-weight: 600;
  color: #333;
  text-decoration: none;
  padding: 0.6rem 1rem; /* 更大点击区域 */
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #1e6cc4;
  background-color: #f3f8ff;
  transform: translateY(-1px);
}

/* 汉堡按钮样式 */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5em; /* 图标更大 */
  color: #333;
  cursor: pointer;
  padding: 0.5rem;
  width: 48px;  /* 加大按钮尺寸 */
  height: 48px;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.nav-toggle:hover {
  background-color: #f5f5f5;
}

.nav-toggle i {
  transition: transform 0.3s ease;
}

.nav-toggle.active i:before {
  content: "\f00d"; /* × 关闭图标 */
}

/* 移动端菜单 */
.nav-mobile {
  position: absolute;
  top: 100%;
  right: 1rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  min-width: 180px; /* 稍宽一些 */
  z-index: 999;
}

.nav-mobile a {
  display: block;
  font-size: 16px; /* 加大字体 */
  padding: 0.9rem 1.2rem; /* 更大触控区 */
  border-bottom: 1px solid #eee;
}

.nav-mobile a:last-child {
  border-bottom: none;
}

.nav-mobile a:hover {
  background-color: #f3f8ff;
  color: #1e6cc4;
  transform: none;
}

/* ============= 响应式断点 ============= */

/* 平板及以下设备 */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-mobile[hidden] {
    display: none;
  }

  .nav-mobile {
    display: block;
    animation: fadeInDown 0.3s ease;
  }
}

/* 显示动画 */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* html 滚动行为 */
html {
  scroll-behavior: smooth;
}

/* ============= 自定义主标题区样式 ============= */

.page-header {
  /* 背景图片设置 */
  background-color: #236D8E !important;
  border: none !important;
  overflow: hidden;

  background-image: url('/assets/img/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  /* 固定高度 */
  height: 400px; /* 稍微增加一点，更现代 */
  min-height: 300px;

  /* Flex 布局：内容完全居中 */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;       /* 垂直贴底 */
  align-items: center;            /* 水平居中 */
  text-align: center;             /* 文字居中 */
  padding: 0 1rem 3rem 1rem;

  /* 防止子元素超出 */
  position: relative;
  color: white;
}

/* 移动端适配 */
@media (max-width: 480px) {
  .page-header {
    padding: 0 1rem 1rem 1rem;
  }
}

/* 半透明遮罩层 */
.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4); /* 黑色遮罩，40% 透明度 */
  z-index: 1;
  pointer-events: none; /* 允许点击穿透到下层链接 */
}

/* 所有内容置于遮罩之上 */
.page-header > * {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); /* 增强文字对比 */
}

/* 标题样式优化 */
.page-header .project-name {
  font-size: 2.8em;     /* 稍大一些 */
  font-weight: bold;
  margin: 0 0 0.8rem 0;
  color: white;
  max-width: 800px;     /* 防止过宽 */
  line-height: 1.2;
}

.page-header .project-tagline {
  font-size: 1.4em;
  margin: 0 0 1.8rem 0;
  color: rgba(255, 255, 255, 0.95);
  max-width: 600px;
  line-height: 1.4;
}

/* 按钮样式：居中排列 */
.page-header .btn {
  background-color: rgba(255, 255, 255, 0.25);
  border: 2px solid white;
  color: white;
  padding: 0.7em 1.4em;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  margin: 0 0.5rem;
  display: inline-block;
  font-size: 1em;
}

/* 多个按钮水平排列时居中对齐 */
.page-header .btn-wrapper {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* 悬停效果 */
.page-header .btn:hover {
  background-color: white;
  color: #1e6cc4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


