/* ============================================================
   大熊物联科技 — common.css  全局公共样式
   ============================================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --primary:      #1a6fc4;
  --primary-dark: #0d3a6e;
  --primary-light:#e8f1fb;
  --accent:       #f47920;
  --accent-dark:  #d4681a;
  --text-dark:    #1a2332;
  --text-mid:     #444;
  --text-gray:    #777;
  --border:       #e4e9f0;
  --bg-light:     #f5f7fa;
  --white:        #ffffff;
  --shadow-sm:    0 2px 10px rgba(0,0,0,0.06);
  --shadow:       0 4px 24px rgba(0,0,0,0.09);
  --shadow-lg:    0 12px 48px rgba(0,0,0,0.13);
  --radius:       10px;
  --radius-lg:    16px;
  --transition:   0.3s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html  { scroll-behavior: smooth; font-size: 16px; }
body  { font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', Arial, sans-serif;
        color: var(--text-dark); line-height: 1.7; background: var(--white); }
a     { text-decoration: none; color: inherit; transition: var(--transition); }
img   { max-width: 100%; display: block; }
ul    { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ---------- Layout ---------- */
.container { max-width: 1220px; margin: 0 auto; padding: 0 24px; }

/* ---------- Section 工具类 ---------- */
.section        { padding: 88px 0; }
.section-alt    { background: var(--bg-light); }
.section-title  { text-align: center; margin-bottom: 56px; }
.section-title h2 {
  font-size: 2rem; font-weight: 700; color: var(--text-dark);
  margin-bottom: 10px; letter-spacing: 0.02em;
}
.section-title p { color: var(--text-gray); font-size: 1rem; max-width: 640px; margin: 0 auto; }
.section-title .line {
  width: 52px; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 14px auto 0; border-radius: 3px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 28px; border-radius: 7px; font-size: 0.95rem; font-weight: 600;
  border: 2px solid transparent; transition: var(--transition); white-space: nowrap;
  letter-spacing: 0.03em;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(26,111,196,0.35); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.btn-accent   { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(244,121,32,0.35); }
.btn-white    { background: #fff; color: var(--primary); border-color: #fff; }
.btn-white:hover { background: rgba(255,255,255,0.9); transform: translateY(-1px); }
.btn-sm { padding: 8px 20px; font-size: 0.88rem; }
.btn-lg { padding: 14px 36px; font-size: 1rem; }

/* ---------- 卡片基类 ---------- */
.card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden; transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-accent  { background: #fef3ea; color: var(--accent); }

/* =================================================================
   NAVBAR
   ================================================================= */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition), border-color var(--transition), background var(--transition);
}
#navbar.scrolled {
  box-shadow: var(--shadow);
  border-bottom-color: var(--border);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between; height: 72px;
}

/* Logo */
.navbar-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.navbar-logo-img { height: 88px; width: auto; display: block; flex-shrink: 0; }
.footer-logo-img { height: 36px; width: auto; display: block; flex-shrink: 0; filter: brightness(0) invert(1); }
.logo-text { line-height: 1.25; }
.logo-text strong { display: block; font-size: 2.05rem; font-weight: 700; color: var(--primary-dark); }
.logo-text span   { display: block; font-size: 0.68rem; color: var(--text-gray); font-weight: 400; letter-spacing: 0.05em; }

/* 导航菜单 */
.nav-menu { display: flex; align-items: center; gap: 2px; }
.nav-menu a {
  padding: 8px 15px; border-radius: 7px; font-size: 0.93rem; font-weight: 500;
  color: var(--text-mid); position: relative;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); background: var(--primary-light); }
.nav-menu a.active::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 2px; background: var(--primary); border-radius: 2px;
}
.nav-buy {
  margin-left: 14px; background: var(--accent) !important;
  color: #fff !important; border-radius: 7px !important;
}
.nav-buy:hover { background: var(--accent-dark) !important; color: #fff !important; box-shadow: 0 4px 14px rgba(244,121,32,0.4); }
.nav-buy::after { display: none !important; }

/* 汉堡菜单按钮 */
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; background: none; border: none; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text-dark);
  border-radius: 2px; transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* =================================================================
   FOOTER
   ================================================================= */
#footer { background: var(--primary-dark); color: rgba(255,255,255,0.8); }
.footer-body { padding: 64px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.6fr;
  gap: 48px;
}

