/* =========================================
   tech_social.css
   技术与社会页面专用样式
   ========================================= */

/* --- 核心修改：导航栏布局调整 --- */

/* 1. 覆盖全局 Header 容器宽度，让它变宽以容纳更多菜单 */
.site-header .nav-container {
    width: 98% !important;   /* 使用屏幕 98% 的宽度 */
    max-width: 1200px !important; /* 突破 global.css 的 1200px 限制 */
    padding: 0 20px;
}

/* 2. Logo 区域微调：稍微紧凑一点，给导航留空间 */
.logo {
    gap: 10px;
    flex-shrink: 0; /* 防止 Logo 被挤压 */
    margin-right: 20px;
}
.logo-text h2 {
    font-size: 16px; /* 稍微调小 Logo 标题字号 */
    white-space: nowrap;
}
.logo-text h3 {
    white-space: nowrap;
}

/* 3. 导航列表：灵活间距 */
.ts-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end; /* 靠右对齐 */
}

.ts-nav ul {
    gap: 5px; /* 减小菜单项之间的间距 */
    justify-content: flex-end;
    width: 100%;
}

/* 4. 导航单项：强制不换行 */
.ts-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    padding: 0 12px; /* 左右内边距 */
    height: 80px;
    color: var(--text-sub);
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    
    /* 核心：强制文字不换行 */
    white-space: nowrap; 
    text-align: center;
}

.ts-nav .nav-item span {
    font-size: 15px;
    font-weight: 600;
}

.ts-nav .nav-item span.en {
    font-size: 11px; /* 英文稍微小一点 */
    font-weight: 400;
    margin-top: 3px;
    text-transform: uppercase;
    opacity: 0.8;
}

.ts-nav .nav-item:hover,
.ts-nav .nav-item.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(240,247,255,0.8));
}

/* --- Hero 区域 --- */
.ts-hero {
    margin-top: 80px;
    height: 300px;
    background: url('/images/background.png') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333; 
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}


.ts-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    padding: 0 20px;
}

.ts-hero-content h1 {
    font-size: 36px; /* 稍微加大标题 */
    font-weight: 800;
    margin-bottom: 15px;
    color: #000;
    line-height: 1.3;
}
.ts-hero-content p {
    font-size: 16px;
    color: #333;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* --- 页面切换逻辑 --- */
.page-view {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page-view.active {
    display: block;
}

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

.ts-main-container {
    padding-bottom: 80px;
    min-height: 600px;
    /* 主内容区依然保持 1200px 居中，避免内容太散 */
    width: 1200px; 
    max-width: 100%;
    margin: 0 auto;
}

/* --- 通用板块样式 --- */
.ts-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.ts-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    position: relative;
}

.ts-section-title::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-blue);
}

.more-link {
    font-size: 13px;
    color: #999;
    transition: 0.3s;
    text-decoration: none;
}
.more-link:hover { color: var(--primary-blue); }

.placeholder-text {
    color: #999;
    text-align: center;
    padding: 60px;
    background: #fcfcfc;
    border: 2px dashed #eee;
    border-radius: 8px;
    font-size: 14px;
}

/* --- 各模块具体样式 --- */

