/* ============================================
   STYLE.CSS | 北京九六鑫元科技有限公司
   AI 科技医疗数字化风格 · 全局样式表
   ============================================
   目录:
   1.  CSS 变量 / 设计 Token
   2.  Reset & 基础排版
   3.  页面结构布局
   4.  Header / 顶部栏
   5.  主菜单导航
   6.  首页 Banner
   7.  侧边栏
   8.  首页右侧内容区
   9.  典型案例横向滚动
   10. 新闻模块（通用）
   11. 二级页面 Banner
   12. 二级页面内容区
   13. Footer / 底部
   14. 动效与动画
   15. 响应式适配
   ============================================ */

/* ============================================
   1. CSS 变量 / 设计 Token
   ============================================ */
:root {
    /* --- 主色 --- */
    --primary-dark: #0A2A44;
    --primary: #1A5276;
    --primary-light: #2E86C1;
    --primary-hover: #3498DB;

    /* --- 渐变 --- */
    --gradient-main: linear-gradient(135deg, #0A2A44 0%, #1A6B8A 100%);
    --gradient-banner: linear-gradient(135deg, #0A2A44 0%, #1A5276 40%, #2E86C1 100%);
    --gradient-glow: linear-gradient(135deg, rgba(46,134,193,0.15) 0%, rgba(10,42,68,0.05) 100%);

    /* --- 辅助色 --- */
    --cyan-light: #D4E6F1;
    --cyan-mist: #E8F0F8;
    --white-matte: #F8FAFB;
    --white-pure: #FFFFFF;

    /* --- 文字色 --- */
    --text-dark: #1C2833;
    --text-primary: #2C3E50;
    --text-muted: #5D6D7E;
    --text-light: #95A5A6;
    --text-white: #FFFFFF;

    /* --- 边框与阴影 --- */
    --border-light: #E8EDF2;
    --border-cyan: #BDD7EE;
    --shadow-card: 0 2px 12px rgba(10,42,68,0.08);
    --shadow-card-hover: 0 6px 24px rgba(10,42,68,0.12);
    --shadow-glow: 0 0 30px rgba(46,134,193,0.25);
    --shadow-nav: 0 4px 20px rgba(10,42,68,0.15);

    /* --- 尺寸 --- */
    --max-width: 1100px;
    --header-height: 76px;
    --nav-height: 44px;
    --sidebar-width: 235px;

    /* --- 字体 --- */
    --font-sans: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 22px;
    --font-size-2xl: 28px;
    --font-size-3xl: 36px;

    /* --- 动画 --- */
    --transition-fast: 0.2s ease;
    --transition-base: 0.35s ease;
    --transition-slow: 0.5s ease;
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   2. Reset & 基础排版
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: var(--white-matte);
    line-height: 1.7;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
    vertical-align: middle;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary-hover);
}
a:active {
    color: var(--primary-dark);
}

ul, ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
}

/* ============================================
   3. 页面结构布局
   ============================================ */
.wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* 首页网格布局 */
.home-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 30px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 20px 0;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* ============================================
   4. Header / 顶部栏
   ============================================ */
.site-header {
    background: var(--white-pure);
    border-bottom: 1px solid var(--border-light);
    position: relative;
    z-index: 100;
    height: var(--header-height);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: opacity var(--transition-fast);
}
.logo:hover {
    opacity: 0.85;
}
.logo img {
    width: 120px;
    height: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.action-link {
    color: var(--primary);
    padding: 4px 10px;
    cursor: pointer;
    transition: color var(--transition-fast);
    font-size: var(--font-size-xs);
}
.action-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.header-separator {
    color: var(--border-light);
    user-select: none;
}

/* ============================================
   5. 主菜单导航
   ============================================ */
.main-nav {
    background: var(--gradient-main);
    height: var(--nav-height);
    box-shadow: var(--shadow-nav);
    position: sticky;
    top: 0;
    z-index: 99;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-item {
    position: relative;
    height: 100%;
}

.nav-item > a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 28px;
    color: var(--text-white);
    font-size: var(--font-size-sm);
    font-weight: 500;
    letter-spacing: 1px;
    transition: background var(--transition-fast), color var(--transition-fast);
    position: relative;
    white-space: nowrap;
}
.nav-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: rgba(255,255,255,0.7);
    transition: width var(--transition-base);
}
.nav-item > a:hover {
    background: rgba(255,255,255,0.08);
}
.nav-item > a:hover::after {
    width: 60%;
}
.nav-item > a .arrow {
    font-size: 10px;
    margin-left: 6px;
    opacity: 0.7;
}

