/* ============================================================
   文件说明：style.css — 网站全局样式
   所有页面共用这一个 CSS 文件。
   结构分区：
     1. Reset（重置浏览器默认样式）
     2. Variables（颜色、尺寸等全局变量）
     3. Cookie Bar（底部 Cookie 提示条）
     4. Navbar（顶部导航栏）
     5. Page Hero（内页顶部横幅）
     6. Section / Container（通用区块布局）
     7. Buttons（按钮样式）
     8. Footer（页脚）
     9. Reveal Animation（滚动入场动画）
    10. Responsive（手机端响应式适配）
   ============================================================ */

/* #region 1. Reset — 重置浏览器默认样式 */
/* 让所有元素使用 border-box 盒模型，padding 和 border 不会撑大元素 */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

/* 开启平滑滚动，点击锚点链接时有过渡动画 */
html { scroll-behavior: smooth; font-size: 16px; }

/* 全局字体、背景色、文字颜色 */
body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f4f7fb;   /* 浅蓝灰色背景 */
  color: #1a2a3a;        /* 深蓝黑色文字 */
  line-height: 1.7;
  overflow-x: hidden;    /* 禁止横向滚动条 */
}

a { text-decoration: none; color: inherit; } /* 链接去掉下划线，继承父元素颜色 */
img { max-width: 100%; display: block; }      /* 图片不超出容器，且为块级元素 */
ul { list-style: none; }                      /* 列表去掉圆点 */
/* #endregion */

/* #region 2. Variables — CSS 全局变量（颜色、尺寸等） */
/* 修改这里的值可以快速改变整站配色 */
:root {
  --blue:    #0066B3;   /* 主蓝色（按钮、链接、图标） */
  --blue-lt: #0099FF;   /* 浅蓝色（悬停高亮） */
  --blue-dk: #004080;   /* 深蓝色（标题） */
  --blue-bg: #e8f2fb;   /* 极浅蓝色（卡片背景、区块背景） */
  --dark:    #0a1628;   /* 深夜蓝（导航栏、页脚背景） */
  --text:    #1a2a3a;   /* 正文文字颜色 */
  --muted:   #5a7080;   /* 次要文字颜色（描述、标签） */
  --border:  #d0dce8;   /* 边框颜色 */
  --nav-h:   68px;      /* 导航栏高度 */
  --r:       8px;       /* 通用圆角半径 */
  --shadow:   0 4px 24px rgba(0,102,179,.10);  /* 普通阴影 */
  --shadow-h: 0 12px 40px rgba(0,102,179,.18); /* 悬停时的深阴影 */
}
/* #endregion */

/* #region 3. Cookie Bar — 底部 Cookie 提示条 */
#cookie-bar {
  position: fixed;          /* 固定在屏幕底部，不随页面滚动 */
  bottom: 0; left: 0; right: 0;
  z-index: 9999;            /* 最高层级，显示在所有内容之上 */
  background: rgba(0,30,70,.96);
  color: #cde;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: .84rem;
  backdrop-filter: blur(6px); /* 背景模糊效果 */
}

/* Cookie 确认按钮 */
#cookie-ok {
  background: var(--blue-lt);
  color: #fff;
  border: none;
  padding: 5px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: .84rem;
  white-space: nowrap;
  transition: background .2s;
}
#cookie-ok:hover { background: var(--blue); }
/* #endregion */

/* #region 4. Navbar — 顶部导航栏 */
#navbar {
  position: fixed;          /* 固定在屏幕顶部 */
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: transparent;  /* 默认透明，滚动后变深色（见 .scrolled） */
  transition: background .3s, box-shadow .3s;
}

/* 页面向下滚动后导航栏变为深色半透明 */
#navbar.scrolled {
  background: rgba(0,25,60,.93);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
  backdrop-filter: blur(10px);
}

/* 导航栏内容区（限制最大宽度并居中） */
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Logo 区域 ── */
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }

/* Logo 左侧图标 */
.logo-icon {
  width: 130px; height: 50px;
  border-radius: 4px;
  flex-shrink: 0;
  background: url('../img/logo/favicon.svg') center/contain no-repeat;
  font-size: 0; color: transparent;
}

/* Logo 右侧文字隐藏（SVG已包含完整logo文字） */
.logo-text { display: none; }
.logo-cn { display: none; }
.logo-en { display: none; }

/* 如需恢复右侧文字，删除上方三行并取消下方注释：
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-cn { font-size: .95rem; letter-spacing: 2px; }
.logo-en { font-size: .6rem; letter-spacing: 3px; color: var(--blue-lt); }
*/

/* ── 导航链接 ── */
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  color: rgba(255,255,255,.82);
  padding: 8px 13px;
  border-radius: 4px;
  font-size: .88rem;
  font-weight: 500;
  transition: color .2s, background .2s;
}
/* 悬停或当前页面的链接高亮 */
.nav-links a:hover,
.nav-links a.active { color: #fff; background: rgba(0,153,255,.18); }

/* 导航栏右侧区域（语言切换 + 汉堡按钮） */
.nav-right { display: flex; align-items: center; gap: 10px; }

/* ── 语言切换下拉菜单 ── */
.lang-switcher { position: relative; } /* 相对定位，让下拉菜单绝对定位于此 */

/* 语言切换按钮（显示当前语言） */
.lang-current {
  display: flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.4);
  color: rgba(255,255,255,.88);
  padding: 5px 13px;
  border-radius: 20px;
  font-size: .8rem;
  cursor: pointer;
  font-weight: 600;
  transition: all .2s;
  white-space: nowrap;
}
.lang-current:hover {
  background: rgba(0,153,255,.2);
  border-color: var(--blue-lt);
  color: #fff;
}

