/* ============================================
   Horizon Grid — 地平线网格
   宽屏横向体验 × 低饱和度 × 精致细线 × 沉浸式浏览
   ============================================ */

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ===== CSS Variables ===== */
:root {
  --bg-primary: #f7f6f3;
  --bg-secondary: #efeee9;
  --bg-card: #ffffff;
  --bg-hero: #faf9f6;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #8a8a8a;
  --text-light: #b0b0b0;
  --accent: #2c5f7c;
  --accent-light: #3a7ca5;
  --accent-subtle: rgba(44, 95, 124, 0.06);
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-body: 'Inter', 'Georgia', -apple-system, BlinkMacSystemFont, 'Segoe UI', serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1440px;
  --section-gap: 64px;
}

/* ===== Body ===== */
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Navigation ===== */
.hg-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(247, 246, 243, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.hg-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 32px;
}
.hg-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.hg-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}
.hg-logo-text {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.hg-nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.hg-nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.3px;
  transition: color 0.2s;
  position: relative;
}
.hg-nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s;
}
.hg-nav-links a:hover { color: var(--accent); }
.hg-nav-links a:hover::after { width: 100%; }
.hg-nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hg-search-btn {
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}
.hg-search-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hg-mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 8px;
}
.hg-mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text-secondary);
  transition: all 0.3s;
}

/* ===== Search Overlay ===== */
.hg-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(247, 246, 243, 0.9);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.hg-search-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.hg-search-overlay-inner {
  width: 100%;
  max-width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.hg-search-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}
.hg-search-close:hover { color: var(--text-primary); }
.hg-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.hg-search-box svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.hg-search-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: var(--font-body);
  background: transparent;
  color: var(--text-primary);
}
.hg-search-input::placeholder { color: var(--text-light); }
.hg-search-results { display: flex; flex-direction: column; gap: 4px; }
.hg-search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
.hg-search-result-item:hover { background: var(--accent-subtle); }
.hg-search-result-thumb {
  width: 56px;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
}
.hg-search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hg-search-result-info { flex: 1; min-width: 0; }
.hg-search-result-cat {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}
.hg-search-result-title {
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hg-search-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== Hero Section — 今日头条 ===== */
.hg-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 40px 0;
}
.hg-hero-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hg-hero-label::before,
.hg-hero-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-strong);
}
.hg-hero-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s, transform 0.3s;
}
.hg-hero-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.hg-hero-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}
.hg-hero-card-img {
  position: relative;
  overflow: hidden;
}
.hg-hero-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}
.hg-hero-card:hover .hg-hero-card-img img {
  transform: scale(1.03);
}
.hg-hero-card-body {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hg-hero-card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 20px;
  width: fit-content;
}
.hg-hero-card-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.hg-hero-card-excerpt {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hg-hero-card-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hg-hero-card-meta svg {
  width: 14px;
  height: 14px;
}

/* ===== Section — 带标题的板块 ===== */
.hg-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}
.hg-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-top: var(--section-gap);
}
.hg-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 16px;
}
.hg-section-label::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
}
.hg-section-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-top: 4px;
}
.hg-section-more {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}
.hg-section-more:hover { gap: 10px; }
.hg-section-more svg {
  width: 14px;
  height: 14px;
}

/* ===== Horizontal Scroll Band — 横向展示带 ===== */
.hg-band {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.hg-band::-webkit-scrollbar { height: 4px; }
.hg-band::-webkit-scrollbar-track { background: transparent; }
.hg-band::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 2px;
}

/* ===== News Card — 新闻卡片 ===== */
.hg-card {
  flex-shrink: 0;
  width: 360px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.hg-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.hg-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-secondary);
}
.hg-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.hg-card:hover .hg-card-img img {
  transform: scale(1.04);
}
.hg-card-body {
  padding: 20px 24px 24px;
}
.hg-card-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.hg-card-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hg-card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Compact Card — 紧凑卡片 ===== */
.hg-card-compact {
  flex-shrink: 0;
  width: 280px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.hg-card-compact:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.hg-card-compact .hg-card-img {
  aspect-ratio: 16/10;
}
.hg-card-compact .hg-card-body {
  padding: 16px 20px 20px;
}
.hg-card-compact .hg-card-title {
  font-size: 15px;
}

/* ===== Grid Section — 网格板块 ===== */
.hg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.hg-grid .hg-card {
  width: auto;
}

/* ===== Divider — 细线分隔 ===== */
.hg-divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}
.hg-divider-line {
  height: 1px;
  background: var(--border-strong);
}

