/* =========================================================
   聚淼成型科技 - 技术问答 Section 样式（三列卡片版）
   文件：qa-section.css
   ========================================================= */

.section.qa {
  width: 100%;
  background: #f9fbff;
  padding: 60px 20px;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.section.qa .section-title {
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  color: #0b6cff;
  margin-bottom: 50px;
}

/* ===== 容器布局：三列网格 ===== */
.qa-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== 单个问答卡片 ===== */
.qa-item {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e3e8f0;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}
.qa-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

/* ===== 问题标题区 ===== */
.qa-question {
  padding: 22px 24px;
  background: #f2f6ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.qa-question h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #111;
  flex: 1;
}
.qa-toggle {
  font-size: 22px;
  color: #0b6cff;
  font-weight: 600;
  transition: transform 0.3s ease;
}
.qa-item.active .qa-toggle {
  transform: rotate(45deg);
}

/* ===== 答案内容区 ===== */
.qa-answer {
  display: none;
  padding: 20px 24px;
  color: #444;
  background: #fff;
  border-top: 1px solid #e3e8f0;
  line-height: 1.8;
  font-size: 15px;
}
.qa-item.active .qa-answer {
  display: block;
}

/* ===== 按钮样式 ===== */
.qa-more {
  text-align: center;
  margin-top: 50px;
}
.qa-more .btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 16px;
  background: #0b6cff;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
}
.qa-more .btn:hover {
  background: #0048a8;
}

/* ===== 移动端自适应 ===== */
@media (max-width: 1024px) {
  .qa-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .qa-container {
    grid-template-columns: 1fr;
  }
  .qa-question h3 {
    font-size: 16px;
  }
  .qa-answer {
    font-size: 14px;
  }
}


/* =========================================================
   修复移动端右侧溢出问题 + 居中对齐优化
   ========================================================= */

/* 全局容器强制不超出屏幕 */
.section.qa {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* 防止横向滚动条 */
  box-sizing: border-box;
}

/* Grid容器微调，防止gap在移动端累积偏移 */
.qa-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0; /* 🔧 避免双层padding */
}

/* 移动端样式 */
@media (max-width: 1024px) {
  .qa-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .qa-container {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 10px; /* ✅ 给手机两侧一点呼吸间距 */
  }
  .qa-item {
    margin: 0; /* 🔧 避免总宽度溢出 */
  }
}

/* 关键：让每个问答项独立对齐 */
.qa-container {
  align-items: start; /* ✅ 每个卡片独立高度，不会整行被拉高 */
}

