/* ==============================================
   撑伞人 — 区块 3-9 样式
   3-八宫格 / 4-动态流 / 5-同城活动
   6-时光信箱 / 7-故事墙 / 8-数据看板 / 9-隐私反诈
   ============================================== */

/* ----- Shared Section Spacing ----- */
.section { padding: 90px 24px; }
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: clamp(23px, 3vw, 32px);
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.section-header .sub {
  font-size: 14px;
  color: var(--gray);
  letter-spacing: 1px;
}
.section-cta {
  text-align: center;
  margin-top: 36px;
}
.section-cta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 28px;
  border: 1px solid rgba(57,100,150,0.25);
  border-radius: 24px;
  transition: all 320ms var(--ease);
}
.section-cta a:hover {
  background: rgba(57,100,150,0.06);
  border-color: var(--blue);
}

/* ==============================================
   区块 3 — 8 宫格功能入口
   ============================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 640px;
  margin: 0 auto;
}
.feat-card {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(57,100,150,0.06);
  text-decoration: none;
  color: var(--charcoal);
  overflow: hidden;
  cursor: pointer;
  transition: transform 400ms var(--ease),
              box-shadow 400ms var(--ease),
              border-color 400ms var(--ease);
  /* scroll reveal */
  opacity: 0;
  transform: translateY(30px);
}
.feat-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.feat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 32px rgba(57,100,150,0.08);
  border-color: rgba(230,147,64,0.18);
}
/* 流体光影扫过 */
.feat-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255,255,255,0.5) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 500ms;
  pointer-events: none;
}
.feat-card:hover::before { opacity: 1; }

/* 时光信箱 — 琥珀橘专属光晕 */
.feat-card.gem-card {
  border-color: rgba(230,147,64,0.20);
  box-shadow: 0 0 24px rgba(230,147,64,0.08);
}
.feat-card.gem-card:hover {
  border-color: rgba(230,147,64,0.40);
  box-shadow: 0 8px 36px rgba(230,147,64,0.16);
}

/* 好物推荐 — 灰度弱化 */
.feat-card.disabled {
  opacity: 0.50;
  pointer-events: none;
  filter: grayscale(30%);
}

.feat-icon { font-size: 26px; margin-bottom: 10px; }
.feat-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}
.feat-card .desc {
  font-size: 12px;
  color: var(--gray);
}
.feat-card .badge {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(57,100,150,0.08);
  color: var(--blue-light);
}
.feat-card .badge.coming {
  background: rgba(57,100,150,0.06);
  color: var(--gray);
}

/* ==============================================
   区块 4 — 社区动态信息流
   ============================================== */
.feed-section { background: rgba(57,100,150,0.03); }
.feed-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.feed-scroll::-webkit-scrollbar { height: 4px; }
.feed-scroll::-webkit-scrollbar-thumb {
  background: rgba(57,100,150,0.15);
  border-radius: 4px;
}
.feed-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(57,100,150,0.06);
  transition: transform 320ms var(--ease),
              box-shadow 320ms var(--ease);
}
.feed-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(57,100,150,0.08);
}
.feed-card .meta {
  font-size: 11px;
  color: var(--blue-light);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.feed-card .title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-card .excerpt {
  font-size: 13px;
  color: var(--gray);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.7;
}

/* ==============================================
   区块 5 — 同城溜娃活动专区
   ============================================== */
.activity-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.activity-scroll::-webkit-scrollbar { height: 4px; }
.activity-scroll::-webkit-scrollbar-thumb {
  background: rgba(57,100,150,0.15);
  border-radius: 4px;
}
.activity-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(57,100,150,0.08);
  transition: transform 320ms var(--ease),
              box-shadow 320ms var(--ease);
  /* 循环微光边框 */
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(230,147,64,0); }
  50%      { box-shadow: 0 0 0 2px rgba(230,147,64,0.12); }
}
.activity-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 32px rgba(57,100,150,0.10);
}
.activity-cover {
  height: 140px;
  background: linear-gradient(135deg, #396496 0%, #6297C9 50%, #8AB4D6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: rgba(255,255,255,0.30);
}
.activity-info {
  padding: 18px;
}
.activity-info h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}
.activity-info .detail {
  font-size: 12px;
  color: var(--gray);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.activity-info .spots {
  font-size: 12px;
  color: var(--amber);
  font-weight: 500;
  margin-top: 6px;
}

/* ==============================================
   区块 6 — 时光信箱专题（重点模块）
   ============================================== */
.timemail-section {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(57,100,150,0.06) 0%,
    rgba(57,100,150,0.02) 50%,
    var(--bg) 100%
  );
  overflow: hidden;
}
/* 装饰粒子 Canvas */
#timemailParticles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.timemail-section .section-header,
.timemail-features,
.timemail-section .section-cta {
  position: relative;
  z-index: 1;
}
.timemail-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 900px;
  margin: 0 auto 40px;
}
.timemail-item {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.50);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(57,100,150,0.06);
  transition: transform 320ms var(--ease);
}
.timemail-item:hover { transform: translateY(-4px); }
.timemail-item .tm-icon {
  font-size: 36px;
  margin-bottom: 14px;
}
.timemail-item h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--charcoal);
}
.timemail-item p {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.7;
}

