@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@700&display=swap');

/* 现代化导航栏样式 - 统一所有页面 */

/* 头部导航 */
.modern-header {
  background: #1F6B47;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-logo img {
  height: 55px;
  filter: brightness(1.1);
}

.header-logo:not(.logo-image-only) img {
  border-radius: 100%;
  object-fit: cover;
}

.header-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-logo .logo-text {
  font-family: 'Noto Serif SC', STSong, SimSun, serif;
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, #F8F4EB 30%, #F2E8D0 55%, #F8F4EB 80%, #fff 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  animation: logoShimmer 5s ease-in-out infinite;
}

@keyframes logoShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.header-nav {
  display: flex;
  gap: 0.5rem;
}

.header-nav .nav-item {
  position: relative;
}

.header-nav .nav-item > a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.5px;
  transition: all 0.3s;
  position: relative;
  padding: 0.6rem 1.5rem;
  display: block;
  border-radius: 6px;
}



.header-nav .nav-item:hover > a,
.header-nav .nav-item.active > a {
  color: #ffffff;
  background: rgba(106, 158, 63, 0.15);
}

/* 下拉菜单样式 - 现代白色卡片风格 */
.header-nav .nav-item .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  min-width: 180px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  border: 1px solid #e5e5e5;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  margin-top: 10px;
  display: block !important;
}

.header-nav .nav-item:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  margin-top: 0;
}

.header-nav .sub-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: white;
  border-left: 1px solid #e5e5e5;
  border-top: 1px solid #e5e5e5;
  transform: translateX(-50%) rotate(45deg);
}

.header-nav .sub-menu {
  padding: 0.5rem !important;
}
.header-nav .sub-menu li {
  list-style: none !important; text-align: center !important; display: block !important;
}
.header-nav .sub-menu a {
  display: flex !important; align-items: center !important; justify-content: center !important;
  padding: 0.7rem 0;
  color: #404040 !important;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
}

.header-nav .sub-menu a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: #6A9E3F;
  border-radius: 1px;
  transition: transform 0.25s ease;
}

.header-nav .sub-menu a:hover {
  background: #F6F9F2;
  color: #6A9E3F;
}

.header-nav .sub-menu a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.header-nav .caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  vertical-align: middle;
  border-top: 4px solid;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  transition: transform 0.3s;
}

.header-nav .nav-item:hover .caret {
  transform: rotate(180deg);
}

.header-cta {
  background: transparent;
  color: #fff;
  padding: 0.55rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.5px;
  border: 1.5px solid rgba(255,255,255,0.5);
  transition: all 0.2s;
}
.header-cta:hover {
  border-color: #FFC107;
  background: #FFC107;
  color: #1F6B47;
}

/* 小程序码下拉 */
.header-miniapp {
  position: relative;
}
.miniapp-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.25s;
  cursor: pointer;
}
.miniapp-trigger i {
  font-size: 1.1rem;
}
.miniapp-trigger:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.miniapp-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
  z-index: 1001;
}
.header-miniapp:hover .miniapp-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.miniapp-arrow {
  position: absolute;
  top: -6px;
  right: 28px;
  width: 14px;
  height: 14px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 2px;
  box-shadow: -2px -2px 4px rgba(0,0,0,0.04);
}

.miniapp-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 8px 48px rgba(0,0,0,0.1);
  min-width: 170px;
}

.miniapp-card img {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  display: block;
  margin: 0 auto 0.75rem;
  object-fit: contain;
}

.miniapp-card p {
  color: #666;
  font-size: 0.8rem;
  margin: 0;
  white-space: nowrap;
}

.miniapp-qr-placeholder {
  width: 140px;
  height: 140px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 12px;
  color: #ccc;
  font-size: 0.75rem;
}

@media (max-width: 1024px) {
  .header-miniapp {
    display: none;
  }
}
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: relative;
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 0.3s ease;
}

.mobile-menu-toggle:active {
  transform: scale(0.9);
}

.mobile-menu-toggle span {
  width: 100%;
  height: 2.5px;
  background: white;
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
  display: block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 汉堡包菜单激活状态 - X 形 */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(8.75px) rotate(45deg);
  background: #6A9E3F;
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-8.75px) rotate(-45deg);
  background: #6A9E3F;
}

/* 移动端菜单容器 */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 400px;
  height: 100vh;
  min-height: 100vh;
  height: 100dvh; /* 动态视口高度，支持移动端地址栏 */
  background: #1F6B47;
  box-shadow: -4px 0 20px rgba(0,0,0,0.5);
  z-index: 1000;
  transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 70px 0 2rem;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
  right: 0;
}



/* 移动端菜单关闭按钮 */
.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(106, 158, 63, 0.1);
  border: 2px solid rgba(106, 158, 63, 0.3);
  border-radius: 50%;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0.8) rotate(-90deg);
}

.mobile-menu.active .mobile-menu-close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition-delay: 0.3s;
}

