/* ==================================================================
   族谱网站 - 现代清新风格样式表
   设计理念：清新自然 · 简洁优雅 · 年轻喜爱
   主色调：天空蓝、薄荷绿、活力橙
   ================================================================== */

:root {
    /* 中国红色彩体系 */
    --china-red: #C41E3A;
    --china-red-light: #E63946;
    --china-red-dark: #990000;
    --golden-yellow: #FFD700;
    --warm-orange: #FF8C42;
    --coral-pink: #FF6B9D;
    --mint-green: #00C9A7;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --text-dark: #1E293B;
    --text-gray: #64748B;
    --text-light: #94A3B8;
    --border-light: #E2E8F0;

    /* 渐变色 */
    --gradient-red: linear-gradient(135deg, #C41E3A 0%, #E63946 100%);
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    --gradient-green: linear-gradient(135deg, #00C9A7 0%, #00D4AA 100%);
    --gradient-orange: linear-gradient(135deg, #FF8C42 0%, #FFA96C 100%);
    --gradient-pink: linear-gradient(135deg, #FF6B9D 0%, #FF8CB1 100%);
    --gradient-hero: linear-gradient(135deg, #C41E3A 0%, #8B0000 100%);
    --gradient-card: linear-gradient(135deg, #F8FAFC 0%, #FFFFFF 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(79, 134, 247, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 201, 167, 0.05) 0%, transparent 40%);
    -webkit-font-smoothing: antialiased;
}

/* ==================================================================
   清新顶部导航
   ================================================================== */
.fresh-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
}

.fresh-header-inner {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 20px;
}

.fresh-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fresh-logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-red);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
    transition: all 0.3s;
}

.fresh-logo-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

.fresh-logo-text {
    font-size: 22px;
    font-weight: 700;
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.fresh-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fresh-nav-item {
    padding: 8px 16px;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.fresh-nav-item:hover {
    color: var(--china-red);
    background: rgba(196, 30, 58, 0.08);
}

.fresh-nav-item.active {
    color: white;
    background: var(--gradient-red);
    font-weight: 600;
}

/* ==================================================================
   清新Hero区域
   ================================================================== */
.fresh-hero {
    background:
        linear-gradient(135deg, rgba(196, 30, 58, 0.4) 0%, rgba(139, 0, 0, 0.5) 100%),
        url('https://images.unsplash.com/photo-1547981609-4b6bfe67ca0b?w=1920&q=80') center/cover no-repeat;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.fresh-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
}

.fresh-hero-title {
    font-size: 52px;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    letter-spacing: 4px;
    position: relative;
}

.fresh-hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 50px;
    letter-spacing: 2px;
}

.fresh-hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 60px;
}

.fresh-stat-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 28px 36px;
    min-width: 160px;
    backdrop-filter: blur(10px);
    transition: all 0.4s;
}

.fresh-stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.fresh-stat-number {
    font-size: 40px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
}

.fresh-stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    letter-spacing: 1px;
}

/* ==================================================================
   清新卡片
   ================================================================== */
.fresh-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.fresh-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--china-red);
}

.fresh-card-header {
    padding: 24px 28px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fresh-card-header.red {
    background: var(--gradient-red);
}

.fresh-card-header.green {
    background: var(--gradient-green);
}

.fresh-card-header.orange {
    background: var(--gradient-orange);
}

.fresh-card-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.fresh-card-body {
    padding: 28px;
}

/* ==================================================================
   清新按钮
   ================================================================== */
.fresh-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.fresh-btn-primary {
    background: var(--gradient-red);
    color: white;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.fresh-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

.fresh-btn-secondary {
    background: white;
    color: var(--china-red);
    border: 2px solid var(--china-red);
}

.fresh-btn-secondary:hover {
    background: var(--china-red);
    color: white;
}

/* ==================================================================
   清新徽章
   ================================================================== */
.fresh-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.fresh-badge-red {
    background: rgba(196, 30, 58, 0.1);
    color: var(--china-red);
}

.fresh-badge-green {
    background: rgba(0, 201, 167, 0.1);
    color: var(--mint-green);
}

.fresh-badge-orange {
    background: rgba(255, 140, 66, 0.1);
    color: var(--warm-orange);
}

/* ==================================================================
   优化后的时间轴 - 简洁版
   ================================================================== */
.fresh-timeline {
    position: relative;
    padding-left: 30px;
}

.fresh-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.fresh-timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.fresh-timeline-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: white;
    border: 3px solid var(--china-red);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.2);
}

