/*
Theme Name: Qing
Theme URI: https://example.com/qing
Author: Qing Theme
Author URI: https://example.com
Description: Qing is a clean, lightweight classic WordPress theme with a responsive layout, sidebar, and support for menus, featured images, and comments.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: qing
Tags: blog, one-column, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #2c2c2c;
    background-color: #f7f7f5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #2f6f4f;
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

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

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    color: #1c1c1c;
    margin: 0 0 0.6em;
}

p {
    margin: 0 0 1.2em;
}

/* ---------- Layout ---------- */
.site {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 40px 0;
}

.content-area {
    flex: 1 1 640px;
    min-width: 0;
}

.widget-area {
    flex: 0 0 300px;
}

@media (max-width: 900px) {
    .site-content {
        flex-direction: column;
        gap: 32px;
    }
    .widget-area {
        flex: 1 1 auto;
    }
}

/* ---------- Header ---------- */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e6e6e2;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 24px 0;
    gap: 16px;
}

.site-branding {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-size: 1.6rem;
    margin: 0;
}

.site-title a {
    color: #1c1c1c;
    text-decoration: none;
}

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

/* ---------- Navigation ---------- */
.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: #333;
    font-weight: 500;
    padding: 6px 0;
}

.main-navigation a:hover {
    color: #2f6f4f;
    text-decoration: none;
}

.main-navigation .current-menu-item > a {
    color: #2f6f4f;
}

.menu-toggle {
    display: none;
    background: #2f6f4f;
    color: #fff;
    border: 0;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
}

@media (max-width: 782px) {
    .menu-toggle {
        display: inline-block;
    }
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        margin-top: 12px;
    }
    .main-navigation.toggled ul {
        display: flex;
    }
    .main-navigation li {
        border-top: 1px solid #eee;
    }
}

/* ---------- Posts ---------- */
.entry {
    background: #fff;
    border: 1px solid #ececea;
    border-radius: 8px;
    padding: 28px 32px;
    margin-bottom: 32px;
}

.entry-title {
    font-size: 1.6rem;
    margin: 0 0 12px;
}

.entry-title a {
    color: #1c1c1c;
}

.entry-title a:hover {
    color: #2f6f4f;
    text-decoration: none;
}

.entry-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 16px;
}

.entry-meta a {
    color: #888;
}

.entry-meta span + span::before {
    content: "\00b7";
    margin: 0 8px;
    color: #ccc;
}

.post-thumbnail {
    display: block;
    margin-bottom: 20px;
    border-radius: 6px;
    overflow: hidden;
}

.entry-content,
.entry-summary {
    font-size: 1.02rem;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.4em;
}

.entry-content blockquote {
    margin: 1.4em 0;
    padding: 0.6em 1.2em;
    border-left: 4px solid #2f6f4f;
    background: #f2f6f3;
    color: #444;
}

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

/* ---------- Buttons ---------- */
.btn,
button,
input[type="submit"] {
    display: inline-block;
    background: #2f6f4f;
    color: #fff;
    border: 0;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
    background: #245840;
    text-decoration: none;
    color: #fff;
}

/* ---------- Page header (archive) ---------- */
.page-header {
    margin-bottom: 28px;
}

.page-title {
    font-size: 1.8rem;
    margin: 0 0 8px;
}

.archive-description {
    color: #666;
}

/* ---------- Pagination ---------- */
.pagination,
.posts-navigation,
.post-navigation {
    margin: 32px 0;
}

.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
}

.pagination .page-numbers.current {
    background: #2f6f4f;
    color: #fff;
    border-color: #2f6f4f;
}

/* ---------- Sidebar / Widgets ---------- */
.widget {
    background: #fff;
    border: 1px solid #ececea;
    border-radius: 8px;
    padding: 22px 24px;
    margin-bottom: 28px;
}

.widget-title {
    font-size: 1.1rem;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2f6f4f;
    display: inline-block;
}

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

.widget ul li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0ee;
}

.widget ul li:last-child {
    border-bottom: 0;
}

/* ---------- Comments ---------- */
.comments-area {
    background: #fff;
    border: 1px solid #ececea;
    border-radius: 8px;
    padding: 28px 32px;
    margin-top: 32px;
}

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

.comment-list .children {
    list-style: none;
    margin-left: 28px;
}

.comment-body {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0ee;
}

.comment-author .avatar {
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 8px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-form input[type="search"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 12px;
    font-family: inherit;
}

/* ---------- Footer ---------- */
.site-footer {
    background: #1c1c1c;
    color: #cfcfcf;
    padding: 40px 0;
    margin-top: 20px;
}

.site-footer a {
    color: #9fd3b8;
}

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 28px;
}

.footer-widgets .widget {
    flex: 1 1 240px;
    background: transparent;
    border: 0;
    padding: 0;
    color: #cfcfcf;
}

.footer-widgets .widget-title {
    color: #fff;
    border-bottom-color: #3a3a3a;
}

.footer-widgets .widget ul li {
    border-bottom-color: #2c2c2c;
}

.site-info {
    text-align: center;
    font-size: 0.88rem;
    color: #9a9a9a;
    border-top: 1px solid #2c2c2c;
    padding-top: 20px;
}

/* ---------- Helpers ---------- */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    word-wrap: normal !important;
}

.sticky,
.bypostauthor {
    /* required by theme review */
}

.alignleft {
    float: left;
    margin: 0 1.5em 1em 0;
}

.alignright {
    float: right;
    margin: 0 0 1em 1.5em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: #777;
    text-align: center;
}
