/* header.css - 顶部菜单（首页透明 vs 内页红色）*/

/* 通用 header - 固定定位，绝对不随滚动条滚动 */
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 100px;
  z-index: 9999;
  transition: background .3s ease;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.header-inner {
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo-img {
  height: 60px;
  width: auto;
  display: none;
}

/* 首页 logo */
body.page-home .logo-home { display: block; }
/* 内页 logo */
body.page-internal .logo-internal { display: block; }

.menu-toggle {
  width: 50px;
  height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 10000;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 30px;
  height: 3px;
  background: #d90734;
  transition: background .3s ease, transform .3s ease;
  position: relative;
  z-index: 10001;
}

/* 内页：红色背景 + 白色菜单图标 */
body.page-internal .site-header {
  background: #d90734;
}
body.page-internal .menu-toggle span {
  background: #fff;
}

/* 首页：透明背景 */
body.page-home .site-header {
  background: transparent;
}

/* 首页滚动后给 header 加半透明背景，保证菜单按钮始终可见 */
body.page-home .site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.page-home .site-header.scrolled .menu-toggle span {
  background: #d90734;
}

/* body 内页时，主内容下移 100px */
body.page-internal main {
  padding-top: 100px;
}

/* 首页 main 不需要 padding（hero 在 header 下面） */
body.page-home main {
  padding-top: 0;
}

/* 防止 body 滚动穿透 */
body.sidebar-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
}