/* ============================================================
   宁化刘氏教育基金会 官网样式
   设计风格：传统中式 + 现代响应式
   主色：朱砂红 #9B1B1B / 米白 #FFF8F0 / 金色 #C5A059
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
    --red: #9B1B1B;
    --red-dark: #6B0F0F;
    --red-light: #C0392B;
    --red-pale: #F9E8E8;
    --cream: #FFF8F0;
    --off-white: #FDF5E6;
    --gold: #C5A059;
    --gold-dark: #A67C00;
    --gold-light: #E6D5A8;
    --ink: #2C1810;
    --text: #4A3728;
    --text-light: #8B8378;
    --border: #D4C4A8;
    --bg: #FAF6F0;
    --shadow: 0 2px 12px rgba(155, 27, 27, 0.08);
    --shadow-lg: 0 4px 24px rgba(155, 27, 27, 0.12);
    --radius: 6px;
    --serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
    --sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.8;
    font-size: 15px;
    overflow-x: hidden;
}

a { color: var(--red); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--red-dark); }

img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   顶部装饰条
   ============================================================ */
.top-bar {
    background: var(--red-dark);
    color: var(--cream);
    font-size: 13px;
    padding: 6px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar a { color: var(--gold-light); }
.top-bar .tagline {
    font-family: var(--serif);
    letter-spacing: 2px;
}
.top-bar .top-links { display: flex; gap: 20px; }

/* ============================================================
   网站头部 Logo+导航
   ============================================================ */
.site-header {
    background: var(--cream);
    border-bottom: 3px solid var(--red);
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.site-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gold);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 30px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}
.logo-img {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}
.logo-text h1 {
    font-family: var(--serif);
    font-size: 26px;
    color: var(--red);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 1px;
}
.logo-text .subtitle {
    font-size: 12px;
    color: var(--gold-dark);
    letter-spacing: 3px;
    margin-top: 2px;
    text-transform: uppercase;
}

/* 导航 */
.nav-list {
    display: flex;
    list-style: none;
    gap: 4px;
}
.nav-list a {
    display: block;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    border-radius: var(--radius);
    transition: all 0.2s;
    position: relative;
}
.nav-list a:hover, .nav-list a.active {
    color: var(--red);
    background: var(--red-pale);
}
.nav-list a.active::after {
    content: '';
    position: absolute;
    bottom: -19px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
}

/* 移动端菜单 */
.menu-toggle {
    display: none;
    font-size: 24px;
    color: var(--red);
    cursor: pointer;
    background: none;
    border: none;
}

/* ============================================================
   Hero 横幅
   ============================================================ */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: var(--cream);
    overflow: hidden;
    min-height: 420px;
    display: flex;
    align-items: center;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(197, 160, 89, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(197, 160, 89, 0.1) 0%, transparent 50%);
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--bg), transparent);
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 1;
    padding: 60px 0;
    max-width: 700px;
}
.hero-title {
    font-family: var(--serif);
    font-size: 42px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.hero-subtitle {
    font-size: 17px;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 30px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 248, 240, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-family: var(--sans);
}
.btn-primary {
    background: var(--cream);
    color: var(--red);
}
.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}
.btn-outline {
    background: transparent;
    color: var(--cream);
    border: 1.5px solid var(--gold);
}
.btn-outline:hover {
    background: var(--gold);
    color: var(--red-dark);
}

/* Hero 右侧装饰 */
.hero-deco {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    opacity: 0.08;
    pointer-events: none;
}

/* ============================================================
   统计数据条
   ============================================================ */
.stats-bar {
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}
.stat-item {
    position: relative;
}
.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    width: 1px;
    background: var(--border);
}
.stat-number {
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 700;
    color: var(--red);
    line-height: 1;
}
.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 6px;
    letter-spacing: 1px;
}

/* ============================================================
   通用区块
   ============================================================ */
