/* AI 与自动化集成页 */
body {
  background-color: #ffffff;
}

.ai section {
  padding: 90px 0;
}

.ai .section_title {
  text-align: center;
  margin-bottom: 50px;
}

.ai .section_title h2 {
  font-size: 34px;
  color: var(--dark-color);
  margin-bottom: 12px;
}

.ai .section_title p {
  color: #636e72;
  max-width: 760px;
  margin: 0 auto;
}

.ai .alt {
  background-color: var(--light-color);
}

.ai code {
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 0.92em;
  background: #eef1ff;
  color: #3b4fd8;
  padding: 1px 6px;
  border-radius: 4px;
}

/* 首屏 */
.ai .ai_hero {
  padding: 150px 0 90px;
  background: linear-gradient(135deg, #4a6bff 0%, #6c5ce7 100%);
  color: white;
}

.ai_hero_grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 50px;
  align-items: center;
}

.ai_hero_grid > * {
  min-width: 0;
}

.ai_badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 14px;
  margin-bottom: 18px;
}

.ai_hero h1 {
  font-size: 44px;
  line-height: 1.35;
  margin-bottom: 20px;
}

.ai_hero p {
  font-size: 18px;
  line-height: 1.8;
  opacity: 0.95;
  margin-bottom: 14px;
}

.ai_hero_points {
  list-style: none;
  margin: 22px 0 32px;
}

.ai_hero_points li {
  margin-bottom: 8px;
  font-size: 16px;
}

.ai_hero_points i {
  color: #7bed9f;
  margin-right: 8px;
}

.ai_hero_btns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.ai .btn-light {
  background-color: white;
  color: var(--primary-color);
}

.ai .btn-light:hover {
  background-color: #f1f3ff;
}

.ai .btn-ghost {
  background-color: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.ai .btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

/* 终端 */
.terminal {
  background: #1e2130;
  border-radius: 10px;
  box-shadow: 0 20px 45px rgba(20, 20, 60, 0.35);
  overflow: hidden;
  text-align: left;
  min-width: 0;
}

.terminal_bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: #2a2e40;
}

.terminal_bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.terminal_bar span:nth-child(2) {
  background: #febc2e;
}

.terminal_bar span:nth-child(3) {
  background: #28c840;
}

.terminal_bar em {
  margin-left: 10px;
  font-style: normal;
  color: #9aa0b8;
  font-size: 13px;
}

.terminal pre {
  margin: 0;
  padding: 18px 20px;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  color: #d5d9eb;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.ai_hero .terminal pre {
  min-height: 440px;
}

.terminal .t-cmd {
  color: #ffffff;
}

.terminal .t-cmd::before {
  content: "$ ";
  color: #7bed9f;
}

.terminal .t-dim {
  color: #8189a8;
}

.terminal .t-ok {
  color: #7bed9f;
}

.terminal .t-skip {
  color: #74b9ff;
}

.terminal .t-warn {
  color: #ffeaa7;
}

.terminal .t-key {
  color: #a29bfe;
}

.terminal .t-str {
  color: #fab1a0;
}

