/* ============================================
   深圳学区决策支持网站 · 主样式
   主题：理性教育蓝
   ============================================ */

:root {
    /* 主色系 */
    --color-primary: #1a5276;
    --color-primary-light: #2980b9;
    --color-primary-dark: #0e3a52;
    --color-accent-red: #e74c3c;
    --color-accent-green: #27ae60;
    --color-accent-yellow: #f39c12;
    --color-accent-blue: #3498db;

    /* 中性色 */
    --color-bg: #f8fafc;
    --color-bg-card: #ffffff;
    --color-bg-section: #f1f5f9;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-text-lighter: #94a3b8;
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;

    /* 可信度标签色 */
    --color-trust-official: #27ae60;
    --color-trust-community: #f39c12;
    --color-trust-pending: #e74c3c;

    /* 间距 */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-full: 9999px;

    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);

    /* 字体 */
    --font-stack: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    --font-mono: "SF Mono", "Fira Code", monospace;
}

/* ============================================
   全局重置
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-stack);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary); }

/* ============================================
   顶部导航
   ============================================ */
.top-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow 0.3s;
}
.top-nav.scrolled { box-shadow: var(--shadow-md); }
.nav-container {
    max-width: 1180px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.875rem 1.5rem; height: 64px;
}
.nav-logo {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 1.15rem; font-weight: 700; color: var(--color-primary);
}
.nav-logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.1rem;
}
.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-link {
    padding: 0.5rem 0.875rem; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 500; color: var(--color-text);
    cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.nav-link:hover { background: var(--color-bg-section); color: var(--color-primary); }
.nav-link.active { background: var(--color-primary); color: white; }
.nav-menu-btn { display: none; }

/* ============================================
   主容器
   ============================================ */
.main-container {
    max-width: 1180px; margin: 0 auto;
    padding: 88px 1.5rem 4rem;
}

/* ============================================
   Hero 首屏
   ============================================ */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
    color: white;
    border-radius: var(--radius-xl);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50%; right: -10%;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.05); border-radius: 50%;
}
.hero::after {
    content: ''; position: absolute; bottom: -30%; left: -5%;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.03); border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
    display: inline-block; padding: 0.35rem 1rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-full);
    font-size: 0.85rem; margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}
