<script setup>
import Head_menu from "@/module/head_menu.vue";
import Footer from "@/module/footer.vue";
import {ref} from 'vue'

// 联系表单数据
const contactForm = ref({
  name: '',
  email: '',
  phone: '',
  subject: '',
  message: ''
})

// 联系方式
const contactInfo = [
  {
    icon: '图标 1',
    title: '标题 1',
    content: '内容 1'
  },
  {
    icon: '图标 2',
    title: '标题 2',
    content: '内容 2'
  },
  {
    icon: '图标 3',
    title: '标题 3',
    content: '内容 3'
  },
  {
    icon: '图标 4',
    title: '标题 4',
    content: '内容 4'
  }
]

const faqList = [
  {
    title: '问题 1',
    content: '内容 1'
  },
  {
    title: '问题 2',
    content: '内容 2'
  },
  {
    title: '问题 3',
    content: '内容 3'
  },
]
</script>

<template>
  <div class="contact-page">
    <!--顶部导航栏-->
    <head_menu></head_menu>

    <!--页面标题区域-->
    <section class="hero-section">
      <div class="container">
        <h1 class="page-title">联系我们</h1>
        <p class="page-subtitle">子标题</p>
      </div>
    </section>

    <!--联系信息区域-->
    <section class="info-section container">
      <div class="info-grid">
        <div v-for="(info, index) in contactInfo" :key="index" class="info-card card">
          <div class="info-icon">{{ info.icon }}</div>
          <h3 class="info-title">{{ info.title }}</h3>
          <p class="info-content">{{ info.content }}</p>
        </div>
      </div>
    </section>

    <!--我们的信息-->
    <section class="form-section container">
      <div class="form-wrapper">
        <!--我们的信息-->
        <div class="form-container card">
          <h2 class="form-title">我们的信息</h2>
          <p class="form-desc">QQ、微信、邮箱 等...</p>

          <el-container>
            <el-form ref="contactForm" :model="contactForm" label-width="80px">
              <div>
                <div class="link-me">
                  <p style="font-size: 110%; font-weight: bold; margin-right: 10px;">QQ:</p>
                  <p style="">1234567891</p>
                </div>
                <div class="link-me">
                  <p style="font-size: 110%; font-weight: bold; margin-right: 10px;">微信:</p>
                  <p style="">1234567891</p>
                </div>
                <div class="link-me">
                  <p style="font-size: 110%; font-weight: bold; margin-right: 10px;">Email:</p>
                  <p style="">export.mail@com</p>
                </div>
              </div>
            </el-form>
          </el-container>
        </div>

      </div>
    </section>

    <!--常见问题区域-->
    <section class="faq-section">
      <div class="container">
        <h2 class="section-title">常见问题</h2>
        <p class="section-subtitle">快速找到您需要的答案</p>

        <div class="faq-list">
          <el-collapse accordion>
            <el-collapse-item
                v-for="(faq, index) in faqList"
                :key="index"
                :name="index + 1"
                :title="faq.title"
            >
              <div class="faq-answer">
                {{ faq.content }}
              </div>
            </el-collapse-item>
          </el-collapse>
        </div>
      </div>
    </section>

    <!--页脚-->
    <Footer/>
  </div>
</template>

<style scoped>
/* 我们的信息 */
.link-me {
  display: flex;
}

.contact-page {
  min-height: 100vh;
}

/* 顶部区域 */
.hero-section {
  background: var(--gradient-primary);
  padding: 80px 20px;
  text-align: center;
  color: white;
}

.page-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 18px;
  opacity: 0.95;
}

/* 联系信息区域 */
.info-section {
  padding: 60px 20px;
  margin-top: -40px;
  position: relative;
  z-index: 10;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.info-card {
  text-align: center;
  padding: 32px 24px;
}

.info-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.info-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.info-content {
  font-size: 15px;
  color: var(--text-secondary);
}

/* 表单区域 */
.form-section {
  padding: 60px 20px;
}

.form-wrapper {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 30px;
}

.form-container {
  padding: 40px;
}

.form-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.form-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.contact-form {
  margin-top: 24px;
}

.submit-btn {
  width: 100%;
  height: 48px;
  font-size: 16px;
  font-weight: 600;
}

.map-container {
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.map-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.map-placeholder {
  flex: 1;
  background: var(--bg-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.map-content {
  text-align: center;
}

.map-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.map-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.map-address {
  font-size: 14px;
  color: var(--text-light);
}

/* FAQ区域 */
.faq-section {
  background: var(--bg-light);
  padding: 80px 20px;
}

.faq-list {
  max-width: 900px;
  margin: 40px auto 0;
}

/* Element Plus Collapse 自定义样式 */
.faq-list :deep(.el-collapse) {
  border: none;
  background: transparent;
}

.faq-list :deep(.el-collapse-item) {
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.faq-list :deep(.el-collapse-item:hover) {
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.12);
  transform: translateY(-2px);
}

.faq-list :deep(.el-collapse-item__header) {
  background: white;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  padding: 20px 24px;
  border: none;
  line-height: 1.6;
  transition: all 0.3s ease;
}

.faq-list :deep(.el-collapse-item__header:hover) {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.03) 0%, rgba(0, 212, 255, 0.03) 100%);
  color: var(--primary-color);
}

.faq-list :deep(.el-collapse-item__header.is-active) {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.05) 0%, rgba(0, 212, 255, 0.05) 100%);
  color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
}

.faq-list :deep(.el-collapse-item__arrow) {
  font-size: 14px;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.faq-list :deep(.el-collapse-item__wrap) {
  border: none;
  background: white;
}

.faq-list :deep(.el-collapse-item__content) {
  padding: 24px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  background: white;
}

.faq-answer {
  position: relative;
  padding-left: 16px;
}

.faq-answer::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: calc(100% - 16px);
  background: var(--gradient-primary);
  border-radius: 2px;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .page-title {
    font-size: 36px;
  }

  .form-wrapper {
    grid-template-columns: 1fr;
  }

  .form-container,
  .map-container {
    padding: 30px 20px;
  }

  .info-section {
    margin-top: -20px;
  }
}
</style>
