<template>
  <div class="management-page">
    <!-- 标题区 -->
    <section class="leadership-header">
      <div class="container">
        <h1 class="page-title">Executive Leadership</h1>
        <p class="page-subtitle">
          Driving Innovation and Operational Excellence
        </p>
      </div>
    </section>

    <!-- 管理团队列表 -->
    <main class="container">
      <div class="leadership-grid">
        <!-- 每个高管卡片 -->
        <div
          v-for="(leader, index) in leadershipTeam"
          :key="index"
          class="leader-card"
          :style="{ '--delay': index * 0.2 + 's' }"
        >
          <!-- 卡片上半部 -->
          <div class="card-profile">
            <div class="avatar-wrapper">
              <div class="decorative-dot"></div>
              <div class="initials">{{ getInitials(leader.name) }}</div>
            </div>
            <div class="profile-info">
              <h2 class="leader-name">{{ leader.name }}</h2>
              <p class="leader-position">{{ leader.position }}</p>
            </div>
          </div>

          <!-- 卡片下半部 -->
          <div class="card-content">
            <div
              class="content-section"
              v-for="(content, cIndex) in leader.content"
              :key="cIndex"
            >
              <p>{{ content }}</p>
            </div>
          </div>
        </div>
      </div>
    </main>
  </div>
</template>

<script setup>
import { useI18n } from "vue-i18n";
import { computed } from "vue";

const { t } = useI18n();

const leadershipTeam = computed(() => [
  {
    name: t("MANAGEMENT.ONE.TITLE"),
    position: t("MANAGEMENT.ONE.TITLETWO"),
    content: [
      t("MANAGEMENT.ONE.CONTENT"),
      t("MANAGEMENT.ONE.CONTENTTWO"),
      t("MANAGEMENT.ONE.CONTENTTHREE"),
    ],
  },
  {
    name: t("MANAGEMENT.TWO.TITLE"),
    position: t("MANAGEMENT.TWO.TITLETWO"),
    content: [t("MANAGEMENT.TWO.CONTENTONE"), t("MANAGEMENT.TWO.CONTENTTWO")],
  },
]);

const getInitials = (name) => {
  return name
    .split(" ")
    .map((n) => n[0])
    .join("");
};
</script>

<style scoped>
/* 基础样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 标题区 */
.leadership-header {
  background: linear-gradient(135deg, #f9fbfe 0%, #e8f2ff 100%);
  padding: 6rem 0 4rem;
  text-align: center;
}

.page-title {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.page-subtitle {
  color: #6b7c93;
  font-size: 1.1rem;
}

/* 管理团队网格 */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
}

/* 高管卡片 */
.leader-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  animation: cardEnter 0.6s ease forwards;
  animation-delay: var(--delay);
  transition: transform 0.3s ease;
}

.leader-card:hover {
  transform: translateY(-5px);
}

/* 个人资料区 */
.card-profile {
  padding: 2rem;
  background: linear-gradient(135deg, #4a90e2 0%, #6c5ce7 100%);
  position: relative;
}

.avatar-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
}

.decorative-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  top: -10px;
  right: -10px;
}

.initials {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: #4a90e2;
}

.profile-info {
  color: white;
}

.leader-name {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.leader-position {
  font-size: 1rem;
  opacity: 0.9;
}

/* 内容区 */
.card-content {
  padding: 2rem;
}

.content-section {
  margin-bottom: 1.5rem;
}

.content-section p {
  color: #5a6d80;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* 动画 */
@keyframes cardEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式 */
@media (max-width: 768px) {
  .leadership-grid {
    grid-template-columns: 1fr;
  }

  .leader-card {
    margin: 0 1rem;
  }
}
</style>
