/* 首页改版样式：定位首屏 + 纯标题文章列表 + 工具箱 + 社群 CTA */
/* 仅作用于首页，通过 layouts/index.html 单独引入 */

/* ========== 首屏 Banner：新图标主视觉 + 清晰文案层级 ========== */
.home-hero {
  padding: 3.1rem 0 2.8rem;
  margin-bottom: 0;
  color: #173b30;
  background:
    radial-gradient(720px 380px at 88% 18%, rgba(245, 196, 81, 0.2), transparent 66%),
    radial-gradient(640px 420px at 6% 92%, rgba(95, 191, 154, 0.18), transparent 64%),
    linear-gradient(118deg, #fcfdf8 0%, #f2f9f2 55%, #fdfaf1 100%);
}
.home-hero .home-hero-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.8fr);
  gap: clamp(1.75rem, 4vw, 3.8rem);
  align-items: center;
}
.home-hero-main, .home-hero-visual { min-width: 0; }
.home-hero-main { display: flex; flex-direction: column; align-items: flex-start; }

.home-hero-badge {
  background: #e7f4ec !important;
  border: 1px solid #cfe9d8;
  color: #146b4c !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.95rem !important;
  border-radius: 999px !important;
  margin-bottom: 1.1rem;
}
.home-hero-title {
  font-size: clamp(1.95rem, 3.15vw, 2.8rem);
  line-height: 1.26;
  margin: 0 0 0.9rem;
  color: #143528;
  font-weight: 800;
  letter-spacing: -0.01em;
  word-break: break-word;
}
.hero-title-break { display: none; }
.home-hero-sub {
  font-size: 1rem;
  line-height: 1.78;
  margin: 0 0 1.25rem;
  color: #4a5f55;
  max-width: 42rem;
  word-break: break-word;
}

