/* Theme 4: Classic Blog - 经典博客风格 */
/* 传统博客布局、侧边栏、时间线样式 */

body {
    font-family: 'Merriweather', 'Georgia', serif;
    background: #f5f5f5;
    color: #2c3e50;
    line-height: 1.8;
}

/* Only apply container styles to frontend pages, not admin pages */
body:not(.admin-body) .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    body:not(.admin-body) .container {
        padding: 0 16px;
    }
}

.header {
    background: #2c3e50;
    border-bottom: 3px solid #34495e;
    padding: 1.5rem 0;
}

.logo {
    color: #ecf0f1;
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Georgia', serif;
}

.nav a {
    color: #bdc3c7;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav a:hover {
    background: #34495e;
    color: #ecf0f1;
}

/* .main styles are handled by main CSS */
/* Only override visual styles if needed, not layout properties */

/* Ensure blog-layout grid works correctly - override any conflicting styles */
.blog-layout {
    display: grid !important;
    grid-template-columns: 1fr 320px !important;
    gap: 3rem !important;
    align-items: start !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
}

/* Ensure main-content takes full width and doesn't overflow */
.main-content {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure posts section doesn't interfere with layout */
.main-content .posts {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure categories section in main-content displays correctly */
.main-content .categories {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 3.5rem 0 !important; /* 保持底部间距 */
    padding: 0 !important;
}

/* Sidebar styles are handled by main CSS (blog-layout grid) */
/* Only override visual styles, not layout properties */
.sidebar {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky !important;
    top: 100px !important;
    max-height: calc(100vh - 120px) !important;
    overflow-y: auto !important;
}

@media (max-width: 1024px) {
    .sidebar {
        position: static !important;
        max-height: none !important;
    }
}

/* Posts grid layout is handled by main CSS */
/* Only override visual styles, not layout properties */
.blog-layout .posts-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important; /* 与主CSS保持一致 */
}

.post-card {
    background: #ffffff;
    border-left: 4px solid #3498db;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    will-change: transform, box-shadow;
    overflow: hidden;
}

.post-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    object-fit: cover;
    border-radius: 4px;
}

.post-card:hover img {
    transform: scale(1.03);
}

.post-card::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #3498db;
    transition: width 0.3s;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateX(4px);
}

.post-card:hover::before {
    width: 6px;
}

.post-card h3 {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    background: none !important;
    background-clip: unset !important;
;
    font-family: 'Georgia', serif;
}

.post-card h3 a {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    background: none !important;
    background-clip: unset !important;
    text-decoration: none !important;
;
    text-decoration: none;
}

.post-card h3 a:hover {
    color: #3498db;
    text-decoration: underline;
}

.post-card .post-meta {
    color: #7f8c8d;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.post-card p {
    color: #4b5563 !important;
    -webkit-text-fill-color: #4b5563 !important;
    background: none !important;
    background-clip: unset !important;
;
    line-height: 1.8;
}

.btn-primary {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, background;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.post-detail {
    background: #ffffff;
    padding: 3rem;
    border-radius: 16px; /* 统一圆角设计，提升美观度 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-family: 'Georgia', serif;
    line-height: 1.3;
}

/* Hero区域适配 */
.hero {
    background: linear-gradient(135deg, rgba(52, 73, 94, 0.05) 0%, rgba(44, 62, 80, 0.05) 100%);
    border-radius: 16px; /* 统一圆角设计，提升美观度 */
}

.hero h1 {
    color: #2c3e50 !important;
    -webkit-text-fill-color: #2c3e50 !important;
    background: none !important;
    background-clip: unset !important;
}

.hero-subtitle {
    color: #34495e !important;
}

/* 分享按钮适配 */
.share-btn-inline {
    background: #fff;
    border: 2px solid #3498db;
    color: #2c3e50;
}

.share-btn-inline:hover {
    background: #3498db;
    color: #fff;
}

/* 评论表单适配 */
.comment-form {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 16px; /* 统一圆角设计，提升美观度 */
}

/* 文章详情页文字样式 */
.post-detail {
    background: #ffffff;
}

.post-header h1 {
    color: #2c3e50 !important;
}

.post-content {
    color: #34495e !important;
}

.post-content h2 {
    color: #2c3e50 !important;
}

.post-content h3 {
    color: #2c3e50 !important;
}

.post-content p {
    color: #34495e !important;
}

.post-content blockquote {
    color: #555 !important;
}

.post-meta {
    color: #7f8c8d !important;
}

.post-meta span {
    color: #7f8c8d !important;
}

.excerpt {
    color: #555 !important;
}

.post-share h3 {
    color: #2c3e50 !important;
}

.post-tags h3 {
    color: #2c3e50 !important;
}

.comments-header h2 {
    color: #2c3e50 !important;
}

.comment-sort label {
    color: #34495e !important;
}

.comment-login-prompt {
    color: #34495e !important;
}

.comment-login-prompt a {
    color: #3498db !important;
}

.no-comments {
    color: #7f8c8d !important;
}

/* 评论项适配 */
.comment-item {
    border-left: 4px solid #3498db;
    border-radius: 16px; /* 统一圆角设计，提升美观度 */
}

/* 回复指示器适配 - 经典主题 */
.comment-reply-indicator {
    color: #2980b9 !important;
    background: #ebf5fb !important;
    border-color: #aed6f1 !important;
}

.comment-item:hover {
    transform: translateX(4px);
}

/* 标签适配 */
.tag {
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    color: #2c3e50;
}

/* 表单输入框适配 */
.form-group input:focus,
.form-group textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #34495e;
}

/* 侧边栏样式 */
.sidebar-widget {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.4);
}

