/* 服務團隊：圓形頭像、雙色名片與點擊翻面，資料直接寫在 HTML。 */
.team-section {
  padding-block: 78px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}
.team-heading .section-intro { max-width: 380px; }
.team-section-hint { color: var(--green); font-size: 15px; }
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 18px;
}
.team-card {
  position: relative;
  min-width: 0;
  height: 460px;
  perspective: 1200px;
}
.team-flip-toggle {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
}
.team-flip-toggle:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
.team-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .55s;
}
.team-card.is-flipped .team-card-inner { transform: rotateY(180deg); }
.team-front,
.team-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ffffff1a;
  border-radius: 18px;
  box-shadow: 0 16px 34px #08142428;
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.team-front { align-items: center; color: #1c2533; background: #fff; }
.team-rank {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 5px 12px;
  border-radius: 999px;
  background: #c8a35d;
  color: #1d1304;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}
.team-rank-silver { color: #26303c; background: #d7d7d7; }
.team-avatar {
  flex-shrink: 0;
  width: 118px;
  height: 118px;
  margin: 36px auto 12px;
  border: 3px solid #c8a35d;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 32%;
}
.team-front h3,
.team-back h3 { font-family: var(--sans); font-size: 24px; font-weight: 700; line-height: 1.6; }
.team-front h3 { width: 100%; padding: 0 14px 20px; }
.team-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 14px 16px 18px;
  color: #d1d5db;
  background: #1c2533;
}
.team-company { font-size: 15px; line-height: 1.8; }
.team-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}
.team-tags li {
  padding: 4px 10px;
  border-radius: 999px;
  color: #1d1304;
  background: #c8a35d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}
.team-intro { font-size: 17px; line-height: 1.75; }
.team-flip-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  color: #e8d7b3;
  font-size: 13px;
  line-height: 1.6;
}
.team-flip-hint .icon { width: 15px; height: 15px; }
.team-back {
  justify-content: center;
  padding: 24px 18px;
  color: #f4f7ff;
  background: linear-gradient(150deg, #101b2d, #1c2533);
  transform: rotateY(180deg);
}
.team-stats { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 16px 0; }
.team-stats > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
  padding: 12px 10px;
  border: 1px solid #ffffff1f;
  border-radius: 12px;
  background: #ffffff14;
}
.team-stats dt { color: #d1d5db; font-size: 14px; line-height: 1.6; }
.team-stats dd { margin: 0; color: #f2d8aa; font-size: 28px; font-weight: 700; line-height: 1.3; }
.team-back .team-flip-hint { margin-top: 0; padding-top: 0; }
.team-more { margin-top: 32px; }
.team-more[open] {
  display: flex;
  flex-direction: column;
}
.team-more > summary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: fit-content;
  min-height: 48px;
  max-width: 100%;
  margin-inline: auto;
  padding: 12px 24px;
  border: 1px solid #c3cabb;
  border-radius: 4px;
  color: var(--green);
  background: transparent;
  list-style: none;
  font-size: 17px;
  line-height: 1.6;
}
.team-more > summary::-webkit-details-marker { display: none; }
.team-more > summary:hover { background: #f5f5f5; }
.team-more > summary > .icon { width: 17px; height: 17px; transition: transform .2s; }
.team-more[open] > summary {
  order: 2;
  margin-top: 32px;
}
.team-more[open] > summary > .icon { transform: rotate(45deg); }
.team-more-closed > span { margin-left: 9px; font-size: 13px; color: var(--muted); }
.team-more-open,
.team-more[open] > summary .team-more-closed { display: none; }
.team-more[open] > summary .team-more-open { display: inline; }
.team-grid-more { margin-top: 28px; }
.team-more[open] > .team-grid-more {
  order: 1;
  margin-top: 0;
}
.team-invitation { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 38px; padding-top: 26px; border-top: 1px solid #d9ddcf; }
.team-invitation p { font-family: var(--serif); font-size: 18px; }
.team-invitation p > span { margin-left: 14px; font-family: var(--sans); font-size: 15px; color: var(--muted); }
.team-invitation .text-link { color: var(--red); white-space: nowrap; font-size: 15px; }
@media (max-width: 1100px) {
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team-invitation p > span { display: block; margin-left: 0; margin-top: 4px; }
}
@media (max-width: 850px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
}
@media (max-width: 760px) {
  .team-section { padding-block: 58px; }
  .team-heading .section-intro { margin-top: 17px; }
  .team-more { margin-top: 26px; }
  .team-more > summary { font-size: 16px; gap: 14px; padding-inline: 18px; }
  .team-more[open] > summary { margin-top: 26px; }
  .team-grid-more { margin-top: 24px; }
  .team-invitation { margin-top: 27px; padding-top: 23px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .team-invitation p > span { font-size: 14px; }
}
@media (max-width: 600px) {
  .team-grid { grid-template-columns: minmax(0, 1fr); max-width: 420px; margin-inline: auto; gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .team-card-inner, .team-more > summary > .icon { transition: none; }
}
@media print {
  .team-section { background: white; padding-block: 25px; }
  .team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .team-more, .team-invitation, .team-flip-toggle, .team-flip-hint { display: none; }
  .team-card { height: auto; break-inside: avoid; }
  .team-card-inner, .team-card.is-flipped .team-card-inner { transform: none; }
  .team-front { position: relative; border: 1px solid #ddd; box-shadow: none; }
  .team-card.is-flipped .team-front { visibility: visible; }
  .team-back { display: none; }
  .team-card-body { color: #273b3a; background: white; }
  .team-company { font-size: 11px; }
  .team-intro { font-size: 12px; }
}
