<template>
  <div class="cooperation-model">
    <div class="cooperation-container">
      <!-- 标题 -->
      <div class="section-title">
        <h2 class="title-text">合作模式</h2>
        <div class="title-bar"></div>
        <p class="title-description">多种合作模式,助力您的业务增长与AI技术应用创新</p>
      </div>
      
      <!-- 合作模式卡片 -->
      <div class="cooperation-cards">
        <div 
          v-for="item in cooperationItems" 
          :key="item.id"
          class="cooperation-card"
        >
          <!-- Icon位置预留 -->
          <div class="card-icon">
            <!-- 这里预留icon位置，用户可以自行填充 -->
            <div class="icon-placeholder">
              <img 
                v-if="item.iconUrl" 
                :src="item.iconUrl" 
                :alt="item.title" 
                class="icon-image"
              />
              <span v-else class="icon-text">{{ item.iconText }}</span>
            </div>
          </div>
          
          <!-- 卡片标题 -->
          <h3 class="card-title">{{ item.title }}</h3>
          
          <!-- 卡片描述 -->
          <p class="card-description">{{ item.description }}</p>
          
          <!-- 分隔线 -->
          <div class="card-divider"></div>
          
          <!-- 特性列表 -->
          <ul class="feature-list">
            <li 
              v-for="feature in item.features" 
              :key="feature"
              class="feature-item"
            >
              {{ feature }}
            </li>
          </ul>
          
          <!-- 加入按钮 -->
          <button class="join-button" @click="joinUs">
            加入我们
          </button>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import fenxIcon from '../assets/CooperationModel_icon/fenx.svg'
import chuangzuoIcon from '../assets/CooperationModel_icon/创作 .svg'
import dingzhiIcon from '../assets/CooperationModel_icon/定制化.svg'
import fanganIcon from '../assets/CooperationModel_icon/方案.svg'

// 跳转到飞书文档
const joinUs = () => {
  window.open('https://lcnezxfyaf18.feishu.cn/wiki/QK5Fwmkv1iHezLkNwnScNxkbnWf', '_blank')
}

// 合作模式数据
const cooperationItems = ref([
  {
    id: 1,
    iconText: '分销',
    iconUrl: fenxIcon, // 分销图标
    title: '分销合作',
    description: '推广1818.AI产品,共享收益',
    features: [
      '推荐客户购买1818.AI产品',
      '享受官方代理授权',
      '专属销售支持',
      '佣金返利政策'
    ]
  },
  {
    id: 2,
    iconText: '创作',
    iconUrl: chuangzuoIcon, // 创作图标
    title: '联合创作',
    description: '共同开发AIGC创新应用',
    features: [
      '联合生产AIGC内容',
      '短视频、文案、设计素材等',
      '智能体、工作流联合开发',
      '新技术联合运用'
    ]
  },
  {
    id: 3,
    iconText: '定制',
    iconUrl: dingzhiIcon, // 定制化图标
    title: '定制化交付',
    description: '为企业用户打造专属落地方案',
    features: [
      '快速推进AIGC产品需求',
      '联合开发专用方案',
      '需要有一定的AI项目交付经验',
      '重点行业:电商、教育'
    ]
  },
  {
    id: 4,
    iconText: '方案',
    iconUrl: fanganIcon, // 方案图标
    title: '整体解决方案',
    description: '交付+培训一体化服务',
    features: [
      '全流程项目跟踪',
      '专业交付团队',
      '定制化培训服务',
      '专属技术支持'
    ]
  }
])
</script>

<style scoped>
.cooperation-model {
  padding: 60px 0;
  background-color: #fff;
  overflow-x: hidden;
  /* CSS变量定义 */
  --primary-color: #333;
  --secondary-color: #666;
  --text-light: #999;
  --border-color: #f0f0f0;
  --hover-shadow: rgba(0, 0, 0, 0.12);
  --card-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cooperation-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* 标题样式 */
.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.title-text {
  font-size: 36px;
  font-weight: bold;
  color: #333;
  margin: 0 0 10px 0;
}

.title-bar {
  width: 60px;
  height: 3px;
  background-color: #333;
  margin: 0 auto 20px auto;
}

.title-description {
  font-size: 16px;
  color: #666;
  margin: 0 auto;
  line-height: 1.5;
  text-align: center;
  max-width: 600px;
}

/* 卡片容器 */
.cooperation-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
  width: 100%;
  box-sizing: border-box;
}

/* 卡片样式 */
.cooperation-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border: 1px solid #f0f0f0;
  height: auto;
  min-height: 520px;
  position: relative;
  overflow: hidden;
}

.cooperation-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: #e0e0e0;
}

.cooperation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #333 0%, #666 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cooperation-card:hover::before {
  opacity: 1;
}

/* Icon样式 */
.card-icon {
  text-align: center;
  margin-bottom: 24px;
}