/* 三种用法 */
.ai_tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.ai_tab {
  border: 1px solid #d6dcff;
  background: white;
  color: var(--dark-color);
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.ai_tab i {
  margin-right: 6px;
  color: var(--primary-color);
}

.ai_tab.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.ai_tab.active i {
  color: white;
}

.ai_panel {
  display: none;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.ai_panel > * {
  min-width: 0;
}

.ai_panel.active {
  display: grid;
}

.ai_panel h3 {
  font-size: 24px;
  margin-bottom: 14px;
}

.ai_panel p {
  color: #4d5656;
  margin-bottom: 12px;
}

.ai_panel ul {
  padding-left: 20px;
  color: #4d5656;
}

.ai_panel li {
  margin-bottom: 8px;
}

.chat {
  background: white;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  padding: 18px;
  margin-bottom: 18px;
}

.chat_msg {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.chat_msg:last-child {
  margin-bottom: 0;
}

.chat_avatar {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef1ff;
  color: var(--primary-color);
}

.chat_msg.agent .chat_avatar {
  background: #e8f8f3;
  color: var(--success-color);
}

.chat_text {
  background: #f5f6fa;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
}

/* 卡片 */
.ai_cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.ai_card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 28px;
  transition: var(--transition);
}

.ai_card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.ai_card_icon {
  font-size: 30px;
  color: var(--primary-color);
  margin-bottom: 14px;
}

.ai_card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.ai_card p {
  color: #4d5656;
  font-size: 15px;
}

/* 流水线 */
.pipeline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin-bottom: 40px;
}

.pipeline span {
  position: relative;
  padding: 8px 14px;
  background: white;
  border: 1px solid #d6dcff;
  border-radius: 6px;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 14px;
}

.pipeline span.opt {
  border-style: dashed;
  color: #636e72;
}

.pipeline span:not(:last-child)::after {
  content: "\203A";
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0a8d8;
}

.pipeline_legend {
  text-align: center;
  color: #636e72;
  font-size: 14px;
  margin: -24px 0 40px;
}

.pipeline_legend i {
  display: inline-block;
  width: 26px;
  height: 14px;
  border: 1px dashed #a0a8d8;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 4px;
}

/* 功能全景 */
.matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.matrix_group {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 26px;
}

.matrix_group h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.matrix_group h3 i {
  color: var(--primary-color);
  margin-right: 8px;
}

.matrix_group > p {
  color: #636e72;
  font-size: 14px;
  margin-bottom: 14px;
}

.matrix_group ul {
  list-style: none;
}

.matrix_group li {
  padding: 7px 0;
  border-top: 1px solid #eef0f6;
  font-size: 14.5px;
  color: #4d5656;
}

.matrix_group li code {
  margin-right: 6px;
}

.matrix_note {
  text-align: center;
  color: #636e72;
  font-size: 14px;
  margin-top: 28px;
}

/* 新功能专题 */
.ai_new_grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.ai_new_grid > * {
  min-width: 0;
}

.ai_new_grid h3 {
  font-size: 22px;
  margin-bottom: 14px;
}

.ai_new_grid ul {
  padding-left: 20px;
  color: #4d5656;
}

.ai_new_grid li {
  margin-bottom: 10px;
}

.notice {
  border-left: 4px solid var(--success-color);
  background: #e8f8f3;
  padding: 12px 16px;
  border-radius: 4px;
  margin-top: 18px;
  color: #00664f;
}

.notice i {
  margin-right: 4px;
}

/* 常见问题：左右两列各自堆叠，不用等高 grid，展开一项不会把旁边那列拉出空白 */
.faq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.faq_col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.faq details {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--dark-color);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "\f078"; /* fa-chevron-down */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  flex-shrink: 0;
  font-size: 12px;
  color: #a0a8b8;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

.faq details > div {
  padding: 0 20px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #4d5656;
}

.faq details > div p {
  margin-bottom: 6px;
}

.faq details > div p:last-child {
  margin-bottom: 0;
}

.faq details > div a {
  color: var(--primary-color);
  font-weight: 600;
}

/* 底部号召 */
.ai .ai_cta {
  text-align: center;
  background: linear-gradient(135deg, #4a6bff 0%, #6c5ce7 100%);
  color: white;
  padding: 70px 0;
}

.ai_cta h2 {
  font-size: 32px;
  margin-bottom: 14px;
}

.ai_cta p {
  opacity: 0.95;
  margin-bottom: 28px;
}

.ai_cta .ai_hero_btns {
  justify-content: center;
}

/* 响应式 */
@media (max-width: 1100px) {
  .ai_hero_grid,
  .ai_panel.active,
  .ai_new_grid {
    grid-template-columns: 1fr;
  }

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

  .faq {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ai .container {
    max-width: 100%;
    padding: 0 16px;
  }

  .ai section {
    padding: 60px 0;
  }

  .ai .ai_hero {
    padding: 110px 0 60px;
  }

  .ai_hero h1 {
    font-size: 30px;
  }

  .ai .section_title h2 {
    font-size: 26px;
  }

  .ai_cards,
  .matrix {
    grid-template-columns: 1fr;
  }

  .ai_hero .terminal pre {
    min-height: 0;
    font-size: 12px;
  }
}