.section {
    padding: 50px 0;
}
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 {
    font-family: var(--serif);
    font-size: 30px;
    color: var(--red);
    font-weight: 700;
    display: inline-block;
    position: relative;
    padding-bottom: 16px;
}
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
}
.section-title p {
    color: var(--text-light);
    margin-top: 12px;
    font-size: 14px;
    letter-spacing: 1px;
}

/* 带左侧装饰条的标题 */
.title-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.title-bar h2 {
    font-family: var(--serif);
    font-size: 24px;
    color: var(--red);
    font-weight: 700;
}
.title-bar .bar {
    width: 5px;
    height: 28px;
    background: var(--red);
    border-radius: 3px;
}
.title-bar .more {
    margin-left: auto;
    font-size: 14px;
    color: var(--text-light);
}

/* ============================================================
   卡片
   ============================================================ */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border);
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ============================================================
   新闻列表
   ============================================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.news-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border);
}
.news-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.news-card-body {
    padding: 20px;
}
.news-tag {
    display: inline-block;
    font-size: 12px;
    color: var(--red);
    background: var(--red-pale);
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.news-card h3 {
    font-size: 16px;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card:hover h3 { color: var(--red); }
.news-card p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-date {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ============================================================
   学子卡片
   ============================================================ */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.student-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}
.student-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.student-card .batch-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}
.batch-badge.batch-985 {
    background: linear-gradient(135deg, #9B1B1B, #C0392B);
    color: white;
}
.batch-badge.batch-211 {
    background: linear-gradient(135deg, #C5A059, #D4AF37);
    color: white;
}
.student-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--red-pale);
    color: var(--red);
    font-size: 24px;
    font-family: var(--serif);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 2px solid var(--red);
}
.student-card .name {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 4px;
}
.student-card .school {
    font-size: 14px;
    color: var(--red);
    font-weight: 500;
    margin-bottom: 4px;
}
.student-card .major {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.student-card .score {
    font-size: 13px;
    color: var(--gold-dark);
    font-weight: 600;
}
.student-card .hometown {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

/* ============================================================
   表格
   ============================================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 14px;
}
.data-table thead {
    background: var(--red);
    color: white;
}
.data-table th {
    padding: 14px 12px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}
.data-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.data-table tbody tr:hover {
    background: var(--red-pale);
}
.data-table .text-left { text-align: left; }
.data-table .batch-985-tag {
    color: var(--red);
    font-weight: 700;
}
.data-table .batch-211-tag {
    color: var(--gold-dark);
    font-weight: 700;
}
.data-table .amount {
    color: var(--red);
    font-weight: 600;
}

/* ============================================================
   捐赠芳名榜
   ============================================================ */
.donor-board {
    background: linear-gradient(135deg, #9B1B1B 0%, #7A1414 100%);
    border-radius: var(--radius);
    padding: 30px;
    color: var(--cream);
    position: relative;
    overflow: hidden;
}
.donor-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}
.donor-board-title {
    font-family: var(--serif);
    font-size: 22px;
    text-align: center;
    margin-bottom: 20px;
    color: var(--gold-light);
    letter-spacing: 2px;
}
.donor-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
}
.donor-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}
.donor-item .seq {
    color: var(--gold);
    font-weight: 600;
    min-width: 24px;
}
.donor-item .name { flex: 1; }
.donor-item .amount {
    color: var(--gold-light);
    font-weight: 600;
}

/* ============================================================
   倡议书
   ============================================================ */
.letter-box {
    background: var(--off-white);
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    padding: 40px;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.letter-box::before, .letter-box::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--red);
}
.letter-box::before { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.letter-box::after { bottom: -2px; right: -2px; border-left: none; border-top: none; }
.letter-title {
    font-family: var(--serif);
    font-size: 28px;
    color: var(--red);
    text-align: center;
    font-weight: 700;
    margin-bottom: 8px;
}
.letter-subtitle {
    text-align: center;
    color: var(--gold-dark);
    font-size: 15px;
    margin-bottom: 24px;
    letter-spacing: 1px;
}
.letter-content { font-size: 15px; line-height: 2; color: var(--text); }
.letter-content p { margin-bottom: 12px; text-indent: 2em; }
.letter-content h3 { font-size: 16px; margin-bottom: 10px; color: var(--ink); text-indent: 2em; }
.letter-content strong { color: var(--red); }
.letter-seal {
    text-align: right;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.seal-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border: 3px solid var(--red);
    border-radius: 50%;
    color: var(--red);
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    opacity: 0.8;
}

/* ============================================================
   分隔装饰
   ============================================================ */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 40px 0;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    max-width: 200px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.divider-icon {
    color: var(--gold);
    font-size: 20px;
}

/* ============================================================
   面包屑
   ============================================================ */
.breadcrumb {
    background: var(--cream);
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb .sep { margin: 0 8px; color: var(--border); }
.breadcrumb .current { color: var(--red); font-weight: 500; }

/* ============================================================
   两栏布局
   ============================================================ */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
    background: var(--red-dark);
    color: var(--cream);
    padding: 50px 0 20px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}
.footer-brand h3 {
    font-family: var(--serif);
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--gold-light);
}
.footer-brand p {
    font-size: 13px;
    line-height: 1.8;
    opacity: 0.8;
}
.footer-col h4 {
    font-size: 15px;
    margin-bottom: 14px;
    color: var(--gold-light);
}
.footer-col ul { list-style: none; }
.footer-col li {
    margin-bottom: 8px;
    font-size: 13px;
    opacity: 0.8;
}
.footer-col a { color: var(--cream); opacity: 0.8; }
.footer-col a:hover { opacity: 1; color: var(--gold-light); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    opacity: 0.6;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 968px) {
    .nav-list { display: none; }
    .menu-toggle { display: block; }
    .nav-list.show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--cream);
        padding: 10px;
        box-shadow: var(--shadow-lg);
        border-top: 2px solid var(--red);
    }
    .nav-list.show a { padding: 12px; }
    .nav-list a.active::after { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2)::after { display: none; }
    .news-grid { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-title { font-size: 28px; }
    .hero-deco { display: none; }
    .donor-list { grid-template-columns: 1fr; }
    .student-grid { grid-template-columns: 1fr; }
    .letter-box { padding: 24px; }
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 8px 6px; }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-item::after { display: none !important; }
    .footer-grid { grid-template-columns: 1fr; }
    .logo-text h1 { font-size: 20px; }
    .section-title h2 { font-size: 24px; }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================================
   加载中
   ============================================================ */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}
.loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   标签页
   ============================================================ */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
}
.tab-btn {
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-family: var(--sans);
}
.tab-btn:hover { color: var(--red); }
.tab-btn.active {
    color: var(--red);
    border-bottom-color: var(--red);
    font-weight: 600;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeInUp 0.4s; }

/* ============================================================
   高亮统计卡片
   ============================================================ */
.highlight-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}
.hl-stat {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}
.hl-stat:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
}
.hl-stat .icon {
    font-size: 28px;
    margin-bottom: 8px;
}
.hl-stat .num {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--red);
    line-height: 1.2;
}
.hl-stat .label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

@media (max-width: 600px) {
    .highlight-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   信息提示框
   ============================================================ */
.info-box {
    background: var(--red-pale);
    border-left: 4px solid var(--red);
    padding: 16px 20px;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 14px;
    color: var(--text);
}
.info-box strong { color: var(--red); }

/* ============================================================
   文章正文
   ============================================================ */
.article-body {
    font-size: 16px;
    line-height: 2;
    color: var(--text);
}
.article-body p { margin-bottom: 16px; text-indent: 2em; }
.article-body strong { color: var(--red); }
.article-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.article-header h1 {
    font-family: var(--serif);
    font-size: 26px;
    color: var(--ink);
    margin-bottom: 12px;
}
