/*
Theme Name: pjkui Blog
Theme URI: https://blog.pjkui.com
Author: pjkui
Author URI: https://pjkui.com
Description: 参考 blog2 (Yii2) 风格的 WordPress 主题，使用 UIkit 3 框架，支持 Markdown 文章渲染、深色导航、幻灯片首页、侧边栏布局。
Version: 1.0.0
License: MIT
Text Domain: pjkui-blog
Tags: blog, uikit, markdown, two-columns
*/

/* =====================================================
   全局基础样式（参考 blog2/frontend/web/css/site.css）
   ===================================================== */

body {
    background-color: rgba(255, 255, 255, 0);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* =====================================================
   导航栏
   ===================================================== */
#site-header {
    position: sticky;
    top: 0;
    z-index: 980;
}

.site-nav-logo {
    height: 36px;
    width: auto;
    margin-right: 8px;
}

/* 导航链接子标题 */
.uk-navbar-subtitle {
    font-size: 11px;
    opacity: 0.7;
    display: block;
    line-height: 1;
    margin-top: 2px;
}

/* =====================================================
   主容器
   ===================================================== */
#primary-content {
    min-width: 70vw;
}

.main-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 960px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   幻灯片
   ===================================================== */
.hero-slideshow {
    margin-bottom: 20px;
}

/* =====================================================
   文章列表项（参考 blog2 _articleItem.php）
   ===================================================== */
.article-item {
    margin-bottom: 24px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
}

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

.article-item-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.article-item-title a {
    color: inherit;
    text-decoration: none;
}

.article-item-title a:hover {
    color: #1e87f0;
}

.article-item-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.article-item-meta a {
    color: #666;
}

.article-item-excerpt {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 12px;
}

.article-item-footer {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* =====================================================
   文章详情（参考 blog2 view.php）
   ===================================================== */
.article-view {
    line-height: 1.8;
}

.article-view h1.article-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.article-view .article-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.article-view .article-content {
    font-size: 1rem;
    line-height: 1.8;
}

/* Markdown 内容样式 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.article-content pre {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 16px;
    overflow-x: auto;
}

.article-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

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

.article-content blockquote {
    border-left: 4px solid #1e87f0;
    margin-left: 0;
    padding: 8px 16px;
    background: #f5f7ff;
    color: #555;
}

.article-content h1, .article-content h2, .article-content h3,
.article-content h4, .article-content h5, .article-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.article-content h2 {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 6px;
}

.article-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.article-content th, .article-content td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.article-content th {
    background-color: #f5f5f5;
    font-weight: 600;
}

/* 标签样式（参考 blog2 uk-label） */
.article-tags {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
}

.article-tags .uk-label {
    display: inline-block;
    padding: 4px 10px;
    background: #1e87f0;
    color: #fff;
    border-radius: 3px;
    font-size: 0.8rem;
    margin: 2px 4px 2px 0;
    text-decoration: none;
}

.article-tags .uk-label:hover {
    background: #0f6fd4;
}

/* 上下篇导航 */
.article-pagination {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}

/* 隐藏文章 */
.article-hidden-notice {
    color: #9bc24e;
    font-style: italic;
    font-size: 0.875rem;
}

/* =====================================================
   侧边栏 Widget（参考 blog2 uk-card）
   ===================================================== */
.sidebar-widget {
    margin-bottom: 20px;
}

/* =====================================================
   分页
   ===================================================== */
.pagination-wrap {
    margin: 30px 0;
    text-align: center;
}

.pagination-wrap .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
}

.pagination-wrap .page-numbers.current,
.pagination-wrap .page-numbers:hover {
    background: #1e87f0;
    color: #fff;
    border-color: #1e87f0;
}

/* =====================================================
   页脚
   ===================================================== */
.site-footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    font-size: 0.875rem;
    color: #666;
}

.site-footer .social-links {
    margin-bottom: 12px;
}

.site-footer .social-links a {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    text-align: center;
    margin: 0 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.site-footer .social-links a:hover {
    background: #1e87f0;
    border-color: #1e87f0;
    color: #fff;
}

/* =====================================================
   响应式
   ===================================================== */
@media (max-width: 640px) {
    .article-view h1.article-title {
        font-size: 1.5rem;
    }
}

/* =====================================================
   其他
   ===================================================== */
.not-set {
    color: #c55;
    font-style: italic;
}

article {
    background-color: #ffffff1f;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 60px;
    right: 60px;
    font-size: 0.875rem;
    color: #666;
    text-decoration: none;
    z-index: 100;
}

.back-to-top:hover {
    color: #1e87f0;
}
