/* 成长历程页面样式 */

/* 时间线样式 */
.timeline-section {
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.timeline-section h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--dark-bg);
    position: relative;
    padding-bottom: 0.5rem;
}

.timeline-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

/* 时间线中轴线 */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    opacity: 0.3;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

/* 时间线项目左侧和右侧交替 */
.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

/* 时间线项目圆点 */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 4px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-item:hover::after {
    transform: scale(1.3);
    background-color: var(--primary-color);
}

/* 时间线内容卡片 */
.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.timeline-content h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-bg);
}

.timeline-content p {
    color: var(--light-text);
    line-height: 1.6;
}

/* 去过的城市样式 */
.cities-section {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cities-section h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--dark-bg);
    position: relative;
    padding-bottom: 0.5rem;
}

.cities-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.city-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.city-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.city-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.city-card:hover img {
    transform: scale(1.1);
}

.city-info {
    padding: 1.5rem;
    background-color: white;
}

.city-info h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-bg);
}

.city-info p {
    color: var(--light-text);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 时间线在移动设备上改为垂直排列 */
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 21px;
        right: auto;
    }
    
    .cities-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .timeline-section,
    .cities-section {
        padding: 1.5rem;
    }
    
    .timeline-content {
        padding: 15px 20px;
    }
    
    .cities-grid {
        grid-template-columns: 1fr;
    }
}

/* 两栏布局样式 - 人生轨迹页面专用 */
.split-layout {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.life-timeline-section {
    flex: 1;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.city-timeline-section {
    flex: 1;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.life-timeline-section h3,
.city-timeline-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-bg);
    position: relative;
    padding-bottom: 0.5rem;
}

.life-timeline-section h3::after,
.city-timeline-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* 更紧凑的时间线样式 */
.compact-timeline {
    position: relative;
    padding-left: 2rem;
}

.compact-timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 0;
    opacity: 0.5;
}

.compact-timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed var(--primary-lighter);
}

.compact-timeline-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.compact-timeline-item::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    left: -25px;
    top: 5px;
}

.compact-timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.compact-timeline-content h4 {
    margin-bottom: 0.3rem;
    color: var(--dark-bg);
    font-size: 1rem;
}

.compact-timeline-content p {
    color: var(--light-text);
    line-height: 1.5;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* 新的city-travel样式，确保图片完整展示 */
.city-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
}

.city-showcase-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.city-showcase-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.city-showcase-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-lighter);
}

.city-showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.city-showcase-info {
    padding: 0.8rem;
    background-color: white;
    text-align: center;
}

.city-showcase-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-bg);
    margin: 0;
}

/* 两栏布局响应式设计 */
@media (max-width: 768px) {
    .split-layout {
        flex-direction: column;
    }
    
    .city-showcase {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.6rem;
    }
}