/* ===========================================================
   NEXAGAIN 首页移动端自适应补丁 v1  (2026-10-23)
   只作用于首页 hero，不影响其它页面；桌面端（>=768px）零改动
   加载位置：所有 CSS 之后（</head> 前最后一行）
   =========================================================== */

@media (max-width: 767px) {
  /* 1. Hero 不再强制整屏，压缩上下留白（原 py-32 = 上下各 128px） */
  main > section.relative.min-h-screen {
    min-height: 0 !important;
  }
  main > section.relative.min-h-screen > div.relative {
    padding-top: 76px !important;
    padding-bottom: 40px !important;
  }

  /* 2. 主标题层级：第一行 25px，第二行 19px */
  .hero-title {
    font-size: 25px !important;
    line-height: 1.32 !important;
    letter-spacing: 0.01em;
    margin-bottom: 16px !important;
  }
  .hero-title > .block {
    font-size: 19px !important;
    line-height: 1.4 !important;
    margin-top: 6px !important;
  }

  /* 3. 副标题（原 text-lg = 18px） */
  main > section.relative.min-h-screen p.text-lg {
    font-size: 14.5px !important;
    line-height: 1.75 !important;
    margin-bottom: 22px !important;
  }

  /* 4. 三个服务标签：三等分一行，不再 2+1 折行 */
  main > section.relative.min-h-screen .flex.flex-wrap.gap-6 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-top: 26px !important;
  }
  main > section.relative.min-h-screen .flex.flex-wrap.gap-6 > div {
    margin-left: 0 !important;   /* 抵消 space-x-3 的左边距 */
    padding: 10px 8px !important;
    gap: 6px !important;
    border-radius: 10px !important;
    min-width: 0 !important;
  }
  main > section.relative.min-h-screen .flex.flex-wrap.gap-6 > div > svg {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
  }
  main > section.relative.min-h-screen .flex.flex-wrap.gap-6 > div > div {
    min-width: 0 !important;
  }
  main > section.relative.min-h-screen .flex.flex-wrap.gap-6 > div p:first-child {
    font-size: 12px !important;
    line-height: 1.25 !important;
    white-space: nowrap;
  }
  main > section.relative.min-h-screen .flex.flex-wrap.gap-6 > div p:last-child {
    font-size: 10px !important;
    line-height: 1.25 !important;
    white-space: nowrap;
  }

  /* 5. CTA 按钮 */
  main > section.relative.min-h-screen button {
    padding: 12px 22px !important;
    font-size: 15px !important;
  }

  /* 6. 隐藏首屏底部的滚动提示（压缩高度后会压住标签） */
  main > section.relative.min-h-screen > .absolute.bottom-8 {
    display: none !important;
  }
}

/* 超窄屏（<=360px，如 iPhone SE）进一步收紧 */
@media (max-width: 360px) {
  .hero-title { font-size: 22px !important; }
  .hero-title > .block { font-size: 17px !important; }
  main > section.relative.min-h-screen .flex.flex-wrap.gap-6 > div { padding: 8px 6px !important; }
  main > section.relative.min-h-screen .flex.flex-wrap.gap-6 > div p:first-child { font-size: 11px !important; }
  main > section.relative.min-h-screen .flex.flex-wrap.gap-6 > div p:last-child { font-size: 9.5px !important; }
}

/* ===========================================================
   「我们的成就」：删掉 98% 后只剩 3 项，移动端 2 列布局下
   第三项会单占左半边、右侧留白。让它跨两列居中。
   选择器限定「移动端 2 列 + 桌面 3 列」的那一个容器（全站唯一）。
   =========================================================== */
@media (max-width: 1023px) {
  .grid.grid-cols-2[class*="lg:grid-cols-3"] > .text-center:last-child:nth-child(3) {
    grid-column: 1 / -1;
  }
}
