<template>
  <div id="Solutions">
    <!-- Banner -->
    <div class="banner container-fuild text-center">
      <h1>解决方案</h1>
      <p>无人机行业应用解决方案</p>
    </div>

    <!-- 解决方案列表 -->
    <div class="l-container l-section">
      <div class="section-header">
        <div class="section-tag">
          <span class="tag-dot"></span>
          <span>SOLUTIONS</span>
        </div>
        <h2 class="section-title">我们的解决方案</h2>
        <p class="section-subtitle">Professional Solutions</p>
      </div>

      <div class="solutions-grid">
        <router-link
          v-for="(item, index) in solutionsList"
          :key="index"
          :to="item.path"
          class="solution-card"
        >
          <div class="solution-image">
            <img :src="item.image" :alt="item.title">
            <div class="solution-overlay">
              <i class="solution-icon glyphicon glyphicon-link"></i>
            </div>
          </div>
          <div class="solution-content">
            <h3>{{ item.title }}</h3>
            <p>{{ item.description }}</p>
          </div>
        </router-link>
      </div>
    </div>
  </div>
</template>

<script>
import {WOW} from 'wowjs';

export default {
  name: 'Solutions',
  data() {
    return {
      solutionsList: [
        {
          path: '/solutions/surveying',
          title: '基础测绘',
          description: '快速进行大范围二维、三维建模，生成地形数据，降低外业成本',
          image: require('@/assets/img/service1.jpg')
        },
        {
          path: '/solutions/building',
          title: '建筑工程',
          description: '房屋建筑业（房建）和土木工程建筑业（基建）领域应用',
          image: require('@/assets/img/service2.jpg')
        },
        {
          path: '/solutions/safety',
          title: '安全生产',
          description: '提供可见光或红外热成像数据，全天候自动化安全巡检',
          image: require('@/assets/img/service3.jpg')
        },
        {
          path: '/solutions/emergency-rescue',
          title: '应急救援',
          description: '救援队伍使用无人机通过空中视角对灾情进行评估、研判',
          image: require('@/assets/img/service4.jpg')
        }
      ]
    };
  },
  mounted() {
    var wow = new WOW();
    wow.init();
  }
};
</script>

<style scoped>
/* Banner */
.banner {
  color: #fff;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image: url("../../assets/img/banner_4.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll;
  background-position: center center;
}

.banner h1 {
  font-size: 36px;
  font-weight: var(--font-weight-bold);
  margin: 0 0 10px;
  letter-spacing: 2px;
}

.banner p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  letter-spacing: 1px;
}

/* 解决方案网格 */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.solution-card {
  display: block;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-bounce);
  text-decoration: none;
  color: inherit;
}

.solution-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg), var(--glow-blue);
}

.solution-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.solution-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.solution-card:hover .solution-image img {
  transform: scale(1.1);
}

.solution-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 115, 190, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.solution-card:hover .solution-overlay {
  opacity: 1;
}

.solution-icon {
  color: #fff;
  font-size: 32px;
}

.solution-content {
  padding: 25px;
}

.solution-content h3 {
  font-size: 20px;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin: 0 0 12px;
}

.solution-content p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-tertiary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 响应式 */
@media screen and (max-width: 991px) {
  .banner {
    height: 150px;
  }

  .banner h1 {
    font-size: 28px;
  }

  .solutions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 767px) {
  .banner {
    height: 120px;
  }

  .banner h1 {
    font-size: 24px;
  }

  .banner p {
    font-size: 14px;
  }

  .solutions-grid {
    grid-template-columns: 1fr;
  }
}
</style>
