/* ============================================================
   辰算星微官网 · 通用样式 common.css
   适用于所有页面：变量 / 重置 / 导航 / 页脚 / 通用组件 / 动效
   ============================================================ */

:root {
  /* 配色（参考 UI 附件：浅色科技蓝） */
  --c-primary: #2b7fff;
  --c-primary-deep: #1a63e0;
  --c-primary-light: #eaf3ff;
  --c-primary-grad: linear-gradient(135deg, #2b7fff 0%, #5aa2ff 100%);
  --c-text-main: #1b2a4a;
  --c-text-sub: #5a6b8c;
  --c-text-light: #8ea0bd;
  --c-bg-page: #f5f8fd;
  --c-bg-white: #ffffff;
  --c-border: #e3ecf7;
  --c-shadow-card: 0 8px 30px rgba(43, 127, 255, 0.08);
  --c-shadow-hover: 0 16px 44px rgba(43, 127, 255, 0.16);
  --radius-card: 16px;
  --radius-btn: 10px;
  --font-main: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --nav-height: 72px;
}

/* ---------- 重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font-main);
  color: var(--c-text-main);
  background: var(--c-bg-page);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; outline: none; }

.container { width: 1200px; max-width: 92%; margin: 0 auto; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 32px; border-radius: var(--radius-btn);
  font-size: 15px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .25s ease;
}
.btn-primary {
  background: var(--c-primary-grad); color: #fff;
  box-shadow: 0 6px 18px rgba(43, 127, 255, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(43, 127, 255, .45); }
.btn-outline { background: var(--c-primary-light); color: var(--c-primary); }
.btn-outline:hover { background: #d9e9ff; transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.16); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.26); }
.btn-sm { padding: 8px 20px; font-size: 14px; }

/* ---------- 通用板块标题 ---------- */
.sec-head { text-align: center; margin-bottom: 56px; }
.sec-head h2 { font-size: 36px; font-weight: 700; letter-spacing: 1px; }
.sec-head .sec-sub { margin-top: 14px; color: var(--c-text-sub); font-size: 16px; }

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--c-bg-white); border-radius: var(--radius-card);
  box-shadow: var(--c-shadow-card);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--c-shadow-hover); }

/* 图标方块（参考图风格：蓝底圆角图标） */
.icon-box {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--c-primary-grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px; flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(43, 127, 255, .3);
}


/* 标签小胶囊 */
.tag {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--c-primary-light); color: var(--c-primary);
  font-size: 13px; font-weight: 500;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: all .3s ease;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(27, 42, 74, .08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-height); }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--c-text-main); }
