<template>
  <div class="home-page">
    <div class="">
      <!-- 标题区 -->
      <div class="company-overview">
        <div class="hero-section">
          <transition name="fade-up" appear>
            <n-h1 class="hero-title"
              >FiEE, Inc. has a team of capable senior management with extensive
              professional experience</n-h1
            >
          </transition>
        </div>
      </div>

      <!-- 管理团队列表 -->
      <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>
  </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>
:root {
  --text-color: #333;
  --primary-color: #895bff;
}

.home-page {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.company-overview {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  color: var(--text-color);
}

/* 顶部大图区域 */
.hero-section {
  background: linear-gradient(135deg, #00ffff, #b21f1f, #ff7bac);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: white;
  padding: 80px 20px;
  text-align: center;
  margin: 2rem 0 3rem;
  border-radius: 8px;
}

/* 动画 */
@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.5rem);
  opacity: 0.9;
}

/* 基础样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 管理团队网格 */
.leadership-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
}

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

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

/* 个人资料区 */
/* 个人资料区 */
.card-profile {
  padding: 1.5rem;
  /* background: linear-gradient(
    135deg,
    #7a4dff 0%,
    #895bff 100%
  ); */
  background: #ff7bac;
  position: relative;
}

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

.decorative-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #ffbfd7;
  border-radius: 50%;
  top: -8px;
  right: -8px;
}

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

.profile-info {
  color: white;
}

.leader-name {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

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

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

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

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

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

/* 响应式设计 - 中屏幕 */
@media (min-width: 768px) {
  .company-overview {
    padding: 0 2rem;
  }

  .hero-section {
    padding: 100px 0;
    margin: 3rem 0 4rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .leadership-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
  }

  .leader-card {
    border-radius: 20px;
  }

  .card-profile {
    padding: 2rem;
  }

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

  .decorative-dot {
    width: 20px;
    height: 20px;
    top: -10px;
    right: -10px;
  }

  .initials {
    font-size: 1.8rem;
  }

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

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

  .card-content {
    padding: 2rem;
  }

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

  .content-section p {
    font-size: 0.95rem;
  }
}

/* 响应式设计 - 大屏幕 */
@media (min-width: 1024px) {
  .leadership-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}
</style>
