/*
 * nhy.css — Xinhangyuan Global Styles
 * 全站公共样式：变量、字体、按钮、动画、2560适配
 * --------------------------------------------------
 */

/* === Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&family=Montserrat:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* === CSS Variables === */
:root {
  --nhy-black:       #0A0A0A;
  --nhy-black-soft:  #1A1A1A;
  --nhy-gray-dark:   #2A2A2A;
  --nhy-gray:        #666666;
  --nhy-gray-light:  #999999;
  --nhy-gray-border: #E0E0E0;
  --nhy-gray-bg:     #F5F5F3;
  --nhy-white:       #FFFFFF;
  --nhy-off-white:   #FAFAF8;
  --nhy-gold:        #C9A84C;
  --nhy-gold-dim:    rgba(201,168,76,0.15);
  --nhy-max-w:       1400px;
  --nhy-pad:         56px;
  --nhy-base-fs:     15px;
}

/* === 2560 Wide Screen === */
@media (min-width:1800px) {
  :root {
    --nhy-pad: 72px;
    --nhy-base-fs: 16px;
    --nhy-max-w: 1560px;
  }
}
@media (min-width:2200px) {
  :root {
    --nhy-base-fs: 17px;
    --nhy-max-w: 1680px;
  }
}

/* === Shared Buttons === */
.nhy-btn-primary {
  padding: 14px 40px;
  background: var(--nhy-white);
  color: var(--nhy-black);
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 1px;
  display: inline-block;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  text-align: center;
  line-height: 1.4;
}
.nhy-btn-primary:hover,
.nhy-btn-primary:focus { background: var(--nhy-gold); color: var(--nhy-black); }

.nhy-btn-dark {
  padding: 14px 40px;
  background: var(--nhy-black);
  color: var(--nhy-white);
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 1px;
  display: inline-block;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  text-align: center;
}
.nhy-btn-dark:hover,
.nhy-btn-dark:focus { background: var(--nhy-gold); color: var(--nhy-black); }

.nhy-btn-outline {
  padding: 14px 40px;
  background: transparent;
  color: var(--nhy-black);
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 1px;
  display: inline-block;
  transition: all 0.3s;
  border: 1px solid var(--nhy-gray-border);
  cursor: pointer;
  text-align: center;
}
.nhy-btn-outline:hover,
.nhy-btn-outline:focus { border-color: var(--nhy-black); }

.nhy-btn-link {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nhy-btn-link:hover { color: var(--nhy-white); }
.nhy-btn-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* === Section Tag & Title (reusable anywhere) === */
.nhy-sec-tag {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--nhy-gray-light);
  margin-bottom: 12px;
  font-weight: 500;
}
.nhy-sec-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--nhy-black);
  line-height: 1.2;
}
@media (min-width:1800px) {
  .nhy-sec-tag  { font-size: 12px; letter-spacing: 5px; }
  .nhy-sec-title { font-size: 42px; }
}

/* === Scroll Reveal === */
.nhy-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
              transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.nhy-reveal.nhy-visible { opacity: 1; transform: translateY(0); }
.nhy-rd1 { transition-delay: 0.08s; }
.nhy-rd2 { transition-delay: 0.16s; }
.nhy-rd3 { transition-delay: 0.24s; }
.nhy-rd4 { transition-delay: 0.32s; }
.nhy-rd5 { transition-delay: 0.40s; }
.nhy-rd6 { transition-delay: 0.48s; }
.nhy-rd7 { transition-delay: 0.56s; }
.nhy-rd8 { transition-delay: 0.64s; }

/* === Placeholder (generic, dark bg) === */
.nhy-ph-dark {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1a1a, #252525);
  border: 1px solid rgba(255,255,255,0.06);
}
.nhy-ph-dark svg { width: 48px; height: 48px; stroke: rgba(255,255,255,0.1); fill: none; stroke-width: 1; }
.nhy-ph-dark span { font-size: 9px; color: rgba(255,255,255,0.15); margin-top: 8px; letter-spacing: 2px; text-transform: uppercase; }

/* === Placeholder (generic, light bg) === */
.nhy-ph-light {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--nhy-gray-bg);
}
.nhy-ph-light svg { width: 40px; height: 40px; stroke: var(--nhy-gray-light); stroke-width: 1; fill: none; opacity: 0.4; }
.nhy-ph-light span { font-size: 9px; color: var(--nhy-gray-light); margin-top: 8px; letter-spacing: 2px; text-transform: uppercase; }