.logo-img { height: 36px; width: auto; display: block; }
.logo em { font-style: normal; color: var(--c-primary); }
.footer-brand .logo-img { filter: brightness(0) invert(1); opacity: .92; }
.footer-brand .logo em { color: #fff; }

.main-nav > ul { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  position: relative; font-size: 15px; font-weight: 500; color: var(--c-text-main);
  padding: 6px 0; transition: color .2s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 50%; bottom: -2px;
  width: 0; height: 3px; border-radius: 2px;
  background: var(--c-primary); transition: all .25s ease; transform: translateX(-50%);
}
.main-nav a:hover, .main-nav a.active { color: var(--c-primary); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

/* 产品下拉 */
.has-dropdown { position: relative; }
.has-dropdown > a { cursor: pointer; }
.dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translate(-50%, 8px);
  width: 240px; background: #fff; border-radius: 14px;
  box-shadow: var(--c-shadow-hover);
  padding: 10px; opacity: 0; visibility: hidden; transition: all .25s ease;
  list-style: none; margin: 0;
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dropdown a {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: 10px; font-size: 14px; color: var(--c-text-main);
}
.dropdown a::after { display: none; }
.dropdown a:hover { background: var(--c-primary-light); color: var(--c-primary); }

/* 有子栏目的「产品服务」加箭头指示，提示可展开 */
.has-dropdown > a { display: inline-flex; align-items: center; }
.has-dropdown > a::after {
  position: static; width: 6px; height: 6px; margin-left: 8px; flex-shrink: 0;
  background: none; border-radius: 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transform-origin: 60% 60%;
  transition: transform .25s ease; opacity: .65;
}
.has-dropdown.open > a::after { transform: rotate(-135deg); }
/* 修复：hover/active 时不要让主导航的下划线样式把箭头撑成一条线 */
.main-nav .has-dropdown > a:hover::after,
.main-nav .has-dropdown > a.active::after {
  position: static; left: auto; bottom: auto; transform: translateX(0) rotate(45deg);
  width: 6px; height: 6px; background: none; border-radius: 0;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  opacity: 1; transition: transform .25s ease;
}
.main-nav .has-dropdown.open > a:hover::after,
.main-nav .has-dropdown.open > a.active::after { transform: translateX(0) rotate(-135deg); }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none; width: 42px; height: 42px; border: none; background: transparent;
  cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 22px; height: 2px; border-radius: 2px; background: var(--c-text-main); transition: all .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 子页页头（面包屑横幅） ---------- */
.page-hero {
  position: relative; padding: calc(var(--nav-height) + 70px) 0 70px;
  background:
    radial-gradient(600px 260px at 85% 20%, rgba(43,127,255,.12), transparent 60%),
    radial-gradient(500px 240px at 10% 90%, rgba(43,127,255,.10), transparent 60%),
    linear-gradient(180deg, #eef4fe 0%, var(--c-bg-page) 100%);
  overflow: hidden;
}
.page-hero h1 { font-size: 42px; font-weight: 700; }
.page-hero .page-hero-sub { margin-top: 16px; max-width: 760px; color: var(--c-text-sub); font-size: 17px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #14213d; color: rgba(255,255,255,.72); margin-top: 100px; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 48px; padding: 64px 0 44px; }
.footer-brand .logo { color: #fff; margin-bottom: 18px; }
.footer-brand p { font-size: 14px; line-height: 1.9; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 20px; font-weight: 600; }
.footer-col li { margin-bottom: 12px; font-size: 14px; }
.footer-col a { color: rgba(255,255,255,.72); transition: color .2s; }
.footer-col a:hover { color: var(--c-primary); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { color: var(--c-primary); flex-shrink: 0; margin-top: 4px; }

.footer-links { padding: 26px 0 6px; margin-top: 6px; border-top: 1px solid rgba(255,255,255,.08); }
.fl-title { color: rgba(255,255,255,.5); font-size: 13px; letter-spacing: 1px; margin-bottom: 14px; }
.fl-list { display: flex; flex-wrap: wrap; gap: 12px 30px; }
.fl-list a { color: rgba(255,255,255,.5); font-size: 14px; transition: color .2s; }
.fl-list a:hover { color: rgba(255,255,255,.85); }
.footer-bottom {
  padding: 22px 0; text-align: center; font-size: 13px; color: rgba(255,255,255,.45);
}
.footer-bottom a { color: rgba(255,255,255,.55); text-decoration: none; transition: color .2s; }
.footer-bottom a:hover { color: #fff; }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed; right: 10px; bottom: 78px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: var(--c-primary-grad); color: #fff; cursor: pointer;
  box-shadow: 0 8px 20px rgba(43, 127, 255, .4);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all .3s ease; font-size: 18px;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { transform: translateY(-4px); }

/* ---------- 右侧悬浮联系按钮（电话 / 微信） ---------- */
.float-side {
  position: fixed; right: 10px; bottom: 136px; z-index: 90;
  display: flex; flex-direction: column; gap: 12px;
}
.float-c-btn {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  border: none; background: var(--c-primary-grad); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(43, 127, 255, .4);
  transition: transform .25s ease, box-shadow .25s ease;
}
.float-c-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(43, 127, 255, .5); }

/* 微信按钮用品牌绿，与蓝色电话按钮区分 */
.float-c-wechat { background: #07C160; box-shadow: 0 8px 20px rgba(7, 193, 96, .4); }
.float-c-wechat:hover { box-shadow: 0 12px 26px rgba(7, 193, 96, .5); }
.float-c-pop {
  position: absolute; right: calc(100% + 14px); bottom: 50%;
  transform: translateY(50%) scale(.96); transform-origin: right center;
  background: #fff; color: var(--c-text-main); border-radius: 12px;
  padding: 12px 16px; font-size: 14px; line-height: 1.6; font-weight: 500;
  white-space: nowrap; box-shadow: var(--c-shadow-hover);
  opacity: 0; visibility: hidden; transition: all .22s ease; pointer-events: none;
}
.float-c-pop::after {
  content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: #fff;
}
/* 透明悬停桥 + :hover 方案（用户要求恢复到 JS 解决之前版本）
   桥覆盖按钮与其左侧弹层之间的间隙，避免 hover 经过空隙中断 */
.float-c-btn::before {
  content: ""; position: absolute; top: 0; bottom: 0; right: 0; left: -15px;
  background: transparent; pointer-events: auto;
}
/* PC：hover 按钮（含其弹层子元素）即显示弹出层 */
.float-c-btn:hover .float-c-pop { opacity: 1; visibility: visible; transform: translateY(50%) scale(1); pointer-events: auto; }
/* 二维码弹层：固定宽度，避免全局 img max-width:100% 把弹层挤窄 */
.float-c-qr { width: 160px; min-width: 160px; padding: 10px; white-space: normal; text-align: center; box-sizing: border-box; }
.float-c-qr img { width: 140px; height: 140px; max-width: none; display: block; margin: 0 auto; border-radius: 8px; object-fit: contain; }
.float-c-qr em { display: block; margin-top: 8px; font-size: 13px; font-style: normal; color: var(--c-text-sub); }

/* ---------- 滚动显现动效 ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ---------- 通用工具 ---------- */
.section { padding: 90px 0; }
.section-tight { padding: 64px 0; }
.bg-white { background: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 768px) {
  :root { --nav-height: 62px; }
  .sec-head h2 { font-size: 27px; }
  .page-hero h1 { font-size: 30px; }
  .section { padding: 60px 0; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: var(--nav-height); left: 0; right: 0; z-index: 99;
    background: #fff;
    box-shadow: 0 16px 30px rgba(27,42,74,.1);
    padding: 10px 5%; display: none;
    max-height: calc(100vh - var(--nav-height)); overflow-y: auto;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .main-nav a { padding: 14px 6px; }
  /* 一级链接统一为 flex，让内边距真正撑开 li 高度，避免 inline a 的 padding 不占据布局导致间距不均 */
  .main-nav > ul > li > a { display: flex; align-items: center; }
  /* 下拉触发器在移动端为 flex，左右撑开，箭头靠右 */
  .main-nav .has-dropdown { display: flex; flex-direction: column; align-items: stretch; }
  .main-nav .has-dropdown > a { display: flex; justify-content: space-between; align-items: center; }
  .main-nav .has-dropdown > a::after { display: inline-block; }
  /* 去掉栏目间分隔线；一级与下拉二级统一视觉高度（仅左缩进区分层级） */
  .main-nav a::after { display: none; }
  .main-nav .dropdown a { display: flex; align-items: center; padding: 14px 6px; font-size: 15px; }
  .main-nav .dropdown,
  .main-nav .has-dropdown:hover .dropdown {
    position: static; transform: none; opacity: 1; visibility: visible;
    box-shadow: none; border: none; width: 100%; padding: 0 0 0 16px; display: none;
    list-style: none;
  }
  .main-nav .has-dropdown.open .dropdown,
  .main-nav .has-dropdown.open:hover .dropdown { display: block; }
  .nav-cta .btn { display: none; }
  /* 右侧悬浮联系按钮：移动端重置 hover，改用点击 .open 切换显示 */
  .float-side { bottom: 130px; gap: 10px; }
  .float-c-btn { width: 44px; height: 44px; }
  
  .float-c-btn:hover .float-c-pop { opacity: 0; visibility: hidden; transform: translateY(50%) scale(.96); }
  .float-c-wechat.open .float-c-pop { opacity: 1; visibility: visible; transform: translateY(50%) scale(1); }
  .footer-main { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 32px; }
}

/* === 图标：<img> 调用 assets/img/ic-*.svg（基色品牌蓝 #2b7fff）。
   蓝/深底容器(icon-box / float-c-btn)用 filter 把蓝转白；
   白底容器(fc-icon / footer-contact)直接用蓝。 === */
.ic { display:inline-block; width:1em; height:1em; flex-shrink:0; vertical-align:middle; }
.icon-box .ic { width:26px; height:26px; filter: brightness(0) invert(1); }
.icon .ic { width:20px; height:20px; }
.footer-contact .icon .ic { width:15px; height:15px; display:block; }
.float-c-btn .ic { width:22px; height:22px; filter: brightness(0) invert(1); }
@media (max-width:768px){ .float-c-btn .ic { width:20px; height:20px; } }