.hero h1 {
    font-size: 2.6rem; font-weight: 800; margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.hero-subtitle {
    font-size: 1.15rem; opacity: 0.9; max-width: 640px; margin: 0 auto 2rem;
    line-height: 1.8;
}
.hero-cta-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-cta {
    padding: 0.875rem 2rem; border-radius: var(--radius-md);
    font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: all 0.3s; border: none;
}
.hero-cta-primary {
    background: white; color: var(--color-primary);
}
.hero-cta-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.hero-cta-secondary {
    background: rgba(255,255,255,0.12); color: white;
    border: 1px solid rgba(255,255,255,0.3);
}
.hero-cta-secondary:hover { background: rgba(255,255,255,0.2); }

/* ============================================
   通用区块
   ============================================ */
.section { margin-bottom: 3rem; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-title {
    font-size: 1.8rem; font-weight: 700; color: var(--color-text);
    margin-bottom: 0.5rem;
}
.section-subtitle { color: var(--color-text-light); font-size: 1rem; }

/* 板块锚点 */
.section-anchor { scroll-margin-top: 80px; }

/* ============================================
   卡片
   ============================================ */
.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-body { padding: 1.5rem; }
.card-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }

/* 卡片网格 */
.card-grid {
    display: grid; gap: 1.5rem;
    align-items: stretch;
}
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================
   可信度标签
   ============================================ */
.trust-tag {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.2rem 0.6rem; border-radius: var(--radius-full);
    font-size: 0.75rem; font-weight: 600;
}
.trust-official { background: #e8f5e9; color: var(--color-trust-official); }
.trust-community { background: #fff8e1; color: #e65100; }
.trust-pending { background: #fce4ec; color: var(--color-trust-pending); }

/* ============================================
   概率标签
   ============================================ */
.prob-tag {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.75rem; border-radius: var(--radius-full);
    font-size: 0.8rem; font-weight: 700;
}
.prob-high { background: #e8f5e9; color: var(--color-accent-green); }
.prob-mid { background: #fff8e1; color: var(--color-accent-yellow); }
.prob-low { background: #fce4ec; color: var(--color-accent-red); }
.prob-na { background: var(--color-bg-section); color: var(--color-text-light); }

/* ============================================
   积分计算器
   ============================================ */
.calculator {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.calc-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white; padding: 1.5rem 2rem; text-align: center;
}
.calc-header h2 { font-size: 1.4rem; margin-bottom: 0.25rem; }
.calc-header p { opacity: 0.85; font-size: 0.9rem; }
.calc-body { padding: 2rem; }

.calc-step { margin-bottom: 2rem; }
.calc-step-title {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.calc-step-num {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--color-primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; flex-shrink: 0;
}

.calc-field { margin-bottom: 1rem; }
.calc-label {
    display: block; font-size: 0.9rem; font-weight: 600;
    margin-bottom: 0.5rem; color: var(--color-text);
}
.calc-input, .calc-select {
    width: 100%; padding: 0.75rem 1rem;
    border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
    font-size: 0.95rem; font-family: inherit;
    transition: border-color 0.2s; background: white;
}
.calc-input:focus, .calc-select:focus {
    outline: none; border-color: var(--color-primary-light);
}
.calc-hint {
    font-size: 0.8rem; color: var(--color-text-lighter);
    margin-top: 0.35rem; line-height: 1.5;
}
.calc-radio-group { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.calc-radio-label {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem; border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm); cursor: pointer;
    font-size: 0.9rem; transition: all 0.2s;
}
.calc-radio-label:hover { border-color: var(--color-primary-light); }
.calc-radio-label.checked {
    border-color: var(--color-primary); background: #ebf5fb;
}
.calc-radio-label input { margin: 0; }

.calc-result {
    background: linear-gradient(135deg, #ebf5fb 0%, #d6eaf8 100%);
    border-radius: var(--radius-lg); padding: 2rem;
    margin-top: 1.5rem; display: none;
}
.calc-result.show { display: block; animation: fadeIn 0.5s; }
.calc-result-total {
    text-align: center; margin-bottom: 1.5rem;
}
.calc-result-score {
    font-size: 3rem; font-weight: 800;
    color: var(--color-primary); line-height: 1;
}
.calc-result-label { font-size: 0.9rem; color: var(--color-text-light); }
.calc-result-breakdown {
    display: flex; flex-direction: column; gap: 0.5rem;
}
.calc-result-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.6rem 1rem; background: rgba(255,255,255,0.6);
    border-radius: var(--radius-sm); font-size: 0.9rem;
}
.calc-result-item-score { font-weight: 700; color: var(--color-primary); }

/* ============================================
   学校卡片
   ============================================ */
.school-card {
    display: flex; flex-direction: column;
    position: relative;
}
.school-card-tier-badge {
    position: absolute; top: 0; right: 0;
    padding: 0.25rem 0.75rem; border-radius: 0 var(--radius-lg) 0 var(--radius-sm);
    font-size: 0.75rem; font-weight: 700;
}
.tier-1 { background: #3498db; color: white; }
.tier-2 { background: #2ecc71; color: white; }

.school-card-header { padding: 1.25rem 1.5rem 0.75rem; }
.school-name { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.25rem; }
.school-meta { font-size: 0.8rem; color: var(--color-text-light); }
.school-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.school-tag {
    padding: 0.15rem 0.6rem; border-radius: var(--radius-full);
    font-size: 0.72rem; font-weight: 600;
    background: var(--color-bg-section); color: var(--color-text-light);
}
.school-tech-score {
    display: flex; align-items: center; gap: 0.25rem;
    margin: 0.5rem 0; font-size: 0.85rem;
}
.tech-score-bar {
    flex: 1; height: 6px; background: var(--color-bg-section);
    border-radius: var(--radius-full); overflow: hidden;
}
.tech-score-fill {
    height: 100%; background: linear-gradient(90deg, var(--color-accent-yellow), var(--color-accent-green));
    border-radius: var(--radius-full);
}
.school-detail-row {
    display: flex; justify-content: space-between;
    padding: 0.5rem 0; border-top: 1px solid var(--color-border-light);
    font-size: 0.85rem;
}
.school-detail-label { color: var(--color-text-light); }
.school-detail-value { font-weight: 600; }

/* ============================================
   时间线
   ============================================ */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: ''; position: absolute; left: 0.5rem; top: 0; bottom: 0;
    width: 2px; background: linear-gradient(to bottom, var(--color-primary), var(--color-primary-light));
}
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-dot {
    position: absolute; left: -1.75rem; top: 0.25rem;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--color-primary); border: 3px solid white;
    box-shadow: 0 0 0 2px var(--color-primary);
}
.timeline-content {
    background: var(--color-bg-card); border-radius: var(--radius-md);
    padding: 1.25rem; box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
}
.timeline-date { font-size: 0.8rem; color: var(--color-primary); font-weight: 700; margin-bottom: 0.3rem; }
.timeline-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.timeline-list { list-style: none; }
.timeline-list li {
    padding: 0.25rem 0; font-size: 0.88rem;
    color: var(--color-text-light); display: flex; gap: 0.5rem;
}
.timeline-list li::before { content: '▸'; color: var(--color-primary-light); }

/* ============================================
   表格
   ============================================ */
.data-table {
    width: 100%; border-collapse: collapse;
    background: var(--color-bg-card); border-radius: var(--radius-md);
    overflow: hidden; box-shadow: var(--shadow-sm);
}
.data-table th {
    background: var(--color-primary); color: white;
    padding: 0.75rem 1rem; font-size: 0.85rem; font-weight: 600;
    text-align: left;
}
.data-table td {
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--color-border-light);
    font-size: 0.88rem;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover { background: var(--color-bg-section); }

/* ============================================
   提示框
   ============================================ */
.alert {
    padding: 1rem 1.25rem; border-radius: var(--radius-md);
    margin-bottom: 1rem; font-size: 0.9rem;
    display: flex; gap: 0.75rem; align-items: flex-start;
}
.alert-icon { font-size: 1.2rem; flex-shrink: 0; }
.alert-danger { background: #fdf2f2; border-left: 4px solid var(--color-accent-red); color: #922c1c; }
.alert-warning { background: #fff8e1; border-left: 4px solid var(--color-accent-yellow); color: #8a6100; }
.alert-info { background: #ebf5fb; border-left: 4px solid var(--color-accent-blue); color: #1a5276; }
.alert-success { background: #e8f5e9; border-left: 4px solid var(--color-accent-green); color: #1b5e20; }

/* ============================================
   路径图
   ============================================ */
.path-flow {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    align-items: center; justify-content: center;
    padding: 2rem 1rem;
}
.path-node {
    background: var(--color-bg-card); border-radius: var(--radius-md);
    padding: 1rem 1.5rem; text-align: center;
    box-shadow: var(--shadow-sm); border: 2px solid var(--color-border);
    min-width: 140px; position: relative;
}
.path-node-icon { font-size: 1.5rem; margin-bottom: 0.3rem; }
.path-node-title { font-size: 0.9rem; font-weight: 700; }
.path-node-sub { font-size: 0.75rem; color: var(--color-text-light); margin-top: 0.2rem; }
.path-arrow {
    color: var(--color-primary-light); font-size: 1.5rem;
    display: flex; align-items: center;
}

/* ============================================
   深圳中学专区
   ============================================ */
.deep-zone-card {
    background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
    color: white; border-radius: var(--radius-xl);
    overflow: hidden; box-shadow: var(--shadow-lg);
}
.deep-zone-header { padding: 2rem; text-align: center; }
.deep-zone-header h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.deep-zone-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1rem; padding: 0 2rem 2rem;
}
.deep-zone-stat { text-align: center; }
.deep-zone-stat-num { font-size: 1.8rem; font-weight: 800; }
.deep-zone-stat-label { font-size: 0.78rem; opacity: 0.85; }

/* ============================================
   Tab
   ============================================ */
.tab-group {
    display: flex; gap: 0.5rem; flex-wrap: wrap;
    margin-bottom: 1.5rem; justify-content: center;
}
.tab-btn {
    padding: 0.5rem 1.25rem; border-radius: var(--radius-full);
    border: 1.5px solid var(--color-border); background: white;
    font-size: 0.88rem; cursor: pointer; transition: all 0.2s;
    color: var(--color-text);
}
.tab-btn:hover { border-color: var(--color-primary-light); }
.tab-btn.active {
    background: var(--color-primary); color: white;
    border-color: var(--color-primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s; }

/* ============================================
   风险雷达
   ============================================ */
.risk-grid {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 1rem; margin: 1.5rem 0;
}
.risk-item {
    text-align: center; padding: 1.25rem 0.75rem;
    border-radius: var(--radius-md); border: 2px solid;
}
.risk-item-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.5rem; }
.risk-item-level { font-size: 1.1rem; font-weight: 800; }
.risk-low { border-color: var(--color-accent-green); background: #e8f5e9; color: var(--color-accent-green); }
.risk-mid { border-color: var(--color-accent-yellow); background: #fff8e1; color: #e65100; }
.risk-high { border-color: var(--color-accent-red); background: #fce4ec; color: var(--color-accent-red); }

/* ============================================
   打印
   ============================================ */
.print-buttons {
    display: flex; gap: 0.75rem; justify-content: center;
    margin: 2rem 0;
}
.print-btn {
    padding: 0.625rem 1.5rem; border-radius: var(--radius-md);
    border: 1.5px solid var(--color-primary); background: white;
    color: var(--color-primary); font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s; display: flex;
    align-items: center; gap: 0.5rem;
}
.print-btn:hover { background: var(--color-primary); color: white; }

/* ============================================
   页脚
   ============================================ */
.footer {
    text-align: center; padding: 3rem 1rem 2rem;
    color: var(--color-text-light); font-size: 0.85rem;
    border-top: 1px solid var(--color-border); margin-top: 3rem;
}
.footer-info { margin-bottom: 0.5rem; }

/* ============================================
   动画
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.5s ease-out; }

/* ============================================
   响应式
   ============================================ */
/* ============================================
   打印模式
   ============================================ */
@media print {
    body { background: white !important; }
    .top-nav, .nav-menu-btn, .print-buttons { display: none !important; }
    .main-container { padding: 0 !important; max-width: 100% !important; }
    .hero { background: white !important; color: black !important; border: 1px solid #ccc; }
    .hero h1, .hero-subtitle { color: black !important; }
    .section { page-break-after: auto; }
    .card { box-shadow: none !important; border: 1px solid #ccc !important; }
    .card-body { break-inside: avoid; }
    .calc-result { break-inside: avoid; }
    .data-table { break-inside: avoid; }
}
body.print-adult .tab-content { display: block !important; }
body.print-adult .calc-result { display: block !important; }
body.print-child .calc-body { display: none; }
body.print-child .card-body p { display: none; }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-menu-btn {
        display: flex; flex-direction: column; gap: 4px;
        cursor: pointer; padding: 0.5rem;
    }
    .nav-menu-btn span {
        width: 24px; height: 3px; background: var(--color-primary);
        border-radius: 2px; transition: 0.3s;
    }
    .nav-links.mobile-open {
        display: flex; flex-direction: column;
        position: absolute; top: 64px; left: 0; right: 0;
        background: white; padding: 1rem;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
    }
    .hero h1 { font-size: 1.8rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .card-grid-2, .card-grid-3, .card-grid-4 {
        grid-template-columns: 1fr;
    }
    .deep-zone-stats { grid-template-columns: repeat(2, 1fr); }
    .risk-grid { grid-template-columns: repeat(2, 1fr); }
    .path-flow { flex-direction: column; }
    .path-arrow { transform: rotate(90deg); }
    .data-table { font-size: 0.78rem; }
    .data-table th, .data-table td { padding: 0.5rem 0.6rem; }
}
