/* ========== 全屏背景图 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #fcf5eb;  /*背景底色*/
    background-image: url('images/入户背景图.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    /* 使用 flex 布局 */
    display: flex;
    align-items: center;
    justify-content: center;
     /* 添加动画：背景图从上到下飞入 */
    animation: bgFlyIn 1s ease-out forwards;
}
/* 定义背景图飞入动画 */
@keyframes bgFlyIn {
    0% {
        background-position: center -100vh;  /* 从顶部外开始 */
        opacity: 0;
    }
    100% {
        background-position: center center;  /* 到达正常位置 */
        opacity: 1;
    }
}


/* 桌面端（宽度大于 768px）时禁止滚动 */
@media (min-width: 769px) {
    body {
        height: 100vh;
        overflow: hidden;
    }
}

main {
    background: transparent;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* 首页（body 没有 sub-page 类） */
body:not(.sub-page) main {
    justify-content: center;  /* 垂直居中 */
    min-height: 100vh;
}
/* 子页面 main 样式 */
body.sub-page main {
    justify-content: flex-start;
    min-height: auto;
}

/* 卡片容器 - 横向排列 */
.cards-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center;
    gap: 5vw;
    padding: 20px;
    max-width: 90%;
    margin: 0 auto;
    margin-top: 40vh !important;  /* 上边距为视口高度的%，自动适配 */
}
/* 单个卡片样式 */
.card {
    width: 12vw;
    height: 10vw;
    min-width: 120px;   /* 最小宽度，防止过小 */
    max-width: 180px;   /* 最大宽度，防止过大 */
    background: #ffffff;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
}
.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.25);
}
.card h3 {
    font-size: 1.2vw;
    font-weight: bold;
    color: #8B0000;
    min-font-size: 14px;
    margin-bottom: 0.5rem;
}
.card p {
    font-size: 0.8vw;
    color: #666;
    line-height: 1.4;
    padding: 0 12px;
    min-font-size: 10px;
}


/* ========== 内容页面样式 ========== */
/* 返回首页的导航链接 */
.page-nav {
    text-align: right;
    margin-top: 10px;
}
.page-nav a {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background 0.3s;
}
.page-nav a:hover {
    background: rgba(255, 255, 255, 0.3);
}
/* 内容页面的 main 区域 */
.content-page {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 24px;
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.content-page h2 {
    color: #1e466e;
    border-bottom: 3px solid #1e466e;
    padding-bottom: 10px;
    margin-bottom: 25px;
}
/* 研究动态列表样式 */
#news-links li {
    margin: 15px 0;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}
#news-links li:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
#news-links a {
    text-decoration: none;
    color: #1e466e;
    font-size: 1rem;
    font-weight: 500;
    display: block;
}
#news-links a:hover {
    color: #0077b6;
}

/* 研究成果列表样式 */
#documents p {
    margin: 15px 0;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}
#documents p:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
#documents a {
    text-decoration: none;
    color: #1e466e;
    font-size: 1rem;
    font-weight: 500;
    display: block;
}
#documents a:hover {
    color: #0077b6;
}
/* 图片容器样式 */
.content-page .image-container {
    margin: 20px 0;
    text-align: center;
}
.content-page .image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* ========== 主页底部文字样式 ========== */
/* 调整 main 的布局，让内容从上到下排列 */
main {
    background: transparent;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}
/* 底部文字容器 */
/* 底部文字容器 */
.home-footer {
    text-align: center;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    color: black;
    font-size: 1rem;
    line-height: 1.5;
    text-shadow: none;
    z-index: 10;
}
.home-footer p {
    margin: 5px 0;
    letter-spacing: 1px;
}
/* 覆盖超链接默认颜色*/
.home-footer a {
    color: black;           /* 设置链接颜色为白色 */
    text-decoration: none;  /* 去掉下划线 */
    transition: opacity 0.3s ease;
}
/* 鼠标悬停效果 */
.home-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;  /* 悬停时显示下划线 */
}


/* ========== 子页面专用 body 样式 ========== */
body.sub-page {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: 100vh;
    height: auto;                 /* 新增：允许高度自动 */
    overflow-y: auto;             /* 新增：允许垂直滚动 */
    background-attachment: scroll;
}

