@charset "utf-8";
/* ============================================
   cgilo.com - 博客风格模板
   风格: Q(极简主义2.0) + 高级灰配色
   ============================================ */

:root {
  --primary: #3498db;
  --primary-dark: #2980b9;
  --accent: #e74c3c;
  --accent2: #f39c12;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --bg-warm: #fef9f6;
  --text-dark: #2c3e50;
  --text-muted: #7f8c8d;
  --text-light: #95a5a6;
  --border: #e8e8e8;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-light);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-dark);
  line-height: 1.8;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul, li { list-style: none; }
img { max-width: 100%; height: auto; }

/* ============================================
   头部
   ============================================ */
.header { background: var(--bg-white); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.top_header { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: center; }
.top_header a#logo { display: flex; flex-direction: column; align-items: center; } .top_header a#logo img { height: 100px; width: 100px; object-fit: cover; border-radius: 8px; } .top_header a#logo .site-name { display: block; text-align: center; color: #1a1a1a; font-size: 1.25rem; font-weight: 700; margin-top: 8px; }

.nav-warp { background: var(--bg-white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: center; gap: 4px; padding: 10px 24px; }
.nav-item { padding: 8px 20px; border-radius: 50px; font-size: 14px; font-weight: 500; color: var(--text-muted); transition: var(--transition); }
.nav-item:hover, .nav-item.active { color: #fff; background: var(--primary); }

/* ============================================
   博客大图头部
   ============================================ */
.blog-hero { position: relative; height: 380px; overflow: hidden; background: var(--primary-dark); }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(41,128,185,0.5) 0%, rgba(41,128,185,0.8) 100%); }
.hero-content { position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); text-align: center; width: 90%; max-width: 700px; z-index: 2; }
.blog-badge { display: inline-block; padding: 6px 16px; background: var(--accent); color: #fff; border-radius: 50px; font-size: 12px; margin-bottom: 16px; }
.hero-content h1 { font-size: 36px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.hero-content p { font-size: 15px; color: rgba(255,255,255,0.9); }

/* ============================================
   主布局
   ============================================ */
.blog-main { max-width: 1200px; margin: 0 auto; padding: 50px 24px; }
.blog-container { display: flex; gap: 40px; }
.blog-content { flex: 1; min-width: 0; }
.blog-sidebar { width: 320px; flex-shrink: 0; }

/* ============================================
   通用区块
   ============================================ */
.section-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--border); }
.section-header.left { text-align: left; }
.section-tag { display: inline-block; font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 6px; }
.section-title { font-size: 22px; font-weight: 700; color: var(--text-dark); }

/* ============================================
   置顶推荐
   ============================================ */
.featured-blog { margin-bottom: 50px; }
.featured-card { background: var(--bg-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); transition: var(--transition); }
.featured-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.featured-img { height: 280px; background-size: cover; background-position: center; }
.featured-info { padding: 28px; }
.feat-cat { display: inline-block; padding: 4px 12px; background: var(--accent); color: #fff; border-radius: 50px; font-size: 11px; margin-bottom: 14px; }
.featured-info h3 { font-size: 22px; font-weight: 700; color: var(--text-dark); margin-bottom: 12px; }
.featured-info p { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.8; }
.feat-meta { display: flex; gap: 20px; font-size: 13px; color: var(--text-light); }
.feat-meta span { display: flex; align-items: center; gap: 6px; }

/* ============================================
   最新文章列表
   ============================================ */
.latest-blog { margin-bottom: 50px; }
.article-list { display: flex; flex-direction: column; gap: 20px; }
.article-item { display: flex; gap: 24px; background: var(--bg-white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); transition: var(--transition); }
.article-item:hover { transform: translateX(6px); box-shadow: var(--shadow-md); }
.article-thumb { width: 180px; height: 130px; background-size: cover; background-position: center; border-radius: var(--radius-sm); flex-shrink: 0; position: relative; }
.article-day { position: absolute; top: 10px; left: 10px; font-size: 28px; font-weight: 700; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.article-month { position: absolute; bottom: 10px; left: 10px; font-size: 11px; color: #fff; background: rgba(0,0,0,0.4); padding: 3px 10px; border-radius: 50px; }
.article-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.article-content h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.article-content h3 a { color: var(--text-dark); }
.article-content h3 a:hover { color: var(--primary); }
.article-content p { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-footer { display: flex; justify-content: space-between; align-items: center; }
.article-cat { font-size: 12px; color: var(--text-light); }
.article-cat i { margin-right: 4px; }
.read-more { font-size: 13px; color: var(--primary); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.read-more:hover { gap: 10px; }

/* ============================================
   标签云
   ============================================ */
.tags-section { margin-bottom: 50px; }
.tags-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-item { padding: 8px 16px; background: var(--bg-white); color: var(--text-muted); border-radius: 50px; font-size: 13px; border: 1px solid var(--border); transition: var(--transition); }
.tag-item:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================
   侧边栏
   ============================================ */
.widget { background: var(--bg-white); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.widget-title { font-size: 16px; font-weight: 700; color: var(--text-dark); margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--primary); display: flex; align-items: center; gap: 10px; }
.widget-title i { color: var(--primary); }

/* 关于博客 */
.about-widget { text-align: center; }
.widget-avatar { width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 50%; overflow: hidden; border: 3px solid var(--border); }
.widget-avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-widget h3 { font-size: 16px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.about-widget p { font-size: 13px; color: var(--text-muted); }

/* 热门文章 */
.widget-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.widget-list li:last-child { border-bottom: none; }
.list-num { width: 24px; height: 24px; background: var(--primary); color: #fff; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.widget-list a { font-size: 13px; color: var(--text-dark); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.widget-list a:hover { color: var(--primary); }

/* 分类目录 */
.widget-cats li { margin-bottom: 6px; }
.widget-cats a { display: flex; justify-content: space-between; padding: 12px 14px; background: var(--bg-light); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-dark); transition: var(--transition); }
.widget-cats a:hover { background: var(--primary); color: #fff; }
.cat-count { font-size: 11px; background: rgba(0,0,0,0.08); padding: 2px 8px; border-radius: 50px; }
.widget-cats a:hover .cat-count { background: rgba(255,255,255,0.2); }

/* 推荐阅读 */
.recommend-list { display: flex; flex-direction: column; gap: 12px; }
.recommend-item { display: flex; gap: 12px; padding: 10px; background: var(--bg-light); border-radius: var(--radius-sm); transition: var(--transition); }
.recommend-item:hover { background: var(--primary); }
.rec-img { width: 80px; height: 60px; background-size: cover; background-position: center; border-radius: 6px; flex-shrink: 0; }
.rec-info { display: flex; flex-direction: column; justify-content: center; }
.rec-info h5 { font-size: 13px; color: var(--text-dark); margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recommend-item:hover .rec-info h5 { color: #fff; }
.rec-info span { font-size: 11px; color: var(--text-light); }
.recommend-item:hover .rec-info span { color: rgba(255,255,255,0.8); }

/* ============================================
   底部
   ============================================ */
.footer { background: var(--bg-white); border-top: 1px solid var(--border); padding: 40px 24px; text-align: center; }
.footer-bottom { max-width: 1200px; margin: 0 auto; font-size: 13px; color: var(--text-muted); }
.footer-bottom a { color: var(--primary); margin: 0 8px; }
.footer-bottom a:hover { text-decoration: underline; }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1024px) {
  .blog-container { flex-direction: column; }
  .blog-sidebar { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .widget { margin-bottom: 0; }
}
@media (max-width: 768px) {
  .blog-hero { height: 280px; }
  .hero-content h1 { font-size: 26px; }
  .blog-sidebar { grid-template-columns: 1fr; }
  .article-item { flex-direction: column; }
  .article-thumb { width: 100%; height: 180px; }
  .section-title { font-size: 18px; }
  .featured-img { height: 200px; }
}

/* ============================================
   文章详情页 & 列表页
   ============================================ */
.page-header { background: var(--bg-white); border-bottom: 1px solid var(--border); padding: 40px 0; margin-bottom: 40px; }
.page-header .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-title { font-size: 28px; font-weight: 700; color: var(--text-dark); margin-bottom: 12px; }
.page-breadcrumb { font-size: 13px; color: var(--text-muted); }
.page-breadcrumb a { color: var(--primary); }
.content-wrapper { max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; }

.article-detail { background: var(--bg-white); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-sm); margin-bottom: 40px; }
.detail-header { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.detail-category { display: inline-block; padding: 6px 16px; background: var(--primary); color: #fff; border-radius: 50px; font-size: 12px; margin-bottom: 14px; }
.detail-title { font-size: 26px; font-weight: 700; color: var(--text-dark); margin-bottom: 14px; line-height: 1.4; }
.detail-meta { display: flex; gap: 24px; font-size: 13px; color: var(--text-muted); }
.detail-meta span { display: flex; align-items: center; gap: 6px; }
.detail-content { font-size: 15px; line-height: 1.9; color: var(--text-dark); }
.detail-content p { margin-bottom: 18px; }
.detail-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 20px 0; }
.detail-content h2, .detail-content h3, .detail-content h4 { margin: 24px 0 14px; color: var(--text-dark); }
.detail-content ul, .detail-content ol { margin: 16px 0; padding-left: 24px; }
.detail-content li { margin-bottom: 8px; list-style: disc; }
.detail-content blockquote { margin: 20px 0; padding: 20px 24px; background: var(--bg-light); border-left: 4px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; color: var(--text-muted); }
.detail-tags { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-tags a { display: inline-block; padding: 4px 12px; background: var(--bg-light); color: var(--text-muted); border-radius: 50px; font-size: 12px; }
.detail-tags a:hover { background: var(--primary); color: #fff; }

.related-title { font-size: 18px; font-weight: 700; color: var(--text-dark); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--primary); display: flex; align-items: center; gap: 10px; }
.related-title i { color: var(--primary); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card { display: block; background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.related-img { height: 140px; background-size: cover; background-position: center; }
.related-info { padding: 16px; }
.related-info h4 { font-size: 14px; color: var(--text-dark); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-info span { font-size: 12px; color: var(--text-light); }
.related-info span i { margin-right: 4px; }

.list-page-grid { display: flex; gap: 30px; }
.list-page-grid .main-content { flex: 1; min-width: 0; }
.list-sidebar { width: 280px; flex-shrink: 0; }
.list-articles { display: flex; flex-direction: column; gap: 20px; }
.list-article-item { display: flex; gap: 20px; background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.list-article-item:hover { transform: translateX(6px); box-shadow: var(--shadow-md); }
.list-article-img { width: 200px; height: 150px; background-size: cover; background-position: center; flex-shrink: 0; }
.list-article-info { padding: 20px; display: flex; flex-direction: column; justify-content: center; flex: 1; }
.list-article-info h3 { font-size: 17px; color: var(--text-dark); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-article-info h3 a:hover { color: var(--primary); }
.list-article-info p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-article-meta { display: flex; gap: 20px; font-size: 12px; color: var(--text-light); }
.list-article-meta span { display: flex; align-items: center; gap: 4px; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pagination a, .pagination span { padding: 10px 16px; background: var(--bg-white); border-radius: var(--radius-sm); font-size: 14px; color: var(--text-dark); box-shadow: var(--shadow-sm); transition: var(--transition); }
.pagination a:hover { background: var(--primary); color: #fff; }
.pagination .active { background: var(--primary); color: #fff; }
.sidebar-card { background: var(--bg-white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.sidebar-card .card-title { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); display: flex; align-items: center; gap: 8px; }
.sidebar-card .card-title i { color: var(--primary); }
.sidebar-nav-list { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav-list li { padding: 10px 14px; background: var(--bg-light); border-radius: var(--radius-sm); transition: var(--transition); }
.sidebar-nav-list li:hover { background: var(--primary); }
.sidebar-nav-list li:hover a { color: #fff; }
.sidebar-nav-list a { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-dark); }
.sidebar-nav-list .count { font-size: 11px; color: var(--text-light); background: rgba(0,0,0,0.06); padding: 2px 8px; border-radius: 50px; }
.sidebar-nav-list li:hover .count { background: rgba(255,255,255,0.2); color: #fff; }

@media (max-width: 900px) { .list-page-grid { flex-direction: column; } .list-sidebar { width: 100%; } .related-grid { grid-template-columns: repeat(2, 1fr); } .list-article-img { width: 160px; height: 130px; } }
@media (max-width: 600px) { .article-detail { padding: 24px; } .detail-title { font-size: 22px; } .list-article-item { flex-direction: column; } .list-article-img { width: 100%; height: 180px; } .related-grid { grid-template-columns: 1fr; } }