/* assets/css/pages/about-history.css */

.timeline {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background: #409eff;
    transform: translateX(-50%);
    z-index: 0;
}

.timeline-item {
    display: flex;
    width: 100%;
    margin-bottom: 60px;
    position: relative;
    align-items: flex-start;
}

.timeline-item.right {
    flex-direction: row-reverse;
}

.timeline-content {
    width: 100% !important; 
    min-width: auto !important;
    max-width: none !important; 
    margin-left: 0 !important;  
    margin-right: 0 !important; 
    background: #E0F2F1 !important; /* 确保背景色与global.css中的pale-tiffany一致或根据需要调整 */
    border-radius: 6px; 
    /* 更新阴影效果，更偏向右下 */
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 1; 
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; 
    align-items: center !important; 
    box-sizing: border-box !important;
    padding: 20px 35px !important;  
    min-height: auto !important;   

    /* 添加过渡效果 */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* 鼠标悬停效果 */
.timeline-content:hover {
    transform: scale(1.03); /* 轻微放大 */
    /* 可以让阴影在悬停时更明显 */
    box-shadow: 6px 6px 18px rgba(0, 0, 0, 0.18);
    z-index: 10; /* 确保放大的卡片在最上层，避免被其他元素遮挡 */
}

.timeline-content h3 {
    color: #409eff;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.timeline-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #409eff;
    color: #fff;
    border-radius: 50px;
    min-width: 70px;
    min-height: 36px;
    font-weight: bold;
    font-size: 1rem;
    margin: 0 24px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(64,158,255,0.15);
}

.timeline-dot span {
    display: block;
    padding: 0 16px;
}

@media (max-width: 900px) {
    .timeline::before {
        left: 8px;
        transform: none;
    }
    .timeline-item,
    .timeline-item.right {
        flex-direction: column;
        align-items: flex-start;
    }
    .timeline-dot {
        margin: 16px 0;
        min-width: 60px;
    }
    .timeline-content {
        padding: 15px 20px !important; /* 移动端进一步减少padding */
        /* min-height 保持 auto */
    }
    .timeline-title {
        margin-bottom: 8px !important;
        font-size: 1rem; /* 移动端可略微减小标题字号 */
        width: auto; /* 移动端也由内容决定宽度 */
    }
    .timeline-text {
        font-size: 0.85rem; 
        line-height: 1.4 !important;
        text-align: left !important; 
        max-width: 100%; /* 移动端通常内容区域窄，可以允许占满 */
        /* 移除 margin-left/right: auto; for mobile if they were added */
    }
    .timeline-text span {
        text-align: left !important; 
        display: inline; /* 移动端span也为inline */
    }
}

.timeline-container {
    position: relative;
    margin-top: 40px;
    max-width: 1100px !important;
    padding: 0 20px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--soft-gold, #FFB800);
    border-radius: 2px;
}

.timeline-item-left {
    flex-direction: row;
    padding-left: 0 !important;
    padding-right: calc(50% + 50px) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    justify-content: flex-start !important;
}

.timeline-item-right {
    flex-direction: row-reverse;
    padding-right: 0 !important;
    padding-left: calc(50% + 50px) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    justify-content: flex-start !important;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    background-color: var(--soft-gold, #FFB800);
    color: #fff;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: none !important;
}

.timeline-content .card-body {
    padding: 1rem 1.25rem;
    background-color: transparent;
}

.timeline-title {
    text-align: center !important; 
    width: auto !important; 
    display: block; /* 或者 inline-block */
    margin-bottom: 10px !important; 
    padding: 0 !important;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--soft-gold, #FFB800);
}

.timeline-text { /* 这是 p 标签 */
    text-align: left !important;    
    display: block !important;      
    width: auto !important; /* 宽度由内容决定，但受限于max-width */
    max-width: 90%; /* 关键：限制p元素的最大宽度，使其能够被父级align-items:center居中 */
                    /* 可以调整这个百分比或者使用一个具体的px值，如 max-width: 320px; */
    padding: 0 !important;
    box-sizing: border-box !important;
    line-height: 1.5 !important; 
    font-size: 0.9rem;
    color: #555;
}

.timeline-text::before,
.timeline-text::after { /* Target both pseudo-elements */
    content: "" !important;
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background-image: none !important;
    list-style-type: none !important; 
}

.timeline-text span {
    text-align: left !important;    
    display: inline !important; 
    width: auto; 
    padding: 0 !important;
}

.timeline-text span::before,
.timeline-text span::after {
    display: none !important;
    content: "" !important;
    padding: 0 !important;
    margin: 0 !important;
    background-image: none !important;
    list-style-type: none !important;
}

/* Arrow pointers for timeline items */
.timeline-content::before {
    content: '';
    position: absolute;
    top: 15px; 
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline-item-left .timeline-content {
    margin-right: 60px !important;
}

.timeline-item-right .timeline-content {
    margin-left: 60px !important;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .timeline-container::before {
        left: 20px;
        transform: none;
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-item-left,
    .timeline-item-right {
        padding-left: 40px !important;
        padding-right: 0px !important;
        width: 100% !important;
        flex-direction: column;
        justify-content: flex-start;
    }
    
    .timeline-marker {
        position: absolute;
        left: 20px;
        transform: none;
        top: 0;
        margin-bottom: 10px;
        border: none !important;
    }
    
    .timeline-content {
        width: 100% !important;
        margin-top: 20px;
        margin-left: 0 !important;
    }
}

.timeline-content ul,
.timeline-content ol {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}
.timeline-content li::marker,
.timeline-content li::before {
    display: none !important;
}
.timeline-content p::before { /* General p before, but .timeline-text::before is more specific */
    display: none !important;
    content: "" !important;
}

/* Ensuring background color consistency, just in case */
.timeline-content,
.timeline-content .card-body {
    background-color: #E0F2F1 !important;
}

.timeline-text:empty::before {
    display: none !important;
    content: none !important;
}

.timeline-content h3::before {
    content: none !important;
    display: none !important;
}

.timeline-title::before, 
.timeline-content h5::before {
    content: none !important;
    display: none !important;
}

/* 更广泛的选择器，确保覆盖所有可能的伪元素 */
.timeline-content *::before {
    content: none !important;
    display: none !important;
}

/* 确保内容区没有列表样式 */
.timeline-content {
    list-style: none !important;
}

.timeline-content p {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* 终极解决方案：移除所有可能的点和伪元素 */
.timeline-content *,
.timeline-content *::before,
.timeline-content *::after,
.timeline-title,
.timeline-title::before,
.timeline-title::after,
.timeline-text,
.timeline-text::before,
.timeline-text::after,
.timeline-text span,
.timeline-text span::before,
.timeline-text span::after {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    content: none !important;
    -webkit-padding-start: 0 !important;
    padding-inline-start: 0 !important;
    text-indent: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* 移除所有可能的点标记或装饰 */
.timeline-content::marker,
.timeline-title::marker,
.timeline-text::marker,
.timeline-text span::marker,
.timeline-content *::marker {
    content: none !important;
    display: none !important;
}

.timeline-isolated * {
    all: revert;
    /* 然后添加你需要的样式 */
}

/* 专门针对Bootstrap Card内的小黑点 */
.timeline-content::before {
    content: none !important;
    display: none !important;
}

/* 使用!important覆盖Bootstrap的样式 */
.timeline-content {
    padding-left: 0 !important;
    text-indent: 0 !important;
    list-style-type: none !important;
}

/* 强制移除任何可能的Unicode字符或特殊标记 */
.timeline-content > *:first-child::before {
    content: "" !important;
    display: none !important;
}

/* 针对Bootstrap 5.0.2特定的列表样式覆盖 */
.timeline-content .card-body::before,
.timeline-content::before {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
}