/* === Flex gap fallback (Safari <14.1) === */
@supports not (gap: 1px) {
  .nhy-flex-gap-16 > * + * { margin-left: 16px; }
  .nhy-flex-gap-24 > * + * { margin-left: 24px; }
  .nhy-flex-gap-32 > * + * { margin-left: 32px; }
  .nhy-flex-gap-48 > * + * { margin-left: 48px; }
  /* Homepage-specific flex gap fallbacks */
  .nhy-hero-btns > * + * { margin-left: 16px; }
  .nhy-hero-specs > * + * { margin-left: 16px; }
  .nhy-intro > * + * { margin-left: 60px; }
  .nhy-intro-right > * + * { margin-left: 48px; }
  .nhy-products-link > * + * { margin-left: 6px; }
  .nhy-trust-finfo > * + * { margin-left: 32px; }
  .nhy-partners-scroll > * + * { margin-left: 48px; }
  .nhy-cta-btns > * + * { margin-left: 16px; }
  .nhy-cta-trust > * + * { margin-left: 12px; }
  .nhy-about-feat h4 > * + * { margin-left: 6px; }
  .nhy-btn-link > * + * { margin-left: 8px; }
}


/* 下拉菜单开始消除菜单和面板之间的间隙（Blocksy 用 CSS 变量控制） */
#menu-item-1128 > .sub-menu,
nav > ul > .ct-mega-menu-custom-width.ct-mega-menu-columns-1 > .sub-menu {
  --dropdown-top-offset: 0px !important;
  --sticky-state-dropdown-top-offset: 0px !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35) !important;
  border-radius: 0 0 6px 6px !important;
  overflow: hidden !important;
}

/* 消除 Blocksy 用 ::before 伪元素制造的间隙 */
#menu-item-1128 > .sub-menu::before,
nav > ul > .ct-mega-menu-custom-width.ct-mega-menu-columns-1 > .sub-menu::before {
  display: none !important;
  height: 0 !important;
}

/* 子菜单 li 的默认 padding 清零 */
#menu-item-1128 > .sub-menu > li,
nav > ul > .ct-mega-menu-custom-width.ct-mega-menu-columns-1 > .sub-menu > li {
  padding: 0 !important;
  --columns-padding: 0px !important;
}

/* Blocksy .entry-content 限制宽度，取消 */
#menu-item-1128 .entry-content.is-layout-constrained {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* === 2. Mega Menu 容器 === */
.nhy-mega-menu {
  display: flex !important;
  min-height: 320px !important;
  font-family: 'Montserrat', 'Inter', sans-serif !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* === 3. 左侧深灰面板 === */
.nhy-mega-left {
  flex: 0 0 320px !important;
  background: #1A1A1A !important;
  color: #FFFFFF !important;
  padding: 40px 36px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  margin: 0 !important;
}

.nhy-mega-label {
  display: block !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 2px !important;
  color: #C9A84C !important;
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
  text-transform: uppercase !important;
}

.nhy-mega-title {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #FFFFFF !important;
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
}

.nhy-mega-desc {
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
  color: rgba(255, 255, 255, 0.55) !important;
  margin: 0 0 28px 0 !important;
  padding: 0 !important;
}

.nhy-mega-btn {
  display: inline-block !important;
  background: #C9A84C !important;
  color: #0A0A0A !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  padding: 12px 28px !important;
  border-radius: 2px !important;
  text-decoration: none !important;
  transition: all 0.25s ease !important;
  align-self: flex-start !important;
  border: none !important;
}

.nhy-mega-btn:hover {
  background: #FFFFFF !important;
  color: #0A0A0A !important;
}

/* === 4. 右侧白色面板 === */
.nhy-mega-right {
  flex: 1 !important;
  background: #FFFFFF !important;
  padding: 32px 40px !important;
  margin: 0 !important;
}

.nhy-mega-right-header {
  margin: 0 0 20px 0 !important;
  padding: 0 0 14px 0 !important;
  border-bottom: 1px solid #E0E0E0 !important;
}

.nhy-mega-right-label {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 2px !important;
  color: #0A0A0A !important;
  text-transform: uppercase !important;
}

/* === 5. 产品网格 (2列) === */
.nhy-mega-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 2px 32px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* === 6. 单个产品项 === */
.nhy-mega-item {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 14px 12px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  background: transparent !important;
  margin: 0 !important;
  color: inherit !important;
}

.nhy-mega-item:hover {
  background: rgba(201, 168, 76, 0.06) !important;
}

.nhy-mega-item:hover .nhy-mega-icon {
  color: #C9A84C !important;
}

.nhy-mega-item:hover .nhy-mega-item-en {
  color: #0A0A0A !important;
}

/* === 7. SVG 图标 === */
.nhy-mega-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  flex-shrink: 0 !important;
  color: rgba(0, 0, 0, 0.3) !important;
  transition: color 0.2s ease !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.5 !important;
}

.nhy-mega-icon circle,
.nhy-mega-icon line,
.nhy-mega-icon path,
.nhy-mega-icon rect {
  stroke: currentColor !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* === 8. 文字 === */
.nhy-mega-item-en {
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: rgba(0, 0, 0, 0.7) !important;
  transition: color 0.2s ease !important;
  line-height: 1.3 !important;
}

/* === 9. 移动端 === */
@media (max-width: 999px) {
  .nhy-mega-menu {
    flex-direction: column !important;
  }
  .nhy-mega-left {
    flex: none !important;
    padding: 24px !important;
  }
  .nhy-mega-right {
    padding: 24px !important;
  }
  .nhy-mega-grid {
    grid-template-columns: 1fr !important;
  }
}
