/*
Theme Name: XingTuoKC
Theme URI: https://xtks110.top
Author: 星拓科创
Author URI: https://xtks110.top
Description: 星拓科创文搜网专注 AI 原创文章创作发布，涵盖生活美文、行业科普、情感随笔、热点文案等优质内容，是专业的智能文稿收录与资讯聚合平台。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: responsive, custom-header, custom-menu, featured-images, translation-ready
Text Domain: xingtuokc
*/

/* ========================================
   全局重置与基础样式
   ======================================== */
*, *::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", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #c0392b;
}

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

ul, ol {
    list-style: none;
}

button, input, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ========================================
   变量定义
   ======================================== */
:root {
    --primary-color: #c0392b;
    --text-color: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-light: #f8f9fa;
    --bg-white: #fff;
    --border-color: #e1e5e9;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    
    /* 栏目配色 */
    --cat-life: #e67e22;
    --cat-science: #2980b9;
    --cat-emotion: #e84393;
    --cat-work: #00a896;
    --cat-product: #f39c12;
    --cat-culture: #8d6e63;
    
    /* 布局 */
    --container-width: 1200px;
    --sidebar-width: 320px;
}

/* ========================================
   通用容器与布局
   ======================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* ========================================
   顶部导航栏
   ======================================== */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo img {
    height: 45px;
    width: auto;
}

.site-logo .site-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav .current-menu-item a::after,
.main-nav .current-post-parent a::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s ease;
}

/* 标语横条 */
.slogan-bar {
    background: linear-gradient(135deg, var(--primary-color), #e74c3c);
    color: #fff;
    text-align: center;
    padding: 12px 20px;
    font-size: 0.95rem;
}

/* ========================================
   Banner横幅
   ======================================== */
.banner {
    width: 100%;
    height: 300px;
    object-fit: cover;
    margin-bottom: 30px;
}

/* ========================================
   文章卡片通用样式
   ======================================== */
.post-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.post-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.post-card .post-thumbnail {
    height: 200px;
    overflow: hidden;
}

.post-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-card .post-content {
    padding: 20px;
}

.post-card .post-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.5;
}

.post-card .post-title a:hover {
    color: var(--primary-color);
}