/* 1. 最新动态 */
.ts-list-group { display: flex; flex-direction: column; }
.ts-list-item {
    display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed #eee; transition: all 0.2s; text-decoration: none; color: inherit;
}
.ts-list-item:hover { color: var(--primary-blue); padding-left: 10px; border-bottom-color: var(--primary-blue); }
.ts-item-title { flex: 1; font-size: 15px; margin-right: 20px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-item-date { font-size: 13px; color: #999; white-space: nowrap; font-family: monospace; }

/* 2. 研究论文 */
.ts-paper-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.ts-paper-card {
    display: flex; background: #f9fbff; border: 1px solid #eef2f9; padding: 18px; border-radius: 8px; transition: all 0.3s; gap: 15px; text-decoration: none;
}
.ts-paper-card:hover {
    box-shadow: var(--hover-shadow); transform: translateY(-3px); border-color: var(--primary-blue); background: #fff;
}
.paper-icon {
    width: 36px; height: 36px; background: #fff; color: #ff4d4f; border: 1px solid #ffd6d7; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; flex-shrink: 0;
}
.paper-content { flex: 1; min-width: 0; }
.paper-content h3 { font-size: 14px; color: #333; line-height: 1.5; margin-bottom: 8px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.paper-date { font-size: 12px; color: #999; font-family: monospace; }

/* --- 研究论文 (Paper Card) 优化 --- */

/* 1. 允许标题换行，不再省略号截断 */
.ts-paper-card .paper-content h3 {
    white-space: normal;      /* 允许换行 */
    line-height: 1.5;         /* 增加行高 */
    height: auto;             /* 高度自适应 */
    display: block;           /* 取消 flex/grid 限制 */
    margin-bottom: 10px;
    font-size: 14px;
}

/* 2. 确保卡片高度对齐，看起来更整齐 */
.ts-paper-grid {
    align-items: stretch; /* 确保每行卡片高度一致 */
}

.ts-paper-card {
    flex-direction: row; /* 保持图标在左 */
    align-items: flex-start; /* 顶部对齐 */
}

/* 3. 日期样式 */
.paper-date {
    display: block;
    margin-top: auto; /* 将日期推到底部 */
    font-size: 12px;
    color: #999;
}

/* 3. 左右布局容器 */
.ts-row-layout { display: flex; gap: 30px; }
.ts-col-left { flex: 3; display: flex; flex-direction: column; }
.ts-col-right { flex: 7; display: flex; flex-direction: column; }

/* 4. 网上社会调查 */
.ts-survey-list { display: flex; flex-direction: column; gap: 12px; }
.survey-btn {
    display: block; padding: 12px 15px; background: #f0f7ff; color: var(--primary-blue); border-radius: 6px; text-align: center; font-weight: 600; font-size: 14px; transition: 0.3s; text-decoration: none;
}
.survey-btn:hover { background: var(--primary-blue); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 86, 255, 0.2); }

/* 5. 机构 */
.ts-institution-list { display: flex; flex-direction: column; gap: 10px; }
.inst-link { padding: 10px; border-bottom: 1px solid #eee; transition: 0.2s; font-size: 14px; color: #555; text-decoration: none; }
.inst-link:hover { color: var(--primary-blue); padding-left: 8px; background: #f9f9f9; }

.inst-details-full h3 { font-size: 20px; color: #333; margin-bottom: 15px; padding-left: 10px; border-left: 4px solid var(--primary-blue); }
.inst-details-full p { margin-bottom: 12px; font-size: 15px; line-height: 1.8; color: #555; text-indent: 2em; text-align: justify; }

/* --- 机构 (Institution) 列表样式 --- */

.ts-institution-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 机构卡片通用样式 (包含链接和折叠面板) */
.inst-card {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none; /* 去除链接下划线 */
    color: inherit;
    background: #fdfdfd;
}

.inst-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: #d6e4ff;
    background: #f0f7ff;
    transform: translateX(5px); /* 悬停微动效果 */
}

/* --- 类型1：跳转链接样式 --- */
.inst-card.link-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
}

/* --- 类型2：折叠面板样式 --- */
.inst-card.accordion-type:hover {
    transform: none; /* 折叠面板不需要位移，只需要阴影 */
}

.inst-card.accordion-type summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
}
.inst-card.accordion-type summary::-webkit-details-marker { display: none; }

.inst-card.accordion-type[open] summary {
    border-bottom: 1px solid #eee;
    background: #f0f7ff;
}

/* 内容区域 */
.inst-content {
    padding: 20px;
    background: #fff;
    animation: fadeIn 0.4s ease;
}
.inst-content p {
    margin-bottom: 10px;
    line-height: 1.8;
    color: #555;
    text-indent: 2em;
    font-size: 14px;
    text-align: justify;
}

/* --- 内部元素样式 --- */
.inst-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding-right: 20px;
}

.inst-date {
    font-size: 13px;
    color: #999;
    font-family: monospace;
    margin-right: 20px;
    white-space: nowrap;
}

.inst-icon {
    font-size: 18px;
    color: var(--primary-blue);
    font-weight: 300;
    width: 20px;
    text-align: center;
}

/* 折叠面板展开时的图标旋转 */
.inst-card.accordion-type[open] .inst-icon {
    transform: rotate(45deg); /* + 变 x */
}

/* 6. 老师 */
.ts-teacher-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.teacher-tag {
    padding: 8px 16px; background: #f5f5f5; border-radius: 20px; font-size: 14px; color: #666; transition: 0.3s; text-decoration: none;
}
.teacher-tag:hover { background: var(--primary-blue); color: #fff; transform: scale(1.05); }

/* 7. 研究计划 */
.ts-plan-list { display: flex; flex-direction: column; gap: 15px; }
.plan-item {
    background: #fdfdfd; border-left: 4px solid #ddd; padding: 15px 20px; position: relative; transition: 0.3s;
}
.plan-item:hover { background: #fff; border-left-color: var(--primary-blue); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.plan-item h4 { font-size: 16px; margin-bottom: 8px; color: #333; font-weight: 700; }
.plan-info { font-size: 13px; color: var(--primary-blue); margin-bottom: 5px; font-weight: 600; }
.plan-date-tag { position: absolute; top: 15px; right: 20px; font-size: 12px; color: #ccc; font-family: monospace; }

/* 8. 课程资源 */
.ts-course-list { display: flex; flex-direction: column; gap: 12px; }
.course-item {
    display: flex; justify-content: space-between; padding: 15px; background: #f8f9fa; border-radius: 8px; transition: 0.3s; text-decoration: none;
}
.course-item:hover { background: #e6f7ff; transform: translateX(5px); }
.c-title { font-weight: 600; color: #333; font-size: 15px; }
.c-date { font-size: 13px; color: #999; }

/* --- 课程资源 (Course Accordion) 样式 --- */

.ts-course-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-accordion {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    background: #fff;
}

.course-accordion:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: #d6e4ff;
    transform: translateX(5px);
}

/* 摘要行 (点击区域) */
.course-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    cursor: pointer;
    background: #fdfdfd;
    list-style: none;
    transition: background 0.3s;
}

.course-accordion summary::-webkit-details-marker { display: none; }

.course-accordion summary:hover {
    background: #f0f7ff;
}

.course-accordion[open] summary {
    background: #f0f7ff;
    border-bottom: 1px solid #eee;
}

/* 课程标题 */
.c-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding-right: 20px;
}

/* 课程日期 */
.c-date {
    font-size: 13px;
    color: #999;
    font-family: monospace;
    margin-right: 20px;
}

/* 展开图标 */
.c-icon {
    font-size: 20px;
    color: var(--primary-blue);
    font-weight: 300;
    width: 20px;
    text-align: center;
    transition: transform 0.3s;
}

/* 展开时的图标旋转 */
.course-accordion[open] .c-icon {
    transform: rotate(45deg);
}

/* 展开内容区域 */
.c-content {
    padding: 20px;
    background: #fff;
    animation: fadeIn 0.4s ease;
}

.c-content .placeholder-text {
    border: none;
    background: transparent;
    padding: 0;
    text-align: left;
    color: #666;
}

/* --- 研究团队 (Team Accordion) 样式 --- */

.ts-team-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.team-accordion {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    background: #fff;
}

.team-accordion:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: #d6e4ff;
}

/* 摘要行 (点击区域) */
.team-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    cursor: pointer;
    background: #fdfdfd;
    list-style: none; /* 移除默认小三角 */
    transition: background 0.3s;
}

/* 移除 Webkit 浏览器的默认小三角 */
.team-accordion summary::-webkit-details-marker {
    display: none;
}

.team-accordion summary:hover {
    background: #f0f7ff;
}

.team-accordion[open] summary {
    background: #f0f7ff;
    border-bottom: 1px solid #eee;
}

/* 名字 */
.t-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    flex: 1; /* 占据剩余空间 */
}

/* 日期 */
.t-date {
    font-size: 13px;
    color: #999;
    font-family: monospace;
    margin-right: 20px;
}

/* 图标 (+/-) */
.t-icon {
    font-size: 20px;
    color: var(--primary-blue);
    font-weight: 300;
    width: 20px;
    text-align: center;
    transition: transform 0.3s;
}

/* 展开时的图标旋转效果 */
.team-accordion[open] .t-icon {
    transform: rotate(45deg); /* +号旋转45度变成x号 */
}

/* 展开的内容区域 */
.t-content {
    padding: 20px;
    background: #fff;
    animation: fadeIn 0.4s ease;
}

/* 确保内部 placeholder 样式正确 */
.t-content .placeholder-text {
    border: none;
    background: transparent;
    padding: 10px;
    text-align: left;
}