/* ============================================
   Ksxfb Global Styles - 统一导航 + 全局样式
   版本: 1.0 | 2026-07-24
   ============================================ */

/* === 思源黑体 (Google Fonts, Apache 2.0 开源授权) === */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

/* === 全局基础 === */
* { box-sizing: border-box; }
body {
    font-family: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   顶部导航栏 (Header) — 深色布纹 + 按键风格
   ============================================ */

/* Header 背景：深海军蓝 + 布纹纹理 */
#header-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    background: #0b1a2c;
    opacity: 0.97;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    /* 布料纹理 SVG 背景 */
    background-image: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M1 6h1v1H1V6zm2-4h1v1H3V2zM5 6h1v1H5V6zm2-4h1v1H7V2zM0 0h8v8H0z'/%3E%3C/g%3E%3C/svg%3E");
}

/* 滚动时稍加深 */
#header-bar.scrolled {
    background: #071220;
    box-shadow: 0 4px 30px rgba(0,0,0,0.6);
}

#header-bar nav {
    max-width: 7xl;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 80rem; /* 1280px 对应 max-w-7xl */
}

/* Logo */
#header-bar .logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}
#header-bar .logo:hover { transform: scale(1.05); }
#header-bar .logo img { height: 44px; width: auto; }

/* === 桌面导航 — 按键风格 === */
.nav-menu {
    display: none;
    align-items: center;
    gap: 4px;
}
@media (min-width: 768px) {
    .nav-menu { display: flex; }
}

.nav-btn {
    font-family: 'Noto Sans SC', sans-serif !important;
    font-size: 1.08rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    color: #ffffff !important;
    padding: 0.6rem 1.4rem !important;
    border-radius: 0.5rem !important;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
    position: relative;
    /* 未选中状态：半透明背景 */
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
}
/* 未选中 hover：变黄 + 弹起 */
.nav-btn:hover {
    color: #f5d76e !important;
    background: rgba(245,215,110,0.12) !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 0 12px rgba(245,215,110,0.15);
    border-color: rgba(245,215,110,0.3);
}
/* 未选中 active（点击瞬间）：下沉 + 缩回 */
.nav-btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}
/* 选中态：蓝色实心高亮 */
.nav-btn.active {
    color: #ffffff !important;
    background: linear-gradient(180deg, #1a5fb4 0%, #154e92 100%) !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3), 0 0 15px rgba(26,95,180,0.25);
    border-color: rgba(100,170,255,0.2);
}
/* 悬停选中态：保持蓝色但亮一点 */
.nav-btn.active:hover {
    background: linear-gradient(180deg, #1e6fc8 0%, #1a5fb4 100%) !important;
    transform: translateY(-2px) scale(1.03);
}

/* 竖线分隔 */
.nav-divider {
    width: 1px !important;
    height: 24px !important;
    background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.15) 20%, rgba(255,255,255,0.15) 80%, transparent 100%);
    margin: 0 0.4rem !important;
    flex-shrink: 0;
}

/* CTA 按钮 */
.cta-btn {
    font-family: 'Noto Sans SC', sans-serif !important;
    background: #2563eb;
    color: #fff !important;
    padding: 0.75rem 2rem !important;
    border-radius: 9999px !important;
    font-weight: 700 !important;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(37,99,235,0.4);
    display: inline-block;
}
.cta-btn:hover {
    background: #3b82f6 !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37,99,235,0.5);
}

/* 手机菜单按钮 */
.mobile-menu-btn {
    display: flex;
    align-items: center;
}
@media (min-width: 768px) {
    .mobile-menu-btn { display: none; }
}
.mobile-menu-btn button {
    font-size: 1.5rem;
    padding: 0.5rem;
    color: #ffffff;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}
.mobile-menu-btn button:hover { color: #f5d76e; }

/* === 手机底部弹出菜单 === */
#mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}
#mobile-nav-overlay.show { display: block; }

#mobile-nav-panel {
    position: fixed;
    top: 0; right: -100%;
    width: 280px;
    height: 100vh;
    background: #0f1d2e;
    box-shadow: -4px 0 30px rgba(0,0,0,0.5);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 70;
    padding: 90px 24px 24px;
    overflow-y: auto;
}
#mobile-nav-panel.open { right: 0; }

#mobile-nav-panel .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
#mobile-nav-panel .close-btn:hover { color: #f5d76e; }

.mobile-nav-link {
    display: block;
    padding: 14px 16px;
    color: #d1d5db;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: all 0.2s;
}
.mobile-nav-link:hover {
    color: #f5d76e !important;
    background: rgba(245,215,110,0.1) !important;
}
.mobile-nav-link.active {
    color: #fff;
    background: rgba(59,130,246,0.3);
}
.mobile-nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 12px 0;
}