/* 下拉箭头图标，展开时旋转 180° */
.lang-arrow { font-size: .6rem; transition: transform .25s; }
.lang-current[aria-expanded="true"] .lang-arrow { transform: rotate(180deg); }

/* 下拉菜单列表（默认隐藏，添加 .open 后显示） */
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px); /* 在按钮正下方 8px 处 */
  right: 0;
  background: rgba(0,18,50,.97);
  border: 1px solid rgba(0,153,255,.3);
  border-radius: 8px;
  overflow: hidden;
  min-width: 120px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  backdrop-filter: blur(10px);
  z-index: 2000;
}
.lang-dropdown.open { display: block; } /* JS 添加 .open 类后显示 */

/* 下拉菜单中的每个语言选项 */
.lang-opt {
  padding: 10px 16px;
  font-size: .86rem;
  color: rgba(255,255,255,.72);
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: background .15s, color .15s;
}
.lang-opt:hover { background: rgba(0,153,255,.2); color: #fff; }

/* 勾号（当前选中语言才显示） */
.lang-opt .check { opacity: 0; font-size: .7rem; width: 12px; flex-shrink: 0; }
.lang-opt.active { color: var(--blue-lt); font-weight: 700; }
.lang-opt.active .check { opacity: 1; }

/* ── 汉堡菜单按钮（手机端显示） ── */
.hamburger {
  display: none;            /* 桌面端隐藏，手机端通过响应式显示 */
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
}
/* 三条横线 */
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
/* 点击后变成 X 形 */
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* #endregion */

/* #region 5. Page Hero — 内页顶部横幅（关于/产品/支援等页面） */
.page-hero {
  background: linear-gradient(135deg, var(--dark) 0%, #002a5c 60%, #003d80 100%);
  padding: calc(var(--nav-h) + 60px) 0 60px; /* 顶部留出导航栏高度 */
  text-align: center;
  color: #fff;
}
.page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem); /* clamp：最小值/推荐值/最大值，自动适应屏幕 */
  font-weight: 800;
  margin-bottom: 10px;
}
.page-hero p { color: rgba(255,255,255,.65); font-size: .95rem; }

/* 面包屑导航（如：首页 / 关于我们） */
.breadcrumb {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--blue-lt); transition: color .2s; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,.3); }
/* #endregion */

/* #region 6. Section / Container — 通用区块布局 */
/* 每个内容区块的上下内边距 */
.section { padding: 80px 0; }

/* 内容容器：限制最大宽度并水平居中 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* 区块标题组（小标签 + 大标题 + 描述） */
.sec-head { text-align: center; margin-bottom: 52px; }

/* 区块小标签（如"产品资讯"、"核心优势"） */
.sec-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--blue-lt);
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* 区块大标题 */
.sec-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--blue-dk);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

/* 区块描述文字 */
.sec-head p { color: var(--muted); font-size: .95rem; max-width: 540px; margin: 0 auto; }
/* #endregion */

/* #region 7. Buttons — 按钮样式 */
/* 基础按钮样式（所有按钮共用） */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border-radius: var(--r);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .25s;
}

/* 主要按钮（蓝色实心） */
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-lt); border-color: var(--blue-lt); transform: translateY(-2px); }

/* 描边按钮（透明背景 + 蓝色边框） */
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }

/* 白色描边按钮（用于深色背景上） */
.btn-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-white:hover { background: rgba(255,255,255,.1); border-color: #fff; transform: translateY(-2px); }
/* #endregion */

/* #region 8. Footer — 页脚 */
.footer { background: var(--dark); color: rgba(255,255,255,.55); padding: 28px 0; }

/* 页脚内容行（品牌 + 链接 + 版权） */
.footer-inner {
  display: flex; flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* 页脚左侧：Logo + 版权文字 */
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.82);
  font-weight: 600; font-size: .88rem;
}

/* 页脚中间：隐私政策 / 使用条款链接 */
.footer-links { display: flex; gap: 18px; }
.footer-links a { font-size: .8rem; transition: color .2s; }
.footer-links a:hover { color: var(--blue-lt); }

/* 页脚右侧：ICP 备案号 */
.footer-copy { font-size: .78rem; text-align: right; }
.footer-icp { display: block; margin-top: 3px; font-size: .72rem; opacity: .45; }
/* #endregion */

/* #region 9. Reveal Animation — 滚动入场动画 */
/* 初始状态：透明 + 向下偏移 28px */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
/* JS 添加 .visible 类后：完全显示 + 回到原位 */
.reveal.visible { opacity: 1; transform: translateY(0); }
/* #endregion */

/* #region 10. Responsive — 手机端响应式适配（屏幕宽度 ≤ 768px） */
@media (max-width: 768px) {
  :root { --nav-h: 60px; } /* 手机端导航栏稍矮 */

  /* 导航链接改为全屏下拉菜单 */
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(0,18,50,.97);
    padding: 16px 20px;
    gap: 2px;
    backdrop-filter: blur(10px);
  }
  .nav-links.open { display: flex; } /* 汉堡按钮点击后显示 */
  .nav-links a { padding: 11px 14px; font-size: .95rem; }

  /* 显示汉堡按钮 */
  .hamburger { display: flex; }

  /* 减小内容区左右内边距 */
  .container { padding: 0 18px; }

  /* 减小区块上下内边距 */
  .section { padding: 56px 0; }

  /* 页脚改为垂直排列 */
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-copy { text-align: center; }
}
/* #endregion */
