/* ==========================================
   qingdaolocal.com v9.0 — Editorial Grid 风格升级
   基于 UI/UX Pro Max 的 Editorial Grid / Magazine 风格数据
   基于红瓦绿树 #C2410C 设计系统，叠加编辑排版特征：
   - 不对称网格 / 大图头条 / 分区色块 / 细线分隔 / 刊头式眉题
   设计令牌来自 ui-design-taste + Anthropic frontend-design 理念
   ========================================== */

:root {
  /* Editorial 增强令牌 */
  --ed-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --ed-rule: 1px solid #E2E8F0;
  --ed-rule-strong: 3px solid var(--primary);
  --ed-kicker-size: 0.6875rem;   /* 眉题 11px */
  --ed-kicker-spacing: 0.14em;   /* 字距 */
  --ed-headline-size: clamp(1.35rem, 2.4vw, 1.75rem);  /* 大标题 */
  --ed-dropcap-color: var(--primary);
  --color-scheme: light;
}

/* 系统级：尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================
   1. Section 眉题（刊头式）— Editorial Kicker
   ========================================== */
.ed-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--ed-kicker-size);
  font-weight: 700;
  letter-spacing: var(--ed-kicker-spacing);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.ed-kicker::before {
  content: '';
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.ed-kicker .ed-kicker-num {
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Section 标题改版：细线+粗线组合 */
.section-header.ed-style {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: var(--gap-lg);
  position: relative;
}
.section-header.ed-style .section-title {
  font-size: var(--ed-headline-size);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.section-header.ed-style::after {
  content: '';
  display: block;
  margin-top: var(--gap-sm);
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 72px, var(--border) 72px, var(--border) 100%);
}

/* ==========================================
   2. Hero 区 Editorial 化
   ========================================== */
.hero-section.ed-hero {
  grid-template-columns: 1.9fr 1fr;
  gap: var(--gap-lg);
}

/* 轮播：加刊头+大标题+日期线 */
.hero-banner.ed-hero-banner {
  border-radius: 0;
  border: none;
  position: relative;
  background: var(--primary-gradient);
}
.hero-banner.ed-hero-banner::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 25%, transparent 25%);
  opacity: 0.9;
}
.hero-banner-slide.ed-slide {
  padding: var(--gap-xl);
}
.hero-banner-slide.ed-slide::before {
  background: linear-gradient(0deg, rgba(2,6,23,0.78) 0%, rgba(2,6,23,0.25) 45%, transparent 75%);
}
.hero-banner-tag.ed-tag {
  border-radius: 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,152,0,0.35);
}
.hero-banner-title.ed-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-family: var(--ed-serif);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.hero-banner-meta.ed-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}
.hero-banner-meta.ed-meta::before {
  content: '';
  width: 28px; height: 1px;
  background: rgba(255,255,255,0.4);
}