/* ==============================================
   区块 7 — 微光互助故事墙
   ============================================== */
.story-section { background: var(--bg); }
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.story-card {
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(57,100,150,0.06);
  position: relative;
  transition: transform 320ms var(--ease),
              box-shadow 320ms var(--ease);
}
.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(57,100,150,0.06);
}
.story-card .story-text {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.8;
  margin-bottom: 12px;
  font-style: italic;
}
.story-card .story-author {
  font-size: 12px;
  color: var(--gray);
}
/* 热度圆环 */
.story-heat {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
}
.story-heat circle {
  fill: none;
  stroke: var(--amber);
  stroke-width: 2;
  stroke-dasharray: 100;
  stroke-dashoffset: 40;
  stroke-linecap: round;
  opacity: 0.5;
  animation: heatPulse 2.5s ease-in-out infinite;
}
@keyframes heatPulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.75; }
}

/* ==============================================
   区块 8 — 社区微光数据可视化
   ============================================== */
.stats-section {
  background: rgba(57,100,150,0.03);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.stat-card {
  text-align: center;
  padding: 32px 16px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.50);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(57,100,150,0.06);
}
.stat-number {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  transition: all 600ms var(--ease);
}
.stat-label {
  font-size: 13px;
  color: var(--gray);
  margin-top: 8px;
  letter-spacing: 1px;
}

/* ==============================================
   区块 9 — 隐私承诺 & 反诈安全公告
   ============================================== */
.trust-section { background: var(--bg); }
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}
.trust-card {
  padding: 36px 28px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(57,100,150,0.06);
}
.trust-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--charcoal);
}
.trust-card ul {
  list-style: none;
  font-size: 13px;
  color: var(--gray);
  line-height: 2;
}
.trust-card ul li::before {
  content: '✓ ';
  color: var(--blue-light);
  font-weight: 700;
}

/* ==============================================
   Responsive — 移动端
   ============================================== */
@media (max-width: 768px) {
  .section { padding: 56px 16px; }
  .section-header { margin-bottom: 32px; }

  /* 8 宫格 → 2 列 */
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .feat-card { padding: 20px 14px; }
  .feat-card h3 { font-size: 15px; }

  /* 动态流卡片变窄 */
  .feed-card { flex: 0 0 260px; }

  /* 活动卡片变窄 */
  .activity-card { flex: 0 0 240px; }

  /* 时光信箱 → 单列 */
  .timemail-features {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* 故事墙 → 单列 */
  .story-grid { grid-template-columns: 1fr; gap: 16px; }

  /* 数据看板 → 2 列 */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .stat-card { padding: 22px 12px; }

  /* 隐私反诈 → 单列 */
  .trust-grid { grid-template-columns: 1fr; gap: 20px; }
}
