/* ============================================================
   医景时官方网站 · 公共样式
   品牌：医学洞察平台  主色：#5f6ef0（蓝紫）
   ============================================================ */

:root {
    --primary: #5f6ef0;
    --primary-dark: #4a57c7;
    --primary-light: #7a6df0;
    --accent: #21d6a8;
    --text: #1c1c30;
    --text-sub: #5a5c82;
    --text-light: #8a8ca8;
    --bg: #f7f8fc;
    --bg-top: #c8d2ff;
    --bg-bottom: #ebe8fa;
    --card: #ffffff;
    --line: #e9ebf4;
    --shadow: 0 12px 40px rgba(80, 70, 160, 0.12);
    --shadow-sm: 0 2px 8px rgba(80, 70, 160, 0.06);
    --radius: 16px;
    --radius-lg: 24px;
    --max-width: 1120px;
    --nav-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

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

/* ---------------- 通用按钮 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 10px 28px rgba(95, 110, 240, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(95, 110, 240, 0.45); }
.btn-secondary {
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-white {
    background: #fff;
    color: var(--primary-dark);
}
.btn-lg { padding: 17px 40px; font-size: 18px; border-radius: 16px; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 4px 20px rgba(80, 70, 160, 0.06);
}
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}
.brand .brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.brand .brand-sub {
    display: none;
    font-size: 12px;
    color: var(--text-sub);
    border-left: 1px solid var(--line);
    padding-left: 12px;
    margin-left: 4px;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav-menu a {
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
    padding: 6px 2px;
    position: relative;
    transition: color 0.15s ease;
}
.nav-menu a:hover { color: var(--primary); }
.nav-menu a.active {
    color: var(--primary);
    font-weight: 700;
}
.nav-menu a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}
.nav-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 24px;
    color: var(--text);
    align-items: center;
    justify-content: center;
}

/* ---------------- 页脚 ---------------- */
.site-footer {
    background: #161630;
    color: #a6a9c8;
    padding: 48px 0 32px;
    margin-top: 80px;
}
.footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand {
    max-width: 320px;
}
.footer-brand .brand-name {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: block;
    margin-bottom: 12px;
}
.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    color: #8c90b3;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 48px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-links h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 14px;
}
.footer-links a {
    display: block;
    font-size: 14px;
    color: #a6a9c8;
    padding: 5px 0;
    transition: color 0.15s ease;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    color: #6f7296;
}
.footer-bottom .icp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-bottom .icp a { color: #a6a9c8; }
.footer-bottom .icp a:hover { color: #fff; }

/* ---------------- 通用区块 ---------------- */
section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 12px;
    padding: 5px 14px;
    background: rgba(95, 110, 240, 0.08);
    border-radius: 100px;
}
.section-head h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
}
.section-head p {
    color: var(--text-sub);
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto;
}
.section-alt { background: #fff; }

/* ---------------- 卡片网格 ---------------- */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.feature-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.feature-card p {
    color: var(--text-sub);
    font-size: 15px;
    line-height: 1.7;
}
.feature-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
}
.feature-icon.green {
    background: linear-gradient(135deg, #14b8a0, var(--accent));
}

/* ---------------- 滚动渐入动画 ---------------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ---------------- 计数器 ---------------- */
.counter {
    font-variant-numeric: tabular-nums;
    display: inline-block;
}

/* ---------------- 响应式导航 ---------------- */
@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 40px rgba(80, 70, 160, 0.12);
        padding: 8px 24px 20px;
        transform: translateY(-120%);
        transition: transform 0.25s ease;
        z-index: 40;
    }
    .nav-menu.open { transform: none; }
    .nav-menu a {
        display: block;
        padding: 14px 4px;
        border-bottom: 1px solid var(--line);
    }
    .nav-menu a.active::after { display: none; }
    .nav-actions .nav-cta { display: none; }
    .brand .brand-sub { display: none; }
}
