/* 民俗文化游 - 杂志博客风格样式表 */
/* 查询关键词: 民俗文化游 www.gujidaolan.cn 提供非遗旅游和民俗体验的专业网站 涵盖传统工艺 节日庆典和民俗村落的深度游攻略 */

/* ===== CSS 变量定义 ===== */
:root {
  --accent-color: #c9a227;
  --accent-dark: #a88420;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f6f3;
  --bg-dark: #2c2416;
  --border-color: #e5e2dc;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

/* ===== 基础重置 ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ===== 布局容器 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 头部样式 ===== */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.logo span {
  color: var(--accent-color);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-dark);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -24px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-color);
}

/* ===== 面包屑导航 ===== */
.breadcrumb {
  background: var(--bg-secondary);
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent-dark);
}

.breadcrumb .sep {
  margin: 0 8px;
}

/* ===== 主内容区 ===== */
.main {
  padding: 40px 0;
}

/* ===== 首页 - 头条区域 ===== */
.hero-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

.headline-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 400px;
}

.headline-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.headline-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: #fff;
}

.category-tag {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.headline-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
}

.headline-content p {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.6;
}

/* 侧边栏小部件 */
.sidebar-widgets {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
}

.widget-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

.widget-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.widget-list li:last-child {
  border-bottom: none;
}

.widget-list a {
  color: var(--text-secondary);
  display: block;
}

.widget-list a:hover {
  color: var(--accent-dark);
}

.widget-list .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== 文章网格 ===== */
.article-section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

.view-more {
  font-size: 0.85rem;
  color: var(--accent-dark);
}

.view-more:hover {
  text-decoration: underline;
}

/* 特色文章网格 */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
}

.featured-large {
  grid-row: span 2;
}

.article-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.featured-large img {
  height: 280px;
}

.article-card-content {
  padding: 16px;
}

.article-card .category {
  font-size: 0.75rem;
  color: var(--accent-dark);
  font-weight: 500;
  margin-bottom: 8px;
}

.article-card h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.featured-large h3 {
  font-size: 1.25rem;
}

.article-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== 三栏推荐区 ===== */
.three-col-section {
  background: var(--bg-secondary);
  padding: 48px 0;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}

.three-col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.col-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.col-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.col-list li:last-child {
  border-bottom: none;
}

.col-list a {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.col-list .num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--accent-color);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.col-list .num.gray {
  background: var(--border-color);
  color: var(--text-secondary);
}

.col-list .info {
  flex: 1;
}

.col-list .info h4 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
}

.col-list .info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== 分类页样式 ===== */
.category-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.category-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 280px;
}

.category-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.category-banner-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: #fff;
}

.category-banner-content h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.category-banner-content p {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* 分类文章网格 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.category-grid .lead-story {
  grid-column: span 1;
  grid-row: span 2;
}

.category-grid .lead-story img {
  height: 240px;
}

.category-grid .article-card img {
  height: 150px;
}

/* ===== 文章详情页 ===== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
}

.article-header {
  margin-bottom: 24px;
}

.article-header .category-tag {
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.article-meta .author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-meta .author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.article-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.article-cover img {
  width: 100%;
  height: auto;
}

.article-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 20px;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 32px 0 16px;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 24px 0 12px;
}

.article-content img {
  border-radius: var(--radius-md);
  margin: 24px 0;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content ul li {
  list-style: disc;
  margin-bottom: 8px;
}

.article-content ol li {
  list-style: decimal;
  margin-bottom: 8px;
}

/* 文章侧边栏 */
.article-sidebar .widget {
  margin-bottom: 24px;
}

.author-card {
  text-align: center;
  padding: 24px;
}

.author-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  object-fit: cover;
}

.author-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.author-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.author-card .bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.tag:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

/* ===== 404页面 ===== */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-content {
  max-width: 500px;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.8;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.error-desc {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent-color);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition);
}

.btn:hover {
  background: var(--accent-dark);
}

/* ===== 页脚 ===== */
.footer {
  background: var(--bg-dark);
  color: #fff;
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

.footer-col ul a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .hero-section,
  .category-hero,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-widgets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .three-col-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-grid .lead-story {
    grid-column: span 2;
    grid-row: span 1;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 0;
  }

  .nav {
    width: 100%;
    justify-content: center;
    margin-top: 12px;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .nav a.active::after {
    bottom: -8px;
  }

  .headline-content {
    padding: 24px;
  }

  .headline-content h2 {
    font-size: 1.25rem;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-large {
    grid-row: span 1;
  }

  .sidebar-widgets {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-grid .lead-story {
    grid-column: span 1;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .error-code {
    font-size: 5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .headline-card {
    min-height: 300px;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .three-col-section {
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
}
