/* ===== Events Timeline - 美化版 ===== */

.timeline {
    position: relative;
    padding: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 16px;
    bottom: 16px;
    width: 3px;
    background: linear-gradient(180deg,
        rgba(32, 107, 196, 0.1) 0%,
        rgba(32, 107, 196, 0.25) 15%,
        rgba(139, 92, 246, 0.25) 50%,
        rgba(6, 182, 212, 0.25) 85%,
        rgba(32, 107, 196, 0.1) 100%
    );
    border-radius: 2px;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
}

.timeline-item:last-child { margin-bottom: 12px; }

.timeline-item:nth-child(odd) { flex-direction: row; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }

/* ---- Dot ---- */
.timeline-dot {
    position: absolute;
    left: 50%;
    top: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px var(--tblr-body-bg, #fff), 0 0 16px rgba(0,0,0,.08);
    transition: box-shadow .3s ease;
}

.timeline-dot::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all .35s ease;
}

.timeline-item:hover .timeline-dot { box-shadow: 0 0 0 6px var(--tblr-body-bg, #fff), 0 0 24px rgba(0,0,0,.14); }

.timeline-dot.announcement { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.timeline-dot.announcement::after { border-color: rgba(59, 130, 246, .25); }
.timeline-item:hover .timeline-dot.announcement { box-shadow: 0 0 0 6px var(--tblr-body-bg, #fff), 0 0 28px rgba(59,130,246,.35); }
.timeline-item:hover .timeline-dot.announcement::after { border-color: rgba(59, 130, 246, .55); }

.timeline-dot.event { background: linear-gradient(135deg, #22c55e, #16a34a); }
.timeline-dot.event::after { border-color: rgba(34, 197, 94, .25); }
.timeline-item:hover .timeline-dot.event { box-shadow: 0 0 0 6px var(--tblr-body-bg, #fff), 0 0 28px rgba(34,197,94,.35); }
.timeline-item:hover .timeline-dot.event::after { border-color: rgba(34, 197, 94, .55); }

.timeline-dot.update { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.timeline-dot.update::after { border-color: rgba(6, 182, 212, .25); }
.timeline-item:hover .timeline-dot.update { box-shadow: 0 0 0 6px var(--tblr-body-bg, #fff), 0 0 28px rgba(6,182,212,.35); }
.timeline-item:hover .timeline-dot.update::after { border-color: rgba(6, 182, 212, .55); }

.timeline-dot.insight { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.timeline-dot.insight::after { border-color: rgba(139, 92, 246, .25); }
.timeline-item:hover .timeline-dot.insight { box-shadow: 0 0 0 6px var(--tblr-body-bg, #fff), 0 0 28px rgba(139,92,246,.35); }
.timeline-item:hover .timeline-dot.insight::after { border-color: rgba(139, 92, 246, .55); }

/* Pinned dot - golden glow */
.timeline-dot.pinned { background: linear-gradient(135deg, #f59e0b, #d97706); }
.timeline-dot.pinned::after { border-color: rgba(245, 158, 11, .35); }
.timeline-item:hover .timeline-dot.pinned { box-shadow: 0 0 0 6px var(--tblr-body-bg, #fff), 0 0 28px rgba(245,158,11,.45); }
.timeline-item:hover .timeline-dot.pinned::after { border-color: rgba(245, 158, 11, .6); }

.timeline-dot.locked { background: linear-gradient(135deg, #6b7280, #4b5563); }

/* ---- Card ---- */
.timeline-card {
    width: calc(50% - 42px);
    background: var(--tblr-card-bg, #fff);
    border: 1px solid var(--tblr-border-color, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    position: relative;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 16px;
    width: 4px;
    height: 42px;
    border-radius: 3px;
}

.timeline-item:nth-child(odd) .timeline-card::before { left: 0; }
.timeline-item:nth-child(even) .timeline-card::before { right: 0; }

.timeline-card.card-announcement::before { background: linear-gradient(180deg, #3b82f6, #60a5fa); }
.timeline-card.card-event::before        { background: linear-gradient(180deg, #22c55e, #4ade80); }
.timeline-card.card-update::before       { background: linear-gradient(180deg, #06b6d4, #22d3ee); }
.timeline-card.card-insight::before      { background: linear-gradient(180deg, #8b5cf6, #a78bfa); }

.timeline-card:hover {
    transform: translateY(-3px);
    border-color: var(--tblr-primary, #206bc4);
    box-shadow: 0 8px 28px rgba(0,0,0,.1);
}

.timeline-card.is-pinned {
    border-color: rgba(245, 158, 11, .35);
    box-shadow: 0 2px 16px rgba(245, 158, 11, .08);
}

.timeline-card.is-pinned:hover {
    border-color: rgba(245, 158, 11, .55);
    box-shadow: 0 8px 32px rgba(245, 158, 11, .16);
}

/* ---- Card Cover ---- */
.timeline-card-cover {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.timeline-card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,.35) 0%, transparent 50%);
}

.timeline-card-cover .cover-icon {
    position: absolute;
    bottom: 12px;
    left: 16px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    backdrop-filter: blur(4px);
}

/* ---- Card Body ---- */
.timeline-card-body { padding: 18px 22px; }

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.timeline-date {
    font-size: 13px;
    color: var(--tblr-muted, #9ca3af);
    font-weight: 500;
    letter-spacing: .3px;
}

.timeline-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--tblr-body-color, #1e293b);
    transition: color .25s ease;
}

.timeline-card:hover .timeline-title { color: var(--tblr-primary, #206bc4); }

.timeline-summary {
    color: var(--tblr-muted, #64748b);
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 12px;
}

.timeline-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--tblr-muted, #9ca3af);
    padding-top: 10px;
    border-top: 1px solid var(--tblr-border-color, #f1f5f9);
}

/* ---- Tags ---- */
.timeline-tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: .3px;
}

.tag-announcement { background: #eff6ff; color: #2563eb; }
.tag-event        { background: #f0fdf4; color: #16a34a; }
.tag-update       { background: #ecfeff; color: #0891b2; }
.tag-insight      { background: #f5f3ff; color: #7c3aed; }

/* ---- Empty State ---- */
.timeline-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--tblr-muted, #9ca3af);
}

.timeline-empty i {
    font-size: 56px;
    display: block;
    margin-bottom: 16px;
    opacity: .25;
}

.timeline-empty p { margin-bottom: 4px; }

/* ---- Modal ---- */
.event-modal .modal-dialog { max-width: 720px; }
.event-modal .modal-content { border-radius: 14px; overflow: hidden; }
.event-modal .modal-header { border-bottom: none; padding: 22px 26px 10px; }
.event-modal .modal-body { padding: 10px 26px 26px; }
.event-modal .modal-cover { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; margin-bottom: 18px; }
.event-modal .modal-content-body { font-size: 15px; line-height: 1.85; color: var(--tblr-body-color, #374151); }
.event-modal .modal-content-body img { max-width: 100%; border-radius: 8px; margin: 14px 0; }
.event-modal .modal-content-body p { margin-bottom: 14px; }

/* ---- Event Detail (show page) ---- */
.event-detail {
    background: var(--tblr-card-bg, #fff);
    border: 1px solid var(--tblr-border-color, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
}

.event-detail-cover {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
}

.event-detail-body { padding: 26px 28px 20px; }

.event-detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.event-detail-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 12px;
    color: var(--tblr-body-color, #1e293b);
}

.event-detail-summary {
    color: var(--tblr-muted, #64748b);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: var(--tblr-bg-surface, #f8fafc);
    border-radius: 10px;
    border-left: 4px solid var(--tblr-primary, #206bc4);
}

.event-detail-content {
    font-size: 15px;
    line-height: 1.85;
    color: var(--tblr-body-color, #374151);
}

.event-detail-content img { max-width: 100%; border-radius: 8px; margin: 14px 0; }
.event-detail-content p { margin-bottom: 14px; }
.event-detail-content h2,
.event-detail-content h3 { margin-top: 24px; margin-bottom: 12px; font-weight: 700; }

.event-detail-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--tblr-border-color, #e5e7eb);
    background: var(--tblr-bg-surface, #f8fafc);
}

.event-sidebar .list-group-item.active {
    background: var(--tblr-primary, #206bc4);
    border-color: var(--tblr-primary, #206bc4);
    color: #fff;
    font-weight: 600;
}

.event-sidebar .list-group-item {
    border-left: none;
    border-right: none;
    transition: background .2s;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .timeline::before { left: 20px; transform: none; }
    .timeline-item { flex-direction: row !important; padding-left: 48px; margin-bottom: 28px; }

    .timeline-dot {
        left: 12px;
        top: 10px;
        width: 32px;
        height: 32px;
        font-size: 14px;
        transform: none;
        box-shadow: 0 0 0 4px var(--tblr-body-bg, #fff), 0 0 12px rgba(0,0,0,.06);
    }

    .timeline-card { width: 100%; }
    .timeline-card::before { left: 0 !important; right: auto !important; }

    .timeline-card-body { padding: 14px 16px; }
    .timeline-title { font-size: 15px; }
    .timeline-summary { font-size: 13px; }
}