<template>
  <div class="home-page">
    <div class="business-page">
      <!-- 渐变背景标题区 -->
      <section class="hero-section">
        <div class="hero-content container">
          <div class="title-wrapper">
            <h1 class="hero-title">
              {{ $t("BusinessiIntroduction.CONTAIN.TITLEONE.TITLE") }}
            </h1>
            <div class="title-decoration"></div>
          </div>
          <div class="hero-description">
            <p>{{ $t("BusinessiIntroduction.CONTAIN.TITLEONE.CONTENT") }}</p>
            <p>{{ $t("BusinessiIntroduction.CONTAIN.TITLEONE.CONTENTTWO") }}</p>
          </div>
        </div>
      </section>

      <!-- 业务核心解决方案 -->
      <main class="container">
        <!-- 解决方案网格 -->
        <div class="solution-grid">
          <!-- 主推解决方案 -->
          <div class="featured-solution">
            <div class="solution-card" :style="{ '--delay': '0s' }">
              <div class="card-header">
                <div class="decorative-line"></div>
                <h2 class="card-title">{{ solutions[0].title }}</h2>
              </div>
              <ul class="card-content">
                <li
                  v-for="(point, pIndex) in solutions[0].points"
                  :key="pIndex"
                  class="content-point"
                >
                  <div class="point-icon">➤</div>
                  <div class="point-text">{{ point }}</div>
                </li>
              </ul>
            </div>
          </div>

          <!-- 次要解决方案组 -->
          <div class="secondary-solutions">
            <div
              v-for="(item, index) in solutions.slice(1)"
              :key="index + 1"
              class="solution-card"
              :style="{ '--delay': (index + 1) * 0.1 + 's' }"
            >
              <div class="card-header">
                <div class="decorative-line"></div>
                <h2 class="card-title">{{ item.title }}</h2>
              </div>
              <ul class="card-content">
                <li
                  v-for="(point, pIndex) in item.points"
                  :key="pIndex"
                  class="content-point"
                >
                  <div class="point-icon">➤</div>
                  <div class="point-text">{{ point }}</div>
                </li>
              </ul>
            </div>
          </div>
        </div>
      </main>
    </div>
  </div>
</template>

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

const { t } = useI18n();

const solutions = computed(() => [
  {
    title: t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.ONE.TITLE"),
    points: [
      t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.ONE.CONTENT"),
      t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.ONE.CONTENTTWO"),
    ],
  },
  {
    title: t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.TWO.TITLE"),
    points: [
      t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.TWO.CONTENT"),
      t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.TWO.CONTENTTWO"),
    ],
  },
  {
    title: t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.THREE.TITLE"),
    points: [
      t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.THREE.CONTENT"),
      t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.THREE.CONTENTTWO"),
      t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.THREE.CONTENTTHREE"),
    ],
  },
  {
    title: t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.FOUR.TITLE"),
    points: [
      t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.FOUR.CONTENT"),
      t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.FOUR.CONTENTTWO"),
      t("BusinessiIntroduction.CONTAIN.TITLEONE.paragraph.FOUR.CONTENTTHREE"),
    ],
  },
]);
</script>

<style scoped>
/* 基础变量定义 */
:root {
  --primary-color: #895bff;
  --primary-light: #a07cff;
  --primary-dark: #6a11cb;
  --primary-gradient: linear-gradient(
    135deg,
    var(--primary-light) 0%,
    var(--primary-color) 100%
  );
  --text-primary: #2c0850;
  --text-secondary: #4a3a6b;
  --text-light: #6c5ce7;
  --bg-light: #f9f6ff;
  --border-radius: 16px;
  --box-shadow: 0 10px 30px rgba(137, 91, 255, 0.15);
}

/* 基础样式 */
.container {
  padding: 0 1.25rem;
}

/* 标题区样式 */
.hero-section {
  background: var(--primary-gradient);
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
  color: #895bff;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(255,255,255,0.05)" d="M0,0 L100,0 L100,100 Q50,80 0,100 Z"></path></svg>')
    no-repeat bottom/100% 30%;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 40px;
  background: white;
  transform: skewY(-3deg);
}

.hero-title {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.title-decoration {
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60%;
  height: 3px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
}

.hero-description {
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.9;
}

/* 解决方案网格 */
.solution-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 3rem 0;
  position: relative;
}

/* 卡片设计 */
.solution-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  transform: translateY(20px);
  opacity: 0;
  animation: cardEnter 0.6s ease forwards;
  animation-delay: var(--delay);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(137, 91, 255, 0.1);
}

.solution-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(137, 91, 255, 0.03) 0%,
    rgba(137, 91, 255, 0) 100%
  );
  z-index: -1;
}

.solution-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(137, 91, 255, 0.2);
}

.featured-solution .solution-card {
  background: var(--bg-light);
  border: 1px solid rgba(137, 91, 255, 0.2);
}

.decorative-line {
  width: 40px;
  height: 3px;
  background: var(--primary-gradient);
  margin-bottom: 1rem;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.solution-card:hover .decorative-line {
  width: 60px;
}

.card-title {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.content-point {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(137, 91, 255, 0.1);
}

.content-point:last-child {
  border-bottom: none;
}

.point-icon {
  color: var(--primary-color);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.point-text {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* 布局调整 */
.secondary-solutions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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