/* ===================================================================
   云鑫联创建站 - 全站基础样式 base.css
   木质配饰风 | 原木色 + 浅棕 + 米白 | 纵向时间轴粗线条布局
   =================================================================== */

/* ===== CSS 变量定义 ===== */
:root {
    /* 木质色彩体系 */
    --wood-deep: #5C4033;
    --wood-dark: #6B4E2E;
    --wood-main: #8B6F47;
    --wood-light: #C4A77D;
    --wood-pale: #DBC9A8;
    --cream: #F5F0E8;
    --cream-dark: #E8DCC8;
    --cream-pale: #FAF6EF;
    --text-dark: #3D2B1F;
    --text-body: #5C4A38;
    --text-light: #8A7960;
    --white: #FFFFFF;
    --accent-rust: #A0522D;
    --accent-leaf: #6B8E5A;
    --shadow-wood: rgba(92, 64, 51, 0.15);
    --shadow-wood-deep: rgba(92, 64, 51, 0.35);
    --border-wood: rgba(139, 111, 71, 0.25);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 50%;
    --transition-fast: 0.2s ease;
    --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 72px;
    --timeline-width: 8px;
    --timeline-left: calc(50% - var(--max-width) / 2 - 80px);
    --max-width: 1280px;
}

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--cream);
    color: var(--text-body);
    line-height: 1.8;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--wood-main);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-rust);
}

ul, ol {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== 排版 ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: "STSong", "SimSun", "Songti SC", serif;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.4;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1em; }

/* ===== 通用容器 ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}

.container-narrow {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 32px;
}

.container-wide {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ===== 木质纹理背景 ===== */
.wood-texture {
    background: linear-gradient(135deg, var(--wood-main) 0%, var(--wood-light) 50%, var(--wood-main) 100%);
    position: relative;
}

.wood-texture::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 3px,
        rgba(92, 64, 51, 0.06) 3px,
        rgba(92, 64, 51, 0.06) 6px
    );
    pointer-events: none;
}

.wood-grain {
    background: var(--wood-main);
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 4px,
            rgba(92, 64, 51, 0.08) 4px,
            rgba(92, 64, 51, 0.08) 5px,
            transparent 5px,
            transparent 12px
        );
}

/* ===== 导航栏 ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: all var(--transition-base);
    background: transparent;
}

.site-header.scrolled {
    background: rgba(245, 240, 232, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px var(--shadow-wood);
    border-bottom: 1px solid var(--border-wood);
}

.nav-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo img {
    height: 44px;
    width: auto;
}

.nav-logo-text {
    font-family: "STSong", serif;
    font-size: 1.3rem;
    color: var(--wood-deep);
    font-weight: 700;
    letter-spacing: 2px;
}

.site-header:not(.scrolled) .nav-logo-text {
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    padding: 8px 18px;
    font-size: 0.95rem;
    color: var(--text-body);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.site-header:not(.scrolled) .nav-menu > li > a {
    color: var(--white);
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--accent-rust);
    background: rgba(196, 167, 125, 0.15);
}

.site-header:not(.scrolled) .nav-menu > li > a:hover {
    color: var(--cream-dark);
    background: rgba(255, 255, 255, 0.15);
}

/* 下拉菜单 */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 200px;
    background: var(--cream-pale);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px var(--shadow-wood-deep);
    border: 1px solid var(--border-wood);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.nav-menu > li:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown li a {
    display: block;
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--text-body);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-dropdown li a:hover {
    background: var(--cream-dark);
    color: var(--accent-rust);
    padding-left: 22px;
}

/* 汉堡菜单按钮 */
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--wood-deep);
    transition: all var(--transition-base);
    border-radius: 2px;
}

.site-header:not(.scrolled) .nav-toggle span {
    background: var(--white);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== 时间轴布局骨架 ===== */
.timeline-page {
    position: relative;
    padding-top: var(--nav-height);
}

.timeline-spine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--timeline-left);
    width: var(--timeline-width);
    background: linear-gradient(
        180deg,
        var(--wood-light) 0%,
        var(--wood-main) 20%,
        var(--wood-dark) 50%,
        var(--wood-main) 80%,
        var(--wood-light) 100%
    );
    border-radius: 4px;
    z-index: 1;
}

.timeline-spine::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        180deg,
        transparent,
        transparent 20px,
        rgba(92, 64, 51, 0.15) 20px,
        rgba(92, 64, 51, 0.15) 22px
    );
    border-radius: 4px;
}

.timeline-section {
    position: relative;
    padding: 80px 0;
}

.timeline-node {
    position: absolute;
    left: var(--timeline-left);
    top: 100px;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--wood-dark);
    border: 4px solid var(--cream);
    box-shadow: 0 0 0 3px var(--wood-main), 0 4px 12px var(--shadow-wood-deep);
    z-index: 2;
}

.timeline-node::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: var(--radius-full);
    background: var(--cream-dark);
}

.timeline-content {
    position: relative;
}

/* 不同宽度的内容区 */
.timeline-content-narrow { max-width: 700px; }
.timeline-content-wide { max-width: 1000px; }
.timeline-content-full { max-width: none; }

/* ===== 区块标题 ===== */
.section-header {
    margin-bottom: 48px;
    position: relative;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--wood-main);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-left: 16px;
    position: relative;
}

.section-eyebrow::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent-rust);
    border-radius: 50%;
}

.section-title {
    font-size: 2.2rem;
    color: var(--wood-deep);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 600px;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    font-weight: 500;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--wood-main);
    color: var(--white);
    border-color: var(--wood-main);
}

.btn-primary:hover {
    background: var(--wood-dark);
    border-color: var(--wood-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-wood-deep);
}

.btn-outline {
    background: transparent;
    color: var(--wood-main);
    border-color: var(--wood-main);
}

