:root {
    /* 替换为黄白系列主色 */
    --main-bg: #f8f5e6;
    /* 浅米黄背景，原深绿背景替代 */
    --cultural-color: #e0c97f;
    /* 淡黄色，用于标题、链接 */
    --tech-color: #b38a3a;
    /* 棕黄色，用于强调文本、高亮 */
    --eco-color: #2d3e504a;
    /* 深蓝灰，用于深色区域替代（如左侧导航） */
    --future-color: #fffbe6;
    /* 淡黄高亮色，用于激活项左侧条 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 60%), url('../img/bg_imh/丝路山水地图 (12).jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-color: var(--main-bg);
    /* 浅米黄背景 */
    color: #333;
    /* 深灰色文字，原始风格 */
    font-family: 'Cambria', serif;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.container {
    display: flex;
    min-height: 100vh;
    margin-top: 5.5rem;
}

/* Left Navigation */
/* 隐藏左侧导航滚动条，但保留滚动功能 */
.left-nav {
    height: calc(100vh - 5.5rem);
    width: 25%;
    position: fixed;
    background-color: rgba(114, 101, 53, 0.72);
    padding: 40px 20px;
    overflow-y: auto;
    border-right: 1px solid rgba(224, 201, 127, 0.3);
    /* 👇 隐藏滚动条（Webkit 浏览器） */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
}

.left-nav::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.nav-title {
    color: var(--cultural-color);
    font-size: 1.8rem;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--cultural-color);
}

.team-list {
    list-style: none;
}

.team-list a {
    color: var(--cultural-color);
    text-decoration: none;
    font-size: 1.2rem;
    display: block;
    padding: 5px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.team-list a:hover {
    background-color: rgba(179, 138, 58, 0.15);
}

.team-list a.active {
    color: white;
    background-color: var(--tech-color);
    font-weight: bold;
}

.team-list a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--future-color);
    /* 淡黄条 */
}

/* Main Content */
.main-content {
    width: 65%;
    margin-left: 25%;
    /* 与 left-nav 宽度对齐 */
    padding: 60px 100px 80px;
}

/* ✅ 修正：让 section 高度由内容决定，不再强制撑满屏幕 */
.team-section {
    margin-bottom: 100px;
    /* 团队间保留间距 */
    display: grid;
    grid-template-rows: auto auto auto;
    /* 三部分：海报、描述、文化连接，全部自适应 */
    gap: 30px;
    /* ❌ 删除：min-height: 100vh */
}

/* Poster Section */
.poster-container {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.poster {
    width: 100%;
    height: 90%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0c97f;
}

.poster img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

/* Project Description */
.project-description {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 25px;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #555;
}

.project-description p {
    text-align: left;
    text-indent: 2em;
    margin-bottom: 1.5em;
}



/* Cultural Connection — 更新为上下布局 */
.cultural-connection {
    display: grid;
    grid-template-rows: auto auto;
    gap: 25px;
    height: 100%;
}

.cultural-image {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    grid-row: 1;
}

.cultural-image::before {
    content: '';
    display: block;
    padding-top: 75%;
}

.cultural-image img {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
}

.cultural-text {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 25px;
    overflow-y: auto;
    color: #555;
    grid-row: 2;
}

.cultural-text h3 {
    color: var(--cultural-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--cultural-color);
    padding-bottom: 10px;
}

.cultural-text p {
    line-height: 1.7;
    margin-bottom: 1.2em;
    text-indent: 2em;
    /* ✅ 首行缩进 */
}

/* 当没有文化图片时，文字占满整行 */
.cultural-connection.no-image {
    grid-template-columns: 1fr;
}

.cultural-connection.no-image .cultural-text {
    grid-column: 1;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        width: 70%;
        margin-left: 25%;
    }

    .cultural-connection {
        grid-template-columns: 100%;
        grid-template-rows: 40% 60%;
    }
}

@media (max-width: 992px) {
    .left-nav {
        width: 25%;
    }

    .main-content {
        width: 70%;
        margin-left: 25%;
        padding: 40px 25px;
    }

    .team-section {
        grid-template-rows: 35% 20% 45%;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .left-nav {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
        max-height: 300px;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 30px 20px;
    }

    .team-section {
        grid-template-rows: 30% 25% 45%;
    }

    .cultural-connection {
        grid-template-columns: 100%;
        grid-template-rows: 40% 60%;
    }
}

@media (max-width: 480px) {
    .nav-title {
        font-size: 1.4rem;
    }

    .team-list a {
        font-size: 1rem;
        padding: 10px;
    }

    .team-section {
        grid-template-rows: 25% 30% 45%;
    }

    .project-description,
    .cultural-text {
        padding: 15px;
        font-size: 0.95rem;
    }
}

/* 修复 navbar 下坠 */
body {
    padding-top: 10px !important;
}

.navbar {
    margin: 2rem !important;
    border-radius: 1.6rem !important;
    width: 97% !important;
    left: 0;
    right: 0;
    top: 0;
    position: fixed;
    z-index: 10000;
}