/* Theme 2: Magazine Style - 杂志风格 */
/* 大图、多栏布局、杂志式排版 */

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #f8f9fa;
    color: #1a1a1a;
    line-height: 1.8;
}

/* Only apply container styles to frontend pages, not admin pages */
body:not(.admin-body) .container {
    max-width: 1400px;
}

.header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom: none;
    padding: 2rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-content {
    color: #fff;
}

.logo {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav a {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
}

.nav a:hover {
    color: #fff;
    border-bottom: 2px solid #fff;
    padding-bottom: 0.25rem;
}

.main {
    background: #f8f9fa;
    padding: 3rem 0;
}

/* Posts grid - Magazine style */
/* Only apply to non-blog-layout contexts (e.g., category pages without sidebar) */
body:not(.admin-body) .posts-grid:not(.blog-layout .posts-grid) {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

body:not(.admin-body) .posts-grid:not(.blog-layout .posts-grid) .post-card:first-child {
    grid-row: span 2;
}

/* For blog-layout context, ensure single column layout (override our own rule) */
body:not(.admin-body) .blog-layout .main-content .posts-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important; /* 与主CSS保持一致 */
}

body:not(.admin-body) .blog-layout .main-content .posts-grid .post-card:first-child {
    grid-row: span 1 !important;
}

/* Ensure categories section in main-content displays correctly */
body:not(.admin-body) .blog-layout .main-content .categories {
    width: 100% !important;
    margin-bottom: 3.5rem !important; /* 与主CSS保持一致 */
    margin-top: 0 !important;
}

.post-card {
    background: #fff;
    border-radius: 16px; /* 统一圆角设计，提升美观度 */
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.post-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.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;
}

.post-card:hover img {
    transform: scale(1.05);
}

.post-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1.5rem;
    line-height: 1.3;
}

.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: #1e293b;
    text-decoration: underline;
}

.post-card p {
    color: #4b5563 !important;
    -webkit-text-fill-color: #4b5563 !important;
    background: none !important;
    background-clip: unset !important;
;
    font-size: 0.95rem;
}

.btn-primary {
    background: #1e293b;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 16px; /* 统一圆角设计，提升美观度 */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, background;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    background: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

.post-detail {
    background: #fff;
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 16px; /* 统一圆角设计，提升美观度 */
}

.post-header h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

/* Hero区域适配 */
.hero {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.05) 0%, rgba(51, 65, 85, 0.05) 100%);
    border-radius: 16px; /* 统一圆角设计，提升美观度 */
}

/* 分享按钮适配 */
.share-btn-inline {
    background: #fff;
    border: 2px solid #1e293b;
    color: #1a1a1a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, background;
}

.share-btn-inline:hover {
    background: #1e293b;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 评论表单适配 */
.comment-form {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 16px; /* 统一圆角设计，提升美观度 */
}

/* 文章详情页文字样式 */
.post-detail {
    background: #ffffff;
}

.post-header h1 {
    color: #1e293b !important;
}

.post-content {
    color: #334155 !important;
}

.post-content h2 {
    color: #1e293b !important;
}

.post-content h3 {
    color: #1e293b !important;
}

.post-content p {
    color: #334155 !important;
}

.post-content blockquote {
    color: #475569 !important;
}

.post-meta {
    color: #64748b !important;
}

.post-meta span {
    color: #64748b !important;
}

.excerpt {
    color: #475569 !important;
}

.post-share h3 {
    color: #1e293b !important;
}

.post-tags h3 {
    color: #1e293b !important;
}

.comments-header h2 {
    color: #1e293b !important;
}

.comment-sort label {
    color: #334155 !important;
}

.comment-login-prompt {
    color: #334155 !important;
}

.comment-login-prompt a {
    color: #1e293b !important;
}

.no-comments {
    color: #64748b !important;
}

/* Hero区域适配 */
.hero {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.05) 0%, rgba(15, 23, 42, 0.05) 100%);
    border-radius: 16px; /* 统一圆角设计，提升美观度 */
}

.hero h1 {
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    background: none !important;
    background-clip: unset !important;
}

.hero-subtitle {
    color: #334155 !important;
}

/* 评论项适配 */
.comment-item {
    border-left: 4px solid #1e293b;
    border-radius: 16px; /* 统一圆角设计，提升美观度 */
}

/* 回复指示器适配 - 杂志主题 */
.comment-reply-indicator {
    color: #1e293b !important;
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    border-radius: 16px !important; /* 统一圆角设计，提升美观度 */
}

.comment-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.comment-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.15);
}

/* 标签适配 */
.tag {
    background: #1e293b;
    color: #fff;
    border: none;
}

/* 表单输入框适配 */
.form-group input,
.form-group textarea {
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #1e293b;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
    outline: none;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .post-card:first-child {
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-card h3 {
        font-size: 1.25rem;
        margin: 1rem;
    }
    
    .post-card p {
        margin: 0 1rem 1rem;
        font-size: 0.875rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .post-header h1 {
        font-size: 2rem;
    }
    
    .post-detail {
        padding: 2rem 1.5rem;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .nav a {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem 0;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .post-card h3 {
        font-size: 1.125rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .post-header h1 {
        font-size: 1.75rem;
    }
}

/* ========================================
   首页文字元素可见性修复 - Magazine 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;
}
