/* ============================================================
   public.css — MIP 站点共享样式
   4 站共用：Reset / 变量 / 导航 / 产品切换 / 按钮 / Footer /
            右侧工具条 / 回顶 / 咨询弹窗 / FAQ / 滚动显示
   ============================================================ */

/* ============ Reset & Base ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text-primary); background: var(--bg-body); line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

:root {
    --c-blue: #3267F0;
    --c-cyan: #02befa;
    --c-green: #66ed9d;
    --c-coral: #f79f8d;
    --c-blue-dark: #1a3fbf;
    --c-cyan-dark: #009fcf;
    --c-green-dark: #3ac870;
    --c-coral-dark: #e07464;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;

    --bg-body: #ffffff;
    --bg-soft: #f8fafc;
    --bg-card: #ffffff;
    --bg-dark: #0f172a;

    --border-light: #e2e8f0;
    --border-card: #f1f5f9;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ============ Section Base ============ */
section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header .eyebrow { color: var(--c-blue); }
.bg-soft { background: var(--bg-soft); }
.bg-dark { background: var(--bg-dark); color: #fff; }
.bg-dark .section-subtitle { color: rgba(255,255,255,0.6); }
.bg-dark .section-title { color: #fff; }
.bg-dark .eyebrow { color: var(--c-cyan); }

/* ============ Typography ============ */
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; }
.section-title { font-size: clamp(30px, 4vw, 42px); font-weight: 400; line-height: 1.2; margin-bottom: 16px; }
.section-subtitle { font-size: clamp(16px, 1.5vw, 20px); color: var(--text-secondary); margin-top: 12px; line-height: 1.6; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header .eyebrow { color: var(--c-blue); }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 32px; font-size: 15px; font-weight: 600; border-radius: 50px; cursor: pointer; border: none; transition: var(--transition); white-space: nowrap; font-family: inherit; }
.btn-primary { background: var(--c-blue); color: #fff; box-shadow: 0 4px 16px rgba(50,103,240,0.3); }
.btn-primary:hover { background: var(--c-blue-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(50,103,240,0.4); }
.btn-outline { background: transparent; color: var(--c-blue); border: 2px solid var(--c-blue); }
.btn-outline:hover { background: var(--c-blue); color: #fff; transform: translateY(-2px); }
.btn-lg { padding: 16px 40px; font-size: 16px; }

/* ============ Navbar ============ */
.navbar {
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    width: 90%; background: rgba(255,255,255,0.88);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    z-index: 1000; border-bottom: 1px solid transparent;
    border-radius: 0 0 20px 20px; transition: var(--transition);
}
.navbar.scrolled { border-bottom-color: var(--border-light); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo { height: 34px; width: auto; display: block; flex-shrink: 0; }
.nav-logo-link { display: flex; align-items: center; text-decoration: none; }
.nav-brand-text { white-space: nowrap; font-weight: 800; font-size: 20px; color: var(--c-blue); letter-spacing: -0.02em; }
.nav-brand-dot { width: 8px; height: 8px; background: var(--c-green); border-radius: 50%; animation: pulse-dot 2s infinite; display: inline-block; }
@keyframes pulse-dot { 0%,100% { opacity:1; } 50% { opacity:0.2; } }
.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--text-secondary); transition: color 0.2s; position: relative; cursor: pointer; }
.nav-link:hover { color: var(--c-blue); }
.nav-link.btn-nav { padding: 10px 22px; background: var(--c-blue); color: #fff; border-radius: 50px; font-weight: 600; cursor: pointer; }
.nav-link.btn-nav:hover { background: var(--c-blue-dark); color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text-primary); transition: var(--transition); border-radius: 2px; }

/* ============ 产品切换下拉（产品页用，prod-switch） ============ */
.prod-switch { display: flex; align-items: center; gap: 8px; position: relative; }
.prod-switch-toggle { display: flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 20px; color: var(--c-blue); letter-spacing: -0.02em; padding: 0; }
.prod-switch-toggle .nav-brand-text { white-space: nowrap; }
.prod-switch-toggle .caret { width: 16px; height: 16px; transition: transform .2s ease; flex-shrink: 0; color: var(--text-tertiary); }
.prod-switch:hover .prod-switch-toggle .caret,
.prod-switch:focus-within .prod-switch-toggle .caret { transform: rotate(180deg); }
.prod-switch-menu {
    position: absolute; top: calc(100% + 12px); left: 0; width: 248px; z-index: 100;
    background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(15,23,42,0.14); border: 1px solid rgba(15,23,42,0.06);
    padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .18s ease;
}
.prod-switch:hover .prod-switch-menu,
.prod-switch:focus-within .prod-switch-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.prod-switch-menu a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; text-decoration: none; color: var(--text-primary); transition: background .15s ease; }
.prod-switch-menu a:hover { background: #f1f5f9; }
.prod-switch-menu .p-ico { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; background: rgba(50,103,240,0.10); }
.prod-switch-menu .p-name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.prod-switch-menu .p-desc { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.prod-switch-menu a.active { background: rgba(50,103,240,0.08); pointer-events: none; }
.prod-switch-menu a.active .p-name { color: var(--c-blue); }
.prod-switch-menu a > span:not(.p-ico):not(.p-cur) { flex: 1; min-width: 0; }
.prod-switch-menu .p-ico, .prod-switch-menu .p-cur { flex: none; }
.prod-switch-menu .p-cur { margin-left: auto; white-space: nowrap; flex-shrink: 0; font-size: 10px; font-weight: 700; color: var(--c-blue); background: rgba(50,103,240,0.12); padding: 3px 8px; border-radius: 20px; }

/* ============ 产品与服务下拉（首页用，prod-dropdown mega menu） ============ */
.prod-dropdown { position: relative; }
.prod-dropdown-toggle { display: flex; align-items: center; gap: 5px; background: none; border: none; font-family: inherit; }
.prod-dropdown-toggle svg { transition: var(--transition); }
.prod-dropdown-menu {
    position: absolute; top: calc(100% + 12px); left: 0; transform: translateY(8px);
    background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--border-light);
    padding: 8px; min-width: 240px; opacity: 0; visibility: hidden; transition: var(--transition); z-index: 100;
}
.prod-dropdown:hover .prod-dropdown-menu,
.prod-dropdown:focus-within .prod-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.prod-dropdown:hover .prod-dropdown-toggle svg { transform: rotate(180deg); }
.prod-dropdown-menu.mega { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 32px; min-width: 0; width: max-content; padding: 20px 24px; }
.mega-col { display: flex; flex-direction: column; min-width: 150px; }
.mega-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 8px; font-size: 15px; font-weight: 700; color: var(--text-primary); border-radius: 10px; border-bottom: 1px solid var(--border-light); transition: background 0.2s; }
.mega-head:hover { background: #f1f5f9; }
.mega-head .pd-ico { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; background: rgba(50,103,240,0.10); }
.mega-head .mega-arrow { margin-left: auto; color: var(--c-blue); font-weight: 700; }
.mega-link { padding: 7px 10px; font-size: 13.5px; color: var(--text-secondary); border-radius: 8px; transition: all 0.2s; }
.mega-link:hover { background: #f1f5f9; color: var(--c-blue); }

/* ============ 右侧固定工具条 ============ */
.fixed-sidebar { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; z-index: 998; }
.sidebar-item {
    width: 64px; height: 64px; border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1); display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    transition: var(--transition); position: relative; text-decoration: none; cursor: pointer; border: none; font-family: inherit;
}
.sidebar-trial { background: var(--c-blue); color: #fff; box-shadow: 0 4px 18px rgba(50,103,240,0.35); }
.sidebar-phone { background: var(--c-cyan); color: #fff; box-shadow: 0 4px 18px rgba(2,190,250,0.35); }
.sidebar-chat { background: var(--c-green); color: #fff; box-shadow: 0 4px 18px rgba(102,237,157,0.35); }
.sidebar-label { font-size: 11px; font-weight: 700; line-height: 1.1; text-align: center; color: #fff; }
.sidebar-item:hover { transform: scale(1.1); }
.sidebar-item::after {
    content: attr(data-tooltip); position: absolute; right: 76px; top: 50%; transform: translateY(-50%);
    background: #1e293b; color: #fff; padding: 6px 14px; border-radius: 6px;
    font-size: 12px; white-space: nowrap; opacity: 0; visibility: hidden; transition: var(--transition);
    pointer-events: none;
}
.sidebar-item:hover::after { opacity: 1; visibility: visible; }

/* ============ Back to Top ============ */
.back-to-top {
    position: fixed; bottom: 28px; right: 28px; width: 48px; height: 48px; border-radius: 50%;
    background: var(--c-blue); color: #fff; border: none; font-size: 22px; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 16px rgba(50,103,240,0.35); opacity: 0; visibility: hidden; transition: var(--transition);
    z-index: 997; display: flex; align-items: center; justify-content: center;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--c-blue-dark); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(50,103,240,0.5); }

/* ============ Consult Modal (咨询弹窗) ============ */
.modal-mask {
    position: fixed; inset: 0; background: rgba(15,23,42,0.55); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 2000;
    opacity: 0; visibility: hidden; transition: opacity .25s ease; padding: 20px;
}
.modal-mask.open { opacity: 1; visibility: visible; }
.modal-card {
    background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 480px;
    box-shadow: var(--shadow-xl); padding: 36px 36px 32px; position: relative;
    transform: translateY(16px) scale(.98); transition: transform .25s ease; max-height: 90vh; overflow-y: auto;
}
.modal-mask.open .modal-card { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%;
    background: #f1f5f9; border: none; cursor: pointer; font-size: 18px; color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.modal-close:hover { background: var(--border-light); color: var(--text-primary); }
.modal-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--text-tertiary); margin-bottom: 22px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.form-group label .req { color: var(--c-coral-dark); }
.form-group input, .form-group textarea {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--border-light); border-radius: var(--radius-md);
    font-size: 14px; font-family: inherit; color: var(--text-primary); transition: border-color .2s; background: #fff;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--c-blue); }
.form-group textarea { resize: vertical; min-height: 88px; }
.form-submit { width: 100%; margin-top: 6px; }
.form-success { display: none; text-align: center; padding: 20px 0; }
.form-success .ok-ico {
    width: 64px; height: 64px; border-radius: 50%; background: rgba(102,237,157,0.2); color: var(--c-green-dark);
    display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 16px;
}
.form-success h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.form-success p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

/* ============ FAQ ============ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { background: #fff; border-radius: var(--radius-md); margin-bottom: 10px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-card); overflow: hidden; }
.faq-q { width: 100%; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; background: none; border: none; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--text-primary); text-align: left; font-family: inherit; }
.faq-q:hover { color: var(--c-blue); }
.faq-q-icon { width: 26px; height: 26px; border-radius: 50%; background: #f1f5f9; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: 16px; font-size: 16px; color: var(--c-blue); transition: var(--transition); }
.faq-item.active .faq-q-icon { background: var(--c-blue); color: #fff; transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; }
.faq-item.active .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 24px 20px; font-size: 14px; line-height: 1.8; color: var(--text-secondary); }

/* ============ CTA ============ */
.cta-section {
    background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-blue-dark) 100%);
    color: #fff; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before { content: ''; position: absolute; inset: 0; background: url('../images/bg.webp') center/cover; opacity: 0.1; }
.cta-section .container { position: relative; z-index: 1; }
.cta-title { font-size: clamp(30px, 4vw, 42px); font-weight: 400; margin-bottom: 16px; }
.cta-subtitle { font-size: 17px; opacity: 0.92; margin-bottom: 36px; }
.cta-section .btn-primary { background: #fff; color: var(--c-blue); box-shadow: 0 8px 28px rgba(0,0,0,0.2); }
.cta-section .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0,0,0,0.25); }

/* ============ Footer ============ */
.footer { background: var(--bg-dark); color: rgba(255,255,255,0.7); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 44px; margin-bottom: 44px; }
.footer-brand { margin-bottom: 18px; }
.footer-brand img { height: 34px; }
.footer-brand h4 { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-brand p { font-size: 14px; opacity: 0.7; margin-bottom: 4px; }
.footer-brand span { font-size: 18px; font-weight: 700; color: #fff; }
.footer-desc { font-size: 13.5px; line-height: 1.75; }
.footer-col h4 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 18px; }
.footer-col h5 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col ul li { margin-bottom: 11px; }
.footer-col a { display: block; font-size: 13.5px; color: rgba(255,255,255,0.6); transition: var(--transition); margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; opacity: 0.5; }

/* ============ Scroll Reveal ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ Selection & Scrollbar ============ */
::selection { background: var(--c-blue); color: #fff; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-blue); }

/* ============ Responsive（共享组件部分） ============ */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-menu { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 20px 24px; box-shadow: var(--shadow-lg); gap: 16px; border-bottom: 1px solid var(--border-light); }
    .nav-menu.active { display: flex; }
    .nav-toggle { display: flex; }
    .prod-dropdown-menu { left: 0; min-width: 0; max-width: calc(100vw - 40px); }
    .prod-dropdown-menu.mega { grid-template-columns: 1fr; width: max-content; max-height: 70vh; overflow-y: auto; }
    .mega-col { min-width: 200px; margin-bottom: 8px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
