/*
Theme Name: Simple Blog
Theme URI: https://example.com/simple-blog
Author: Your Name
Author URI: https://example.com
Description: A clean, lightweight WordPress blog theme. Homepage lists all posts with pagination; right sidebar shows categories with post counts and a date-based archive.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: simple-blog
*/

/* -------------------- Reset / Base -------------------- */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2b2b2b;
    background: #f7f7f8;
    line-height: 1.65;
}

a {
    color: #1a5fb4;
    text-decoration: none;
}
a:hover { text-decoration: underline; }

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

/* -------------------- Header -------------------- */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 24px 0;
}

.site-header .header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.site-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}
.site-title a { color: #111; }

.site-logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

.site-description {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: #777;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}
.main-navigation a {
    color: #333;
    font-weight: 500;
}

/* -------------------- Layout -------------------- */
.site-content {
    max-width: 1100px;
    margin: 32px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 780px) {
    .site-content {
        grid-template-columns: 1fr;
    }
}

/* -------------------- Posts (main column) -------------------- */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 24px;
}

.post-card .post-thumbnail {
    margin: -24px -24px 16px;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.post-card .post-title {
    margin: 0 0 8px;
    font-size: 1.4rem;
}
.post-card .post-title a { color: #111; }

.post-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 12px;
}
.post-meta a { color: #888; }
.post-meta span { margin-right: 10px; }

.post-excerpt { color: #444; }

.read-more {
    display: inline-block;
    margin-top: 12px;
    font-weight: 600;
}

.no-posts {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 24px;
}

/* -------------------- Pagination -------------------- */
.pagination-wrap {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.pagination-wrap .page-numbers {
    display: inline-flex;
    gap: 6px;
    padding: 0;
    list-style: none;
    margin: 0;
}

.pagination-wrap .page-numbers li a,
.pagination-wrap .page-numbers li span {
    display: inline-block;
    padding: 8px 13px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
}

.pagination-wrap .page-numbers li span.current {
    background: #1a5fb4;
    color: #fff;
    border-color: #1a5fb4;
}

.pagination-wrap .page-numbers li a:hover {
    background: #f0f0f0;
    text-decoration: none;
}

/* -------------------- Sidebar -------------------- */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px;
}

.widget-title {
    margin: 0 0 14px;
    font-size: 1.05rem;
    font-weight: 700;
    border-bottom: 2px solid #1a5fb4;
    padding-bottom: 8px;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget ul li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.widget ul li:last-child { border-bottom: none; }

.widget ul li a { color: #333; }

.cat-count,
.archive-count {
    color: #999;
    font-size: 0.85rem;
}

/* -------------------- Single / Page -------------------- */
.single-post,
.single-page {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 28px;
}

.single-post .entry-title,
.single-page .entry-title {
    margin-top: 0;
}

/* -------------------- Footer -------------------- */
.site-footer {
    background: #fff;
    border-top: 1px solid #e5e5e5;
    padding: 24px 0;
    margin-top: 48px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}