.btn-outline:hover {
    background: var(--wood-main);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-body);
    border-color: var(--border-wood);
}

.btn-ghost:hover {
    background: var(--cream-dark);
    border-color: var(--wood-light);
}

.btn-lg { padding: 16px 40px; font-size: 1.05rem; }
.btn-sm { padding: 8px 20px; font-size: 0.85rem; }

/* ===== 卡片 ===== */
.wood-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-wood);
    transition: all var(--transition-base);
    border: 1px solid var(--border-wood);
}

.wood-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px var(--shadow-wood-deep);
}

.wood-card-image {
    overflow: hidden;
    position: relative;
}

.wood-card-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.wood-card-body {
    padding: 24px;
}

.wood-card-title {
    font-size: 1.2rem;
    color: var(--wood-deep);
    margin-bottom: 8px;
}

.wood-card-text {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== 网格系统 ===== */
.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== 页脚 ===== */
.site-footer {
    background: var(--wood-deep);
    color: var(--cream-dark);
    padding: 64px 0 0;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--wood-light), var(--wood-main), var(--wood-light));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

.footer-brand img {
    height: 48px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--wood-pale);
    line-height: 1.8;
    margin-bottom: 16px;
}

.footer-col h4 {
    color: var(--cream);
    font-size: 1.05rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(196, 167, 125, 0.3);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--wood-pale);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.footer-col ul li a:hover {
    color: var(--cream);
    padding-left: 6px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--wood-pale);
}

.footer-contact svg {
    flex-shrink: 0;
    margin-top: 3px;
}

.footer-bottom {
    margin-top: 48px;
    padding: 24px 32px;
    border-top: 1px solid rgba(196, 167, 125, 0.2);
    text-align: center;
    font-size: 0.85rem;
    color: var(--wood-pale);
}

.footer-bottom a {
    color: var(--wood-pale);
}

.footer-bottom a:hover {
    color: var(--cream);
}

.footer-icp {
    margin-top: 8px;
    font-size: 0.8rem;
}

.footer-icp a {
    color: var(--wood-pale);
}

/* ===== 滚动动画 ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* 延迟动画 */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ===== 自定义SVG图标基础 ===== */
.svg-icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===== 通用工具类 ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }
.pt-5 { padding-top: 48px; }
.pb-5 { padding-bottom: 48px; }
.bg-cream { background-color: var(--cream); }
.bg-cream-dark { background-color: var(--cream-dark); }
.bg-cream-pale { background-color: var(--cream-pale); }
.bg-wood { background-color: var(--wood-main); }
.bg-wood-light { background-color: var(--wood-light); }
.text-wood { color: var(--wood-main); }
.text-wood-deep { color: var(--wood-deep); }
.text-white { color: var(--white); }
.hidden { display: none; }

/* ===== 面包屑 ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 16px 0;
}

.breadcrumb a {
    color: var(--wood-main);
}

.breadcrumb a:hover {
    color: var(--accent-rust);
}

.breadcrumb-separator {
    color: var(--wood-light);
}

/* ===== 页面横幅 ===== */
.page-banner {
    height: 320px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wood-dark);
}

.page-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.page-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 0 32px;
}

.page-banner h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.page-banner p {
    font-size: 1.05rem;
    color: var(--cream-dark);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== 标签 ===== */
.tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.8rem;
    border-radius: 20px;
    background: var(--cream-dark);
    color: var(--wood-main);
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--wood-light);
    color: var(--white);
}

.tag-wood {
    background: var(--wood-main);
    color: var(--white);
}

/* ===== 分隔线 ===== */
.divider-wood {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--wood-light), transparent);
    margin: 48px 0;
    border: none;
}

.divider-vertical {
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--wood-light), transparent);
}

/* ===== 响应式 ===== */
@media (max-width: 1440px) {
    :root {
        --timeline-left: 40px;
    }
}

@media (max-width: 1280px) {
    .timeline-content {
        padding-left: 80px;
        padding-right: 80px;
    }
}

@media (max-width: 1024px) {
    :root {
        --timeline-left: 30px;
    }

    .timeline-content {
        padding-left: 70px;
        padding-right: 70px;
    }

    .grid-4 { grid-template-columns: repeat(3, 1fr); }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
        --timeline-left: 20px;
        --timeline-width: 6px;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    .container, .container-narrow, .container-wide {
        padding: 0 16px;
    }

    .timeline-content {
        padding-left: 40px;
        padding-right: 40px;
    }
    
    /* 移动端导航 */
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--cream-pale);
        flex-direction: column;
        align-items: stretch;
        padding: 24px 20px;
        gap: 4px;
        transform: translateX(100%);
        transition: transform var(--transition-base);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-menu > li > a {
        padding: 14px 16px;
        font-size: 1rem;
        color: var(--text-dark) !important;
        border-bottom: 1px solid var(--border-wood);
        border-radius: 0;
    }
    
    .nav-dropdown {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        padding: 0 0 0 20px;
        background: transparent;
        min-width: auto;
    }
    
    .nav-dropdown li a {
        padding: 10px 16px;
        font-size: 0.9rem;
        border-bottom: none;
    }
    
    /* 时间轴移动端 */
    .timeline-section {
        padding: 48px 0;
    }
    
    .timeline-node {
        top: 60px;
        width: 20px;
        height: 20px;
    }

    /* 网格变单列 */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* 页脚 */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 0 20px;
    }
    
    .footer-bottom {
        padding: 20px;
    }
    
    /* 页面横幅 */
    .page-banner {
        height: 240px;
    }
    
    .page-banner h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    :root {
        --timeline-left: 20px;
    }

    .timeline-content {
        padding-left: 36px;
        padding-right: 36px;
    }

    .timeline-node {
        left: 20px;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    
    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}
