/*
Theme Name: 图片文字发布主题
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: 一个支持图片和文字发布的现代化WordPress主题，具有响应式设计和优雅的排版。
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: image-text-theme
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================
   全局样式重置
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* ============================================
   容器和布局
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px 0;
    margin-bottom: 30px;
}

.site-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.site-title a {
    color: #333;
    text-decoration: none;
}

.site-description {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* ============================================
   导航菜单
   ============================================ */
.main-navigation {
    margin-top: 20px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.main-navigation a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: #0073aa;
}

/* ============================================
   主内容区
   ============================================ */
.site-main {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* ============================================
   文章列表
   ============================================ */
.post {
    margin-bottom: 50px;
    padding-bottom: 50px;
    border-bottom: 1px solid #eee;
}

.post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.post-header {
    margin-bottom: 20px;
}

.post-title {
    font-size: 32px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #0073aa;
}

.post-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.post-meta span {
    margin-right: 15px;
}

/* ============================================
   特色图片
   ============================================ */
.post-thumbnail {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.post-thumbnail:hover img {
    transform: scale(1.02);
}

/* ============================================
   文章内容
   ============================================ */
.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.post-content h2 {
    font-size: 28px;
}

.post-content h3 {
    font-size: 24px;
}

.post-content ul,
.post-content ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content a {
    color: #0073aa;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.post-content a:hover {
    border-bottom-color: #0073aa;
}

.post-content blockquote {
    border-left: 4px solid #0073aa;
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: #666;
}

/* ============================================
   阅读更多链接
   ============================================ */
.read-more {
    display: inline-block;
    margin-top: 20px;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.read-more:hover {
    color: #005177;
}

/* ============================================
   分页
   ============================================ */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.pagination a:hover {
    background: #0073aa;
    color: #fff;
}

.pagination .current {
    background: #0073aa;
    color: #fff;
}

/* ============================================
   侧边栏
   ============================================ */
.sidebar {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.widget {
    margin-bottom: 40px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.widget li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.widget a:hover {
    color: #0073aa;
}

/* ============================================
   页脚
   ============================================ */
.site-footer {
    background: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 768px) {
    .site-main {
        padding: 20px;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .post-content {
        font-size: 16px;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* ============================================
   内容区域布局
   ============================================ */
.content-area {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
}

/* ============================================
   单篇文章页面
   ============================================ */
.single-post .post-content {
    font-size: 18px;
}

.single-post .post-thumbnail {
    margin-bottom: 30px;
}

/* ============================================
   搜索表单
   ============================================ */
.search-form {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.search-field {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-submit {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.search-submit:hover {
    background: #005177;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ============================================
   文章导航（上一篇/下一篇）
   ============================================ */
.post-navigation {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: #0073aa;
    color: #fff;
}

.nav-subtitle {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.nav-title {
    display: block;
    font-weight: 500;
}

/* ============================================
   归档页面
   ============================================ */
.archive-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.archive-title {
    font-size: 32px;
    margin-bottom: 10px;
}

.archive-description {
    color: #666;
    font-size: 16px;
}

.search-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.search-title {
    font-size: 28px;
}

.search-title span {
    color: #0073aa;
}

/* ============================================
   404页面
   ============================================ */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}

.error-404 h1 {
    font-size: 72px;
    margin-bottom: 20px;
    color: #ccc;
}

.error-404 p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* ============================================
   编辑链接
   ============================================ */
.edit-link {
    margin-top: 20px;
    display: block;
}

.edit-link a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    transition: all 0.3s;
}

.edit-link a:hover {
    background: #0073aa;
    color: #fff;
}

/* ============================================
   评论样式
   ============================================ */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.comments-title {
    font-size: 24px;
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
    margin-bottom: 30px;
}

.comment {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 10px;
}

.comment-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.comment-content {
    line-height: 1.6;
}

.comment-form {
    margin-top: 30px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 15px;
}

.comment-form input[type="submit"] {
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.comment-form input[type="submit"]:hover {
    background: #005177;
}