.mobile-menu-close:hover {
  background: rgba(106, 158, 63, 0.2);
  border-color: #6A9E3F;
  transform: scale(1.1) rotate(90deg);
}

.mobile-menu-close:active {
  transform: scale(0.95);
}

.mobile-menu-close span {
  position: absolute;
  width: 18px;
  height: 2px;
  background: #6A9E3F;
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu-close span:nth-child(1) {
  transform: rotate(45deg);
}

.mobile-menu-close span:nth-child(2) {
  transform: rotate(-45deg);
}

.mobile-menu-close:hover span {
  background: white;
}

/* 移动端菜单遮罩 */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  height: 100dvh; /* 动态视口高度 */
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

/* 移动端导航项 */
.mobile-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateX(30px);
  animation: slideInFromRight 0.4s ease forwards;
}

/* 依次延迟动画 */
.mobile-menu.active .mobile-nav-item:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu.active .mobile-nav-item:nth-child(2) { animation-delay: 0.15s; }
.mobile-menu.active .mobile-nav-item:nth-child(3) { animation-delay: 0.2s; }
.mobile-menu.active .mobile-nav-item:nth-child(4) { animation-delay: 0.25s; }
.mobile-menu.active .mobile-nav-item:nth-child(5) { animation-delay: 0.3s; }
.mobile-menu.active .mobile-nav-item:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideInFromRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-nav-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.mobile-nav-item > a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #6A9E3F 0%, #4E7A2C 100%);
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 0 10px rgba(106, 158, 63, 0.5);
}

.mobile-nav-item > a:active,
.mobile-nav-item.active > a {
  background: rgba(106, 158, 63, 0.15);
  color: white;
  padding-left: 2rem;
}

.mobile-nav-item > a:active::before,
.mobile-nav-item.active > a::before {
  transform: scaleY(1);
}

/* 移动端子菜单 */
.mobile-sub-menu {
  max-height: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  transition: max-height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-left: 2px solid transparent;
}

.mobile-sub-menu.active {
  max-height: 500px;
  border-left-color: rgba(106, 158, 63, 0.3);
}

.mobile-sub-menu li {
  list-style: none;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

.mobile-sub-menu.active li {
  opacity: 1;
  transform: translateX(0);
}

.mobile-sub-menu.active li:nth-child(1) { transition-delay: 0.1s; }
.mobile-sub-menu.active li:nth-child(2) { transition-delay: 0.15s; }
.mobile-sub-menu.active li:nth-child(3) { transition-delay: 0.2s; }
.mobile-sub-menu.active li:nth-child(4) { transition-delay: 0.25s; }
.mobile-sub-menu.active li:nth-child(5) { transition-delay: 0.3s; }

.mobile-sub-menu a {
  display: block;
  padding: 0.875rem 1.5rem 0.875rem 2.5rem;
  color: #d4d4d4;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.mobile-sub-menu a::before {
  content: '›';
  position: absolute;
  left: 1.5rem;
  color: #6A9E3F;
  font-size: 18px;
  font-weight: bold;
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mobile-sub-menu a:active {
  background: rgba(106, 158, 63, 0.15);
  color: white;
  padding-left: 3rem;
}

.mobile-sub-menu a:active::before {
  opacity: 1;
  transform: translateX(0);
}

/* 移动端 CTA 按钮 */
.mobile-cta {
  margin: 1.5rem 1.5rem 0;
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #6A9E3F 0%, #4E7A2C 100%);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(106, 158, 63, 0.3);
  transition: all 0.3s;
}

.mobile-cta:active {
  background: linear-gradient(135deg, #4E7A2C 0%, #E8B320 100%);
  transform: scale(0.98);
}

/* 子菜单展开图标 */
.mobile-nav-item .submenu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 0.5rem;
  transition: transform 0.3s;
}

.mobile-nav-item .submenu-toggle::after {
  content: '›';
  font-size: 18px;
  font-weight: bold;
  transform: rotate(90deg);
  transition: transform 0.3s;
}

.mobile-nav-item.active .submenu-toggle::after {
  transform: rotate(-90deg);
}

/* 响应式 */
@media (max-width: 992px) {
  .header-nav .nav-item > a {
    padding: 0.5rem 0.75rem;
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none !important;
  }
  
  .header-cta {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: flex !important;
  }
  
  .header-container {
    padding: 1rem 1.5rem;
  }
  
  .header-logo {
    flex: 1;
    max-width: calc(100% - 50px);
  }
  
  .header-logo img {
    height: 40px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
  }

  .header-logo .logo-text {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0.875rem 1rem;
  }
  
  .header-logo img {
    height: 35px;
  }

  .header-logo .logo-text {
    font-size: 16px;
  }

  .mobile-menu-toggle {
    width: 24px;
    height: 18px;
  }
  
  .mobile-menu-toggle span {
    height: 2px;
  }
  
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}
