/**
 * Timeline Horizontal Arrows Layout
 * 时间线水平箭头布局
 * 
 * 设计说明：
 * - 水平箭头时间线，从左到右
 * - 节点上下交替排列
 * - 支持圆形图片（可选）
 * - 箭头渐变色效果
 * 
 * @package Corporate_Theme
 * @since 2.0.0
 */

/* 覆盖原有的时间线布局 */
.page-about-modern .timeline {
    position: relative;
    max-width: 100%;
    margin: 80px auto 0;
    padding: 0 20px;
    overflow: visible;
}

/* 隐藏原有的垂直线 */
.page-about-modern .timeline__line {
    display: none;
}

/* 创建水平箭头容器 */
.page-about-modern .timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 60px;
    transform: translateY(-50%);
    z-index: 0;
}

/* 时间线项目容器 - 使用 flexbox 水平排列 */
.page-about-modern .timeline {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative !important;
    padding-top: 180px !important;
    padding-bottom: 120px !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 每个时间线项目 */
.page-about-modern .timeline__item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    z-index: 2;
}

/* 上方节点 */
.page-about-modern .timeline__item--left {
    flex-direction: column-reverse;
    padding-bottom: 0;
    padding-top: 0;
}

/* 下方节点 */
.page-about-modern .timeline__item--right {
    flex-direction: column;
    padding-top: 0;
    padding-bottom: 0;
}

/* 内容卡片 */
.page-about-modern .timeline__content {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 180px !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 35px !important;
    transition: all 0.3s ease !important;
}

.page-about-modern .timeline__item--right .timeline__content {
    margin-bottom: 0 !important;
    margin-top: 25px !important;
}

.page-about-modern .timeline__content::before {
    display: none;
}

.page-about-modern .timeline__content:hover {
    transform: translateY(-8px);
}

.page-about-modern .timeline__item--right .timeline__content:hover {
    transform: translateY(8px);
}

/* 年份标签 - 大号显示 */
.page-about-modern .timeline__year {
    display: block;
    background: transparent;
    color: var(--about-primary);
    padding: 0;
    border-radius: 0;
    font-size: 2rem;
    font-weight: 700;
    margin: 15px 0 10px 0;
    letter-spacing: 0;
}

/* 标题 */
.page-about-modern .timeline__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--about-text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

/* 描述 */
.page-about-modern .timeline__description {
    font-size: 0.875rem;
    color: var(--about-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* 圆形标记点 - 作为图片占位符 */
.page-about-modern .timeline__marker {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 120px;
    height: 120px;
    background: var(--about-primary);
    border: 5px solid var(--about-bg-primary);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
    z-index: 3;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 移除伪元素背景（现在使用真实图片） */
.page-about-modern .timeline__marker::after {
    display: none;
}

.page-about-modern .timeline__item:hover .timeline__marker {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(25, 118, 210, 0.4);
}

/* 连接线 - 从标记点到箭头 */
.page-about-modern .timeline__marker::before {
    content: '' !important;
    position: absolute !important;
    width: 2px !important;
    height: 45px !important;
    background: var(--about-primary) !important;
    z-index: 1 !important;
}

.page-about-modern .timeline__item--left .timeline__marker::before {
    bottom: -45px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

.page-about-modern .timeline__item--right .timeline__marker::before {
    top: -35px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

/* 水平箭头时间线 */
.page-about-modern .timeline::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 5% !important;
    right: 5% !important;
    height: 8px !important;
    background: linear-gradient(
        to right,
        #1565c0 0%,
        #1976d2 25%,
        #42a5f5 50%,
        #64b5f6 75%,
        #81c784 100%
    ) !important;
    transform: translateY(-50%) !important;
    z-index: 1 !important;
    border-radius: 4px !important;
}

/* 箭头装饰 */
.page-about-modern .timeline::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    right: 5% !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 20px solid #81c784 !important;
    border-top: 15px solid transparent !important;
    border-bottom: 15px solid transparent !important;
    transform: translateY(-50%) !important;
    z-index: 1 !important;
}

/* 箭头上的节点圆点 */
.page-about-modern .timeline__item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 3px solid var(--about-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */

/* 平板端 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .page-about-modern .timeline {
        padding-top: 150px !important;
        padding-bottom: 100px !important;
    }
    
    .page-about-modern .timeline__marker {
        width: 100px !important;
        height: 100px !important;
    }
    
    .page-about-modern .timeline__year {
        font-size: 1.75rem !important;
    }
    
    .page-about-modern .timeline__content {
        max-width: 150px !important;
    }
}

/* 移动端 (< 768px) - 改为垂直布局 */
@media (max-width: 767px) {
    .page-about-modern .timeline {
        flex-direction: column;
        padding: 40px 20px;
        padding-left: 60px;
    }
    
    /* 隐藏水平箭头 */
    .page-about-modern .timeline::after,
    .page-about-modern .timeline::before {
        display: none;
    }
    
    /* 显示垂直线 */
    .page-about-modern .timeline__line {
        display: block;
        left: 30px;
        width: 3px;
    }
    
    .page-about-modern .timeline__item {
        flex-direction: row !important;
        align-items: flex-start;
        margin-bottom: 40px;
        width: 100%;
    }
    
    .page-about-modern .timeline__item:last-child {
        margin-bottom: 0;
    }
    
    .page-about-modern .timeline__marker {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
        margin-right: 20px;
    }
    
    .page-about-modern .timeline__marker::before {
        display: none;
    }
    
    .page-about-modern .timeline__item::after {
        left: 30px;
        top: 40px;
    }
    
    .page-about-modern .timeline__content {
        text-align: left;
        max-width: none;
        margin: 0;
    }
    
    .page-about-modern .timeline__year {
        font-size: 1.5rem;
        margin: 0 0 8px 0;
    }
}

/* 打印样式 */
@media print {
    .page-about-modern .timeline {
        padding: 40px 0;
    }
    
    .page-about-modern .timeline__marker {
        box-shadow: none;
    }
}

/* 无障碍优化 */
@media (prefers-reduced-motion: reduce) {
    .page-about-modern .timeline__content,
    .page-about-modern .timeline__marker {
        transition: none;
    }
    
    .page-about-modern .timeline__content:hover,
    .page-about-modern .timeline__item:hover .timeline__marker {
        transform: none;
    }
}
