/* ============================================================
   Simple Security Theme — Common Styles
   简洁安防行业通用样式
   ============================================================ */

:root {
    --s-bg: #ffffff;
    --s-surface: #f8fafc;
    --s-surface-2: #f1f5f9;
    --s-surface-3: #e2e8f0;
    --s-text: #334155;
    --s-muted: #64748b;
    --s-heading: #0f172a;
    --s-primary: #0A1D33;
    --s-primary-light: #16324f;
    --s-accent: #2563EB;
    --s-accent-hover: #1D4ED8;
    --s-accent-light: #DBEAFE;
    --s-success: #10b981;
    --s-warning: #f59e0b;
    --s-border: #e2e8f0;
    --s-border-hover: #cbd5e1;
    --s-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --s-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --s-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
    --s-radius: 14px;
    --s-radius-sm: 8px;
    --s-max-width: 1200px;
    --s-header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--s-text);
    background: var(--s-bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

.s-container { max-width: var(--s-max-width); margin: 0 auto; padding: 0 24px; }

/* Buttons */
.s-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 28px; border-radius: var(--s-radius-sm); font-size: 15px; font-weight: 600;
    transition: all 0.25s ease;
}
.s-btn-primary {
    background: var(--s-accent); color: #fff; box-shadow: 0 4px 14px rgba(14, 165, 233, 0.28);
}
.s-btn-primary:hover { background: var(--s-accent-hover); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35); }
.s-btn-outline {
    background: transparent; color: var(--s-heading); border: 1px solid var(--s-border-hover);
}
.s-btn-outline:hover { border-color: var(--s-accent); color: var(--s-accent); background: var(--s-accent-light); }
.s-btn-light {
    background: #fff; color: var(--s-primary); box-shadow: var(--s-shadow-md);
}
.s-btn-light:hover { transform: translateY(-2px); box-shadow: var(--s-shadow-lg); }

/* Section basics */
.s-section { padding: 90px 0; }
.s-section-alt { background: var(--s-surface); }
.s-section-title-wrap { margin-bottom: 48px; }
.s-section-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 14px; border-radius: 999px; background: var(--s-accent-light);
    color: var(--s-accent-hover); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 14px;
}
.s-section-title { font-size: 32px; font-weight: 800; color: var(--s-heading); line-height: 1.25; margin-bottom: 12px; }
.s-section-subtitle { font-size: 16px; color: var(--s-muted); max-width: 560px; line-height: 1.7; }

@media (max-width: 768px) {
    .s-section { padding: 60px 0; }
    .s-section-title { font-size: 26px; }
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--s-header-height);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled { box-shadow: var(--s-shadow-md); border-bottom-color: var(--s-border); }
.header-container {
    max-width: var(--s-max-width); margin: 0 auto; padding: 0 24px;
    height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

/* Logo */
.header-logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-logo .logo-img { height: 38px; width: auto; object-fit: contain; }
.header-logo .logo-text {
    font-size: 20px; font-weight: 800; color: var(--s-primary); letter-spacing: -0.01em; white-space: nowrap;
}

/* Desktop Nav */
.main-nav { flex: 1; display: flex; justify-content: center; }
.nav-wrap { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
    display: flex; align-items: center; gap: 4px;
    padding: 10px 16px; border-radius: var(--s-radius-sm);
    font-size: 15px; font-weight: 500; color: var(--s-text);
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--s-accent); background: var(--s-accent-light); }
.nav-caret { font-size: 10px; opacity: 0.7; }

.nav-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0;
    min-width: 180px; background: #fff; border: 1px solid var(--s-border);
    border-radius: var(--s-radius-sm); box-shadow: var(--s-shadow-lg);
    padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: all 0.2s ease;
}
.nav-item:hover > .nav-dropdown, .nav-item:focus-within > .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-subitem { position: relative; }
.nav-sub-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 18px; font-size: 14px; color: var(--s-text); white-space: nowrap;
}
.nav-sub-link:hover, .nav-sub-link.active { color: var(--s-accent); background: var(--s-surface); }
.nav-sub-caret { font-size: 11px; opacity: 0.6; }
.nav-submenu {
    position: absolute; top: -8px; left: calc(100% + 4px);
    min-width: 170px; background: #fff; border: 1px solid var(--s-border);
    border-radius: var(--s-radius-sm); box-shadow: var(--s-shadow-lg); padding: 8px 0;
    opacity: 0; visibility: hidden; transform: translateX(-6px); transition: all 0.2s ease;
}
.nav-subitem:hover > .nav-submenu, .nav-subitem:focus-within > .nav-submenu { opacity: 1; visibility: visible; transform: translateX(0); }
.nav-submenu-link { display: block; padding: 8px 18px; font-size: 14px; color: var(--s-text); }
.nav-submenu-link:hover, .nav-submenu-link.active { color: var(--s-accent); background: var(--s-surface); }