.post-card .post-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.post-card .post-meta {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========================================
   首页布局
   ======================================== */
.home-featured {
    margin-bottom: 50px;
}

.home-featured h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.featured-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.featured-card .card-image {
    height: 220px;
    overflow: hidden;
}

.featured-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-card .card-body {
    padding: 20px;
}

.featured-card .card-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.featured-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.featured-card .card-title a:hover {
    color: var(--primary-color);
}

.featured-card .card-excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 栏目入口 */
.categories-section {
    margin-bottom: 50px;
}

.categories-section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.category-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-card .cat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

.category-card .cat-icon span {
    font-size: 2.5rem;
}

.category-card.cat-life .cat-icon { background: rgba(230, 126, 34, 0.15); color: var(--cat-life); }
.category-card.cat-science .cat-icon { background: rgba(41, 128, 185, 0.15); color: var(--cat-science); }
.category-card.cat-emotion .cat-icon { background: rgba(232, 67, 147, 0.15); color: var(--cat-emotion); }
.category-card.cat-work .cat-icon { background: rgba(0, 168, 150, 0.15); color: var(--cat-work); }
.category-card.cat-product .cat-icon { background: rgba(243, 156, 18, 0.15); color: var(--cat-product); }
.category-card.cat-culture .cat-icon { background: rgba(141, 110, 99, 0.15); color: var(--cat-culture); }

.category-card .cat-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.category-card .cat-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.category-card .cat-link {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-card.cat-life .cat-link { background: var(--cat-life); color: #fff; }
.category-card.cat-science .cat-link { background: var(--cat-science); color: #fff; }
.category-card.cat-emotion .cat-link { background: var(--cat-emotion); color: #fff; }
.category-card.cat-work .cat-link { background: var(--cat-work); color: #fff; }
.category-card.cat-product .cat-link { background: var(--cat-product); color: #fff; }
.category-card.cat-culture .cat-link { background: var(--cat-culture); color: #fff; }

.category-card:hover .cat-link {
    background: #333;
}

/* 最新文章 */
.latest-posts {
    margin-bottom: 50px;
}

.latest-posts h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.posts-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* ========================================
   分页导航
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 18px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination .prev,
.pagination .next {
    padding: 10px 20px;
}

/* ========================================
   底部
   ======================================== */
.site-footer {
    background: #1a1a2e;
    color: #ccc;
    margin-top: 60px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 50px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-widget h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-widget p {
    line-height: 1.8;
}

.footer-bottom {
    text-align: center;
    padding: 25px 0;
    font-size: 0.9rem;
}

.footer-slogan {
    background: linear-gradient(135deg, var(--primary-color), #e74c3c);
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 1.1rem;
}

/* ========================================
   侧边栏
   ======================================== */
.sidebar {
    width: var(--sidebar-width);
    float: right;
}

.sidebar-widget {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.sidebar-widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.sidebar-widget ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-widget ul li a:hover {
    color: var(--primary-color);
}

/* 搜索框 */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
}

.search-form input:focus {
    border-color: var(--primary-color);
}

.search-form button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: #a93226;
}

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

.tagcloud a {
    display: inline-block;
    padding: 5px 12px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tagcloud a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ========================================
   内容页 single.php
   ======================================== */
.single-post {
    width: 100%;
}

/* 全宽标题区 */
.article-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #922b21 100%);
    padding: 50px 20px;
    margin: 0 -20px;
    text-align: center;
    color: #fff;
}

.article-hero-inner {
    max-width: 860px;
    margin: 0 auto;
}

.article-hero .article-category-badge {
    display: inline-block;
    padding: 5px 18px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 18px;
    transition: background 0.3s;
}

.article-hero .article-category-badge:hover {
    background: rgba(255,255,255,0.35);
    color: #fff;
}

.article-hero .article-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #fff;
}

.article-hero .article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    opacity: 0.9;
    flex-wrap: wrap;
}

.article-hero .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-hero .meta-divider {
    margin: 0 4px;
    opacity: 0.5;
}

/* 主布局：文章 + 侧边栏 */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-top: 40px;
}

.article-main {
    min-width: 0;
}

.article-sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
}

/* 侧边栏默认小工具样式 */
.article-sidebar .widget {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.article-sidebar .widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.article-sidebar ul {
    list-style: none;
    padding: 0;
}

.article-sidebar li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.article-sidebar li:last-child {
    border-bottom: none;
}

.article-sidebar li a:hover {
    color: var(--primary-color);
}

.article-sidebar .tagcloud a {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 0.85rem !important;
    margin: 2px;
    transition: all 0.2s;
}

.article-sidebar .tagcloud a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 特色图 */
.article-featured-image {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

/* 文章正文 */
.article-body {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    font-size: 1.05rem;
    line-height: 2;
}

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

.article-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 35px 0 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.article-body h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 25px 0 15px;
}

.article-body blockquote {
    margin: 25px 0;
    padding: 20px 25px;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-light);
}

.article-body ul,
.article-body ol {
    margin: 20px 0;
    padding-left: 25px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body ul li {
    list-style: disc;
}

.article-body ol li {
    list-style: decimal;
}

.article-body pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-body code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.article-body pre code {
    background: none;
    padding: 0;
}

.article-body img {
    border-radius: 8px;
    margin: 15px 0;
}

/* 分页链接 */
.page-links {
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
    text-align: center;
}

.page-links span {
    padding: 5px 12px;
    margin: 0 3px;
    background: #fff;
    border-radius: 4px;
}

/* 标签 */
.article-tags {
    margin-top: 30px;
    padding: 20px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tags .tags-label {
    font-weight: 600;
    margin-right: 5px;
    color: var(--text-light);
}

.article-tags a {
    display: inline-block;
    padding: 5px 14px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
    transition: all 0.2s;
}

.article-tags a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 上下篇导航 */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
}

.post-navigation a {
    display: block;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.post-navigation a:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    color: var(--primary-color);
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation .nav-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.post-navigation .nav-title {
    display: block;
    font-size: 0.95rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-navigation .nav-placeholder {
    visibility: hidden;
}

/* 相关推荐（全宽） */
.related-posts {
    margin: 50px 0 0;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.related-header {
    text-align: center;
    margin-bottom: 30px;
}

.related-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.related-line {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.related-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.related-thumb {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.related-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-card:hover .related-thumb img {
    transform: scale(1.05);
}

.related-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}

.related-info {
    padding: 16px;
}

.related-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 8px;
}

.related-title a:hover {
    color: var(--primary-color);
}

.related-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.related-excerpt {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 评论区 */
.comments-area {
    margin-top: 40px;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* 栏目分类色覆盖文章标题区 */
.single-post.cat-life .article-hero { background: linear-gradient(135deg, #e67e22, #d35400); }
.single-post.cat-science .article-hero { background: linear-gradient(135deg, #2980b9, #1a5276); }
.single-post.cat-emotion .article-hero { background: linear-gradient(135deg, #e84393, #c2185b); }
.single-post.cat-work .article-hero { background: linear-gradient(135deg, #00a896, #00796b); }
.single-post.cat-product .article-hero { background: linear-gradient(135deg, #f39c12, #e67e22); }
.single-post.cat-culture .article-hero { background: linear-gradient(135deg, #8d6e63, #5d4037); }

.comments-area h2 {
    font-size: 1.4rem;
    margin-bottom: 25px;
}

/* ========================================
   404页面
   ======================================== */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 .error-image {
    max-width: 400px;
    margin: 0 auto 30px;
}

.error-404 .error-image img {
    width: 100%;
    border-radius: 12px;
}

.error-404 h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.error-404 .error-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 35px;
}

.error-404 .error-search {
    max-width: 500px;
    margin: 0 auto 40px;
}

.error-404 .btn-home {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 30px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.error-404 .btn-home:hover {
    background: #a93226;
    color: #fff;
    transform: translateY(-3px);
}

.error-recommended {
    margin-top: 50px;
}

.error-recommended h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
}

/* ========================================
   栏目模板 - 生活随笔 (杂志风)
   ======================================== */
body.category-life {
    --accent-color: var(--cat-life);
}

.category-magazine {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-bottom: 40px;
}

.magazine-featured {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.magazine-featured .featured-image {
    height: 350px;
    overflow: hidden;
}

.magazine-featured .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.magazine-featured .featured-content {
    padding: 25px;
}

.magazine-featured .featured-category {
    display: inline-block;
    padding: 5px 15px;
    background: var(--cat-life);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.magazine-featured .featured-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
}

.magazine-featured .featured-title a:hover {
    color: var(--cat-life);
}

.magazine-featured .featured-excerpt {
    color: var(--text-light);
    line-height: 1.8;
}

.magazine-list {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.magazine-list h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--cat-life);
}

.magazine-list .list-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.magazine-list .list-item:last-child {
    border-bottom: none;
}

.magazine-list .list-thumb {
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.magazine-list .list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.magazine-list .list-content h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.magazine-list .list-content h4 a:hover {
    color: var(--cat-life);
}

.magazine-list .list-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   栏目模板 - 行业科普 (知识卡片网格)
   ======================================== */
body.category-science {
    --accent-color: var(--cat-science);
}

.science-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.science-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.science-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.science-card .card-image {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.science-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.science-card .card-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: var(--cat-science);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.science-card .card-body {
    padding: 20px;
}

.science-card .card-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(41, 128, 185, 0.1);
    color: var(--cat-science);
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.science-card .card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.science-card .card-title a:hover {
    color: var(--cat-science);
}

.science-card .card-excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ========================================
   栏目模板 - 情感美文 (文艺单列居中)
   ======================================== */
body.category-emotion {
    --accent-color: var(--cat-emotion);
}

.emotion-list {
    max-width: 750px;
    margin: 0 auto;
}

.emotion-article {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 50px 40px;
    margin-bottom: 35px;
    box-shadow: var(--shadow);
    text-align: center;
}

.emotion-article .article-quote {
    font-size: 1.5rem;
    color: var(--cat-emotion);
    font-style: italic;
    margin-bottom: 20px;
    position: relative;
    padding: 0 30px;
}

.emotion-article .article-quote::before,
.emotion-article .article-quote::after {
    content: '"';
    font-size: 3rem;
    color: rgba(232, 67, 147, 0.2);
    position: absolute;
    font-family: Georgia, serif;
}

.emotion-article .article-quote::before {
    left: 0;
    top: -10px;
}

.emotion-article .article-quote::after {
    right: 0;
    bottom: -20px;
}

.emotion-article .article-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.5;
}

.emotion-article .article-title a:hover {
    color: var(--cat-emotion);
}

.emotion-article .article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.emotion-article .read-more {
    display: inline-block;
    padding: 12px 35px;
    border: 2px solid var(--cat-emotion);
    color: var(--cat-emotion);
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.emotion-article .read-more:hover {
    background: var(--cat-emotion);
    color: #fff;
}

/* ========================================
   栏目模板 - 职场文案 (双列专业)
   ======================================== */
body.category-work {
    --accent-color: var(--cat-work);
}

.work-layout {
    display: flex;
    gap: 30px;
}

.work-main {
    flex: 1;
}

.work-article {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 20px;
}

.work-article .article-thumb {
    width: 200px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.work-article .article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-article .article-content {
    flex: 1;
}

.work-article .article-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--cat-work);
    color: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.work-article .article-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.work-article .article-title a:hover {
    color: var(--cat-work);
}

.work-article .article-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.work-article .article-tags a {
    padding: 3px 10px;
    background: var(--bg-light);
    border-radius: 15px;
    font-size: 0.8rem;
}

.work-article .article-tags a:hover {
    background: var(--cat-work);
    color: #fff;
}

.work-article .article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.work-sidebar {
    width: 320px;
}

/* ========================================
   栏目模板 - 好物推荐 (电商测评卡片)
   ======================================== */
body.category-product {
    --accent-color: var(--cat-product);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-card .product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 15px;
    background: var(--cat-product);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.product-card .product-badge.hot {
    background: #e74c3c;
}

.product-card .product-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .product-body {
    padding: 25px;
}

.product-card .product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.product-card .product-title a:hover {
    color: var(--cat-product);
}

.product-card .product-rating {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
}

.product-card .product-rating span {
    color: #f39c12;
    font-size: 1.1rem;
}

.product-card .product-rating span.empty {
    color: #ddd;
}

.product-card .product-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.product-card .product-link {
    display: inline-block;
    padding: 10px 25px;
    background: var(--cat-product);
    color: #fff;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-card .product-link:hover {
    background: #d68910;
    color: #fff;
}

/* ========================================
   栏目模板 - 文史杂谈 (古典时间线)
   ======================================== */
body.category-culture {
    --accent-color: var(--cat-culture);
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--cat-culture), rgba(141, 110, 99, 0.2));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 40px 50px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--cat-culture);
    border-radius: 50%;
    border: 4px solid var(--bg-light);
}

.timeline-item:nth-child(odd)::before {
    right: -10px;
}

.timeline-item:nth-child(even)::before {
    left: -10px;
}

.timeline-content {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 25px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -20px;
    border-left-color: var(--bg-white);
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -20px;
    border-right-color: var(--bg-white);
}

.timeline-date {
    display: inline-block;
    padding: 5px 15px;
    background: var(--cat-culture);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.timeline-title a:hover {
    color: var(--cat-culture);
}

.timeline-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
}

.timeline-thumb {
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.timeline-thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .featured-grid,
    .categories-grid,
    .science-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-magazine {
        grid-template-columns: 1fr;
    }
    
    .work-layout {
        flex-direction: column;
    }
    
    .work-sidebar {
        width: 100%;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 60px;
        padding-right: 20px;
    }
    
    .timeline-item::before {
        left: 10px !important;
        right: auto !important;
    }
    
    .timeline-item .timeline-content::before {
        left: -20px !important;
        right: auto !important;
        border-right-color: var(--bg-white) !important;
        border-left-color: transparent !important;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* 文章页平板适配 */
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        position: static;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        box-shadow: var(--shadow);
        padding: 20px;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .featured-grid,
    .categories-grid,
    .science-grid,
    .posts-list {
        grid-template-columns: 1fr;
    }
    
    .work-article {
        flex-direction: column;
    }
    
    .work-article .article-thumb {
        width: 100%;
        height: 200px;
    }
    
    .emotion-article {
        padding: 30px 20px;
    }
    
    .emotion-article .article-quote {
        font-size: 1.2rem;
    }
    
    .emotion-article .article-title {
        font-size: 1.4rem;
    }
    
    /* 文章页手机适配 */
    .article-hero {
        padding: 30px 15px;
    }
    
    .article-hero .article-title {
        font-size: 1.6rem;
    }
    
    .article-hero .article-meta {
        font-size: 0.8rem;
    }
    
    .article-body {
        padding: 24px 18px;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .site-logo .site-name {
        font-size: 1.2rem;
    }
    
    .banner {
        height: 200px;
    }
    
    .category-card {
        padding: 20px 15px;
    }
    
    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .error-404 h1 {
        font-size: 2rem;
    }
}

/* ========================================
   关于我们页面
   ======================================== */
.about-banner {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.about-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.about-banner-overlay h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 4px;
}

.about-banner-overlay p {
    font-size: 1.1rem;
    opacity: 0.9;
    letter-spacing: 2px;
}

.about-page {
    padding: 60px 0;
}

.about-content {
    max-width: 860px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 55px;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--primary-color);
}

.about-section-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
}

.about-section-body {
    padding-left: 60px;
    font-size: 1.05rem;
    line-height: 2;
    color: #444;
}

.about-section-body p {
    margin-bottom: 18px;
}

.about-category-list {
    margin: 20px 0;
    padding-left: 20px;
}

.about-category-list li {
    margin-bottom: 12px;
    padding-left: 5px;
    list-style: none;
    position: relative;
    line-height: 1.8;
}

.about-category-list li::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
}

.about-category-list li strong {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .about-banner {
        height: 200px;
    }

    .about-banner-overlay h1 {
        font-size: 2rem;
    }

    .about-section-body {
        padding-left: 0;
    }

    .about-section-title {
        font-size: 1.3rem;
    }
}

/* ========================================
   搜索结果页
   ======================================== */
.search-page {
    padding: 40px 0 60px;
}

.search-hero {
    text-align: center;
    padding: 40px 0 30px;
}

.search-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-color);
}

.search-keyword {
    color: var(--primary-color);
}

.search-bar {
    max-width: 560px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color 0.3s;
    background: var(--bg-white);
}

.search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.search-input {
    flex: 1;
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    outline: none;
    background: transparent;
    min-width: 0;
}

.search-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 14px 22px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #922b21;
}

/* 搜索统计 */
.search-stats {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.search-stats strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* 搜索结果列表 */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.search-item {
    display: flex;
    gap: 24px;
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.search-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.search-item-thumb {
    flex-shrink: 0;
    width: 200px;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
}

.search-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.search-item:hover .search-item-thumb img {
    transform: scale(1.05);
}

.search-item-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}

.search-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.search-item-cat {
    display: inline-block;
    align-self: flex-start;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    color: #fff;
    margin-bottom: 10px;
}

.search-item-title {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 10px;
}

.search-item-title a:hover {
    color: var(--primary-color);
}

.search-item-excerpt {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-light);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.search-item-meta .meta-dot {
    opacity: 0.4;
}

/* 分页 */
.search-pagination {
    margin-top: 40px;
    text-align: center;
}

/* 空结果 */
.search-empty {
    text-align: center;
    padding: 60px 20px;
}

.search-empty-icon {
    margin-bottom: 20px;
}

.search-empty h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.search-empty > p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 40px;
}

.search-empty-suggestions {
    margin-bottom: 40px;
}

.search-empty-suggestions h3,
.search-empty-recommend h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-light);
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.suggestion-tags a {
    padding: 8px 20px;
    background: var(--bg-white);
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.suggestion-tags a:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-hover);
}

/* 空结果推荐 */
.search-empty-recommend {
    margin-top: 40px;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.recommend-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.recommend-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    color: var(--primary-color);
}

.recommend-card-thumb {
    height: 120px;
    overflow: hidden;
}

.recommend-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommend-card-title {
    padding: 12px 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .search-hero {
        padding: 20px 0;
    }

    .search-title {
        font-size: 1.2rem;
    }

    .search-item {
        flex-direction: column;
        padding: 18px;
    }

    .search-item-thumb {
        width: 100%;
        height: 180px;
    }

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

@media (max-width: 480px) {
    .recommend-grid {
        grid-template-columns: 1fr;
    }

    .suggestion-tags a {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
}
