/* ===== 公共设置 ===== */

.language-switcher {
  text-align: right;
  margin-left: auto;
}

.lang-link {
  font-weight: bold;
  text-decoration: none;
  border: 1px solid #ccc;
  padding: 5px 10px;
  border-radius: 4px;
}

.lang-link:hover {
  background-color: #f0f0f0;
}

/* ===== 首页布局整体 ===== */
.homepage-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

/* ===== 侧边栏 ===== */
.homepage-sidebar {
  flex: 1;
  min-width: 220px;
}

.sidebar-block {
  background-color: #f9f9f9;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-block h3 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  color: #333;
}

.sidebar-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color:dimgray;
}

.sidebar-block li {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.sidebar-block img {
  width: 60px;
  height: auto;
  border-radius: 4px;
}

/* ===== 响应式：小屏幕下上下堆叠布局 ===== */
@media screen and (max-width: 768px) {
  .homepage-layout {
    flex-direction: column;
  }

  .homepage-sidebar {
    width: 100%;
  }
}


/* ===== Header 区域 ===== */

.full-header {
  width: 100%;
}

.wrapper {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

.header-top {
  background: white;
  border-bottom: 1px solid #ccc;
  padding: 1rem 0;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo img {
  height: 60px;
  border-radius: 8px;
}

.header-logo-text {
  display: flex;
  flex-direction: column;
}

.header-logo-text .lab-title {
  font-size: 2.4rem; /* 更大的字体大小 */
  font-weight: 700;
  font-family: "Garamond", "Georgia", serif; /* 更有质感的字体 */
  color: #2a2a2a;
}


.header-logo-text .lab-subtitle {
  font-size: 0.95rem;
  color: #666;
  margin-top: 0rem;
}

/* 下部：导航 */

.header-nav {
  background-color: #3e5d7b;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.navbar a,
.page-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 0;
}

.navbar a:hover,
.page-link:hover {
  text-decoration: underline;
}

/* 卡片 */
.news-card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start; /* 左对齐 */
}

.news-card {
  background: white;
  border-radius: 6px;
  padding: 1rem;
  box-sizing: border-box;

  /* 一行最多 4 个卡片 */
  flex: 1 1 calc(25% - 1rem);
  max-width: calc(25% - 1rem);
}

/* 可选：小屏自动调整 */
@media screen and (max-width: 1024px) {
  .news-card {
    flex: 1 1 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }
}

@media screen and (max-width: 600px) {
  .news-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
}


/* ===== Footer 样式 ===== */

.site-footer {
  background-color: #2c3e50;
  color: #fff;
  font-size: 0.9rem;
  padding: 2rem 0 1rem;
  margin-top: 2rem;
}

.site-footer a {
  color: #ccc;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.footer-col {
  flex: 1;
}

.footer-col-2 {
    text-align: center;
}

/* 调整 Clustrmaps 插件容器的样式 */
#clstr_globe_container {
    width: 10vw;
    height: 10vh;
    margin: 0 auto; /* 居中显示 */
}

.footer-col h3 {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  color: #f1f1f1;
}

.contact-list,
.social-media-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li,
.social-media-list li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 1rem;
  text-align: center;
  color: #aaa;
  font-size: 0.8rem;
}

/* 响应式：窄屏时改为垂直排列 */
@media screen and (max-width: 768px) {
  .footer-content {
    flex-direction: column;
  }

  .footer-col {
    flex: 1 1 100%;
  }
}

/* ===== 响应式优化 ===== */

@media screen and (max-width: 768px) {
  .header-logo {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .language-switcher {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .gray-block > div {
    flex-direction: column;
    align-items: center;
  }

  .gray-block img {
    margin-bottom: 1rem;
  }
}

/* 成员 */
/* 成员整体布局 */
.members-section {
  margin: 3rem auto;
  max-width: 1140px;
  padding: 0 16px;
}

.members-section h2 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

/* 网格容器：一行最多4个，少于4个居中 */
.members-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* 居中对齐 */
  gap: 1.5rem;
}

/* 单个成员卡片 */
.member-card {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 1rem;
  width: calc(25% - 1.5rem); /* 一行4个 */
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 图片 */
.member-image {
  width: 160px;              /* 统一宽度 */
  height: 160px;             /* 统一高度 */
  object-fit: cover;         /* 自动裁剪填充 */
  border-radius: 0;        /* 可选：变为圆形头像 */
  display: block;
  margin: 0 auto 10px;
}
.member-image-wrapper {
  width: 160px;
  height: 160px;
  overflow: hidden;
  border-radius: 8px;
  margin: 0 auto 10px;
}
/* 名字与职位 */
.member-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.member-position {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.member-bio {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
}

.member-bio.expanded {
  -webkit-line-clamp: unset;
  max-height: none;
}

.bio-toggle {
  background: none;
  border: none;
  color: #007acc;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  margin-bottom: 0.5rem;
}

.bio-toggle:hover {
  text-decoration: underline;
}


/* 邮箱样式 */
.member-email {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.member-email a {
  color: #0366d6;
  text-decoration: none;
}

.member-email a:hover {
  text-decoration: underline;
}

/* 响应式：平板每行3个，手机每行1个 */
@media screen and (max-width: 992px) {
  .member-card {
    width: calc(33.333% - 1.5rem);
  }
}

@media screen and (max-width: 768px) {
  .member-card {
    width: calc(50% - 1.5rem);
  }
}

@media screen and (max-width: 480px) {
  .member-card {
    width: 100%;
  }
}

/* ===== 轮播图样式 ===== */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    box-sizing: border-box;
    text-align: center;
    background-color: white;
    padding: 1rem;
}

.carousel-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
}

.carousel-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 10px 0 5px;
}

.carousel-date {
    font-size: 0.8rem;
    color: #666;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 2;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}