/* More menu */
.nav-more { position: relative; }
.nav-more-btn {
    display: flex; align-items: center; gap: 4px;
    padding: 10px 16px; font-size: 15px; font-weight: 500; color: var(--s-text); border-radius: var(--s-radius-sm);
}
.nav-more-btn:hover { color: var(--s-accent); background: var(--s-accent-light); }
.nav-more-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 180px; background: #fff; border: 1px solid var(--s-border);
    border-radius: var(--s-radius-sm); box-shadow: var(--s-shadow-lg); padding: 8px 0;
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all 0.2s ease;
}
.nav-more:hover > .nav-more-dropdown, .nav-more:focus-within > .nav-more-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-more-item { position: relative; }
.nav-more-link { display: flex; align-items: center; justify-content: space-between; padding: 9px 18px; font-size: 14px; color: var(--s-text); }
.nav-more-link:hover, .nav-more-link.active { color: var(--s-accent); background: var(--s-surface); }
.nav-more-submenu { left: auto; right: calc(100% + 4px); top: -8px; }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-search { position: relative; display: flex; align-items: center; }
.header-search input {
    width: 170px; height: 38px; padding: 0 34px 0 14px;
    border: 1px solid var(--s-border); border-radius: 999px; background: var(--s-surface);
    font-size: 14px; color: var(--s-text); outline: none; transition: all 0.2s;
}
.header-search input:focus { border-color: var(--s-accent); width: 200px; background: #fff; }
.header-search input::placeholder { color: var(--s-muted); }
.header-search button {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center; color: var(--s-muted); background: none;
}
.header-consult {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 22px; border-radius: 999px; background: var(--s-primary); color: #fff;
    font-size: 14px; font-weight: 600; transition: all 0.25s;
}
.header-consult:hover { background: var(--s-primary-light); transform: translateY(-2px); box-shadow: var(--s-shadow-md); }

/* Mobile menu toggle */
.menu-toggle { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 40px; height: 40px; border-radius: var(--s-radius-sm); background: var(--s-surface-2);
}
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--s-heading); border-radius: 2px; transition: all 0.3s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
    position: absolute; top: var(--s-header-height); left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--s-border); box-shadow: var(--s-shadow-lg);
    max-height: 0; overflow: hidden; opacity: 0; transition: all 0.3s ease;
}
.mobile-nav.open { max-height: calc(100vh - var(--s-header-height)); opacity: 1; overflow-y: auto; }
.mobile-nav-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px; font-size: 15px; font-weight: 500; color: var(--s-text);
    border-bottom: 1px solid var(--s-border);
}
.mobile-nav-link:hover, .mobile-nav-link.active { color: var(--s-accent); background: var(--s-surface); }
.mobile-nav-children { background: var(--s-surface); }
.mobile-nav-child, .mobile-nav-grandchild { display: block; padding: 12px 24px 12px 42px; font-size: 14px; color: var(--s-muted); border-bottom: 1px solid var(--s-border); }
.mobile-nav-grandchild { padding-left: 60px; }
.mobile-nav a.mobile-nav-child:hover, .mobile-nav a.mobile-nav-grandchild:hover { color: var(--s-accent); background: var(--s-surface-2); }

@media (max-width: 900px) {
    .main-nav, .header-search { display: none; }
    .menu-toggle { display: flex; }
    .header-actions { gap: 8px; }
    .header-consult { padding: 8px 16px; font-size: 13px; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--s-primary); color: rgba(255,255,255,0.72); font-size: 14px; }
.footer-container { max-width: var(--s-max-width); margin: 0 auto; padding: 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; padding: 72px 0 48px; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-logo-img { height: 40px; width: auto; object-fit: contain; border-radius: var(--s-radius-sm); background: #fff; padding: 4px; }
.footer-logo-name { font-size: 20px; font-weight: 800; color: #fff; }
.footer-desc { max-width: 320px; line-height: 1.8; margin-bottom: 20px; }
.footer-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 20px; }
.footer-links li, .footer-contact li { margin-bottom: 12px; }
.footer-links a, .footer-contact a { color: rgba(255,255,255,0.72); transition: color 0.2s; }
.footer-links a:hover, .footer-contact a:hover { color: var(--s-accent); }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact svg { flex-shrink: 0; margin-top: 3px; color: var(--s-accent); }
.footer-contact .contact-label { display: block; font-size: 12px; opacity: 0.7; margin-bottom: 2px; }
.footer-contact .contact-value { color: #fff; font-weight: 500; }
.footer-wechat { display: inline-flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid rgba(255,255,255,0.12); border-radius: var(--s-radius); background: rgba(255,255,255,0.05); }
.footer-wechat-img { width: 76px; height: 76px; padding: 4px; background: #fff; border-radius: var(--s-radius-sm); }
.footer-wechat-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.footer-wechat-text strong { color: #fff; font-size: 13px; }
.footer-wechat-text span { font-size: 12px; opacity: 0.7; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 24px 0; }
.footer-bottom .footer-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.copyright { color: rgba(255,255,255,0.55); font-size: 13px; }
.icp-link { color: rgba(255,255,255,0.55); margin-left: 12px; }
.icp-link:hover { color: #fff; }
.back-to-top {
    position: fixed; right: 24px; bottom: 24px; z-index: 999;
    width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--s-primary);
    box-shadow: var(--s-shadow-lg); display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.25s;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--s-accent); color: #fff; }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 32px; }
    .footer-bottom .footer-container { flex-direction: column; align-items: flex-start; }
}