/* 品牌列 */
.footer-brand .f-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand .f-logo strong { font-size: 1.1rem; color: #fff; font-weight: 700; }
.footer-brand p { font-size: 0.88rem; line-height: 1.9; color: rgba(255,255,255,0.65); margin-bottom: 22px; max-width: 260px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px; background: rgba(255,255,255,0.1); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
}
.footer-social a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

/* 链接列 */
.footer-col h4 {
  font-size: 0.98rem; font-weight: 600; color: #fff;
  margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.87rem; color: rgba(255,255,255,0.65); }
.footer-col ul li a:hover { color: #fff; padding-left: 4px; }

/* 联系列 */
.f-contact-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 13px; }
.f-contact-item i { color: var(--accent); font-size: 0.9rem; margin-top: 3px; width: 14px; flex-shrink: 0; }
.f-contact-item span { font-size: 0.87rem; color: rgba(255,255,255,0.7); line-height: 1.6; }

/* 版权栏 */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.84rem; color: rgba(255,255,255,0.45);
}
.footer-bottom-links a { color: rgba(255,255,255,0.45); margin-left: 18px; }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.8); }

/* =================================================================
   BACK TO TOP
   ================================================================= */
#back-top {
  position: fixed; bottom: 32px; right: 32px; z-index: 999;
  width: 46px; height: 46px; background: var(--primary); color: #fff;
  border: none; border-radius: 50%; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(26,111,196,0.4);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.3s;
}
#back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
#back-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* =================================================================
   PAGE BANNER (内页顶部)
   ================================================================= */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 126px 0 56px; color: #fff; text-align: center; position: relative; overflow: hidden;
}
.page-banner::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='28'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.page-banner h1 { font-size: 2.4rem; font-weight: 700; margin-bottom: 10px; position: relative; }
.page-banner p  { font-size: 1.05rem; opacity: 0.82; position: relative; }
.breadcrumb {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px; font-size: 0.88rem; opacity: 0.7; position: relative;
}
.breadcrumb a:hover { opacity: 1; }
.breadcrumb i { font-size: 0.7rem; }

/* =================================================================
   分割线 / 工具类
   ================================================================= */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-gray    { color: var(--text-gray); }
.fw-bold      { font-weight: 700; }
.mt-8  { margin-top:  8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom:  8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.d-flex { display: flex; }
.gap-8  { gap:  8px; }
.gap-16 { gap: 16px; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  .section          { padding: 60px 0; }
  .section-title h2 { font-size: 1.6rem; }
  .section-title    { margin-bottom: 40px; }

  /* Navbar mobile */
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none; position: fixed; top: 72px; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 16px; box-shadow: var(--shadow-lg); gap: 4px; z-index: 999;
    border-top: 1px solid var(--border);
  }
  .nav-menu.open   { display: flex; }
  .nav-menu a      { padding: 12px 16px; font-size: 1rem; border-radius: 8px; }
  .nav-buy         { margin-left: 0 !important; text-align: center; }

  /* Footer */
  .footer-grid         { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom       { flex-direction: column; gap: 10px; text-align: center; }
  .footer-bottom-links { margin-top: 4px; }
  .footer-bottom-links a { margin-left: 12px; }

  /* Page banner */
  .page-banner          { padding: 104px 0 44px; }
  .page-banner h1       { font-size: 1.75rem; }

  /* Back top */
  #back-top { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .btn-lg    { padding: 12px 26px; }
}

/* =================================================================
   WECHAT QR CODE MODAL
   ================================================================= */
.qr-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.qr-modal.open { opacity: 1; visibility: visible; }
.qr-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(3px);
  cursor: pointer;
}
.qr-modal-box {
  position: relative; z-index: 1;
  background: #fff; border-radius: 16px;
  padding: 36px 32px 28px; width: 90%; max-width: 300px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
  transform: scale(0.9);
  transition: transform 0.25s;
}
.qr-modal.open .qr-modal-box { transform: scale(1); }
.qr-modal-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; font-size: 1.5rem;
  color: #aaa; cursor: pointer; line-height: 1; padding: 4px;
}
.qr-modal-close:hover { color: #333; }
.qr-modal-header {
  font-size: 1rem; font-weight: 700; color: #07c160;
  margin-bottom: 16px;
}
.qr-modal-header i { margin-right: 6px; }
.qr-modal-img {
  width: 100%; max-width: 210px; height: auto;
  border-radius: 8px; border: 1px solid #eee;
  margin-bottom: 12px;
}
.qr-modal-name {
  font-size: .88rem; font-weight: 600; color: #333;
  margin: 0 0 4px;
}
.qr-modal-tip {
  font-size: .78rem; color: #999; margin: 0;
}
