/* ===================================
   历史文化页面特定样式
   =================================== */

.history-content-section {
    padding: 100px 0;
    background: var(--bg-primary);
}

.history-timeline-section {
    margin-bottom: 50px;
    padding: 20px 0;
}

/* ===================================
   历史文化时间轴
   =================================== */

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

/* 居中时间线 */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 100% 300%;
    transform: translateX(-50%);
    animation: timelineGradientUp 3s linear infinite;
}

@keyframes timelineGradientUp {
    0% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: 50%;
}

/* 交替排列 */
.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
    text-align: left;
}

.timeline-content {
    background: var(--bg-primary);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    max-width: 400px;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.timeline-year {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: block;
    line-height: 1;
}

.timeline-item h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.timeline-text {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-size: 1rem;
}

/* 时间点样式 */
.timeline-dot {
    position: absolute;
    top: 15px;
    width: 18px;
    height: 18px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 100% 300%;
    border: 4px solid var(--bg-primary);
    border-radius: 50%;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 3px rgba(0, 184, 212, 0.2);
    animation: timelineGradientUp 3s linear infinite;
}

/* 定位时间点 */
.timeline-item:nth-child(odd) .timeline-dot {
    right: -9px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -9px;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 5px rgba(0, 184, 212, 0.3);
}

/* ===================================
   文化特色样式
   =================================== */

.culture-features-section {
    margin-bottom: 50px;
}

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

.feature-item {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.feature-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===================================
   文化遗产与古迹样式
   =================================== */

.cultural-heritage-section {
    margin-bottom: 50px;
}

.heritage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.heritage-item {
    background: var(--bg-primary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.heritage-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.heritage-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.heritage-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.heritage-item:hover .heritage-image img {
    transform: scale(1.1);
}

.heritage-content {
    padding: 20px;
}

.heritage-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.heritage-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.heritage-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.heritage-level {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 介绍按钮样式 */
.heritage-intro-btn {
    padding: 8px 16px;
    background: var(--accent-color);
    color: #1A1A1A;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.3);
}

.heritage-intro-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: none;
}

.heritage-intro-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
    }
}

.heritage-intro-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.heritage-intro-btn:hover::before {
    left: 100%;
}

[data-theme="dark"] .heritage-intro-btn {
    color: white;
    background: var(--accent-color);
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .heritage-intro-btn:hover {
    background: #FFB300;
    box-shadow: 0 0 15px rgba(255, 179, 0, 0.5);
    transform: scale(1.05);
}

/* ===================================
   现代与传统的交融样式
   =================================== */

.festivals-section {
    margin-bottom: 50px;
}

.festivals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.festival-item {
    background: var(--bg-primary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.festival-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.festival-content {
    width: 100%;
}

.festival-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.festival-title i {
    color: var(--accent-color);
    font-size: 2.5rem;
    background: rgba(var(--accent-rgb), 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.festival-item:hover .festival-title i {
    transform: scale(1.1);
    background: rgba(var(--accent-rgb), 0.2);
}

.festival-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.festival-date {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-weight: 500;
}

/* 夜景模式 - 页面内容发光效果 */
[data-theme="dark"] .timeline-item {
    box-shadow: none;
    background: transparent;
    border: none;
}

[data-theme="dark"] .feature-item,
[data-theme="dark"] .heritage-item,
[data-theme="dark"] .festival-item {
    box-shadow: 0 0 15px var(--glow-color);
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(0, 184, 212, 0.2);
}

[data-theme="dark"] .timeline-content {
    background: rgba(18, 18, 18, 0.9);
    box-shadow: 0 0 15px var(--glow-color);
    border: 1px solid rgba(0, 184, 212, 0.2);
}

[data-theme="dark"] .feature-item,
[data-theme="dark"] .heritage-content,
[data-theme="dark"] .festival-content {
    background: rgba(18, 18, 18, 0.9);
}

[data-theme="dark"] .timeline-text,
[data-theme="dark"] .feature-item p,
[data-theme="dark"] .heritage-description,
[data-theme="dark"] .festival-description {
    text-shadow: 0 0 4px var(--text-glow);
    color: var(--text-primary);
    opacity: 0.9;
}

[data-theme="dark"] .timeline-year,
[data-theme="dark"] .feature-item h3,
[data-theme="dark"] .heritage-title,
[data-theme="dark"] .festival-title {
    text-shadow: 0 0 8px var(--text-glow);
    color: var(--text-primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 70px;
        padding-right: 20px;
        text-align: left !important;
    }
    
    .timeline-dot {
        left: 21px !important;
        right: auto !important;
    }
    
    .timeline-content {
        max-width: 100%;
    }
    
    .timeline-year {
        font-size: 1.4rem;
    }
    
    .features-grid,
    .heritage-grid,
    .festivals-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-dot {
        left: 11px !important;
        width: 16px;
        height: 16px;
    }
    
    .timeline-year {
        font-size: 1.3rem;
    }
    
    .timeline-content {
        padding: 20px;
    }
}
