/* ========================================
   Divi 可展开团队成员模块样式
   ======================================== */

/* 团队成员容器 - 网格布局 */
.team-accordion-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* 确保Divi列不会太窄 */
.team-grid .et_pb_column {
  min-width: 200px !important;
}

/* 强制文字水平显示 */
.team-grid .et_pb_team_member * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  width: 100%;
}

/* 响应式布局 */
@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .team-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Person模块卡片样式 */
.et_pb_team_member {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #fff;
  min-width: 180px;
  width: 100%;
}

.et_pb_team_member:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 团队成员图片 */
.et_pb_team_member_image {
  position: relative;
  overflow: hidden;
}

.et_pb_team_member_image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.et_pb_team_member:hover .et_pb_team_member_image img {
  transform: scale(1.05);
}

/* 团队成员描述区域 */
.et_pb_team_member_description {
  padding: 20px;
  text-align: center;
}

.et_pb_team_member h4 {
  margin: 0 0 5px 0;
  font-size: 1.2em;
  font-weight: 600;
  color: #333;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: none;
}

.et_pb_member_position {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 10px;
  font-style: italic;
  word-wrap: break-word;
  white-space: normal;
}

/* 简短描述（始终可见） */
.et_pb_team_member_description > p:first-of-type {
  font-size: 0.85em;
  color: #666;
  margin: 10px 0;
  line-height: 1.4;
}

/* 社交图标 */
.et_pb_member_social_links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.et_pb_member_social_links li {
  list-style: none;
}

.et_pb_member_social_links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #333;
  transition: all 0.3s ease;
}

.et_pb_member_social_links a:hover {
  background: #2ea3f2;
  color: #fff;
  transform: scale(1.1);
}

/* 展开按钮 */
.team-expand-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 20px;
  background: #2ea3f2;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

.team-expand-btn:hover {
  background: #1e88d8;
  transform: scale(1.05);
}

.team-expand-btn:after {
  content: ' ▼';
  font-size: 0.8em;
  margin-left: 5px;
}

.team-member-expanded .team-expand-btn:after {
  content: ' ▲';
}

/* 手风琴展开内容 */
.team-accordion-content {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 99999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
}

.team-accordion-content.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

/* 展开的详细内容 */
.team-detail-box {
  position: relative;
  background: #fff;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.team-accordion-content.active .team-detail-box {
  transform: scale(1);
}

.team-detail-inner {
  padding: 40px;
}

/* 关闭按钮 */
.team-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: #333;
  transition: all 0.3s ease;
  z-index: 10;
}

.team-close-btn:hover {
  background: #e74c3c;
  color: #fff;
  transform: rotate(90deg);
}

/* 详细内容布局 */
.team-detail-header {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.team-detail-image {
  flex: 0 0 250px;
}

.team-detail-image img {
  width: 100%;
  border-radius: 8px;
}

.team-detail-info {
  flex: 1;
  min-width: 250px;
}

.team-detail-info h3 {
  font-size: 2em;
  margin: 0 0 10px 0;
  color: #333;
}

.team-detail-info .position {
  font-size: 1.2em;
  color: #2ea3f2;
  font-weight: 600;
  margin-bottom: 20px;
}

.team-detail-bio {
  font-size: 1em;
  line-height: 1.8;
  color: #555;
  margin-bottom: 20px;
}

.team-detail-social {
  display: flex;
  gap: 15px;
}

.team-detail-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2ea3f2;
  color: #fff;
  transition: all 0.3s ease;
}

.team-detail-social a:hover {
  background: #1e88d8;
  transform: scale(1.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .team-detail-inner {
    padding: 20px;
  }
  
  .team-detail-header {
    flex-direction: column;
  }
  
  .team-detail-image {
    flex: 0 0 auto;
    max-width: 200px;
    margin: 0 auto;
  }
  
  .team-detail-info h3 {
    font-size: 1.5em;
    text-align: center;
  }
  
  .team-detail-info .position {
    text-align: center;
  }
  
  .team-detail-social {
    justify-content: center;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-grid .et_pb_team_member {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

.team-grid .et_pb_team_member:nth-child(1) { animation-delay: 0.1s; }
.team-grid .et_pb_team_member:nth-child(2) { animation-delay: 0.2s; }
.team-grid .et_pb_team_member:nth-child(3) { animation-delay: 0.3s; }
.team-grid .et_pb_team_member:nth-child(4) { animation-delay: 0.4s; }
.team-grid .et_pb_team_member:nth-child(5) { animation-delay: 0.5s; }
.team-grid .et_pb_team_member:nth-child(6) { animation-delay: 0.6s; }
.team-grid .et_pb_team_member:nth-child(7) { animation-delay: 0.7s; }
.team-grid .et_pb_team_member:nth-child(8) { animation-delay: 0.8s; }

/* 隐藏Divi默认的完整简介，只在弹窗中显示 */
.et_pb_team_member_description .team-full-bio {
  display: none;
}