/* 快捷入口：去卡片化，改editorial色块标签 */
.hero-grid.ed-grid {
  gap: 10px;
}
.hero-grid-item.ed-item {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 10px 8px;
  border-bottom: 1px solid var(--ed-rule);
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
}
.hero-grid-item.ed-item:hover {
  background: var(--primary-light);
  transform: none;
  box-shadow: none;
  border-bottom-color: var(--primary);
}
.hero-grid-icon.ed-icon {
  width: 34px; height: 34px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary);
}
.hero-grid-label.ed-label {
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

/* ==========================================
   3. 头条网格 — Editorial 大图头条
   ========================================== */
.news-grid.ed-headlines {
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
  margin-bottom: var(--gap-lg);
}
.news-grid-card.ed-card {
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--ed-rule);
  position: relative;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.25s;
}
.news-grid-card.ed-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(194,65,12,0.10);
  border-color: var(--primary);
}
.news-grid-card.ed-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
.news-grid-card.ed-card:first-child .news-grid-img {
  aspect-ratio: 16/10;
}
.news-grid-card.ed-card:first-child .news-grid-title {
  font-size: 1.15rem;
  font-weight: 700;
  -webkit-line-clamp: 2;
  font-family: var(--ed-serif);
}
.news-grid-img.ed-img {
  border-radius: 0;
}
.news-grid-body.ed-body {
  padding: 14px 16px;
}
.news-grid-tag.ed-tag {
  border-radius: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
}
.news-grid-tag.ed-tag.blue { background: #FEF3E7; color: #C2410C; }
.news-grid-tag.ed-tag.orange { background: #FEF9E7; color: #D97706; }
.news-grid-tag.ed-tag.green { background: #F0FDF9; color: #059669; }

/* ==========================================
   4. 资讯列表 — Editorial 时间线分隔
   ========================================== */
.news-card.ed-news-card {
  border-radius: 0;
  box-shadow: none;
  border: none;
  border-bottom: 1px solid var(--ed-rule);
  padding: var(--gap-md) 0;
  gap: var(--gap-md);
}
.news-card.ed-news-card:hover {
  transform: none;
  box-shadow: none;
  border-bottom-color: var(--primary);
  background: var(--primary-light);
  padding-left: var(--gap-md);
  padding-right: var(--gap-md);
}
.news-card.ed-news-card .news-card-img {
  border-radius: 0;
}
.news-card.ed-news-card .news-card-title {
  font-size: 15px;
  font-weight: 600;
}
.news-card.ed-news-card .news-card-title:hover { color: var(--primary); }
.news-card.ed-news-card .news-card-summary {
  color: var(--text-muted);
  font-size: 13px;
}

/* ==========================================
   5. 分类卡片 — 色块化（去卡片疲劳 AP10）
   ========================================== */
.category-grid.ed-cats {
  gap: var(--gap-md);
}
.category-card.ed-cat-card {
  border-radius: 0;
  box-shadow: none;
  border: none;
  padding: var(--gap-lg);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease-out;
}
.category-card.ed-cat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--cat-color, var(--primary));
  transition: width 0.25s ease-out;
}
.category-card.ed-cat-card:hover {
  transform: translateX(4px);
  box-shadow: none;
}
.category-card.ed-cat-card:hover::before {
  width: 8px;
}
.category-card.ed-cat-card .category-card-icon {
  color: var(--cat-color, var(--primary));
}
.category-card.ed-cat-card .category-card-title {
  font-size: 17px;
  font-weight: 700;
}
.category-card.ed-cat-card .category-card-desc {
  color: var(--text-muted);
}
.category-card.ed-cat-card .category-card-link {
  color: var(--cat-color, var(--primary));
  font-weight: 600;
}
/* 每个分类独立主色 */
.cat-jobs    { --cat-color: #C2410C; background: linear-gradient(135deg, #FEF3E7 0%, #FFFFFF 70%); }
.cat-housing { --cat-color: #0EA5E9; background: linear-gradient(135deg, #F0F9FF 0%, #FFFFFF 70%); }
.cat-edu     { --cat-color: #059669; background: linear-gradient(135deg, #F0FDF9 0%, #FFFFFF 70%); }
.cat-food    { --cat-color: #F97316; background: linear-gradient(135deg, #FFF7ED 0%, #FFFFFF 70%); }
.cat-service { --cat-color: #D97706; background: linear-gradient(135deg, #FEF9E7 0%, #FFFFFF 70%); }
.cat-market  { --cat-color: #E11D48; background: linear-gradient(135deg, #FFF1F2 0%, #FFFFFF 70%); }

/* ==========================================
   6. 侧栏 Editorial 化
   ========================================== */
.sidebar-card.ed-side {
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--ed-rule);
  padding: var(--gap-lg);
}
.sidebar-title.ed-side-title {
  border-bottom: none;
  padding-bottom: 0;
  position: relative;
  font-size: 16px;
  font-weight: 700;
}
.sidebar-title.ed-side-title::after {
  content: '';
  display: block;
  margin-top: 8px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 48px, var(--border) 48px, var(--border) 100%);
}
/* 热榜：a标签化+编号徽章 */
.hot-item.ed-hot {
  border-radius: 0;
  border-bottom: 1px dashed var(--border);
  padding: 9px 4px;
}
.hot-item.ed-hot:last-child { border-bottom: none; }
.hot-item.ed-hot:hover { background: var(--primary-light); }
.hot-rank.ed-rank {
  width: 26px; height: 26px;
  border-radius: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}
.hot-rank.ed-rank.top3 {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(255,152,0,0.3);
}
/* 工具入口：editorial小标签 */
.tools-entry-item.ed-tool {
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--ed-rule);
}
.tools-entry-item.ed-tool:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

/* 寻归公益：editorial 强调框 */
.welfare-card.ed-welfare {
  border-radius: 0;
  border: none;
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
}
.welfare-card.ed-welfare .welfare-btn {
  border-radius: 0;
  letter-spacing: 0.04em;
}

/* ==========================================
   7. 数据统计条 Editorial
   ========================================== */
.stat-card.ed-stat {
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--ed-rule);
  border-top: 3px solid var(--primary);
  padding: var(--gap-lg);
}
.stat-num.ed-num {
  font-size: 30px;
  font-weight: 800;
  font-family: var(--ed-serif);
  color: var(--primary);
}

/* ==========================================
   8. 页脚微调
   ========================================== */
.site-footer.ed-footer {
  border-top: 4px solid var(--primary);
}

/* ==========================================
   9. 无图新闻占位（替代📰 emoji）— AP06
   ========================================== */
.news-card-img.ed-placeholder,
.news-grid-img.ed-placeholder {
  background: linear-gradient(135deg, #FEF3E7 0%, #FDE8D6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ed-serif);
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}
.news-card-img.ed-placeholder::before {
  content: attr(data-initial);
  position: static;
}

/* ==========================================
   10. 响应式 Editorial 调整
   ========================================== */
@media (max-width: 1024px) {
  .news-grid.ed-headlines { grid-template-columns: 1fr 1fr; }
  .news-grid-card.ed-card:first-child { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 768px) {
  .news-grid.ed-headlines { grid-template-columns: 1fr; }
  .news-grid-card.ed-card:first-child { grid-column: auto; }
  .hero-banner-slide.ed-slide { padding: var(--gap-lg); }
  .hero-banner-title.ed-title { font-size: 1.25rem; }
  .category-card.ed-cat-card { padding: var(--gap-md); }
}
