* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: #1f2933;
  background: #000; /* 首屏采用全屏背景图，其他区块用白色容器 */
  line-height: 1.6;
}

a {
  color: #1677ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 透明导航叠加在首页背景之上 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent);
}

/* 向下滚动后的白色导航样式 */
.site-header.scrolled {
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 35, 52, 0.06);
}

.logo span {
  font-size: 28px; /* 再稍微放大一点，让品牌更突出 */
  font-weight: 700;
  color: #ffffff;
}

.site-header.scrolled .logo span {
  color: #1677ff;
}

.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  padding: 4px;
  margin-left: auto;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: #f9fafb;
  transition: background 0.2s;
}

.site-header.scrolled .nav-toggle span {
  background: #4b5563;
}

.main-nav a {
  margin-left: 36px; /* 导航间距加宽一些，视觉更舒展 */
  font-size: 17px; /* 字号保持不变，避免过于挤占空间 */
  color: #e5e7eb;
}

.main-nav a:hover {
  color: #ffffff;
}

.site-header.scrolled .main-nav a {
  color: #4b5563;
}

.site-header.scrolled .main-nav a:hover {
  color: #1677ff;
}

section {
  padding: 56px 48px;
}

section h2 {
  font-size: 28px;
  margin-bottom: 24px;
}

.section-header p {
  font-size: 16px;
  color: #4b5563;
}

/* 让“旗下产品”和说明文案在该区块内居中对齐 */
.products-section .section-header {
  text-align: center;
  margin-bottom: 32px;
}

.hero {
  min-height: 100vh; /* 全屏首屏 */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 120px 48px 80px; /* 预留给 fixed 导航 */
  background: center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

.hero-left {
  max-width: 520px;
  color: #ffffff;
  margin-left: 0; /* 向左收回一些，贴近内容区域起始 */
}

/* 灰色蒙层，保证文字在任何背景下都清晰 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* 让内容在蒙层之上 */
.hero-left,
.hero-arrow {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 43px; /* 原 36px 放大约 20% */
  margin-bottom: 18px;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 22px; /* 原 18px 放大约 20% */
  color: #e5e7eb;
  margin-bottom: 18px;
}

.hero-bullets {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 28px;
  color: #f9fafb;
  font-size: 17px; /* 原 14px 放大约 20% ，顺带提升可读性 */
}

.hero-qrcode img {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 35, 52, 0.12);
  object-fit: cover;
}

.hero-qrcode p {
  margin-top: 8px;
  font-size: 13px;
  color: #e5e7eb;
}

.hero-right {
  flex: 1;
  min-height: 260px;
  margin-left: 40px;
  border-radius: 24px;
  /* 右侧可以继续做玻璃效果占位，也可留空 */
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.26), transparent);
}

/* 跑马灯左右箭头 */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.55);
}

.hero-arrow-left {
  left: 24px;
}

.hero-arrow-right {
  right: 24px;
}

.products-section {
  background: #ffffff;
  padding-top: 86px;
  padding-bottom: 86px; /* 在上次基础上再提升，整体约高 20% */
}

.product-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px; /* 卡片间距加宽一些 */
}

.product-card {
  background: #ffffff; /* 改成白色卡片 */
  border-radius: 16px;
  padding: 32px 18px 28px; /* 在原基础上上下高度再提高约 30% */
  box-shadow: 0 8px 20px rgba(15, 35, 52, 0.08); /* 稍明显一点的阴影 */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* 让二维码靠下 */
}

.product-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.product-slogan {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
}

.product-features {
  list-style: disc;
  margin-left: 18px;
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 14px;
}

.product-qrcode {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-qrcode img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 35, 52, 0.12);
  object-fit: cover;
}

.product-qrcode p {
  font-size: 12px;
  color: #6b7280;
}

.news-section {
  position: relative;
  padding: 72px 48px; /* 整体高度提升约 30% */
  background: url("images/xwbj.png") center/cover no-repeat;
}

.news-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.news-inner {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 24px 20px;
  box-shadow: 0 10px 24px rgba(15, 35, 52, 0.12);
}

.news-layout {
  display: flex;
  align-items: stretch;
  gap: 24px;
}

.news-image {
  flex: 0 0 460px;
  border-radius: 12px;
  background: url("images/msxf.png") center/cover no-repeat;
}

.news-content {
  flex: 1;
}

.education-section,
.rural-section,
.safety-section {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}

.service-section {
  background: url("images/khfw.png") center/cover no-repeat;
  border-top: 1px solid #e5e7eb;
}

.rural-section {
  padding: 80px 48px;
  position: relative;
}

.rural-section .section-header h2,
.rural-section .section-header p {
  line-height: 1.8; /* 乡村振兴标题与副标题行间距更大一些 */
}

.rural-more {
  margin-top: 24px;
}

.rural-overview h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.rural-more-button {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid #1677ff;
  color: #1677ff;
  font-size: 14px;
  background: transparent;
}

.rural-more-button:hover {
  background: rgba(22, 119, 255, 0.08);
}

.news-list,
.education-list,
#rural-news-list {
  list-style: none;
  margin-top: 8px;
}

.news-item,
.education-item,
.rural-news-item {
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.news-item-title,
.education-item-title,
.rural-news-item-title {
  font-size: 14px;
  color: #111827;
}

.news-item-meta,
.education-item-meta {
  font-size: 12px;
  color: #9ca3af;
}

.news-more {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.rural-content {
  display: flex;
  align-items: stretch;
  gap: 32px;
  max-width: 100%;
}

.rural-left {
  flex: 1;
  box-sizing: border-box;
  padding-left: 24px;
  padding-right: 24px;
}

.rural-carousel {
  flex: 1;
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.rural-carousel img {
  width: 100%;
  display: block;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 35, 52, 0.18);
  object-fit: cover;
}

.rural-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.rural-carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.65);
}

