/**
 * 页面通用样式 - 崖城风骨
 */

/* ===== 页面头图 ===== */
.page-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 60px;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(45, 45, 45, 0.7) 0%,
        rgba(45, 45, 45, 0.5) 50%,
        rgba(45, 45, 45, 0.8) 100%
    );
    z-index: 2;
}

.page-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 2rem;
}

.page-tag {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: rgba(201, 169, 97, 0.2);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-size: var(--text-sm);
    border-radius: 50px;
    margin-bottom: 1rem;
}

.page-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.page-quote {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

/* ===== 内容区块 ===== */
.content-section {
    padding: 5rem 2rem;
}

.content-section.bg-light {
    background: linear-gradient(to bottom, var(--color-paper), var(--color-white));
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(139, 69, 19, 0.1);
    color: var(--color-ochre);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--color-ink);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-stone);
}

/* ===== 时间轴 ===== */
.timeline-container {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.timeline {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
    padding: 0 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 1.6rem;
    left: 2rem;
    right: 2rem;
    height: 3px;
    background: linear-gradient(to right, var(--color-ochre), var(--color-gold), var(--color-ochre));
    z-index: 0;
}

.timeline-item {
    position: relative;
    z-index: 1;
    text-align: center;
    cursor: pointer;
    padding: 0.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover {
    transform: translateY(-8px) scale(1.05);
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(139, 69, 19, 0.4);
}

.timeline-item:hover .timeline-year {
    color: var(--color-ochre);
}

.timeline-item:active {
    transform: translateY(-4px) scale(0.98);
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--color-white);
    border: 4px solid var(--color-ochre);
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.timeline-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--color-ochre);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.timeline-item.active .timeline-dot {
    background: var(--color-ochre);
    box-shadow: 0 0 20px rgba(139, 69, 19, 0.6),
                0 0 40px rgba(139, 69, 19, 0.3);
    transform: scale(1.15);
}

.timeline-item.active .timeline-dot::after {
    transform: translate(-50%, -50%) scale(1);
    background: var(--color-white);
}

.timeline-year {
    display: block;
    font-weight: 600;
    color: var(--color-ink);
    font-size: var(--text-base);
    transition: color 0.3s ease,
                transform 0.3s ease;
}

.timeline-item.active .timeline-year {
    color: var(--color-ochre);
    transform: scale(1.05);
}

.timeline-period {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-stone);
    margin-top: 0.25rem;
    transition: opacity 0.3s ease;
}

.timeline-item.active .timeline-period {
    opacity: 0.7;
}

.era-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.era-display.visible {
    opacity: 1;
    transform: translateY(0);
}

.era-display.transitioning {
    pointer-events: none;
}

.era-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    opacity: 0;
    transform: translateX(-30px) scale(0.95);
    transition: opacity 0.6s ease-out 0.1s,
                transform 0.6s ease-out 0.1s;
}

.era-display.visible .era-image {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.era-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.era-display.visible .era-image:hover img {
    transform: scale(1.05);
}

.era-info {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out 0.2s,
                transform 0.6s ease-out 0.2s;
}

.era-display.visible .era-info {
    opacity: 1;
    transform: translateX(0);
}

.era-info h3 {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    color: var(--color-ochre);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease-out 0.3s,
                transform 0.5s ease-out 0.3s;
}

.era-display.visible .era-info h3 {
    opacity: 1;
    transform: translateY(0);
}

.era-info p {
    color: var(--color-stone);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease-out 0.4s,
                transform 0.5s ease-out 0.4s;
}

.era-display.visible .era-info p {
    opacity: 1;
    transform: translateY(0);
}

.era-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease-out 0.5s,
                transform 0.5s ease-out 0.5s;
}

.era-display.visible .era-features {
    opacity: 1;
    transform: translateY(0);
}

.feature-tag {
    padding: 0.5rem 1rem;
    background: var(--color-paper);
    color: var(--color-ochre);
    font-size: var(--text-sm);
    border-radius: 50px;
    border: 1px solid var(--color-ochre);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease-out,
                transform 0.3s ease-out,
                background 0.3s ease,
                box-shadow 0.3s ease;
}

.era-display.visible .feature-tag {
    opacity: 1;
    transform: scale(1);
}

.feature-tag:hover {
    background: var(--color-ochre);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
    transform: scale(1.05);
}

/* ===== 选址智慧 ===== */
.site-wisdom {
    display: grid;
    gap: 2rem;
}