/* 下拉子菜单 - 全息悬浮光效 */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-top: 2px solid var(--primary-light);
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow-card-hover), var(--shadow-glow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
    z-index: 200;
    padding: 8px 0;
}
.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown a {
    display: block;
    padding: 10px 24px;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
    position: relative;
    border-left: 2px solid transparent;
}
.nav-dropdown a:hover {
    background: var(--cyan-mist);
    color: var(--primary);
    border-left-color: var(--primary-light);
    padding-left: 30px;
}

/* ============================================
   6. 首页 Banner
   ============================================ */
.hero-banner {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: var(--gradient-banner);
}

/* 粒子动画 Canvas */
.hero-banner #particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-banner .banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.3;
}

.hero-banner .banner-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-banner .banner-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    position: relative;
    z-index: 3;
}

.hero-banner .banner-title-main {
    font-size: var(--font-size-3xl);
    color: var(--text-white);
    font-weight: 700;
    letter-spacing: 3px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    margin-bottom: 12px;
}

.hero-banner .banner-sub {
    font-size: var(--font-size-lg);
    color: rgba(255,255,255,0.85);
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 1px 10px rgba(0,0,0,0.2);
}

/* Banner AI 科技装饰 SVG */
.banner-svg-deco {
    position: absolute;
    right: 5%;
    bottom: 10%;
    z-index: 2;
    opacity: 0.4;
    pointer-events: none;
}
.banner-svg-deco svg {
    width: 160px;
    height: 160px;
    filter: drop-shadow(0 0 30px rgba(46,134,193,0.4));
}

/* ============================================
   7. 侧边栏
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
}

.sidebar-section {
    margin-bottom: 24px;
    background: var(--white-pure);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.sidebar-title {
    background: var(--gradient-main);
    color: var(--text-white);
    font-size: var(--font-size-base);
    font-weight: 600;
    padding: 10px 16px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-title svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.sidebar-list {
    padding: 6px 0;
}

.sidebar-list li {
    border-bottom: 1px dashed var(--border-light);
}
.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    display: block;
    padding: 9px 16px 9px 20px;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
    position: relative;
    border-left: 2px solid transparent;
}
.sidebar-list a::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border-cyan);
    transition: background var(--transition-fast);
}
.sidebar-list a:hover {
    background: var(--cyan-mist);
    color: var(--primary);
    border-left-color: var(--primary-light);
    padding-left: 26px;
}
.sidebar-list a:hover::before {
    background: var(--primary-light);
}

/* ============================================
   8. 首页右侧内容区
   ============================================ */
.main-content {
    min-width: 0;
}

/* ============================================
   9. 典型案例横向滚动
   ============================================ */
.case-scroll-section {
    background: var(--white-pure);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    margin-bottom: 28px;
    overflow: hidden;
}