.fresh-timeline-date {
    color: var(--china-red);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.fresh-timeline-content {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px 20px;
    transition: all 0.3s;
}

.fresh-timeline-content:hover {
    border-color: var(--china-red);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.1);
}

.fresh-timeline-content h4 {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
}

.fresh-timeline-content p {
    color: var(--text-gray);
    line-height: 1.6;
    font-size: 14px;
}

/* ==================================================================
   紧凑时间轴 - 适用于建厝人物
   ================================================================== */
.compact-timeline {
    position: relative;
}

.compact-timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.compact-timeline-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    position: relative;
}

.compact-timeline-item::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 20px;
    width: 10px;
    height: 10px;
    background: white;
    border: 2px solid var(--china-red);
    border-radius: 50%;
}

.compact-timeline-marker {
    width: 32px;
    height: 32px;
    background: var(--gradient-red);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 16px;
}

.compact-timeline-content {
    flex: 1;
    min-width: 0;
}

.compact-timeline-year {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
}

.compact-timeline-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.compact-timeline-desc {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.5;
}

/* ==================================================================
   响应式设计
   ================================================================== */
@media (max-width: 768px) {
    .fresh-header {
        height: 70px;
    }

    .fresh-header-inner {
        position: relative;
        height: 70px;
        padding: 15px 20px;
        gap: 15px;
    }

    /* 在移动端隐藏PC导航，显示移动菜单按钮 */
    .fresh-nav {
        display: none;
    }

    .fresh-hero {
        padding: 80px 20px;
    }

    .fresh-hero-title {
        font-size: 36px;
        letter-spacing: 2px;
    }

    .fresh-hero-subtitle {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .fresh-hero-stats {
        gap: 20px;
    }

    .fresh-stat-item {
        min-width: 130px;
        padding: 20px 24px;
    }

    .fresh-stat-number {
        font-size: 32px;
    }
}

/* ==================================================================
   动画效果
   ================================================================== */
@keyframes fresh-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fresh-fade-in {
    animation: fresh-fade-in 0.6s ease-out;
}

@keyframes fresh-scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fresh-scale {
    animation: fresh-scale 3s ease-in-out infinite;
}

/* ==================================================================
   清新页脚
   ================================================================== */
.fresh-footer {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    color: white;
    padding: 60px 30px 30px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.fresh-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.3), transparent);
}

.fresh-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
}

.footer-brand i {
    font-size: 32px;
    color: var(--china-red);
}

.footer-tagline {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 8px;
}

.footer-links a:hover {
    color: white;
    background: rgba(196, 30, 58, 0.2);
    transform: translateY(-2px);
}

.footer-copyright {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================================================================
   回到顶部按钮
   ================================================================== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--gradient-red);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
    transition: all 0.3s;
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.5);
}

/* ==================================================================
   统计卡片
   ================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s;
    border: 1px solid var(--border-light);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
    margin-top: 4px;
}

/* ==================================================================
   区域标题
   ================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-title i {
    color: var(--china-red);
    font-size: 28px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-gray);
    letter-spacing: 2px;
}

/* ==================================================================
   渐变文字
   ================================================================== */
.gradient-text {
    background: linear-gradient(135deg, #C41E3A 0%, #8B0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================================================================
   粒子效果
   ================================================================== */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particle-float 8s ease-in-out infinite;
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* ==================================================================
   建厝时间轴容器
   ================================================================== */
.jianchu-timeline-container {
    max-width: 1000px;
    margin: 0 auto;
}

.jianchu-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.jianchu-title i {
    color: var(--vibrant-orange);
    font-size: 28px;
}

/* ==================================================================
   响应式页脚
   ================================================================== */
@media (max-width: 768px) {
    .fresh-footer {
        padding: 40px 20px 20px;
    }

    .footer-brand {
        font-size: 22px;
        flex-direction: column;
        gap: 8px;
    }

    .footer-brand i {
        font-size: 28px;
    }

    .footer-tagline {
        font-size: 14px;
    }

    .footer-links {
        gap: 15px;
    }

    .footer-links a {
        font-size: 12px;
        padding: 6px 12px;
    }

    .footer-copyright {
        font-size: 12px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-card {
        padding: 24px;
    }

    .stat-number {
        font-size: 28px;
    }

    .section-header {
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 14px;
    }
}