/* ============================================
   页面 Hero 通用样式
   ============================================ */
.page-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    text-align: center;
    padding: 120px 24px 60px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.page-hero h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 16px;
}

.page-hero p {
    color: #94a3b8;
    font-size: 1.1rem;
    max-width: 600px;
}

/* ============================================
   全局 Footer — 与首页/产品页（Tailwind bg-slate-900 风格）视觉对齐
   文章页不引 Tailwind，故此处用纯 CSS 还原同一套深色四列 footer
   ============================================ */
.site-footer {
    background: #0f172a;        /* slate-900 */
    color: #cbd5e1;             /* slate-300 */
    padding: 96px 16px 40px;    /* 上间距对齐主站 pt-24 */
    margin-top: 64px;
}
.site-footer-inner {
    max-width: 1280px;          /* Tailwind max-w-7xl = 80rem = 1280px */
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 64px;                  /* 主站 mb-20 = 5rem = 80px，留白略减 */
    text-align: left;
}
@media (min-width: 768px) {
    .site-footer-inner { grid-template-columns: repeat(4, 1fr); }  /* md:grid-cols-4 */
}
.footer-col { text-align: center; }   /* 所有列居中（手机单列） */
@media (min-width: 768px) { .footer-col:not(:first-child) { text-align: left; } }  /* 桌面：第一列居中，其余左对齐 */
.footer-col h4 {
    color: #60a5fa;             /* text-blue-400 */
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;      /* tracking-widest */
    text-transform: uppercase;
    margin-bottom: 32px;        /* mb-8 */
}
.footer-col p, .footer-col li, .footer-col a {
    font-size: 14px;
    line-height: 2;             /* space-y-4 ≈ 行高2 */
    color: #cbd5e1;             /* slate-300 */
    text-decoration: none;
    list-style: none;
}
.footer-col ul { padding: 0; margin: 0; }
.footer-col a:hover { color: #fff; }
.footer-col .qr {
    border-radius: 12px;
    border: 4px solid rgba(255,255,255,0.1);
    max-width: 200px;
    margin: 0 auto 16px;
    display: block;
}
.footer-col .qr-tip {
    color: #60a5fa;
    font-weight: 700;
    margin-top: 16px;
}
.footer-col .quick-box {
    background: rgba(255,255,255,0.05);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}
.footer-col .quick-box p { margin-bottom: 16px; font-size: 14px; }
.footer-col .quick-box a {
    display: block;
    text-align: center;
    width: 100%;
    background: #2563eb;        /* bg-blue-600 */
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    color: #fff;
}
.footer-col .quick-box a:hover { background: #1d4ed8; }  /* hover:bg-blue-700 */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 80px;
    padding-top: 40px;
    padding-bottom: 40px;
    text-align: center;
    font-size: 13px;
    color: #64748b;             /* text-slate-500 */
}
@media (max-width: 640px) {
    .site-footer-inner { grid-template-columns: 1fr; }
}

/* ============================================
   导航栏二级下拉菜单（"定制问题"子栏目）
   ============================================ */

/* 下拉菜单容器 */
.nav-dropdown-wrap {
    position: relative;
    display: inline-block;
}

/* 下拉面板 */
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 140px;
    background: #0f1d2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    z-index: 100;
    padding-top: 14px;
    margin-top: 0;
}
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #0f1d2e;
}
.nav-dropdown-wrap:hover .nav-dropdown,
.nav-dropdown-wrap:focus-within .nav-dropdown {
    display: block;
}

/* 下拉菜单项 */
.nav-dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-dropdown-item:hover {
    color: #f5d76e;
    background: rgba(245,215,110,0.1);
}

/* ============================================
   手机端二级菜单（可展开）
   ============================================ */
.mobile-nav-group {
    margin-bottom: 6px;
}
.mobile-nav-parent {
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}
.mobile-nav-parent .expand-icon {
    font-size: 12px;
    transition: transform 0.25s ease;
    color: #64748b;
}
.mobile-nav-group.open .mobile-nav-parent .expand-icon {
    transform: rotate(90deg);
}

/* 手机子菜单（默认隐藏） */
.mobile-subnav {
    display: none;
    padding-left: 16px;
    margin-bottom: 6px;
}
.mobile-nav-group.open .mobile-subnav {
    display: block;
}

.mobile-subnav-link {
    display: block;
    padding: 10px 16px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}
.mobile-subnav-link:hover {
    color: #f5d76e !important;
    background: rgba(245,215,110,0.08) !important;
}