.rural-carousel-arrow-left {
  left: 12px;
}

.rural-carousel-arrow-right {
  right: 12px;
}

.safety-article h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.safety-article p {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 12px;
}

.safety-more {
  display: none;
  font-size: 14px;
  color: #4b5563;
}

.safety-more ol {
  margin-left: 20px;
}

.link-button {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 13px;
  cursor: pointer;
  color: #111827;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.service-card {
  background: #f9fafb;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 4px 12px rgba(15, 35, 52, 0.04);
}

.service-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.service-card p {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 10px;
}

.site-footer {
  padding: 24px 48px 32px;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}

.ai-assistant-floating {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ai-assistant-button {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 35, 52, 0.3);
  overflow: hidden;
  background-image: url("images/xiaoma.png");
  background-size: cover;
  background-position: center;
}

.ai-assistant-button span {
  display: none;
}

.ai-assistant-label {
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.86);
  color: #f9fafb;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.45);
}

.ai-assistant-dialog {
  position: fixed;
  right: 24px;
  bottom: 112px;
  z-index: 99999;
  width: min(480px, calc(100vw - 40px));
  max-height: min(640px, calc(100vh - 160px));
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(15, 35, 52, 0.45);
  display: none;
  flex-direction: column;
}

.ai-header {
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-header > div {
  min-width: 0;
  padding-right: 12px;
}

.ai-header h3 {
  font-size: 15px;
}

.ai-header p {
  font-size: 12px;
  color: #6b7280;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ai-close {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.ai-body {
  padding: 10px 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ai-message {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  max-width: 72%;
  align-self: flex-start;
  flex: 0 0 auto;
  display: inline-flex;
  width: auto;
  text-align: left;
  justify-content: flex-start;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ai-message-bot {
  background: #eff6ff;
  color: #111827;
  align-self: flex-start;
}

.ai-message-user {
  background: #1677ff;
  color: #ffffff;
  align-self: flex-end;
}

.ai-suggestions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  gap: 8px;
  margin-bottom: 6px;
}

.ai-suggestion {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 11px;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  white-space: normal;
}

.ai-input-area {
  padding: 8px 10px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.ai-input-area textarea {
  flex: 1;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  padding: 8px 12px;
  line-height: 1.4;
  resize: none;
  overflow-y: auto;
  min-height: 34px;
  max-height: 120px;
  font-family: inherit;
}

.ai-input-area button {
  border-radius: 999px;
  border: none;
  background: #1677ff;
  color: #ffffff;
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
}

.about-body {
  background: #ffffff;
}

.about-section-home {
  background: url("images/gywm.png") center/cover no-repeat;
  border-top: 1px solid #e5e7eb;
  padding: 64px 48px 56px;
  position: relative;
  overflow: hidden;
}

.about-section-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88); /* 让背景图存在但不影响阅读 */
}

.about-section-home > * {
  position: relative;
  z-index: 1;
}

.about-header-center {
  text-align: center;
  margin-bottom: 28px;
}

.about-text {
  max-width: none;
  margin: 0 32px; /* 左右与乡村振兴文案保持一致的 32px 内边距 */
  font-size: 16px;
  color: #4b5563;
  line-height: 1.8;
}

.about-text p + p {
  margin-top: 14px;
}

.about-hero {
  position: relative;
  height: 260px;
  background: url("assets/anyihua_homepage_hero.png") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.48), rgba(15, 23, 42, 0.2));
}

.about-hero-content {
  position: relative;
  text-align: center;
  color: #ffffff;
}

.about-hero-content h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.about-main {
  padding: 40px 48px 56px;
}

.about-section {
  margin-bottom: 32px;
}

.about-section h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

.about-content p {
  font-size: 14px;
  color: #4b5563;
}

.timeline {
  border-left: 2px solid #e5e7eb;
  margin-top: 8px;
  padding-left: 16px;
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.timeline-year {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-content {
  font-size: 13px;
  color: #4b5563;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1677ff;
}

@media (max-width: 960px) {
  .site-header {
    padding: 10px 16px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    display: none;
    flex-direction: column;
    padding: 8px 16px 12px;
    box-shadow: 0 2px 8px rgba(15, 35, 52, 0.12);
  }

  .site-header.nav-open .main-nav {
    display: flex;
  }

  .main-nav a {
    margin: 0;
    padding: 10px 0;
    font-size: 15px;
    color: #111827;
  }

  .hero {
    flex-direction: column;
    padding: 96px 16px 56px;
  }

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

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-bullets {
    font-size: 14px;
  }

  .hero-right {
    margin-left: 0;
    margin-top: 24px;
    width: 100%;
  }

  .product-list,
  .service-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  section,
  .site-header,
  .site-footer,
  .about-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .news-layout {
    flex-direction: column;
  }

  .news-image {
    flex: 0 0 auto;
    height: 180px;
  }

  .rural-content {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-assistant-dialog {
    right: 8px;
    left: 8px;
    bottom: 96px;
    width: auto;
    max-height: 70vh;
  }

  .ai-assistant-floating {
    right: 16px;
    bottom: 16px;
  }
}

@media (min-width: 961px) {
  .hero {
    background-attachment: fixed;
  }
}

