/* ========================================
   律师团队列表页
   ======================================== */

.team-tools__toggle {
  display: none;
}

.team-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 28px;
}

.team-filter__item {
  display: inline-flex;
  align-items: center;
  font-family: HarmonyOS_Sans_SC_Bold, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  color: #aaaaaa;
  line-height: 32px;
  letter-spacing: 0;
  text-align: left;
  font-style: normal;
  text-transform: none;
  white-space: nowrap;
  transition: color var(--transition), font-size var(--transition);
}

.team-filter__item.is-active {
  font-size: 16px;
  color: #a42127;
}

.team-filter__item:hover {
  color: #a42127;
}

.team-search {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 28px;
  width: auto;
  max-width: 100%;
  height: 44px;
  background: transparent;
  border: none;
  overflow: visible;
}

.team-search__input {
  flex: 1;
  min-width: 770px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid #dddddd;
  border-radius: 3px;
  font-size: 14px;
  color: #333;
  background: #ffffff;
  box-sizing: border-box;
}

.team-search__input::placeholder {
  color: #bbb;
}

.team-search__input:focus {
  outline: none;
}

.team-search__btn {
  width: 374px;
  height: 44px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 18px;
  border: none;
  background: var(--color-primary);
  color: #ffffff;
  font-family: HarmonyOS_Sans_SC_Bold, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  text-align: left;
  font-style: normal;
  text-transform: none;
  transition: background var(--transition);
}

.team-search__btn:hover {
  background: var(--color-primary-dark);
}

.team-sort-note {
  margin-top: 37px;
  margin-bottom: 10px;
  font-family: HarmonyOS_Sans_SC, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  color: #666666;
  line-height: 35px;
  text-align: left;
  font-style: normal;
  text-transform: none;
}

.team-empty {
  grid-column: 1 / -1;
  padding: 48px 0 80px;
  text-align: center;
  font-size: 14px;
  color: #999;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 273px);
  justify-content: space-between;
  row-gap: 50px;
  padding-bottom: 80px;
}

.lawyer-card {
  display: block;
  width: 273px;
  background: #fff;
  transition: transform var(--transition);
}

.lawyer-card:hover {
  transform: translateY(-4px);
}

.lawyer-card__photo {
  overflow: hidden;
  width: 273px;
  height: 381px;
  margin-bottom: 16px;
  background: #f5f5f5;
  margin: 16px auto;
}

.lawyer-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.lawyer-card__name {
  font-family: HarmonyOS_Sans_SC_Bold, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  color: #111111;
  line-height: 26px;
  text-align: left;
  margin-bottom: 4px;
  transition: color var(--transition);
}

.lawyer-card:hover .lawyer-card__name {
  color: var(--color-primary);
}

.lawyer-card__title {
  font-family: HarmonyOS_Sans_SC, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  color: #999999;
  line-height: 24px;
  text-align: left;
  margin-bottom: 12px;
}

.lawyer-card__bio {
  font-family: HarmonyOS_Sans_SC, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  color: #666666;
  line-height: 28px;
  text-align: left;
  height: 84px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin-bottom: 16px;
}

.lawyer-card__contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid #ececec;
}

.lawyer-card__contact span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: HarmonyOS_Sans_SC, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  color: #666666;
  line-height: 1.4;
}

.lawyer-card__contact img {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .team-search {
    flex-wrap: wrap;
    height: auto;
  }

  .team-search__input {
    min-width: 0;
    width: 100%;
  }

  .team-search__btn {
    width: 100%;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    justify-content: stretch;
    column-gap: 24px;
    row-gap: 40px;
  }

  .lawyer-card {
    width: 100%;
  }

  .lawyer-card__photo {
    width: 273px;
    height: 381px;
  }
}

@media (max-width: 768px) {
  /* 中文版：两列分类，始终展开 */
  .team-filter {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 10px;
    align-items: start;
  }

  .team-filter__item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-width: 100%;
  }

  .team-filter__item:nth-child(2n + 4) {
    grid-column: 2;
  }

  .team-filter__item:nth-child(2n + 5) {
    grid-column: 3;
  }

  /* 英文版：仅分类可展开/收起，搜索框始终显示 */
  html.lang-en .team-tools__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #dddddd;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    text-align: left;
  }

  html.lang-en .team-tools__toggle-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
  }

  html.lang-en .team-tools__toggle-action {
    font-family: HarmonyOS_Sans_SC_Bold, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    color: #a42127;
    line-height: 22px;
  }

  html.lang-en .team-tools__toggle-action.is-collapse {
    display: none;
  }

  html.lang-en .team-tools.is-open .team-tools__toggle-action[data-team-tools-action-open] {
    display: none;
  }

  html.lang-en .team-tools.is-open .team-tools__toggle-action.is-collapse {
    display: block;
  }

  html.lang-en .team-tools__toggle-current {
    font-family: HarmonyOS_Sans_SC, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    color: #666666;
    line-height: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html.lang-en .team-tools__chevron {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid #a42127;
    border-bottom: 2px solid #a42127;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -4px;
  }

  html.lang-en .team-tools.is-open .team-tools__chevron {
    transform: rotate(-135deg);
    margin-top: 4px;
  }

  html.lang-en .team-tools__panel {
    display: none;
    margin-bottom: 4px;
  }

  html.lang-en .team-tools.is-open .team-tools__panel {
    display: block;
  }

  html.lang-en .team-filter {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 12px;
  }

  html.lang-en .team-filter__item {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 22px;
    height: auto;
    overflow: visible;
    text-overflow: unset;
  }

  html.lang-en .team-filter__item:nth-child(2n + 4),
  html.lang-en .team-filter__item:nth-child(2n + 5) {
    grid-column: auto;
  }

  .lawyer-card__bio {
    font-size: 15px;
    line-height: 26px;
    height: auto;
    max-height: 78px;
  }

  .lawyer-card__title {
    font-size: 15px;
  }

  .lawyer-card__contact span {
    font-size: 14px;
    word-break: break-all;
  }

  .team-grid {
    grid-template-columns: 1fr;
    row-gap: 32px;
    padding-bottom: 48px;
  }

  .lawyer-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .lawyer-card__photo {
    width: 273px;
    height: 381px;
  }
}



/* [mobile bump] base 10-13px +2px on phone */
@media (max-width: 768px) {
  .team-filter__item { font-size: 15px; }
  .team-search__btn { font-size: 15px; }
  .team-sort-note { font-size: 15px; }
}
