/* 彰九云官网 · 移动端适配 */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 70;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 55;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
body.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible;
}
body.nav-open { overflow: hidden; }

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  height: 100dvh;
  background: #fff;
  z-index: 60;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
body.nav-open .nav-drawer { transform: translateX(0); }

.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%);
  flex-shrink: 0;
}
.nav-drawer-head .brand {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.nav-drawer-head .brand em {
  font-style: normal;
  color: var(--brand);
}

.nav-drawer-links {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0;
}
.nav-drawer-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s, color 0.15s;
}
.nav-drawer-links a::after {
  content: '›';
  font-size: 18px;
  color: var(--disabled);
  font-weight: 300;
}
.nav-drawer-links a:active,
.nav-drawer-links a.on {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}
.nav-drawer-links a.on::after { color: var(--brand); }

.nav-drawer-foot {
  padding: 16px 20px 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: #fafafa;
}
.nav-drawer-foot .btn { width: 100%; justify-content: center; padding: 12px 20px; }

@media (max-width: 900px) {
  /* 仅裁切页面内容横向溢出，避免裁切 position:fixed 联系浮窗 */
  #page-home,
  #page-about,
  #page-process,
  #page-apps,
  #page-price,
  #page-trial {
    overflow-x: clip;
  }
  .site-nav {
    padding: 0 12px 0 16px;
    z-index: 65;
  }
  .site-nav-inner {
    gap: 8px;
    position: relative;
  }
  .logo { flex: 1; min-width: 0; }
  .logo-img { height: 38px; }
  .nav-toggle { display: flex; margin-left: auto; }

  .nav-links,
  .nav-actions { display: none !important; }

  /* ── Hero 移动端：左右等宽，避免示例区视觉右偏 ── */
  .hero {
    padding: 24px 16px 28px;
    background: #fff;
  }
  .hero::before {
    opacity: 0.28;
    inset: 0;
    background-position: center 18%;
    animation: none;
  }
  .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.96) 48%,
      rgba(247, 249, 252, 0.94) 100%
    );
  }
  .hero-particles { display: none; }
  .hero-grid {
    gap: 20px;
    width: 100%;
    max-width: 100%;
  }
  .hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
  }
  .hero-copy > * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .hero h1 {
    font-size: 25px;
    margin-bottom: 8px;
    line-height: 1.28;
    color: var(--ink);
    letter-spacing: -0.02em;
  }
  .hero h1 em { color: var(--brand); }
  .hero-keywords {
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--muted);
    line-height: 1.5;
  }
  .hero .lead {
    font-size: 13.5px;
    margin-bottom: 16px;
    max-width: none;
    color: var(--body);
    line-height: 1.7;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 11px 12px;
    font-size: 14px;
    white-space: nowrap;
  }
  .hero-actions .btn-ghost {
    background: #fff;
  }
  .hero-bullets {
    background: var(--alt, #f7f9fc);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 12px 12px 14px;
    gap: 9px;
    box-shadow: none;
    min-width: 0;
  }
  .hero-bullets li {
    font-size: 12.5px;
    color: var(--body);
    line-height: 1.55;
    padding-left: 18px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .hero-bullets li::before {
    top: 7px;
    width: 6px;
    height: 6px;
  }

  .hero-visual {
    margin-top: 4px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
  }
  .hero.is-loaded .hero-visual {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .hero-visual-glow { display: none; }
  .hero-browser-wrap,
  .hero-browser {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    box-sizing: border-box;
  }
  .hero-browser {
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  }
  .hero-browser-url {
    font-size: 9px;
    padding: 4px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .hero-browser-body {
    overflow: hidden;
    width: 100%;
    height: auto;
    max-height: none;
  }
  /* 手机端：去掉桌面侧栏与固定宽缩放，改为自适应内容卡 */
  .dash-mock {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-height: 0 !important;
    transform: none !important;
  }
  .dash-head {
    text-align: center !important;
    padding: 12px 10px 4px !important;
    width: 100%;
    box-sizing: border-box;
  }
  .dash-body { display: block !important; width: 100%; }
  .dash-side { display: none !important; }
  .dash-main {
    padding: 8px 10px 10px;
    width: 100%;
    box-sizing: border-box;
  }
  .dash-welcome {
    font-size: 13px;
    text-align: center !important;
  }
  .dash-sub {
    font-size: 10px;
    margin-bottom: 0;
    text-align: center !important;
  }
  .dash-kpis {
    margin-top: 8px;
  }
  .dash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
    margin-bottom: 10px;
  }
  .dash-kpi { padding: 8px; min-width: 0; }
  .dash-kpi .lbl { font-size: 10px; }
  .dash-kpi .val { font-size: 16px; }
  .dash-kpi .delta { font-size: 9px; }
  .dash-panel-head { padding: 8px 10px; font-size: 11px; }
  .dash-table { font-size: 10px; table-layout: fixed; width: 100%; }
  .dash-table th,
  .dash-table td {
    padding: 7px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dash-table th:first-child,
  .dash-table td:first-child { display: none; }

  .section { padding: 56px 16px; }
  .stats-bar {
    padding: 20px 16px;
  }
  .stats-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }
  .stats-inner .num { font-size: 22px; }
  .stats-inner .lbl { font-size: 12px; }
  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: 24px; }
  .section-head p { font-size: 14px; }

  .cta-band { padding: 48px 16px; }
  .cta-band h2 { font-size: 22px; }
  .cta-band p { font-size: 14px; }
  .cta-band .btn { width: 100%; max-width: 280px; }

  .site-footer { padding: 32px 16px 24px; }
  .footer-links { flex-direction: column; gap: 8px; }
  .footer-links span { display: none; }

  .industry-panel { padding: 20px 16px; }
  .industry-panel h3 { font-size: 18px; }
  .template-card .body h4 { font-size: 15px; }
  .case-card .body h4 { font-size: 15px; }

  .about-banner { padding: 36px 16px 44px; }
  .about-banner h1 { font-size: 26px; }
  .about-banner .intro { font-size: 15px; }
  .breadcrumb { padding: 16px 16px 0; margin-bottom: 16px; }
  .compare-card { padding: 20px 16px; }
  .compare-card h3 { font-size: 17px; flex-wrap: wrap; }
  .timeline { padding-left: 24px; }
  .contact-card { padding: 24px 16px; }
  .contact-card .qr { width: 132px; }
  .contact-card .phone { font-size: 18px; }

  .workmode-panel {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }
  .workmode-tabs {
    justify-content: flex-start;
    margin-bottom: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .workmode-tabs::-webkit-scrollbar { display: none; }
  .workmode-tabs button {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 12px 10px;
    min-width: 100px;
  }
  .workmode-copy h3 { font-size: 18px; }
  .workmode-lead { font-size: 14px; }
  .wm-mock { min-height: 180px; }
  .guarantee-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .guarantee-card { padding: 18px 14px; }
  .guarantee-card h3 { font-size: 15px; }
  .cap-grid { grid-template-columns: 1fr; }
  .cap-tabs { gap: 18px; margin-bottom: 20px; }
  .cap-tabs button { font-size: 15px; }
}

@media (max-width: 480px) {
  .stats-inner .num { font-size: 20px; }
  .stats-inner .lbl { font-size: 12px; }
  .section-head h2 { font-size: 22px; }
  .hero {
    padding: 20px 14px 24px;
  }
  .hero h1 { font-size: 22px; }
  .hero-keywords { font-size: 12.5px; }
  .hero .lead { font-size: 13px; margin-bottom: 14px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { padding: 10px 8px; font-size: 13px; }
  .hero-bullets { padding: 11px 10px 11px 12px; }
  .hero-bullets li { font-size: 12px; }
  .hero-visual {
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
  }
  .dash-head { padding: 10px 8px 2px !important; }
  .dash-main { padding: 6px 8px 8px; }
  .dash-kpi .val { font-size: 15px; }
  .stats-bar {
    padding: 18px 14px;
  }
  .guarantee-grid { grid-template-columns: 1fr; }
  .price-hero { padding: 40px 16px 32px; }
  .price-plans { padding: 0 16px 48px; }
  .price-card { padding: 28px 20px; }
  .price-card .plan-price .amount { font-size: 36px; }
}

/* ── 右侧联系浮窗（全站） ── */
.site-contact-float {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  font-family: inherit;
}
.site-contact-rail {
  display: flex;
  flex-direction: column;
  width: 52px;
  background: #fff;
  border: 1px solid rgba(24, 144, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
  overflow: visible;
}
.site-contact-slot {
  position: relative;
  width: 52px;
  height: 52px;
}
.site-contact-slot + .site-contact-slot {
  border-top: 1px solid rgba(24, 144, 255, 0.12);
}
.site-contact-slot:first-child .site-contact-item {
  border-radius: 26px 26px 0 0;
}
.site-contact-slot:last-child .site-contact-item {
  border-radius: 0 0 26px 26px;
}
.site-contact-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: none;
  background: transparent;
  color: var(--brand, #1890ff);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  overflow: visible;
  transition: background 0.2s ease, color 0.2s ease;
}
.site-contact-slot:hover .site-contact-item,
.site-contact-slot.is-open .site-contact-item {
  background: var(--brand-soft, #e6f7ff);
  color: var(--brand-active, #096dd9);
}
.site-contact-item svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
  pointer-events: none;
}
.site-contact-panel {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  min-width: 220px;
  max-width: 260px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid rgba(24, 144, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 90;
}
/* 仅点击打开/关闭，悬停只高亮图标，不展开面板 */
.site-contact-slot.is-open .site-contact-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}
.site-contact-panel::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: #fff;
  border-right: 1px solid rgba(24, 144, 255, 0.16);
  border-top: 1px solid rgba(24, 144, 255, 0.16);
  transform: translateY(-50%) rotate(45deg);
}
.site-contact-panel .panel-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}
.site-contact-panel .panel-phone {
  display: block;
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--brand, #1890ff);
  letter-spacing: 0.02em;
  text-decoration: none;
  line-height: 1.3;
}
.site-contact-panel .panel-phone:hover {
  color: var(--brand-hover, #40a9ff);
}
.site-contact-panel .panel-email {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand, #1890ff);
  word-break: break-all;
  text-decoration: none;
  line-height: 1.5;
}
.site-contact-panel .panel-email:hover {
  color: var(--brand-hover, #40a9ff);
}
.site-contact-panel .panel-hint {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}
.site-contact-panel .panel-qr {
  display: block;
  width: 148px;
  height: auto;
  margin: 0 auto 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

@media (max-width: 900px) {
  .site-back-top {
    right: 12px;
    width: 46px;
    height: 46px;
    /* 叠在联系栏上方，避开微信/浏览器底栏 */
    bottom: max(calc(88px + 46px * 4 + 12px), calc(64px + 46px * 4 + 12px + env(safe-area-inset-bottom, 0px)));
  }
  .site-contact-float {
    right: 12px;
    top: auto;
    /* 避开手机浏览器/微信底栏，保证整条联系栏完整可见 */
    bottom: max(88px, calc(64px + env(safe-area-inset-bottom, 0px)));
    transform: none;
    z-index: 90;
  }
  .site-contact-rail,
  .site-contact-slot,
  .site-contact-item {
    width: 46px;
  }
  .site-contact-slot,
  .site-contact-item {
    height: 46px;
  }
  .site-contact-slot:first-child .site-contact-item {
    border-radius: 23px 23px 0 0;
  }
  .site-contact-slot:last-child .site-contact-item {
    border-radius: 0 0 23px 23px;
  }
  .site-contact-rail {
    border-radius: 23px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14);
  }
  .site-contact-item svg {
    width: 20px;
    height: 20px;
  }
  .site-contact-panel {
    min-width: 200px;
    max-width: min(240px, calc(100vw - 72px));
    right: calc(100% + 8px);
    max-height: min(70vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* 底部两项面板向上锚定，避免贴底被裁切 */
  .site-contact-slot:nth-last-child(-n+2) .site-contact-panel {
    top: auto;
    bottom: 0;
    transform: translateX(6px);
  }
  .site-contact-slot:nth-last-child(-n+2).is-open .site-contact-panel {
    transform: translateX(0);
  }
  .site-contact-slot:nth-last-child(-n+2) .site-contact-panel::after {
    top: auto;
    bottom: 18px;
    transform: rotate(45deg);
  }
  .site-contact-panel .panel-qr {
    width: 128px;
  }
}

@media (max-width: 480px) {
  .site-back-top {
    right: 12px;
    width: 44px;
    height: 44px;
    bottom: max(calc(96px + 44px * 4 + 12px), calc(72px + 44px * 4 + 12px + env(safe-area-inset-bottom, 0px)));
  }
  .site-contact-float {
    bottom: max(96px, calc(72px + env(safe-area-inset-bottom, 0px)));
    right: 12px;
  }
  .site-contact-rail,
  .site-contact-slot,
  .site-contact-item {
    width: 44px;
  }
  .site-contact-slot,
  .site-contact-item {
    height: 44px;
  }
  .site-contact-rail { border-radius: 22px; }
  .site-contact-slot:first-child .site-contact-item {
    border-radius: 22px 22px 0 0;
  }
  .site-contact-slot:last-child .site-contact-item {
    border-radius: 0 0 22px 22px;
  }
  .site-contact-item svg {
    width: 18px;
    height: 18px;
  }
  .site-contact-panel {
    max-width: min(220px, calc(100vw - 64px));
    padding: 14px 14px;
  }
  .site-contact-panel .panel-qr {
    width: 120px;
  }
}
