body {
    font-family: 'Caveat', cursive, sans-serif; /* Aesthetic handwriting font */
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #a0c4ff, #e0b0ff); /* Light blue to purple/pink */
    color: #333;
    min-height: 100vh;
    padding-top: 100px; /* Initial padding for fixed header, adjust if header height changes */
    font-size: 1.1em; /* Base font size */
}


header#main-header {
    text-align: center;
    padding: 25px 10px; /* Initial padding */
    background-color: rgba(255, 255, 255, 0.4); /* Semi-transparent white */
    color: #2c3e50;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: padding 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

header#main-header.sticky {
    padding: 8px 10px; /* 减小上浮时的padding */
    background-color: rgba(255, 255, 255, 0.7);
}

header#main-header h1 {
    margin: 0;
    font-size: 3em; /* Initial size */
    font-weight: 700;
    transition: font-size 0.3s ease-in-out;
    color: #333;
    margin-bottom: 20px;
    font-family:'MyCustomFont','KaiTi', serif
}

header#main-header.sticky h1 {
    font-size: 1.2em; /* 减小上浮时的标题大小 */
    margin-bottom: 5px; /* 减小上浮时的底部间距 */
}

header#main-header p.slogan {
    font-family: 'DancingScript','KaiTi', serif;
    margin: 5px 0 0;
    font-size: 1.2em;
    font-weight: 400;
    transition: all 0.3s ease-in-out;
    opacity: 1;
    max-height: 50px; /* 足够容纳 slogan 的高度 */
    overflow: hidden;
}

header#main-header.sticky p.slogan {
    font-size: 0.9em; /* 减小上浮时的slogan大小 */
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
}

main {
    max-width: 800px; /* Adjusted for better timeline layout */
    margin: 30px auto;
    padding: 20px;
    margin-top: 100px; /* 可根据 header 的高度调整 */
}
.small {
    font-family: 'font_4','KaiTi', serif;
    font-size: 1em;
}
.timeline-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 40px;
    font-size: 2.5em;
}

.timeline {
    list-style: none;
    padding: 0;
    position: relative;
    font-family: 'font_4','KaiTi',serif;
}

/* The central vertical line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: rgba(255, 255, 255, 0.5); /* Lighter line */
    border-radius: 2px;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 15px 20px;
    position: relative;
    margin-bottom: 30px;
    width: 50%;
    box-sizing: border-box;
    background-color: rgba(255,255,255,0.6);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
}

/* Position items on left and right */
.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 30px; /* Space for the arrow/dot */
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 30px; /* Space for the arrow/dot */
    text-align: left;
}

/* The circle on the timeline */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #fff;
    border: 3px solid #a0c4ff; /* Match top gradient color */
    top: 20px; /* Adjust vertical position */
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -8px; /* (16px / 2) */
    transform: translateY(-50%);
}

.timeline-item:nth-child(even)::after {
    left: -8px; /* (16px / 2) */
    transform: translateY(-50%);
}

.timeline-content h3 {
    margin-top: 0;
    color: #34495e;
    font-size: 1.4em;
    margin-bottom: 5px;
}

.timeline-content .date {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 8px;
    display: block;
}

.timeline-description {
    font-size: 1em;
    line-height: 1.5;
    color: #555;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin-top 0.4s ease-out;
    opacity: 0;
    margin-top: 0;
}

.timeline-item.active .timeline-description {
    max-height: 150px; /* Adjust as needed */
    opacity: 1;
    margin-top: 10px;
}

.timeline-node-animation {
    width: 8px;
    height: 8px;
    background-color: #268bd2;
    border-radius: 50%;
    display: inline-block;
    margin-top: 8px;
    animation: pulse 1.5s infinite ease-in-out;
}

.timeline-item.active .timeline-node-animation {
    display: none;
}

@keyframes pulse {
    0% { transform: scale(0.7); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.7); opacity: 0.6; }
}

#load-more-btn {
    display: block;
    margin: 40px auto 20px;
    padding: 12px 25px;
    font-family: 'Caveat', cursive, sans-serif;
    font-size: 1.3em;
    background-color: rgba(255,255,255,0.6);
    border: 2px solid #a0c4ff;
    color: #2c3e50;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#load-more-btn {
    font-family: 'Segoe UI', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background-color: #28a745;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#load-more-btn:hover {
    background-color: #218838;
}


footer {
    text-align: center;
    padding: 25px 10px;
    background-color: rgba(0,0,0,0.15);
    color: #000;
    width: 100%;
    margin-top: auto;
}

.contact-links {
    margin-top: 10px;
}

.contact-item {
    font-family: "KaiTi", sans-serif;
    position: relative;
    display: inline-block;
    margin: 0 15px;
    color: #000000;
}

.contact-item a {
    color: #000000; /* Lighter blue for footer links */
    text-decoration: none;
    /*font-size: 1.1em;*/
}

.contact-item a:hover {
    text-decoration: underline;
}

.qr-code {
    display: none;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    border: 1px solid #ccc;
    background-color: white;
    padding: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 10;
    border-radius: 5px;
}

.contact-item:hover .qr-code {
    display: block;
}

.record-number {
    font-size: 0.85em;
    margin-top: 15px;
    color: #000000;
    a {
        color: #000000;
        text-decoration: none;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 0.9em;
        padding-top: 80px;
    }

    header#main-header {
        padding: 15px 10px;
    }

    header#main-header h1 {
        font-size: 1.8em;
        margin-bottom: 10px;
    }

    header#main-header p.slogan {
        font-size: 1em;
    }

    main {
        max-width: 95%;
        margin: 20px auto;
        padding: 10px;
        margin-top: 80px;
    }

    .timeline-section h2 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .timeline {
        position: relative;
        padding-left: 40px;
    }

    .timeline::before {
        left: 20px;
        z-index: 1;
    }

    .timeline-item {
        width: calc(100% - 50px); /* 调整宽度，留出适当边距 */
        left: 0 !important;
        padding: 12px 15px !important;
        text-align: left !important;
        margin-bottom: 20px;
        margin-left: 0;
        position: relative;
    }

    .timeline-item::after {
        position: absolute;
        left: -20px !important;
        right: auto !important;
        transform: translateX(-50%);
        top: 50%;
        z-index: 2;
        background-color: #fff;
        border: 3px solid #a0c4ff;
    }

    .timeline-content h3 {
        font-size: 1.2em;
        margin-left: 0;
    }

    .timeline-content .date {
        font-size: 0.8em;
        margin-left: 0;
    }

    .timeline-description {
        margin-left: 0;
    }

    #load-more-btn {
        font-size: 16px;
        padding: 10px 20px;
    }

    .contact-item {
        margin: 0 8px;
    }

    .qr-code {
        width: 80px;
        height: 80px;
    }

    header#main-header.sticky {
        padding: 5px 10px; /* 移动端更小的padding */
    }

    header#main-header.sticky h1 {
        font-size: 1.1em; /* 移动端更小的标题大小 */
        margin-bottom: 3px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 0.85em;
        padding-top: 70px;
    }

    header#main-header h1 {
        font-size: 1.5em;
    }

    .timeline-section h2 {
        font-size: 1.5em;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        width: calc(100% - 40px); /* 更小的屏幕下进一步调整宽度 */
        padding: 10px 12px !important;
        margin-left: 0;
    }

    .timeline-item::after {
        left: -15px !important;
    }

    .contact-item {
        margin: 0 5px;
        font-size: 0.9em;
    }
}