.case-scroll-header {
    background: var(--gradient-main);
    color: var(--text-white);
    font-size: var(--font-size-base);
    font-weight: 600;
    padding: 10px 16px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.case-scroll-header svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.case-scroll-wrap {
    position: relative;
    overflow: hidden;
    padding: 16px 0;
}

.case-scroll-track {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: scrollCases 35s linear infinite;
    padding: 0 8px;
}
.case-scroll-wrap.paused .case-scroll-track {
    animation-play-state: paused;
}

.case-scroll-item {
    flex-shrink: 0;
    width: 155px;
    text-align: center;
    transition: transform var(--transition-base);
}
.case-scroll-item:hover {
    transform: translateY(-4px);
}

.case-scroll-item img {
    width: 135px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow var(--transition-base);
}
.case-scroll-item:hover img {
    box-shadow: 0 4px 16px rgba(10,42,68,0.2);
}

.case-scroll-item .case-name {
    display: block;
    margin-top: 6px;
    font-size: var(--font-size-xs);
    color: var(--text-primary);
    font-weight: 500;
    transition: color var(--transition-fast);
}
.case-scroll-item:hover .case-name {
    color: var(--primary);
}

/* ============================================
   10. 新闻模块（通用）
   ============================================ */
.news-section {
    background: var(--white-pure);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.news-header {
    background: var(--gradient-main);
    color: var(--text-white);
    font-size: var(--font-size-base);
    font-weight: 600;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 1px;
}

.news-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.news-header-left svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.news-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,0.85);
    font-size: var(--font-size-xs);
    font-weight: 400;
    padding: 3px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    transition: all var(--transition-fast);
    cursor: pointer;
}
.news-more:hover {
    background: rgba(255,255,255,0.15);
    color: var(--text-white);
    border-color: rgba(255,255,255,0.6);
}
.news-more svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.news-list {
    padding: 4px 0;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 9px 16px;
    border-bottom: 1px dashed var(--border-light);
    transition: background var(--transition-fast);
    gap: 10px;
}
.news-item:last-child {
    border-bottom: none;
}
.news-item:hover {
    background: var(--cyan-mist);
}

.news-date {
    flex-shrink: 0;
    font-size: var(--font-size-xs);
    color: var(--text-light);
    background: var(--white-matte);
    padding: 2px 10px;
    border-radius: 3px;
    border: 1px solid var(--border-light);
    white-space: nowrap;
    min-width: 82px;
    text-align: center;
    transition: all var(--transition-fast);
}
.news-item:hover .news-date {
    background: var(--cyan-light);
    color: var(--primary);
    border-color: var(--border-cyan);
}

.news-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    transition: color var(--transition-fast);
}
.news-item:hover .news-title {
    color: var(--primary);
}

/* 首页限10条后加渐隐效果 */
.news-list-fade::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, var(--white-pure), transparent);
    pointer-events: none;
}
.news-list-wrap {
    position: relative;
}

/* ============================================
   11. 二级页面 Banner
   ============================================ */
.page-banner {
    position: relative;
    height: 180px;
    background: var(--gradient-banner);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    pointer-events: none;
}

.page-banner .banner-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-banner .banner-icon {
    width: 48px;
    height: 48px;
    fill: rgba(255,255,255,0.9);
    flex-shrink: 0;
}

.page-banner h1 {
    font-size: var(--font-size-xl);
    color: var(--text-white);
    font-weight: 600;
    letter-spacing: 2px;
}

.page-banner .breadcrumb {
    font-size: var(--font-size-xs);
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}
.page-banner .breadcrumb a {
    color: rgba(255,255,255,0.7);
}
.page-banner .breadcrumb a:hover {
    color: var(--text-white);
}

/* 二级页面 SVG 装饰 */
.page-banner .banner-svg-right {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.12;
    pointer-events: none;
}
.page-banner .banner-svg-right svg {
    width: 120px;
    height: 120px;
}

/* ============================================
   12. 二级页面内容区
   ============================================ */
.page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 20px 48px;
    min-height: 500px;
}

/* 产品详情 / 案例详情 / 新闻详情 统一内容卡片 */
.content-card {
    background: var(--white-pure);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    padding: 32px 36px;
    line-height: 1.8;
    font-size: var(--font-size-md);
}

.content-card h2,
.content-card h3 {
    margin: 24px 0 12px;
    color: var(--text-dark);
}
.content-card h2 { font-size: var(--font-size-xl); }
.content-card h3 { font-size: var(--font-size-lg); }

.content-card p {
    margin-bottom: 14px;
    color: var(--text-primary);
}

.content-card img {
    max-width: 100%;
    height: auto;
    margin: 16px 0;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.content-card table {
    width: 100%;
    margin: 16px 0;
    border: 1px solid var(--border-light);
    font-size: var(--font-size-sm);
}
.content-card table td,
.content-card table th {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    vertical-align: top;
}
.content-card table th {
    background: var(--cyan-mist);
    font-weight: 600;
    color: var(--text-dark);
}
.content-card table tr:nth-child(even) {
    background: var(--white-matte);
}

.content-card .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    padding: 8px 20px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}
.content-card .back-link:hover {
    background: var(--cyan-mist);
    color: var(--primary);
    border-color: var(--border-cyan);
}