.site-map {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.site-svg {
    width: 100%;
    height: auto;
}

.site-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.site-svg .mountain {
    fill: none;
    stroke: var(--color-stone);
    stroke-width: 3;
}

.site-svg .river {
    fill: none;
    stroke: var(--color-river);
    stroke-width: 4;
    stroke-dasharray: 8, 4;
}

.site-svg .city {
    fill: rgba(139, 69, 19, 0.1);
    stroke: var(--color-ochre);
    stroke-width: 3;
}

.site-svg .connect-line {
    stroke: var(--color-gold);
    stroke-width: 2;
    stroke-dasharray: 5, 3;
}

.site-svg .site-label {
    font-size: 14px;
    fill: var(--color-ink);
    font-weight: 500;
    text-anchor: middle;
}

.site-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.site-card {
    padding: 2rem;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.site-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.site-card h4 {
    font-family: var(--font-serif);
    color: var(--color-ochre);
    margin-bottom: 0.75rem;
}

.site-card p {
    font-size: var(--text-sm);
    color: var(--color-stone);
    line-height: 1.6;
}

/* ===== 建筑格局 ===== */
.layout-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.layout-diagram {
    flex: 1;
    background: var(--color-white);
    padding: 0.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 400px;
}

.layout-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.layout-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.layout-card {
    padding: 1.5rem;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.layout-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.layout-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.layout-card h4 {
    font-family: var(--font-serif);
    color: var(--color-ochre);
    margin-bottom: 0.5rem;
    font-size: var(--text-lg);
}

.layout-card p {
    font-size: var(--text-sm);
    color: var(--color-stone);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .layout-container {
        flex-direction: column;
    }
    
    .layout-features {
        grid-template-columns: 1fr;
    }
}

/* ===== 卷轴弹窗 ===== */
.scroll-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scroll-modal.active {
    opacity: 1;
    visibility: visible;
}

.scroll-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.scroll-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 900px;
    height: 500px;
}

.scroll-roll {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, #8B4513 0%, #A0522D 30%, #8B4513 50%, #654321 100%);
    border-radius: 20px;
    box-shadow: 
        inset 2px 0 5px rgba(0,0,0,0.3),
        inset -2px 0 5px rgba(255,255,255,0.1),
        5px 0 15px rgba(0,0,0,0.4);
    z-index: 10;
}

.scroll-roll.left {
    left: 0;
    transform: translateX(-50%);
}

.scroll-roll.right {
    right: 0;
    transform: translateX(50%);
}

.scroll-roll::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    background: linear-gradient(90deg, #5D3A1A, #8B4513, #5D3A1A);
    border-radius: 4px;
}

.scroll-content {
    position: relative;
    background: linear-gradient(180deg, #F5F5DC 0%, #FAF0E6 50%, #F5F5DC 100%);
    width: 0;
    height: auto;
    max-height: 80vh;
    overflow: hidden;
    border-top: 3px solid #8B4513;
    border-bottom: 3px solid #8B4513;
    box-shadow: 
        inset 0 0 30px rgba(139, 69, 19, 0.1),
        0 10px 40px rgba(0,0,0,0.3);
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-modal.active .scroll-content {
    width: 100%;
}

.scroll-close {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #8B4513;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.5s ease 1s;
}

.scroll-modal.active .scroll-close {
    opacity: 1;
}

.scroll-close:hover {
    background: #8B4513;
    color: #fff;
}

.scroll-body {
    padding: 2.5rem 3rem;
    opacity: 0;
    transition: opacity 0.5s ease 0.8s;
    min-width: 800px;
    max-height: 70vh;
    overflow-y: auto;
}

.scroll-modal.active .scroll-body {
    opacity: 1;
}

.scroll-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: #8B4513;
    text-align: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #D2691E;
    padding-bottom: 0.75rem;
}

.scroll-section {
    margin-bottom: 1.5rem;
}

.scroll-intro {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
}

.fengshui-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fengshui-item {
    text-align: center;
    padding: 1rem 0.5rem;
    background: rgba(139, 69, 19, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(139, 69, 19, 0.2);
}

.fengshui-name {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: #8B4513;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.fengshui-desc {
    display: block;
    font-size: 0.85rem;
    color: #666;
}

.scroll-subtitle {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: #8B4513;
    margin-bottom: 1rem;
    text-align: center;
}

.scroll-quote {
    background: rgba(139, 69, 19, 0.05);
    border-left: 4px solid #D2691E;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.scroll-quote p {
    color: #555;
    line-height: 1.8;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .scroll-container {
        width: 95%;
        height: auto;
        max-height: 85vh;
    }
    
    .scroll-content {
        height: auto;
        min-height: 400px;
        max-height: 85vh;
    }
    
    .scroll-body {
        min-width: auto;
        padding: 1.5rem;
        max-height: 75vh;
    }
    
    .fengshui-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== 城门展示 ===== */
.gates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.gate-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gate-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gate-image {
    overflow: hidden;
}

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

.gate-card:hover .gate-image img {
    transform: scale(1.05);
}

.gate-info {
    padding: 1.5rem;
}

.gate-info h4 {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    color: var(--color-ochre);
    margin-bottom: 0.5rem;
}

.gate-info p {
    font-size: var(--text-sm);
    color: var(--color-stone);
    line-height: 1.6;
}

/* ===== 营造技艺展示 ===== */
.tech-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tech-tab {
    padding: 0.75rem 2rem;
    background: var(--color-white);
    color: var(--color-ink);
    font-size: var(--text-base);
    font-weight: 500;
    border: 2px solid var(--color-ochre);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.tech-tab:hover,
.tech-tab.active {
    background: var(--color-ochre);
    color: var(--color-white);
}

.tech-display {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.tech-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    display: none;
}

.tech-panel.active {
    display: grid;
}

.tech-image {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

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

.tech-image:hover img {
    transform: scale(1.05);
}

.tech-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tech-info h3 {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    color: var(--color-ochre);
    margin-bottom: 1rem;
}

.tech-info p {
    color: var(--color-stone);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.tech-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===== 水利工程 ===== */
.water-system {
    position: relative;
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.water-canvas-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.water-canvas-container canvas {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.water-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.water-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.water-node:hover {
    transform: scale(1.1);
}

.node-dot {
    width: 16px;
    height: 16px;
    background: var(--color-ochre);
    border: 3px solid var(--color-white);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.5);
}

.water-node.active .node-dot {
    background: var(--color-gold);
    box-shadow: 0 0 15px rgba(201, 169, 97, 0.7);
}

.node-label {
    margin-top: 8px;
    font-size: var(--text-sm);
    color: var(--color-ink);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.water-info {
    margin-top: 2rem;
    text-align: center;
    padding: 1.5rem;
    background: rgba(139, 69, 19, 0.08);
    border-radius: var(--radius-md);
}

.water-info h4 {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    color: var(--color-ochre);
    margin-bottom: 0.5rem;
}

.water-info p {
    color: var(--color-stone);
}

/* ===== 贬官文化 ===== */
.officials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.official-card {
    display: flex;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.official-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.official-image {
    width: 180px;
    flex-shrink: 0;
    overflow: hidden;
}

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

.official-card:hover .official-image img {
    transform: scale(1.05);
}

.official-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.official-info h4 {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    color: var(--color-ochre);
    margin-bottom: 0.25rem;
}

.official-title {
    font-size: var(--text-sm);
    color: var(--color-gold);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.official-info p {
    color: var(--color-stone);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.official-info blockquote {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--color-ochre);
    font-size: var(--text-sm);
    border-left: 3px solid var(--color-gold);
    padding-left: 1rem;
    margin: 0;
}

.culture-heritage {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.heritage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.heritage-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.heritage-name {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    color: var(--color-ink);
    font-weight: 600;
}

.heritage-desc {
    font-size: var(--text-sm);
    color: var(--color-stone);
    margin-top: 0.25rem;
}

/* ===== 民居文化 ===== */
.house-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.house-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

.house-image:hover img {
    transform: scale(1.05);
}

.house-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-content h4 {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    color: var(--color-ochre);
    margin-bottom: 0.25rem;
}

.feature-content p {
    font-size: var(--text-sm);
    color: var(--color-stone);
    line-height: 1.6;
}

/* ===== 滚动显示动画 ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .era-display {
        grid-template-columns: 1fr;
    }
    
    .site-features {
        grid-template-columns: 1fr;
    }
    
    .gates-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-panel {
        grid-template-columns: 1fr;
    }
    
    .tech-image {
        height: 280px;
    }
    
    .tech-info {
        padding: 1.5rem;
    }
    
    .officials-grid {
        grid-template-columns: 1fr;
    }
    
    .official-card {
        flex-direction: column;
    }
    
    .official-image {
        width: 100%;
        height: 200px;
    }
    
    .house-display {
        grid-template-columns: 1fr;
    }
    
    .house-image img {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .timeline {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
    
    .timeline::before {
        display: none;
    }
    
    .tech-image {
        height: 220px;
    }
    
    .official-image {
        height: 180px;
    }
    
    .house-image img {
        height: 200px;
    }
    
    .culture-heritage {
        gap: 1.5rem;
    }
    
    .heritage-item {
        padding: 1rem 1.5rem;
    }
}

/* ===== 多维度时间轴 ===== */
.timeline-section {
    padding: 6rem 2rem;
    background: linear-gradient(to bottom, #f8f6f0, #fffef9);
    position: relative;
    overflow: hidden;
}

.timeline-header {
    text-align: center;
    margin-bottom: 3rem;
}

.timeline-title {
    font-family: var(--font-serif);
    font-size: var(--text-3xl);
    color: var(--color-ochre);
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

.timeline-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.timeline-subtitle {
    font-size: var(--text-base);
    color: var(--color-stone);
    margin-top: 1.25rem;
}

.timeline-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(139, 69, 19, 0.15);
    overflow: hidden;
    user-select: none;
}

.timeline-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.timeline-bg img {
    width: 200%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-out;
}

.timeline-wrapper {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem 2rem;
    overflow-x: auto;
    overflow-y: visible;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: var(--color-ochre) transparent;
}

.timeline-wrapper:active {
    cursor: grabbing;
}

.timeline-wrapper::-webkit-scrollbar {
    height: 8px;
}

.timeline-wrapper::-webkit-scrollbar-track {
    background: rgba(139, 69, 19, 0.05);
    border-radius: 4px;
}

.timeline-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--color-ochre), var(--color-gold));
    border-radius: 4px;
}

.timeline-track {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    position: relative;
    width: 100%;
}

.track-label {
    min-width: 120px;
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-ochre);
    padding-top: 0.5rem;
    text-align: right;
    padding-right: 2rem;
    position: sticky;
    left: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.98) 80%, transparent);
    z-index: 2;
    padding-left: 1rem;
}

.track-line {
    position: absolute;
    top: 1.25rem;
    left: 140px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        var(--color-ochre) 0%,
        var(--color-gold) 50%,
        var(--color-ochre) 100%
    );
    opacity: 0.3;
}

.track-nodes {
    display: flex;
    gap: 4rem;
    padding-left: 140px;
    position: relative;
    z-index: 1;
}

.timeline-node {
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 180px;
    text-align: center;
}

.node-dot {
    width: 18px;
    height: 18px;
    background: var(--color-white);
    border: 3px solid var(--color-ochre);
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
}

.node-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--color-ochre);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.timeline-node:hover .node-dot {
    transform: scale(1.3);
    border-color: var(--color-gold);
    box-shadow: 0 4px 16px rgba(218, 165, 32, 0.4);
}

.timeline-node.active .node-dot {
    background: var(--color-gold);
    border-color: var(--color-gold);
    transform: scale(1.5);
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.6);
}

.node-content {
    background: var(--color-white);
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(139, 69, 19, 0.1);
    transition: all 0.3s ease;
}

.timeline-node:hover .node-content {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 69, 19, 0.15);
    border-color: var(--color-gold);
}

.node-year {
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--color-ochre);
    margin-bottom: 0.35rem;
}

.node-title {
    font-size: var(--text-xs);
    color: var(--color-ink);
    line-height: 1.4;
    font-weight: 500;
}

.dynasty-track .node-dot { border-color: #8B4513; }
.dynasty-track .node-dot::before { background: #8B4513; }
.craft-track .node-dot { border-color: #D2691E; }
.craft-track .node-dot::before { background: #D2691E; }
.artisan-track .node-dot { border-color: #CD853F; }
.artisan-track .node-dot::before { background: #CD853F; }
.tool-track .node-dot { border-color: #A0522D; }
.tool-track .node-dot::before { background: #A0522D; }
.material-track .node-dot { border-color: #DEB887; }
.material-track .node-dot::before { background: #DEB887; }
.bridge-water-track .node-dot { border-color: #4682B4; }
.bridge-water-track .node-dot::before { background: #4682B4; }

.timeline-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: rgba(139, 69, 19, 0.03);
    border-top: 1px solid rgba(139, 69, 19, 0.1);
}

.nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-white);
    border: 2px solid var(--color-ochre);
    color: var(--color-ochre);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: var(--color-ochre);
    color: var(--color-white);
    transform: scale(1.1);
}

.nav-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.nav-progress {
    flex: 1;
    max-width: 400px;
    height: 6px;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-ochre), var(--color-gold));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.timeline-hint {
    text-align: center;
    padding: 1rem;
    color: var(--color-stone);
    font-size: var(--text-sm);
    animation: fadeInHint 2s ease-in-out infinite;
}

@keyframes fadeInHint {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.timeline-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.timeline-modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content-box {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease;
    z-index: 1;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(139, 69, 19, 0.1);
    border: none;
    font-size: 1.5rem;
    color: var(--color-ink);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close-btn:hover {
    background: var(--color-ochre);
    color: var(--color-white);
    transform: rotate(90deg);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 2px solid rgba(139, 69, 19, 0.1);
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.03), rgba(218, 165, 32, 0.03));
}

.modal-title {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    color: var(--color-ochre);
    margin-bottom: 0.5rem;
}


.modal-body {
    padding: 2rem;
}

.modal-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.05), rgba(218, 165, 32, 0.05));
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed rgba(139, 69, 19, 0.2);
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-image-placeholder {
    color: var(--color-stone);
    font-size: var(--text-sm);
    text-align: center;
}

.modal-desc {
    font-size: var(--text-base);
    color: var(--color-ink);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.modal-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.modal-feature-tag {
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.08), rgba(218, 165, 32, 0.08));
    color: var(--color-ochre);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: 50px;
    border: 1px solid rgba(139, 69, 19, 0.2);
}

.modal-source {
    padding: 1rem;
    background: rgba(139, 69, 19, 0.03);
    border-left: 3px solid var(--color-gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: var(--text-sm);
    color: var(--color-stone);
    font-style: italic;
}

@media (max-width: 992px) {
    .timeline-section {
        padding: 4rem 1rem;
    }

    .track-label {
        min-width: 90px;
        font-size: var(--text-base);
        padding-right: 1rem;
    }

    .track-line {
        left: 110px;
    }

    .track-nodes {
        padding-left: 110px;
        gap: 2.5rem;
    }

    .timeline-node {
        min-width: 150px;
    }

    .modal-content-box {
        max-height: 90vh;
    }

    .modal-image {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .timeline-header {
        margin-bottom: 2rem;
    }

    .timeline-title {
        font-size: var(--text-2xl);
    }

    .timeline-container {
        border-radius: var(--radius-md);
    }

    .timeline-wrapper {
        padding: 2rem 1rem 1.5rem;
    }

    .track-label {
        min-width: 70px;
        font-size: var(--text-sm);
        padding-right: 0.75rem;
    }

    .track-line {
        left: 85px;
    }

    .track-nodes {
        padding-left: 85px;
        gap: 1.5rem;
    }

    .timeline-node {
        min-width: 130px;
    }

    .node-content {
        padding: 0.75rem 0.5rem;
    }

    .node-year {
        font-size: var(--text-xs);
    }

    .node-title {
        font-size: 0.7rem;
    }

    .nav-progress {
        max-width: 200px;
    }

    .modal-content-box {
        max-width: 95%;
        margin: 0 auto;
    }

    .modal-header {
        padding: 1.5rem 1.25rem 1rem;
    }

    .modal-body {
        padding: 1.25rem;
    }

    .modal-image {
        height: 180px;
    }

    .modal-title {
        font-size: var(--text-xl);
    }
}

/* ===== 崖城学宫部分 ===== */
.yacheng-xuegong-section {
    padding: 6rem 2rem;
    background: linear-gradient(to bottom, #fffef9, #f5f0e6);
}

.xuegong-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 180px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.xuegong-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--color-white);
}

.xuegong-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.xuegong-image:hover img {
    transform: scale(1.03);
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(45, 35, 25, 0.9), transparent);
    color: var(--color-white);
    font-size: var(--text-sm);
    text-align: center;
    font-family: var(--font-serif);
}

.xuegong-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom,
        var(--color-ochre) 0%,
        var(--color-gold) 50%,
        var(--color-ochre) 100%
    );
    transform: translateX(-50%);
    border-radius: 2px;
    opacity: 0.4;
}

.timeline-nodes {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.xg-node {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 8px 8px 0;
    transition: all 0.3s ease;
    border-radius: var(--radius-sm);
    position: relative;
}

.xg-node:hover {
    transform: translateX(4px);
}

.xg-node .node-dot {
    width: 16px;
    height: 16px;
    background: var(--color-white);
    border: 3px solid var(--color-ochre);
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
    position: relative;
    z-index: 2;
}

.xg-node .node-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--color-ochre);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.xg-node:hover .node-dot {
    border-color: var(--color-gold);
    box-shadow: 0 4px 14px rgba(218, 165, 32, 0.4);
    transform: scale(1.15);
}

.xg-node.active .node-dot {
    background: var(--color-gold);
    border-color: var(--color-gold);
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.6);
    transform: scale(1.25);
}

.xg-node.active .node-dot::after {
    background: var(--color-white);
}

.node-text {
    font-size: var(--text-sm);
    color: var(--color-ink);
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.xg-node:hover .node-text {
    color: var(--color-ochre);
}

.xg-node.active .node-text {
    color: var(--color-gold);
    font-weight: 700;
}

.xuegong-info-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.xuegong-info-card.active {
    border-color: var(--color-gold);
    box-shadow: 0 10px 40px rgba(218, 165, 32, 0.2);
}

.info-card-header {
    padding: 1.75rem 2rem 1.25rem;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.06), rgba(218, 165, 32, 0.06));
    border-bottom: 2px solid rgba(139, 69, 19, 0.1);
}

.info-card-header h3 {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    color: var(--color-ochre);
    margin: 0;
    position: relative;
    display: inline-block;
}

.info-card-header h3::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gold), transparent);
    border-radius: 2px;
}

.info-card-body {
    padding: 1.75rem 2rem;
    flex: 1;
    overflow-y: auto;
}

.info-card-body p {
    color: var(--color-stone);
    line-height: 1.85;
    margin-bottom: 1.5rem;
    text-align: justify;
    font-size: var(--text-base);
}

.card-image {
    margin-bottom: 1.25rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 200px;
    transition: transform 0.3s ease;
}

.card-image img:hover {
    transform: scale(1.03);
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.04), rgba(218, 165, 32, 0.04));
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-gold);
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.08), rgba(218, 165, 32, 0.08));
    transform: translateX(4px);
}

