<template>
  <div class="sampling-process">
    <!-- 第一部分：实地走访调查 -->
    <div class="process-section">
      <div class="section-header">
        <div class="section-number">1</div>
        <h2>实地走访调查农业投入品使用情况</h2>
      </div>
      
      <div class="section-content">
        <div class="info-card">
          <div class="card-icon">🚜</div>
          <div class="card-content">
            <p>
              对项目实施区域进行实地走访，调查作物种植面积，并统计化肥（氮、磷、钾、复合肥）、有机肥（商品有机肥、农家肥）及农药等农资的年均施用量。
            </p>
            <p>
              <span class="highlight">后期方案：</span>利用无人机光谱识别技术调查项目区内的种植结构，
              再根据具体种植结构详细调查施肥习惯（如水稻田、蔬菜地等）。
            </p>
          </div>
        </div>
        
        <div class="image-container">
          <el-image :src="image1" alt="农业投入品使用情况" class="sampling-image"></el-image>
          <p class="image-caption">图1 农业投入品使用情况</p>
        </div>
      </div>
    </div>
    
    <!-- 第二部分：样品采集 -->
    <div class="process-section">
      <div class="section-header">
        <div class="section-number">2</div>
        <h2>市面流通的农业投入品样品采集</h2>
      </div>
      
      <div class="section-content">
        <div class="collection-info">
          <div class="collection-card">
            <div class="collection-icon">📦</div>
            <div class="collection-text">
              <h3>样品数量</h3>
              <p>合计采集市面上流通的及相关行业生产的各种农业投入品共137份</p>
            </div>
          </div>
          
          <div class="collection-card">
            <div class="collection-icon">📋</div>
            <div class="collection-text">
              <h3>样品种类</h3>
              <p>包含但不限于：磷肥、钾肥、复合肥、叶面肥、常用农药、农家肥、地膜等</p>
            </div>
          </div>
        </div>
        
        <div class="image-gallery">
          <div class="gallery-card">
            <el-image :src="image2" alt="农业化肥采集" class="sampling-image"></el-image>
            <p class="image-caption">图2-1 农业化肥采集</p>
          </div>
          <div class="gallery-card">
            <el-image :src="image3" alt="农药采集" class="sampling-image"></el-image>
            <p class="image-caption">图2-2 农药采集</p>
          </div>
          <div class="gallery-card">
            <el-image :src="image4" alt="农膜采集" class="sampling-image"></el-image>
            <p class="image-caption">图2-3 农膜采集</p>
          </div>
          <div class="gallery-card">
            <el-image :src="image5" alt="有机肥采集" class="sampling-image"></el-image>
            <p class="image-caption">图2-4 有机肥采集</p>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 第三部分：重金属含量测试（保持原图比例） -->
    <div class="process-section">
      <div class="section-header">
        <div class="section-number">3</div>
        <h2>​农业投入品重金属含量的测定与评估​</h2>
      </div>
      
      <div class="section-content">
        <div class="testing-info">
          <div class="info-card">
            <div class="card-icon">🔬</div>
            <div class="card-content">
              <p>
                对不同种类的农业投入品进行测试，从而分析比较其重金属含量差异。
              </p>
            </div>
          </div>
          
          <!-- 保持原图比例的测试结果 -->
          <div class="testing-gallery">
            <div class="results-card">
              <div class="results-header">
                <h3>各农业投入品重金属含量测试报告样例</h3>
              </div>
              <div class="image-container-proportional">
                <el-image 
                  :src="image6" 
                  alt="各农业投入品测试结果" 
                  class="results-image-proportional">
                </el-image>
              </div>
              <p class="image-caption">图3-1 各农业投入品重金属含量测试报告样例</p>
            </div>
            
            <div class="results-card">
              <div class="results-header">
                <h3>各类农业投入品中镉元素含量分布情况</h3>
              </div>
              <div class="image-container-proportional">
                <el-image 
                  :src="image7" 
                  alt="农业投入品镉含量" 
                  class="results-image-proportional">
                </el-image>
              </div>
              <p class="image-caption">图3-2 农业投入品镉含量</p>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 第四部分：计算方法 -->
    <div class="process-section">
      <div class="section-header">
        <div class="section-number">4</div>
        <h2>农业投入品重金属输入通量计算方法</h2>
      </div>
      
      <div class="section-content">
        <div class="info-card">
          <div class="card-icon">🧮</div>
          <div class="card-content">
            <p>
              通过农业投入品的施用数据与重金属检测结果，建立重金属输入通量计算公式，
              精确计算不同农业投入品在农田中所引入的重金属污染通量。
            </p>
          </div>
        </div>
        
        <div class="formula-section">
          <div class="formula-card">
            <div class="formula-image">
              <el-image :src="image8" alt="农业投入品用量计算方法" class="sampling-image"></el-image>
            </div>
            <p class="image-caption">图4-1 农业投入品用量计算方法</p>
            <div class="formula-text">
              <p>式中：</p>
              <p>N<sub>i</sub>为农业投入品i的单位面积年施用量，单位：kg/ha/a；</p>
              <p>M<sub>i</sub>为农业投入品i年施用总量，单位：kg/a；</p>
              <p>A<sub>x</sub>为项目区域全年农作物总播种面积，单位：ha；</p>
            </div>
          </div>
          
          <div class="formula-card">
            <div class="formula-image">
              <el-image :src="image9" alt="农业投入品重金属输入通量计算方法" class="sampling-image"></el-image>
            </div>
                          <p class="image-caption">图4-2 农业投入品重金属输入通量计算方法</p>

            <div class="formula-text">
              <p>式中：</p>
              <p>F<sub>f</sub>为单位面积农业投入品途径的重金属输入通量，g/ha/a；</p>
              <p>N<sub>i</sub>为农业投入品i的单位面积年施用量，kg/ha/a；</p>
              <p>C<sub>ij</sub>为重金属j在农业投入品i中的含量，mg/kg。</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      image1: '/农业投入品使用情况.png',
      image2: '/农业化肥采集(1).png',
      image3: '/农药采集(1).png',
      image4: '/农膜采集(1).png',
      image5: '/有机肥采集(1).png',
      image6: '/各农业投入品测试结果.png',
      image7: '/农业投入品镉含量.png',
      image8: '/农业投入品用量计算方法.png',
      image9: '/农业投入品重金属输入通量计算方法.png'
    };
  }
};
</script>

