/* ==========================================================================
   艾城市有限公司 - 團隊介紹頁面專屬樣式 (Partners.css)
   ========================================================================== */

/* 1. 頁面標題區塊 */
.page-header-section {
  background: var(--bg-light-gray);
  padding: 60px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 60px;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 2.25rem;
  color: var(--primary-green);
  font-weight: 700;
  margin-bottom: 12px;
}

.page-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

/* 區塊標題通用樣式 */
.section-title-wrapper {
  text-align: center;
  margin-bottom: 48px;
}

.section-badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: var(--accent-gold-light);
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.section-title {
  font-size: 1.875rem;
  color: var(--primary-green);
  font-weight: 700;
  margin-bottom: 10px;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
}

.team-section {
  padding: 40px 0 80px;
}

.bg-alt {
  background-color: var(--bg-light-gray);
  padding: 60px 0;
}

/* ==========================================================================
   2. 正式職員區塊：左右交錯水平排版（所有螢幕尺寸均維持）
   ========================================================================== */
.team-section:not(.bg-alt) .team-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.team-section:not(.bg-alt) .team-grid > .team-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 48px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 20px 0;
  border-bottom: 1px dashed var(--border-color);
}

.team-section:not(.bg-alt) .team-grid > .team-card:nth-child(even) {
  flex-direction: row-reverse;
}

.team-section:not(.bg-alt) .team-card .team-img-wrapper {
  flex: 0 0 300px;
  height: 360px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.team-section:not(.bg-alt) .team-card .team-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.team-section:not(.bg-alt) .team-card:hover .team-img {
  transform: scale(1.03);
}

.team-section:not(.bg-alt) .team-card .team-info {
  flex: 1;
  padding: 0;
  min-width: 0;
}

.team-section:not(.bg-alt) .team-card .team-name {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.team-section:not(.bg-alt) .team-card .team-title-tag {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-green);
  background: var(--bg-light-gray);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 20px;
}

.team-section:not(.bg-alt) .team-card .team-bio {
  font-size: 1.04rem;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 20px;
}

.team-section:not(.bg-alt) .team-card .team-experience {
  background: var(--bg-white);
  border-left: 4px solid var(--primary-green);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.team-section:not(.bg-alt) .team-card .exp-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 8px;
}

.team-section:not(.bg-alt) .team-card .team-experience ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 0;
  margin: 0;
}

.team-section:not(.bg-alt) .team-card .team-experience li {
  font-size: 0.9375rem;
  color: var(--text-body);
  position: relative;
  padding-left: 14px;
}

.team-section:not(.bg-alt) .team-card .team-experience li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-gold);
  font-weight: bold;
}

/* ==========================================================================
   3. 外聘講師與輔導師專用區塊（卡片尺寸縮小優化）
   ========================================================================== */
.expert-scroll-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-green) var(--border-color);
}

.expert-scroll-container::-webkit-scrollbar {
  height: 6px;
}
.expert-scroll-container::-webkit-scrollbar-track {
  background: var(--border-color);
  border-radius: 10px;
}
.expert-scroll-container::-webkit-scrollbar-thumb {
  background: var(--primary-green);
  border-radius: 10px;
}

.expert-scroll-track {
  display: flex;
  gap: 20px;
  scroll-snap-type: x mandatory;
  padding: 5px;
}

.expert-scroll-track > .expert-card {
  flex: 0 0 calc((100% - 60px) / 3.5);
  min-width: 240px;
  max-width: 280px;
  scroll-snap-align: start;
  box-sizing: border-box;
}

.bg-alt .team-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.bg-alt .team-card:hover {
  border-color: var(--primary-green);
}

.bg-alt .team-card .team-img-wrapper {
  width: 100%;
  height: 200px;
  flex: none;
  overflow: hidden;
}

.bg-alt .team-card .team-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-alt .team-card .team-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.bg-alt .team-card .team-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.bg-alt .team-card .team-title-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(2, 132, 199, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.bg-alt .team-card .team-bio {
  font-size: 0.875rem;
  color: var(--text-body);
  margin-bottom: 12px;
  line-height: 1.55;
  white-space: pre-line; /* 關鍵：強制保留換行符號 */
}

/* ==========================================================================
   4. 合作企業與公協會夥伴區塊：固定 3 欄排列 (3個一行)
   ========================================================================== */
.partners-section {
  padding: 50px 0 70px;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.partner-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  transition: var(--transition);
}

.partner-card:hover {
  border-color: var(--accent-gold);
  background: var(--accent-gold-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(212, 160, 23, 0.12);
}

.partner-logo {
  max-height: 44px;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter 0.3s;
}

.partner-card:hover .partner-logo {
  filter: grayscale(0%);
}

.partner-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* ==========================================================================
   5. 組織架構圖區塊
   ========================================================================== */
.org-chart-section {
  padding: 40px 0 60px;
  background-color: var(--bg-white);
}

.org-chart-container {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--bg-white);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  text-align: center;
  transition: var(--transition);
}

.org-chart-container:hover {
  box-shadow: 0 12px 30px rgba(27, 67, 50, 0.08);
  border-color: var(--primary-green);
}

.org-chart-img {
  width: 100%;
  height: auto;
  max-height: 550px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* ==========================================================================
   6. RWD 響應式微調 (平板 & 手機)
   ========================================================================== */
@media (max-width: 991px) {
  .team-section:not(.bg-alt) .team-grid > .team-card {
    gap: 28px;
  }
  .team-section:not(.bg-alt) .team-card .team-img-wrapper {
    flex: 0 0 200px;
    height: 260px;
  }

  .expert-scroll-track > .expert-card {
    flex: 0 0 240px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .team-section:not(.bg-alt) .team-grid {
    gap: 32px;
  }

  .team-section:not(.bg-alt) .team-grid > .team-card {
    gap: 16px;
    padding: 16px 0;
  }

  .team-section:not(.bg-alt) .team-card .team-img-wrapper {
    flex: 0 0 130px;
    height: 175px;
    border-radius: 8px;
  }

  .team-section:not(.bg-alt) .team-card .team-name {
    font-size: 1.15rem;
    gap: 6px;
    margin-bottom: 8px;
  }

  .team-section:not(.bg-alt) .team-card .team-title-tag {
    font-size: 0.75rem;
    padding: 2px 8px;
  }

  .team-section:not(.bg-alt) .team-card .team-bio {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 10px;
  }

  .team-section:not(.bg-alt) .team-card .team-experience {
    padding: 10px 12px;
    border-left-width: 3px;
  }

  .team-section:not(.bg-alt) .team-card .exp-title {
    font-size: 0.75rem;
    margin-bottom: 4px;
  }

  .team-section:not(.bg-alt) .team-card .team-experience li {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .expert-scroll-track > .expert-card {
    flex: 0 0 68%; 
    min-width: 200px;
  }

  .bg-alt .team-card .team-img-wrapper {
    height: 160px;
  }

  .partners-grid {
    gap: 10px;
  }

  .partner-card {
    padding: 12px 6px;
    gap: 8px;
  }

  .partner-logo {
    max-height: 32px;
  }

  .partner-name {
    font-size: 0.75rem;
    line-height: 1.3;
  }
}