/* ========== 版头样式（在导航栏上方） ========== */
.sub-header {
    background: linear-gradient(135deg, rgb(128,0,0), rgb(128,0,0));
    color: white;
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.sub-header h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: 1px;
}
.sub-header-subtitle {
    margin: 8px 0 0 0;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ========== 导航栏样式 ========== */
.sub-nav {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 12px 0;
}
.sub-nav-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.sub-nav-item {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 30px;
    transition: all 0.3s ease;
}
.sub-nav-item:hover {
    background: #f0f0f0;
    color: #8B0000;
}
.sub-nav-item.active {
    background: #8B0000;
    color: white;
}

/* ========== 内容区域 ========== */
.sub-page-content {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 0;
    max-width: 100%;
    padding: 3vh 5vw;              /*上边距与左右边距*/
    margin-top: 0;               /* 确保没有上边距 */
    box-shadow: none;
    flex: 0 0 auto;              /* 不拉伸，保持内容高度 */
}
.sub-page-content h2,
.sub-page-content ul,
.sub-page-content div {
    margin-left: auto;
    margin-right: auto;
}

/* ========== 页脚样式 ========== */
footer {
    text-align: center;
    padding: 1rem;
    background-color: rgb(128,0,0);
    color: white;
    width: 100%;
    margin-top: auto;
}


/* ========== 研究动态页面：左右两栏布局 ========== */
/* 两栏容器 */
.two-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 6vw;
     max-width: 75vw;
    justify-content: space-between;
}
/* 左侧：会议资讯 */
.dynamic-section:first-child {
    flex: 0.6;
    min-width: 15vw;
    min-width: 25vw;
}
/* 右侧：调研访谈 */
.dynamic-section:last-child {
    flex: 0.9;
    min-width: 25vw;
    min-width: 35vw;
}
/* 板块标题样式 */
.dynamic-section h2 {
    color: black;
    border-bottom: 0.2vw solid black;
    padding-bottom: 2vh;  /* 下边距为视口高度的% */
    margin-bottom: 3vh;   /* 标题与内容间距为视口高度的% */
    font-size: clamp(1.1rem, 2.3vw, 1.6rem);  /* 动态字体 */
    font-weight: 500;
}
/* 列表样式 */
#news-links,
#interview-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
/* 列表项样式 */
#news-links li,
#interview-links li {
    margin: 1.5vh 0;             /* 条目上下间距为视口高度的1.5% */
    padding: 1.2vh 1.5vw;        /* 内边距：上下用vh，左右用vw */
    background: #fcf5eb;         /* 背景颜色 */ 
    border-radius: 1.2vw;        /* 圆角为视口宽度的1.2% */
    transition: transform 0.2s, box-shadow 0.2s;
}
/* 链接文字样式 */
#news-links a,
#interview-links a {
    text-decoration: none;
    color: black;
    font-size: clamp(0.85rem, 1.2vw, 1rem);  /* 动态字体：最小0.85rem，最大1rem */
    font-weight: 500;
    display: block;
}
/* 悬浮效果 */
#news-links li:hover,
#interview-links li:hover {
    transform: translateX(0.5vw);           /* 悬浮移动距离为视口宽度的0.5% */
    box-shadow: 0 0.5vh 1.5vh rgba(0, 0, 0, 0.1);  /* 阴影用vh单位 */
}
/* 链接悬浮颜色 */
#news-links a:hover,
#interview-links a:hover {
        color: black;
}
/* 暂无内容提示样式 */
.empty-tip {
    color: #999;
    text-align: center;
    padding: 3vh 2vw !important;           /* 内边距比例化 */
    background: #fcf5eb !important;
    font-style: italic;
    font-size: clamp(0.8rem, 1vw, 0.9rem); /* 动态字体 */
}

/* 会议资讯卡片样式 */
.news-cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.news-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f5f5f5;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.news-card:hover .card-image img {
    transform: scale(1.03);
}
.card-title {
    padding: 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #1e466e;
    line-height: 1.4;
    background: white;
}