<style scoped>
.sampling-process {
  padding: 30px;
  background: linear-gradient(135deg, rgba(245, 252, 240, 0.8) 0%, rgba(235, 248, 255, 0.8) 100%);
  position: relative;
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sampling-process::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1518834107812-67b0b7c58434?q=80&w=2070&auto=format&fit=crop') center/cover;
  opacity: 0.08;
  z-index: -1;
  filter: blur(2px);
}

.process-section {
  margin-bottom: 50px;
  padding: 30px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 25px rgba(0, 60, 120, 0.08);
  transition: all 0.4s ease;
  overflow: hidden;
  position: relative;
}

.process-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 60, 120, 0.15);
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(58, 160, 207, 0.25);
}

.section-number {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #4a9ef7, #3a9fd3);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  margin-right: 20px;
  box-shadow: 0 5px 12px rgba(74, 158, 247, 0.25);
}

h2 {
  color: #1a365d;
  font-size: 1.9rem;
  margin: 0;
  font-weight: 650;
  letter-spacing: 0.5px;
}

.section-content {
  padding: 0 10px;
}

.info-card {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(235, 245, 255, 0.6);
  border-radius: 15px;
  border-left: 4px solid #3a9fd3;
}

.card-icon {
  font-size: 2.5rem;
  margin-right: 25px;
  color: #3a9fd3;
}

.card-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #2d3748;
  margin: 0 0 15px 0;
}

.highlight {
  font-weight: 600;
  color: #1a6fb3;
}

/* 样品采集部分样式 */
.collection-info {
  display: flex;
  gap: 25px;
  margin-bottom: 30px;
}

.collection-card {
  flex: 1;
  display: flex;
  padding: 20px;
  background: rgba(245, 252, 255, 0.7);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-top: 3px solid #3a9fd3;
}

.collection-icon {
  font-size: 2.2rem;
  margin-right: 20px;
  color: #3a9fd3;
}

.collection-text h3 {
  color: #1a365d;
  font-size: 1.3rem;
  margin-top: 0;
  margin-bottom: 12px;
}

.collection-text p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #2d3748;
  margin: 0;
}

/* 图片画廊样式 */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.gallery-card {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  background: white;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}


.gallery-card:hover .sampling-image {
  transform: scale(1.05);
}

.image-caption {
  text-align: center;
  font-size: 15px;
  color: #2d3748;
  padding: 15px;
  font-weight: 500;
  background: rgba(248, 250, 252, 0.8);
  margin: 0;
  border-top: 1px dashed #cbd5e0;
}

/* 第三部分：重金属含量测试（保持原图比例） */
.testing-info {
  display: flex;
  flex-direction: column;
}

.testing-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 20px;
}

.results-card {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transition: all 0.4s ease;
  background: white;
  padding: 0;
}

.results-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.results-header {
  padding: 20px;
  background: linear-gradient(90deg, #f0f9ff, #e6f7ff);
  border-bottom: 1px solid #cce5ff;
}

.results-header h3 {
  color: #1a365d;
  font-size: 1.5rem;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.results-header p {
  font-size: 1.1rem;
  color: #4a5568;
  margin: 0;
  line-height: 1.6;
}

/* 保持原图比例的图片容器 */
.image-container-proportional {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: white;
}

.results-image-proportional {
  max-width: 100%;
  max-height: 350px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform 0.4s ease;
}

.results-card:hover .results-image-proportional {
  transform: scale(1.03);
}

.formula-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 改为两列 */
  gap: 30px;
}

/* 公式图片容器 */
.formula-image {
  padding: 15px;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 250px; /* 设置固定高度，使两个图片容器高度一致 */
}

.formula-image .sampling-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* 等比例缩放 */
}

/* 响应式调整：在小于900px时改为单列 */
@media (max-width: 900px) {
  .formula-section {
    grid-template-columns: 1fr;
  }
}

.formula-card {
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  border-top: 3px solid #5cb85c;
}



.formula-text {
  padding: 20px;
}

.formula-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #2d3748;
  margin: 0 0 10px 0;
}

.formula-text sub {
  font-size: 0.8em;
  vertical-align: sub;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .image-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .formula-section {
    grid-template-columns: 1fr;
  }
  
  .testing-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .collection-info {
    flex-direction: column;
  }
  
  .process-section {
    padding: 25px;
  }
  
  .section-number {
    width: 45px;
    height: 45px;
    font-size: 1.6rem;
  }
  
  h2 {
    font-size: 1.7rem;
  }
}

@media (max-width: 768px) {
  .image-gallery {
    grid-template-columns: 1fr;
  }
  
  .sampling-process {
    padding: 20px;
  }
  
  .info-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .card-icon {
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .collection-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .results-image-proportional {
    max-height: 300px;
  }
}

@media (max-width: 480px) {
  .sampling-process {
    padding: 15px;
  }
  
  .process-section {
    padding: 20px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .section-number {
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  .sampling-image {
    height: 200px;
  }
  
  .results-image-proportional {
    max-height: 250px;
  }
}
</style>