.detail-label {
    font-weight: 600;
    color: var(--color-ochre);
    font-size: var(--text-sm);
}

.detail-value {
    color: var(--color-ink);
    font-size: var(--text-sm);
}

/* 信息卡片切换动画 */
.card-fade-in {
    animation: cardFadeIn 0.4s ease;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式 - 平板 */
@media (max-width: 1100px) {
    .xuegong-container {
        grid-template-columns: 260px 160px 1fr;
        gap: 1.5rem;
    }

    .xuegong-image img {
        height: 420px;
    }

    .xuegong-info-card {
        min-height: 420px;
    }

    .timeline-nodes {
        gap: 1.5rem;
    }

    .node-text {
        font-size: var(--text-xs);
    }
}

/* 响应式 - 手机横屏/小平板 */
@media (max-width: 900px) {
    .xuegong-container {
        grid-template-columns: 220px 140px 1fr;
        gap: 1.25rem;
    }

    .xuegong-image img {
        height: 360px;
    }

    .xuegong-info-card {
        min-height: 360px;
    }

    .info-card-header {
        padding: 1.25rem 1.5rem 1rem;
    }

    .info-card-header h3 {
        font-size: var(--text-xl);
    }

    .info-card-body {
        padding: 1.25rem 1.5rem;
    }

    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}

/* 响应式 - 手机竖屏 */
@media (max-width: 768px) {
    .yacheng-xuegong-section {
        padding: 4rem 1rem;
    }

    .xuegong-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .xuegong-image {
        order: 1;
    }

    .xuegong-image img {
        height: 280px;
    }

    .xuegong-timeline {
        order: 2;
        flex-direction: row;
        padding: 1rem 0;
        overflow-x: auto;
        width: 100%;
    }

    .timeline-line {
        top: 50%;
        left: 0;
        right: 0;
        bottom: auto;
        width: auto;
        height: 3px;
        transform: translateY(-50%);
    }

    .timeline-nodes {
        flex-direction: row;
        gap: 0.75rem;
        justify-content: flex-start;
        width: max-content;
        padding: 0 0.5rem;
    }

    .xg-node {
        flex-direction: column;
        gap: 6px;
        padding: 10px 8px;
        text-align: center;
    }

    .xg-node:hover {
        transform: translateY(-4px);
    }

    .node-text {
        white-space: normal;
        font-size: 11px;
        text-align: center;
    }

    .xuegong-info-card {
        order: 3;
        min-height: auto;
    }

    .card-details {
        gap: 0.75rem;
    }

    .detail-item {
        padding: 0.75rem 1rem;
    }
}