/* ========== 合作单位卡片样式 ========== */
/* 卡片容器：一排显示 */
.partners-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3vw;
    margin-top: 5vh;
}
/* 每个单位独立包装 */
.partner-card-wrapper {
    width: 14vw;
    min-width: 220px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
}
/* 悬浮窗卡片 - 带背景图 */
.partner-card {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 1.2vw;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0.5vh 1.5vh rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    height: 15vh;
    min-height: 100px;
    max-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
}
/* 半透明遮罩层 - 让文字更清晰 */
.partner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(139, 69, 19, 0.5);  /* 半透明颜色，可调整 */
    border-radius: 1.2vw;
    z-index: 1;
}
.partner-card:hover {
    transform: translateY(-0.8vh);
    box-shadow: 0 1.5vh 3vh rgba(0, 0, 0, 0.15);
}
/* 卡片内的文字 */
.partner-card h3 {
    position: relative;
    z-index: 2;
    color: white;
    padding: 1.2vh 1vw;
    margin: 0;
    font-size:  clamp(1.1rem, 1.3vw, 1.5rem);
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
    word-break: break-word;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
/* 四行文字链接区域 */
.partner-links {
    margin-top: 2vh;
    display: flex;  
显示 ：flex;
    flex-direction: column;
    gap: 1vh;
    width: 100%;
}
.link-item {
    display: block;
    padding: 1vh 0.8vw;  
缓冲 ：1 辆 VH 0.8VW;
    background: #f8f9fa;
    border-radius: 0.8vw;
    text-decoration: none;
    font-size: clamp(0.8rem, 1vw, 1.2rem);
    color: #333;
    transition: all 0.2s ease;
    text-align: center;
    white-space: normal;
    word-break: break-word;
}
.link-item:hover {
    background: #8B0000;
    color: white;
    transform: translateX(0.3vw);
}
/* ========== 弹窗（Tooltip）样式 ========== */
.tooltip-item {
    position: relative;
    display: block;
    width: 100%;
}
.tooltip-trigger {
    display: block;
    padding: 1vh 0.8vw;
    background: #f8f9fa;
    border-radius: 0.8vw;
    font-size:  clamp(0.8rem, 1vw, 1.2rem);
    color: #333;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tooltip-trigger:hover {
    background: #8B0000;
    color: white;
}
/* 弹窗内容 - 默认隐藏 */
.tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.5;
    min-width: 220px;
    max-width: 280px;
    white-space: normal;
    z-index: 100;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}
/* 弹窗小三角 */
.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}
/* 鼠标悬浮时显示弹窗 */
.tooltip-item:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}


/* ========== 各单位研究成果卡片样式 ========== */
.results-cards-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: flex-start;
    margin-top: 2vh;
}
.results-card {
    width: 280px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.results-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.results-card .card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background-color: #f5f5f5;
}
.results-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.results-card:hover .card-image img {
    transform: scale(1.03);
}
.results-card .card-title {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e466e;
    line-height: 1.4;
    background: white;
}


/* ========== 项目人员页面：左侧图片 + 右侧成员列表 ========== */
.members-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4vw;                   /* 间距改为视口宽度的3% */
    margin-top: 3vh;            /* 上边距改为视口高度的3% */
    align-items: center;
}
/* 左侧图片区域 */
.members-image {
    flex: 0 0 35%;              /* 固定占38%宽度 */
    min-width: 250px;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.members-image img {
    width: 100%;
    height: auto;
    border-radius: 1.2vw;       /* 圆角随屏幕宽度变化 */
    box-shadow: 0 0.5vh 1.5vh rgba(0, 0, 0, 0.1);
}
/* 右侧成员列表区域 */
.members-list {
    flex: 3;
    min-width: 500px;
}
/* 单个成员项 */
.member-item {
    padding: 1vh 1.2vw;       /* 内边距：上下用vh，左右用vw */
    margin-bottom: 1.2vh;         /* 间距用视口高度 */
    background: #f8f9fa;
    border-radius: 1vw;         /* 圆角随屏幕宽度 */
    transition: all 0.2s ease;
    line-height: 1.5;
    font-size: clamp(0.85rem, 1.2vw, 1rem);  /* 动态字体：最小0.85rem，最大1rem */
    color: #333;
    border-left: 0.25vw solid #8B0000;       /* 左边框随屏幕宽度 */
}
.member-item:hover {
    transform: translateX(0.5vw);            /* 悬浮移动距离随屏幕宽度 */
    background: #fff;
    box-shadow: 0 0.8vh 1.8vh rgba(0, 0, 0, 0.08);
}
.member-item strong {
    color: #8B0000;
    font-size: clamp(0.9rem, 1.3vw, 1.05rem);  /* 动态字体 */
    display: inline-block;
    min-width: 5.5vw;           /* 最小宽度用视口宽度比例 */
    font-weight: 600;
}


/* ========== 项目成果详情页面（上下两个板块） ========== */

.research-section {
    margin-bottom: 4vh;
}

.research-section:last-child {
    margin-bottom: 0;
}

.section-title {
    color: #1e466e;
    border-bottom: 3px solid #1e466e;
    padding-bottom: 1vh;
    margin-bottom: 2vh;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 600;
}
/* 成果卡片容器 - 左右排列 */
.results-cards-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: flex-start;
}
/* 成果卡片样式 */
.result-card {
    width: 280px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.result-card .card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background-color: #f5f5f5;
}
.result-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.result-card:hover .card-image img {
    transform: scale(1.03);
}
.result-card .card-title {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e466e;
    line-height: 1.4;
    background: white;
}


/* ========== 返回按钮样式 ========== */
.back-button-container {
    margin-bottom: 2vh;
    text-align: left;
}
.back-button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.back-button:hover {
    background: #8B0000;
    color: white;
    transform: translateX(-3px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
