.ksdh .bg-wrap {
  background: url("../image/ksdh-bg.png") top center / cover no-repeat;
  min-height: 800px;
  height: auto;
  padding-bottom: 110px;
}

.ksdh-container {
  display: grid;
  grid-template-columns: calc(50% - 60px) calc(50% + 20px);
  gap: 40px;
  color: #333;
  width: auto;
}

/* 标题样式 */
.ks-title {
  font-family: var(--font-decorative);
  font-size: 36px;
  color: #244840;
  height: 60px;
  line-height: 60px;
  padding-left: 20px;
  background: url("../image/ksdh-title-bg.png") no-repeat left center;
  background-size: auto 100%;
  margin-bottom: 40px;
  transform: translateX(-10px);
}

/* 左侧：科室介绍 Tabs */
.ks-tabs {
  display: flex;
  gap: 36px;
  margin-bottom: 48px;
}

.ks-tab-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 212px;
  height: 50px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.ks-tab-item.active {
  background: url("../image/ks-active.png") no-repeat center center;
  background-size: 100% 100%;
  color: #fff;
}

.ks-tab-item:not(.active) {
  background: url("../image/ks-inactive.png") no-repeat center center;
  background-size: 100% 100%;
  color: var(--text-main);
}

.ks-tab-icon-placeholder {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* 默认状态图片 */
.ks-tab-icon-placeholder.lc-icon {
  background-image: url("../image/lc-icon.png");
}
.ks-tab-icon-placeholder.yj-icon {
  background-image: url("../image/yj-icon.png");
}
.ks-tab-icon-placeholder.xz-icon {
  background-image: url("../image/xz-icon.png");
}

/* 激活状态图片 */
.ks-tab-item.active .ks-tab-icon-placeholder.lc-icon {
  background-image: url("../image/lc-icon-active.png");
}
.ks-tab-item.active .ks-tab-icon-placeholder.yj-icon {
  background-image: url("../image/yj-icon-active.png");
}
.ks-tab-item.active .ks-tab-icon-placeholder.xz-icon {
  background-image: url("../image/xz-icon-active.png");
}

/* 科室标签 */
.ks-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 40px;
}

.ks-tag-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 44px;
  padding: 0px 16px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  background: url("../image/k-inactive.png") no-repeat center center;
  background-size: 100% 100%;
  color: #73472e;
}

.ks-tag-item.active {
  background: url("../image/k-active.png") no-repeat center center;
  background-size: 100% 100%;
  color: #fff;
}

/* 科室详情 */
.ks-details h3 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  margin-bottom: 16px;
}

.ks-details p {
  font-size: 16px;
  line-height: 2;
}

.expert-team-col {
  width: 100%;
  overflow: hidden;
}

/* 右侧：专家团队 */
.expert-cards {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 10px; /* 为滚动条留出空间 */
}

.expert-card {
  flex: 0 0 auto;
  min-width: 280px;
  max-width: 378px;
  border: 1px solid #c39576;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
}

.expert-photo {
  width: 100%;
}

.expert-info {
  padding: 20px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid #c39576;
}

.expert-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.expert-name {
  font-size: 20px;
  font-weight: 500;
}

.expert-job {
  font-size: 14px;
  font-weight: 500;
  color: #73472e;
}

.expert-desc {
  font-size: 14px;
  color: #666666;
}

/* 响应式适配 */
@media (max-width: 1600px) {
  .ksdh-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 1024px) {
  .ks-tabs {
    gap: 20px;
    margin-bottom: 30px;
  }
  .ks-tab-item {
    width: 160px;
    height: 44px;
    font-size: 16px;
  }
  .ks-tags {
    gap: 15px;
    margin-bottom: 30px;
  }
  .ks-tag-item {
    min-width: 100px;
    height: 38px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .ksdh .bg-wrap {
    padding-bottom: 60px;
  }
  .ks-title {
    font-size: 28px;
    margin-bottom: 24px;
  }
  .ks-tabs {
    gap: 10px;
    margin-bottom: 30px;
  }
  .ks-tab-item {
    width: 120px;
    height: 36px;
    font-size: 13px;
  }
  .ks-tab-icon-placeholder {
    width: 14px;
    height: 14px;
    margin-right: 4px;
  }
  .ks-tags {
    gap: 12px;
    margin-bottom: 24px;
  }
  .ks-tag-item {
    min-width: 90px;
    height: 32px;
    font-size: 12px;
  }
  .expert-cards {
    gap: 16px;
  }
  .expert-card {
    min-width: 220px;
    max-width: 378px;
    border-radius: 12px;
    border-radius: 16px;
  }
}

@media (max-width: 576px) {
  .ksdh-container {
    margin: 0;
  }
  .ks-tabs {
    gap: 8px;
  }
  .ks-tab-item {
    width: 105px;
    height: 34px;
    font-size: 12px;
  }
  .ks-tags {
    gap: 8px;
  }
  .ks-tag-item {
    min-width: 80px;
    height: 30px;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .ks-tabs {
    gap: 5px;
  }
  .ks-tab-item {
    width: 95px;
    font-size: 11px;
  }
  .ks-tag-item {
    min-width: 72px;
    height: 28px;
    font-size: 10px;
  }
}

/* 专家团队卡片轮播效果 */
.expert-cards.carousel-active {
  overflow: hidden;
  width: max-content;
  display: flex;
  flex-wrap: nowrap;
  animation: marquee 25s linear infinite;
  padding-bottom: 0; /* 轮播时隐藏滚动条占位 */
}

.expert-cards.carousel-active:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(var(--scroll-width, -50%));
  }
}
