/* ============================================
   华兴新锐官网 — 全局样式
   深色视觉 · 深海军蓝/近黑底 · teal 品牌强调
   ============================================ */

:root {
  /* 品牌色 */
  --brand: #009080;          /* 华兴新锐 teal 主色 */
  --brand-deep: #007a6d;
  --brand-glow: #3ccfbb;     /* 青蓝光效 */
  --brand-dim: rgba(0, 144, 128, 0.16);

  /* 背景层级 */
  --bg-0: #07090f;           /* 最深底 */
  --bg-1: #0b0f1a;           /* 主背景 */
  --bg-2: #111726;           /* 卡片 */
  --bg-3: #182134;           /* 悬浮卡片 */

  /* 文字 */
  --text-hi: #f2f6fc;
  --text-mid: #c9d4e3;
  --text-low: #9aa8bc;

  /* 线条 */
  --line: rgba(148, 170, 200, 0.14);
  --line-strong: rgba(148, 170, 200, 0.28);

  /* 尺寸 */
  --content-w: 1240px;
  --radius: 14px;
  --radius-lg: 20px;

  /* 字体 */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --font-display: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-1);
  color: var(--text-hi);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* 星点背景层 */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* 主内容层 */
#app {
  position: relative;
  z-index: 1;
}

/* ============ 导航 ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 9, 15, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled {
  background: rgba(7, 9, 15, 0.85);
  border-bottom-color: var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-hi);
}
.brand img { height: 40px; width: auto; display: block; }
.brand .brand-text { font-weight: 600; letter-spacing: .5px; font-size: 15px; }

.nav-links {
  display: flex; align-items: center; gap: 4px; list-style: none;
}
.nav-links > li { position: relative; }
.nav-links a {
  display: block; padding: 8px 14px; color: var(--text-mid);
  text-decoration: none; font-size: 15px; border-radius: 8px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-hi); }
.nav-links a.active { background: var(--brand-dim); }

/* 下拉菜单 */
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 180px;
  padding: 8px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .2s; box-shadow: 0 16px 40px rgba(0,0,0,.5);
  list-style: none;
}
.dropdown a { font-size: 14px; padding: 8px 12px; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text-hi); padding: 8px;
}

/* ============ 通用布局 ============ */
.container { max-width: var(--content-w); margin: 0 auto; padding: 0 24px; }

section { padding: 88px 0; position: relative; }

.section-head { margin-bottom: 48px; }
.section-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 3px; color: var(--brand-glow);
  text-transform: uppercase; margin-bottom: 12px;
}
.section-tag::before {
  content: ""; width: 28px; height: 2px; background: var(--brand);
}
.section-title {
  font-size: 34px; font-weight: 700; line-height: 1.3;
  letter-spacing: 1px;
  overflow-wrap: break-word;
  word-break: break-word;
}
.section-sub { margin-top: 14px; color: var(--text-mid); font-size: 16px; max-width: 640px; }

/* 滚动显现 */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.16,.84,.34,1), transform .7s cubic-bezier(.16,.84,.34,1);
}
.reveal.in { opacity: 1; transform: none; }

/* 按钮 */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 500; cursor: pointer;
  text-decoration: none; border: 1px solid transparent;
  transition: background .25s, color .25s, border-color .25s, transform .18s, box-shadow .25s;
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); transition: transform .55s ease; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn:focus-visible { outline: 2px solid var(--brand-glow); outline-offset: 3px; }
.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 8px 24px rgba(0,144,128,.28);
}
.btn-primary:hover {
  background: var(--brand-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,144,128,.38);
}
.btn-primary:active { transform: translateY(1px) scale(.985); box-shadow: 0 4px 12px rgba(0,144,128,.22); }
.btn-ghost {
  background: transparent; color: var(--text-hi);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-glow); background: var(--brand-dim); }

/* ============ 页脚 ============ */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line);
  background: var(--bg-0);
  overflow: hidden;
}
.footer-particle-wrap {
  position: relative; height: 280px; overflow: hidden;
}
#footer-particles { position: absolute; inset: 0; width: 100%; height: 100%; }
.footer-meta {
  padding: 40px 0 48px; border-top: 1px solid var(--line);
}
.footer-cols {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 32px;
}
.footer-cols h4 { font-size: 15px; margin-bottom: 16px; color: var(--text-hi); }
.footer-cols p, .footer-cols a {
  font-size: 14px; color: var(--text-low); line-height: 2;
  text-decoration: none; display: block;
}
.footer-cols a:hover { color: var(--brand-glow); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--text-low);
}
.footer-bottom a { color: var(--text-low); text-decoration: none; }

/* ============ 验证码 ============ */
.captcha-row { display: flex; gap: 12px; align-items: center; }
.captcha-row input { min-width: 0; }
.captcha-img { flex: none; }