.home-trust {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6rem !important;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
}
.home-trust li {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.87rem;
  line-height: 1.5;
  color: #3c5147;
}
.home-trust i { color: #16a34a; font-size: 0.92rem; flex: none; }

.home-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.home-cta .btn {
  font-size: 0.9rem;
  padding: 0.75rem 1.3rem;
  border-radius: 9px;
  font-weight: 600;
  line-height: 1.4;
}
.home-cta-primary { background: #159a68; border: 1px solid #159a68; color: #fff; box-shadow: 0 8px 20px rgba(21, 154, 104, 0.24); }
.home-cta-primary:hover { background: #0f8357; border-color: #0f8357; color: #fff; }
.home-cta-secondary { background: #fff; border: 1px solid #cfe3d6; color: #146b4c; }
.home-cta-secondary:hover { background: #eef7f1; color: #0f8357; }

/* 搜索与热门词：次级信息，弱化但保留 */
.home-extras { width: 100%; max-width: 44rem; padding-top: 1.2rem; border-top: 1px solid #dceadf; }
.home-search { margin-top: 0; }
.home-search .search-form {
  max-width: 100%;
  background: #fff;
  border: 1px solid #cfe3d6;
  box-shadow: 0 2px 10px rgba(23, 59, 48, 0.04);
}
.home-search .search-input { background: transparent; color: #173b30; padding: 0.72rem 1rem; font-size: 0.9rem; }
.home-search .search-input::placeholder { color: #8aa094; }
.home-search .search-btn { background: #159a68; color: #fff; padding: 0.72rem 1rem; }
.home-search .search-btn:hover { background: #0f8357; }
.home-tags { gap: 0.5rem; margin-top: 0.8rem; }
.home-tags .tags-label { font-size: 0.76rem; color: #72867b; }
.home-tags .tag { font-size: 0.75rem; padding: 0.24rem 0.65rem; background: rgba(255,255,255,0.72); border: 1px solid #d8e9dd; color: #2c6b50; }
.home-tags .tag:hover { background: #e7f4ec; }

/* 主视觉：新图标 + 柔和光晕容器 */
.home-hero-visual {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 330px;
  aspect-ratio: 1 / 1;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.95) 0%, rgba(233, 245, 235, 0.85) 55%, rgba(255, 250, 231, 0.9) 100%);
  box-shadow: 0 22px 52px rgba(23, 59, 48, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}
.home-hero-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 82%;
  height: 82%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 72%);
}
.home-hero-image {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 88%;
  max-width: none !important;
  height: auto;
  transform: translate(-50%, -50%);
  display: block;
}
.home-hero-visual-caption {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #146b4c;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #d7e9dc;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}
#join-community-bottom, #ai-efficiency { scroll-margin-top: 90px; }

.home-section { padding: 2.4rem 0; background: #fff; border-bottom: 1px solid #eef1f5; }
.home-section.home-toolbox { background: #f7f9fc; }
.home-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.2rem; }
.home-section-title { font-size: 1.45rem; font-weight: 700; color: #1f2937; margin: 0; }
.home-section-desc { margin: 0.35rem 0 0; font-size: 0.9rem; color: #667085; }
.home-section-more { color: #2c5aa0; font-size: 0.9rem; text-decoration: none; white-space: nowrap; }
.home-section-more:hover { text-decoration: underline; }
.home-empty { color: #667085; font-size: 0.9rem; }

/* 纯标题列表：无图、无摘要、无日期、无阅读数 */
.home-title-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem 1.8rem; }
.home-title-grid img { display: none !important; }
.home-title-grid li { position: relative; padding-left: 0.9rem; min-width: 0; }
.home-title-grid li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 5px; height: 5px; border-radius: 50%; background: #2c5aa0; }
.home-title-grid a { display: block; color: #243044; font-size: 0.94rem; line-height: 1.5; text-decoration: none; }
.home-title-grid a:hover { color: #2c5aa0; text-decoration: underline; }

.home-tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 0.8rem; }
.home-tool-card { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 1rem; background: #fff; border: 1px solid #e5eaf1; border-radius: 10px; text-decoration: none; color: inherit; transition: border-color 0.2s, transform 0.2s; }
.home-tool-card:hover { border-color: #2c5aa0; transform: translateY(-2px); }
.home-tool-name { font-size: 0.95rem; font-weight: 700; color: #1f2937; }
.home-tool-role { font-size: 0.82rem; color: #667085; }
.home-tool-kind { align-self: flex-start; font-size: 0.72rem; padding: 0.12rem 0.5rem; border-radius: 999px; background: #e8f0fb; color: #2c5aa0; }
.home-tool-kind.is-diy { background: #fff4e5; color: #b45309; }
.home-tool-kind.is-download { background: #eaf7ee; color: #237a3d; }
.home-diy-note { margin-top: 1rem; padding: 0.8rem 1rem; background: #eef4ff; border-left: 3px solid #2c5aa0; border-radius: 6px; font-size: 0.88rem; line-height: 1.7; color: #344054; }
.home-inline-cta { margin: 0.9rem 0 0; font-size: 0.9rem; color: #475467; }
.home-inline-cta a { color: #2c5aa0; font-weight: 600; text-decoration: none; }

.home-bottom-cta { background: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%); color: #fff; padding: 2.2rem 0; }
.home-bottom-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.home-bottom-cta h2 { font-size: 1.5rem; margin: 0 0 0.4rem; }
.home-bottom-cta p { margin: 0 0 1rem; color: rgba(255,255,255,0.88); font-size: 0.95rem; }
.home-bottom-cta .home-qr { display: flex; align-items: center; gap: 0.75rem; max-width: 100%; min-width: 0; background: #fff; color: #243044; padding: 0.7rem; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.home-bottom-cta .home-qr img { width: 84px; height: 84px; object-fit: contain; flex: none; }
.home-bottom-cta .home-qr-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; word-break: break-word; }
.home-bottom-cta .home-qr-text strong { font-size: 0.92rem; color: #1f2937; }
.home-bottom-cta .home-qr-text span { font-size: 0.78rem; color: #667085; }
.home-bottom-cta .home-qr-large img { width: 110px !important; height: 110px; }

/* ========== 隔离补丁：覆盖主题基类（hero-text/badge/content 等）对首屏的干扰 ========== */
/* 主题 main.css 中 .hero-text{gap:1.5rem}、移动端 text-align:center/order/badge 放大/
   .popular-tags nowrap 等会串到本首屏，这里用更高特异性逐项归位 */
.home-hero.home-hero { padding: 3.1rem 0 2.8rem !important; }
.home-hero .home-hero-layout { text-align: left; }
.home-hero .home-hero-main { gap: 0 !important; align-items: flex-start; text-align: left; }
.home-hero .home-hero-badge {
  align-self: flex-start !important;
  width: auto !important;
  display: inline-block !important;
  font-size: 0.82rem !important;
  white-space: normal;
  text-align: left;
}
.home-hero .home-hero-title { text-align: left; }
.home-hero .home-hero-sub { text-align: left; }
.home-hero .home-trust { align-items: flex-start !important; justify-content: flex-start !important; text-align: left; }
.home-hero .home-trust li { text-align: left; }
.home-hero .home-cta { justify-content: flex-start; }
.home-hero .home-tags { flex-wrap: wrap !important; overflow-x: visible !important; justify-content: flex-start !important; }
.home-hero .home-search { justify-content: flex-start; margin-top: 0 !important; margin-bottom: 0 !important; }
.home-hero .tags-label { font-size: 0.76rem !important; margin: 0 !important; white-space: normal !important; }
.home-hero .tag { font-size: 0.75rem !important; margin: 0 !important; }
.home-hero .home-extras { text-align: left; }

@media (min-width: 992px) {
  .home-title-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .home-hero.home-hero { padding: 2rem 0 2rem !important; }
  .home-hero .home-hero-layout { grid-template-columns: 1fr; gap: 1.5rem; text-align: left; }
  .home-hero .home-hero-main { order: 1; text-align: left; }
  .home-hero .home-hero-visual { order: 2; max-width: 210px; border-radius: 20px; }
  .hero-title-break { display: block; }
  .home-hero .home-hero-title { font-size: 1.6rem; line-height: 1.32; }
  .home-hero .home-hero-badge { font-size: 0.78rem !important; padding: 0.35rem 0.8rem !important; align-self: flex-start !important; }
  .home-hero .home-hero-sub { font-size: 0.92rem; line-height: 1.7; margin-bottom: 1rem; }
  .home-hero .home-trust { gap: 0.35rem 1rem; margin-bottom: 1.2rem !important; }
  .home-hero .home-trust li { font-size: 0.8rem; }
  .home-hero .home-cta { gap: 0.55rem; margin-bottom: 1.2rem; }
  .home-hero .home-cta .btn { font-size: 0.82rem; padding: 0.62rem 0.85rem; }
  .home-hero .home-extras { padding-top: 0.9rem; }
  .home-hero .tag { font-size: 0.72rem !important; padding: 0.22rem 0.55rem !important; }
  .home-hero-visual-caption { bottom: 0.7rem; font-size: 0.68rem; padding: 0.28rem 0.7rem; }
  .home-section-head { flex-direction: column; align-items: flex-start; }
  .home-title-grid { grid-template-columns: 1fr; gap: 0.4rem; }
  .home-bottom-cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .home-hero .home-hero-title { font-size: 1.5rem; }
  .home-hero .home-trust li { font-size: 0.78rem; }
  .home-hero .home-cta .btn { font-size: 0.8rem; padding: 0.6rem 0.75rem; }
  .home-hero .home-hero-visual { max-width: 190px; }
}