/* ===== Ad Slot ===== */
.hg-ad-slot {
  text-align: center;
  padding: 16px;
  display: flex;
  justify-content: center;
}

/* ===== Footer ===== */
.hg-footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.7);
  margin-top: var(--section-gap);
}
.hg-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 40px 32px;
}
.hg-footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.hg-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.hg-footer-brand-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
}
.hg-footer-brand-text {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}
.hg-footer-desc {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
}
.hg-footer-heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 16px;
}
.hg-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hg-footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.hg-footer-links a:hover { color: #fff; }
.hg-footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
}

/* ===== Detail Page ===== */
.hg-detail {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 40px 80px;
}
.hg-detail-back {
  margin-bottom: 24px;
}
.hg-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: gap 0.2s;
}
.hg-back-link:hover { gap: 12px; }
.hg-back-link svg {
  width: 16px;
  height: 16px;
}
.hg-detail-hero-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}
.hg-detail-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 16px;
}
.hg-detail-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 24px;
}
.hg-detail-body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-secondary);
}
.hg-detail-body p {
  margin-bottom: 18px;
}
.hg-detail-body strong {
  color: var(--text-primary);
  font-weight: 600;
}
.hg-detail-body h2,
.hg-detail-body h3 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-top: 32px;
  margin-bottom: 12px;
  font-weight: 600;
}
.hg-detail-body h2 { font-size: 22px; }
.hg-detail-body h3 { font-size: 18px; }
.hg-detail-body ul,
.hg-detail-body ol {
  margin: 12px 0 12px 24px;
}
.hg-detail-body li {
  margin-bottom: 6px;
}
.hg-detail-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hg-detail-media {
  margin: 32px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hg-detail-media img {
  width: 100%;
  display: block;
}

/* ===== Related Section ===== */
.hg-related {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border-strong);
}
.hg-related-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.2px;
}
.hg-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.hg-related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s, transform 0.3s;
}
.hg-related-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.hg-related-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-secondary);
}
.hg-related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.hg-related-card:hover .hg-related-card-img img {
  transform: scale(1.04);
}
.hg-related-card-title {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Static Page ===== */
.hg-static {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 40px 80px;
}
.hg-static-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 32px;
}
.hg-static-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}
.hg-static-content p { margin-bottom: 14px; }
.hg-static-content strong { color: var(--text-primary); font-weight: 600; }
.hg-static-content ul, .hg-static-content ol { margin: 10px 0 10px 24px; }
.hg-static-content li { margin-bottom: 6px; }
.hg-static-content a { color: var(--accent); text-decoration: underline; }
.hg-static-content h2, .hg-static-content h3, .hg-static-content h4 {
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 10px;
  font-weight: 600;
}
.hg-static-content h2 { font-size: 20px; }
.hg-static-content h3 { font-size: 17px; }

/* ===== Reveal Animation ===== */
.hg-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.hg-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hg-hero-card-inner { grid-template-columns: 1fr; min-height: auto; }
  .hg-hero-card-img { height: 280px; }
  .hg-hero-card-body { padding: 32px; }
  .hg-hero-card-title { font-size: 26px; }
  .hg-grid { grid-template-columns: repeat(2, 1fr); }
  .hg-related-grid { grid-template-columns: repeat(3, 1fr); }
  .hg-footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hg-nav-inner { padding: 0 20px; }
  .hg-nav-links { display: none; }
  .hg-mobile-menu-btn { display: flex; }
  .hg-hero { padding: 24px 20px 0; }
  .hg-section { padding: 0 20px; }
  .hg-hero-card-body { padding: 24px; }
  .hg-hero-card-title { font-size: 22px; }
  .hg-hero-card-excerpt { font-size: 14px; }
  .hg-card { width: 300px; }
  .hg-card-compact { width: 240px; }
  .hg-grid { grid-template-columns: 1fr; }
  .hg-grid .hg-card { width: auto; }
  .hg-section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hg-detail { padding: 20px 20px 60px; }
  .hg-detail-title { font-size: 26px; }
  .hg-related-grid { grid-template-columns: repeat(2, 1fr); }
  .hg-footer-top { grid-template-columns: 1fr; gap: 32px; }
  .hg-footer-inner { padding: 40px 20px 24px; }
  .hg-static { padding: 20px 20px 60px; }
  .hg-static-content { padding: 24px; }
}

@media (max-width: 480px) {
  .hg-hero-card-title { font-size: 20px; }
  .hg-card { width: 260px; }
  .hg-card-compact { width: 200px; }
  .hg-related-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hg-detail-title { font-size: 22px; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

::selection { background: rgba(44, 95, 124, 0.15); color: var(--text-primary); }