/* ============ 语言切换器 ============ */
.lang-switch { position: relative; margin-left: 16px; }
.lang-current {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  color: var(--text-hi); cursor: pointer; font-size: 14px;
  transition: border-color .2s, background .2s;
}
.lang-current:hover { border-color: var(--brand-glow); background: var(--bg-3); }
.lang-current .caret { transition: transform .2s; }
.lang-switch.open .lang-current .caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 160px; padding: 6px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 100;
}
.lang-switch.open .lang-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.lang-menu button {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 9px 12px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-mid); cursor: pointer; font-size: 14px;
  text-align: left;
}
.lang-menu button:hover { background: var(--bg-3); color: var(--text-hi); }
.lang-menu button.active { color: var(--brand-glow); }
.lang-menu .check { color: var(--brand-glow); font-weight: 700; }

/* 阿拉伯语 RTL 适配 */
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .lang-switch { margin-left: 0; margin-right: 16px; }
html[dir="rtl"] .lang-menu { right: auto; left: 0; }
html[dir="rtl"] .lang-menu button { text-align: right; }
html[dir="rtl"] .site-header,
html[dir="rtl"] .nav-links,
html[dir="rtl"] .hero-inner,
html[dir="rtl"] .footer-cols,
html[dir="rtl"] .form-row { direction: rtl; }
html[dir="rtl"] .section-head,
html[dir="rtl"] .section-sub,
html[dir="rtl"] .form-field,
html[dir="rtl"] .breadcrumb { text-align: right; }
/* 阿拉伯语下 section 标签横线移到右侧 */
html[dir="rtl"] .section-tag { flex-direction: row-reverse; }
html[dir="rtl"] .section-tag::before { order: 2; }
html[dir="rtl"] .btn { flex-direction: row-reverse; }
/* 阿拉伯语使用更合适的字体族 */
html[lang="ar"] body {
  font-family: "Noto Naskh Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.9;
}
html[lang="ru"] body {
  font-family: "Segoe UI", "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .site-header { padding: 0 20px; }
  .nav-links {
    position: fixed; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 12px; gap: 2px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none;
    background: transparent; border: none; box-shadow: none; padding-left: 16px; }
  .nav-toggle { display: block; }
  section { padding: 60px 0; }
  .section-title { font-size: 26px; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .footer-particle-wrap { height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn::after { display: none; }
  .btn, .btn-primary, .product-card, .tech-card { transition: none; }
  .btn:hover, .btn:active, .btn-primary:hover, .btn-primary:active,
  .product-card:hover, .tech-card:hover { transform: none; }
}

/* ============ 咨询表单 ============ */
.inquiry-section {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 40px;
}
.inquiry-form { max-width: 720px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-size: 14px; color: var(--text-mid); margin-bottom: 8px; }
.form-field .req { color: #ff6b9d; }
.form-field input, .form-field textarea {
  width: 100%; background: var(--bg-1); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 12px 14px; color: var(--text-hi); font-size: 15px;
  font-family: var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,144,128,.28);
}
.form-field textarea { resize: vertical; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-hint { font-size: 14px; color: var(--text-mid); }
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .inquiry-section { padding: 24px 20px; }
}

/* ============ 联系我们页 ============ */
.contact-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px;
}
.contact-info-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px;
  position: relative; overflow: hidden;
}
.contact-info-card::before {
  content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--brand), var(--brand-glow));
}
.contact-info-card h3 {
  font-size: 22px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.contact-info-card h3 .icon { font-size: 24px; }
.contact-info-list { list-style: none; }
.contact-info-list li {
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line);
  font-size: 15px; line-height: 1.6;
}
.contact-info-list li:last-child { border-bottom: none; }
.contact-info-list .k {
  flex: none; width: 64px; color: var(--text-low); font-size: 14px; padding-top: 1px;
}
.contact-info-list .v { color: var(--text-hi); overflow-wrap: break-word; word-break: normal; }
.contact-info-list .v.tel { white-space: nowrap; }
.contact-info-list .v a { color: var(--brand-glow); text-decoration: none; }
.contact-info-list .v a:hover { text-decoration: underline; }

.contact-map {
  margin-top: 56px; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); position: relative; background: var(--bg-2);
}
.contact-map .factory-map {
  display: block; width: 100%; height: 420px; object-fit: cover; object-position: center;
}
.contact-map .map-tip {
  padding: 16px 24px; font-size: 14px; color: var(--text-mid);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.contact-map .map-tip a { color: var(--brand-glow); text-decoration: none; }
.contact-map .map-tip a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .contact-info-grid { grid-template-columns: 1fr; }
  .contact-map .factory-map { height: 280px; }
}
