<!-- SpeechStance.vue -->
<template>
  <div class="speech-stance-container">
    <div class="speech-stance-grid">
      <div v-for="(item, index) in speechStance" :key="index" class="speech-stance-card">
        <div class="speech-stance-avatar-wrapper">
          <img :src="item.avatar" alt="" class="speech-stance-avatar" />
        </div>
        <div class="speech-stance-text-content">
          <div style="display: flex;      width: 683px;">
            <h3 class="speech-stance-name">{{ item.name }}</h3>
            <p class="speech-stance-title">{{ item.title }}</p>
          </div>

          <p class="speech-stance-content">{{ item.content }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
// 导入数据
import speechStance from '../json/speechStance.json';
</script>

<style scoped>
.speech-stance-container {
  width: 1530px;
  /* max-width: 900px; */
  margin: 0 auto;
  margin: 5px 35px;
}

.speech-stance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 9px;
}

/* 响应式：小屏变一列 */
@media (max-width: 768px) {
  .speech-stance-grid {
    grid-template-columns: 1fr;
  }
}

.speech-stance-card {
  /* 容器 553 */
  width: 768px;
  height: 50px;
  display: flex;
}

.speech-stance-avatar-wrapper {
  flex-shrink: 0;
}

.speech-stance-avatar {
  /* 椭圆 141 */
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.speech-stance-text-content {
  width: 656px;
  flex: 1;
  margin-left: 13px;

}

.speech-stance-name {
  color: rgba(34, 41, 52, 1);
  margin: 0;
  font-family: Microsoft YaHei;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0px;
  text-align: left;
}

.speech-stance-title {
  color: rgba(95, 101, 108, 1);
  margin: 0;
  margin-left: 12px;
  font-family: Microsoft YaHei;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0px;
  text-align: left;
}

.speech-stance-content {
  color: rgba(95, 101, 108, 1);
  margin: 0;
  font-family: Microsoft YaHei;
  font-size: 16px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: 0px;
  text-align: left;
  white-space: nowrap;
  /* 禁止换行 */
  overflow: hidden;
  /* 隐藏溢出内容 */
  text-overflow: ellipsis;
  /* 溢出部分显示省略号 */
}
</style>