.sidebar-widget:last-child {
    border-bottom: none;
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-family: 'Georgia', serif;
}

.theme-classic .sidebar-widget ul {
    list-style: none;
    padding: 0;
}

.theme-classic .sidebar-widget li {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    position: relative;
}

.theme-classic .sidebar-widget li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #3498db;
}

/* 响应式设计 - 使用主CSS的blog-layout响应式规则 */

@media (max-width: 768px) {
    .post-card {
        padding: 1.5rem;
    }
    
    .post-card h3 {
        font-size: 1.25rem;
    }
    
    .post-header h1 {
        font-size: 2rem;
    }
    
    .post-detail {
        padding: 2rem 1.5rem;
    }
    
    .header {
        padding: 1.25rem 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem 0;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .post-card {
        padding: 1.25rem;
    }
    
    .post-header h1 {
        font-size: 1.75rem;
    }
}

/* ========================================
   首页文字元素可见性修复 - Classic Theme
   确保所有文字在所有情况下都清晰可见
   ======================================== */

/* Featured Article 标题 */
.featured-post h2 {
    color: #111827 !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #111827 !important;
    background: none !important;
    background-clip: unset !important;
}

/* Latest Articles 标题 */
.posts h2,
.main-content .posts h2 {
    color: #111827 !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #111827 !important;
    background: none !important;
    background-clip: unset !important;
}

/* 侧边栏标题 */
.sidebar {
    border-radius: 16px !important; /* 统一圆角设计，提升美观度 */
}

.sidebar-widget h3 {
    color: #111827 !important; /* 深色文字，适合白色背景 */
    text-shadow: none !important;
    -webkit-text-fill-color: #111827 !important;
    background: none !important;
    background-clip: unset !important;
    font-weight: 700 !important; /* 增加字重，提高可读性 */
}

/* 文章卡片标题 */
.post-card h3 {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    background: none !important;
    background-clip: unset !important;
}

.post-card h3 a {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    background: none !important;
    background-clip: unset !important;
    text-decoration: none !important;
}

.post-card h3 a:hover {
    color: #2563eb !important;
    -webkit-text-fill-color: #2563eb !important;
    background: none !important;
    background-clip: unset !important;
}

/* 文章卡片内容 */
.post-card p {
    color: #4b5563 !important;
    -webkit-text-fill-color: #4b5563 !important;
    background: none !important;
    background-clip: unset !important;
}

.post-card .post-content p {
    color: #4b5563 !important;
    -webkit-text-fill-color: #4b5563 !important;
    background: none !important;
    background-clip: unset !important;
}

/* 文章元数据 */
.post-meta {
    color: #6b7280 !important;
    -webkit-text-fill-color: #6b7280 !important;
    background: none !important;
    background-clip: unset !important;
}

.post-meta span {
    color: #6b7280 !important;
    -webkit-text-fill-color: #6b7280 !important;
    background: none !important;
    background-clip: unset !important;
}

/* 侧边栏链接 */
.sidebar-widget a {
    color: #374151 !important; /* 深灰色文字，提高对比度 */
    -webkit-text-fill-color: #374151 !important;
    font-weight: 500 !important; /* 增加字重 */
    background: none !important;
    background-clip: unset !important;
    text-decoration: none !important;
}

.sidebar-widget a:hover {
    color: #2563eb !important;
    -webkit-text-fill-color: #2563eb !important;
    background: none !important;
    background-clip: unset !important;
}

/* 侧边栏文本 */
.sidebar-widget p {
    color: #4b5563 !important; /* 深灰色文字，适合白色背景 */
    -webkit-text-fill-color: #4b5563 !important;
    line-height: 1.7 !important;
    background: none !important;
    background-clip: unset !important;
}

/* 分类标签 */
.category-tag {
    color: #4b5563 !important;
    -webkit-text-fill-color: #4b5563 !important;
    background: #fff !important;
    border-color: #e5e7eb !important;
}

.category-tag:hover {
    color: #2563eb !important;
    -webkit-text-fill-color: #2563eb !important;
}

/* 分类标签 */
.category {
    color: #2563eb !important;
    -webkit-text-fill-color: #2563eb !important;
    background: none !important;
    background-clip: unset !important;
}

/* 特色文章卡片内容 */
.post-card.featured h3,
.post-card.featured h3 a {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    background: none !important;
    background-clip: unset !important;
}

.post-card.featured {
    border-radius: 16px !important; /* 统一圆角设计，提升美观度 */
}

.post-card.featured p {
    color: #374151 !important; /* 加深颜色，提高对比度和可读性 */
    -webkit-text-fill-color: #374151 !important;
    line-height: 1.7 !important;
    background: none !important;
    background-clip: unset !important;
}

.post-card.featured .post-meta {
    color: #6b7280 !important;
    -webkit-text-fill-color: #6b7280 !important;
    background: none !important;
    background-clip: unset !important;
}