/* ============================================
   13. Footer / 底部
   ============================================ */
.site-footer {
    background: var(--gradient-main);
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 28px 20px 32px;
    margin-top: 40px;
    font-size: var(--font-size-sm);
    line-height: 1.9;
}

.site-footer p {
    margin: 2px 0;
}

.site-footer .footer-company {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 6px;
}

/* ============================================
   14. 动效与动画
   ============================================ */

/* 案例横向滚动 */
@keyframes scrollCases {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 全息光效 - hover 微光 */
.glow-hover {
    position: relative;
    overflow: hidden;
}
.glow-hover::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(46,134,193,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}
.glow-hover:hover::before {
    opacity: 1;
}

/* 渐入动画 */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 脉冲光晕 (应用于重点图标/按钮) */
.pulse-glow {
    animation: pulseGlow 3s ease-in-out infinite;
}
@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(46,134,193,0.2)); }
    50%      { filter: drop-shadow(0 0 20px rgba(46,134,193,0.5)); }
}

/* 新闻项纵向依次渐入 */
.news-item {
    animation: slideInItem 0.4s ease backwards;
}
.news-item:nth-child(1)  { animation-delay: 0.05s; }
.news-item:nth-child(2)  { animation-delay: 0.1s; }
.news-item:nth-child(3)  { animation-delay: 0.15s; }
.news-item:nth-child(4)  { animation-delay: 0.2s; }
.news-item:nth-child(5)  { animation-delay: 0.25s; }
.news-item:nth-child(6)  { animation-delay: 0.3s; }
.news-item:nth-child(7)  { animation-delay: 0.35s; }
.news-item:nth-child(8)  { animation-delay: 0.4s; }
.news-item:nth-child(9)  { animation-delay: 0.45s; }
.news-item:nth-child(10) { animation-delay: 0.5s; }

@keyframes slideInItem {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ============================================
   15. 响应式适配
   ============================================ */

/* 小桌面 / 笔记本 (1000px 以下) */
@media (max-width: 1024px) {
    .home-layout {
        grid-template-columns: 210px 1fr;
        gap: 20px;
        padding: 20px 16px 0;
    }
    :root {
        --sidebar-width: 210px;
    }
    .hero-banner { height: 260px; }
    .hero-banner .banner-title-main { font-size: var(--font-size-2xl); }
    .content-card { padding: 24px; }
}

/* 平板 (768px 以下) */
@media (max-width: 768px) {
    .home-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .sidebar {
        display: none; /* 移动端隐藏侧边栏 */
    }
    .site-header { height: 60px; }
    .header-inner { padding: 0 12px; }
    .logo img { width: 90px; }
    .header-actions .action-link { padding: 4px 6px; font-size: 11px; }

    .main-nav { height: auto; }
    .nav-inner { flex-wrap: wrap; padding: 0; }
    .nav-item { width: 50%; }
    .nav-item > a { justify-content: center; padding: 10px 12px; font-size: var(--font-size-xs); }
    .nav-dropdown { position: static; box-shadow: none; border: none; background: rgba(255,255,255,0.95); border-radius: 0; opacity: 1; visibility: visible; transform: none; display: none; }
    .nav-item:hover .nav-dropdown { display: block; }

    .hero-banner { height: 200px; }
    .hero-banner .banner-title-main { font-size: var(--font-size-xl); }
    .hero-banner .banner-sub { font-size: var(--font-size-base); }
    .banner-svg-deco { display: none; }

    .page-banner { height: 130px; }
    .page-banner h1 { font-size: var(--font-size-md); }
    .page-banner .banner-icon { width: 32px; height: 32px; }

    .page-content { padding: 20px 12px 32px; }
    .content-card { padding: 16px; }

    .case-scroll-item { width: 120px; }
    .case-scroll-item img { width: 108px; height: 80px; }

    .site-footer { padding: 20px 16px 24px; font-size: var(--font-size-xs); }
}