.icon-placeholder {
  width: 72px;
  height: 72px;
  border: none;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.cooperation-card:hover .icon-placeholder {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.icon-text {
  font-size: 14px;
  color: #666;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.icon-image {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.cooperation-card:hover .icon-image {
  transform: scale(1.1);
}

/* 卡片标题 */
.card-title {
  font-family: Arial, sans-serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 32px;
  color: #333;
  margin: 0 0 10px 0;
  text-align: center;
}

/* 卡片描述 */
.card-description {
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 40px;
  letter-spacing: 0px;
  color: #666;
  text-align: center;
  margin: 0 0 20px 0;
}

/* 分隔线 */
.card-divider {
  height: 1px;
  background-color: #eee;
  margin: 20px 0;
}

/* 特性列表 */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
  flex-grow: 1;
}

.feature-item {
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 40px;
  letter-spacing: 0px;
  color: #555;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
  text-align: left;
}

.feature-item::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #333;
  font-weight: bold;
}

/* 加入按钮 */
.join-button {
  background: linear-gradient(135deg, #333 0%, #555 100%);
  border: none;
  color: #fff;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  margin-top: auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(51, 51, 51, 0.2);
}

.join-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.join-button:hover::before {
  left: 100%;
}

.join-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(51, 51, 51, 0.3);
}

.join-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(51, 51, 51, 0.2);
}

/* 响应式设计 */

/* 大屏幕 (1200px+) - 4列布局 */
@media (min-width: 1200px) {
  .cooperation-cards {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

/* 超大屏幕 (1400px+) - 4列布局，增加间距 */
@media (min-width: 1400px) {
  .cooperation-cards {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
  
  .cooperation-container {
    padding: 0 60px;
  }
}

/* 中等屏幕 (768px - 1199px) - 2列布局 */
@media (max-width: 1199px) and (min-width: 768px) {
  .cooperation-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 40px auto 0;
  }
  
  .cooperation-container {
    padding: 0 32px;
  }
  
  .cooperation-card {
    padding: 28px 24px;
    min-height: 480px;
  }
  
  .title-text {
    font-size: 32px;
  }
  
  .card-title {
    font-size: 24px;
    line-height: 28px;
  }
  
  .card-description {
    font-size: 16px;
    line-height: 24px;
  }
  
  .feature-item {
    font-size: 16px;
    line-height: 24px;
  }
}

/* 小屏幕 (481px - 767px) - 1列布局，卡片较宽 */
@media (max-width: 767px) and (min-width: 481px) {
  .cooperation-model {
    padding: 50px 0;
  }
  
  .cooperation-container {
    padding: 0 24px;
  }
  
  .cooperation-cards {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 500px;
    margin: 32px auto 0;
  }
  
  .cooperation-card {
    padding: 24px 20px;
    min-height: 400px;
    margin: 0;
  }
  
  .title-text {
    font-size: 28px;
  }
  
  .title-description {
    font-size: 15px;
  }
  
  .card-title {
    font-size: 22px;
    line-height: 26px;
  }
  
  .card-description {
    font-size: 15px;
    line-height: 22px;
  }
  
  .feature-item {
    font-size: 15px;
    line-height: 22px;
    margin-bottom: 6px;
  }
  
  .icon-placeholder {
    width: 64px;
    height: 64px;
  }
  
  .icon-image {
    width: 40px;
    height: 40px;
  }
  
  .join-button {
    padding: 12px 24px;
    font-size: 15px;
  }
}

/* 超小屏幕 (480px及以下) - 1列布局，紧凑设计 */
@media (max-width: 480px) {
  .cooperation-model {
    padding: 40px 0;
  }
  
  .cooperation-container {
    padding: 0 16px;
  }
  
  .cooperation-cards {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px auto 0;
  }
  
  .cooperation-card {
    padding: 20px 16px;
    min-height: 380px;
    border-radius: 12px;
  }
  
  .section-title {
    margin-bottom: 32px;
  }
  
  .title-text {
    font-size: 24px;
  }
  
  .title-description {
    font-size: 14px;
  }
  
  .card-icon {
    margin-bottom: 16px;
  }
  
  .icon-placeholder {
    width: 56px;
    height: 56px;
  }
  
  .icon-image {
    width: 36px;
    height: 36px;
  }
  
  .card-title {
    font-size: 20px;
    line-height: 24px;
    margin-bottom: 8px;
  }
  
  .card-description {
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 16px;
  }
  
  .card-divider {
    margin: 16px 0;
  }
  
  .feature-item {
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 4px;
  }
  
  .join-button {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .cooperation-card {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  .cooperation-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  .join-button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px; /* 确保触摸目标足够大 */
  }
  
  .join-button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
  
  /* 禁用悬停效果 */
  .cooperation-card:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  }
  
  .cooperation-card:hover::before {
    opacity: 0;
  }
  
  .cooperation-card:hover .icon-placeholder {
    transform: none;
  }
  
  .cooperation-card:hover .icon-image {
    transform: none;
  }
  
  .join-button:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(51, 51, 51, 0.2);
  }
  
  .join-button:hover::before {
    left: -100%;
  }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .icon-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}
</style> 