/*
Theme Name: GEO Content
Description: Professional Chinese blog - JustNews style
Version: 3.0
*/

:root {
    --primary: #08c;
    --primary-hover: #0077b3;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg: #fff;
    --bg-light: #f5f6f8;
    --bg-dark: #222;
    --border: #eee;
    --border-light: #f5f5f5;
    --radius: 4px;
    --shadow: 0 1px 3px rgba(0,0,0,.06);
    --max-width: 1160px;
    --content-ratio: 0.68;
}

*{margin:0;padding:0;box-sizing:border-box}

body {
    font-family: -apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background: #f5f6f8;
    -webkit-font-smoothing: antialiased;
}

a{color:var(--primary);text-decoration:none;transition:color .2s}
a:hover{color:var(--primary-hover)}
img{max-width:100%;height:auto;vertical-align:middle}

/* ========== HEADER ========== */
.site-header {
    background: #1e2c3a;
    height: 50px;
    line-height: 50px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    height: 50px;
}

.site-logo {
    font-size: 20px;
    font-weight: 700;
    color: #fff !important;
    margin-right: 30px;
    white-space: nowrap;
}
.site-logo:hover{color:#fff !important;opacity:.85}

.site-nav {
    display: flex;
    list-style: none;
    height: 50px;
}

.site-nav li {
    position: relative;
}

.site-nav li a {
    display: block;
    padding: 0 15px;
    height: 50px;
    line-height: 50px;
    color: rgba(255,255,255,.85);
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}

.site-nav li a:hover,
.site-nav li.current-menu-item a {
    color: #fff;
    background: rgba(255,255,255,.08);
}

/* ========== CONTAINER ========== */
.container {
    max-width: var(--max-width);
    margin: 20px auto 0;
    padding: 0 15px;
    display: flex;
    gap: 20px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

@media(max-width:960px){
    .container{flex-direction:column}
    .sidebar{width:100%}
}

/* ========== HERO / BANNER ========== */
.hero {
    background: #fff;
    margin-bottom: 20px;
    padding: 25px 20px;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero h1{font-size:26px;font-weight:700;margin-bottom:8px;color:var(--text)}
.hero p{font-size:15px;color:var(--text-light)}

/* ========== CATEGORY TABS ========== */
.cat-tabs {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
    border-bottom: 2px solid var(--border);
}

.cat-tabs a {
    display: block;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
}

.cat-tabs a:hover,
.cat-tabs a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ========== POST CARDS ========== */
.posts-list {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.post-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 20px;
}

.post-item:last-child{border-bottom:none}

.post-item-thumb {
    width: 200px;
    height: 130px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
    position: relative;
}

.post-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-item-thumb .no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #ccc;
}

.post-item-cat {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 2px;
    z-index: 2;
}

.post-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.post-item-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 8px;
}

.post-item-title a {
    color: var(--text);
}

.post-item-title a:hover {
    color: var(--primary);
}

.post-item-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-item-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.post-item-meta .author-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.post-item-meta .author-name {
    color: var(--primary);
}

.post-item-meta .dot {
    color: #ddd;
}

.post-item-meta .views {
    color: var(--text-muted);
}

/* Sticky */
.post-item.sticky .post-item-title::before {
    content: "置顶";
    display: inline-block;
    background: #ff5e52;
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
}

/* ========== SINGLE ARTICLE ========== */
.article {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 35px;
}

.breadcrumbs {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs .sep {
    margin: 0 8px;
    color: #ccc;
}

.article-header {
    margin-bottom: 25px;
}

.article-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.4;
    color: #222;
    margin-bottom: 15px;
}

.article-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.article-meta .author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 4px;
}

.article-meta .author-name a {
    color: var(--primary);
}

.article-meta .dot {
    color: #ddd;
    margin: 0 6px;
}

.article-meta .meta-item {
    display: inline-flex;
    align-items: center;
}

/* Article Content */
.article-content {
    font-size: 16px;
    line-height: 1.85;
    color: #444;
    word-break: break-word;
}

.article-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 35px 0 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    color: #222;
}

.article-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 28px 0 12px;
    color: #333;
}

.article-content p {
    margin-bottom: 18px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 18px auto;
    display: block;
}

.article-content figure {
    margin: 20px 0;
    text-align: center;
}

.article-content figcaption {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.article-content ul,
.article-content ol {
    margin: 14px 0 18px 22px;
}

.article-content li {
    margin-bottom: 6px;
}

.article-content blockquote {
    background: #f8f9fa;
    border-left: 3px solid var(--primary);
    padding: 14px 18px;
    margin: 20px 0;
    color: var(--text-light);
    font-size: 15px;
}

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

.article-content th {
    background: #f8f9fa;
    padding: 10px 14px;
    border: 1px solid var(--border);
    font-weight: 600;
    text-align: left;
}

.article-content td {
    padding: 8px 14px;
    border: 1px solid var(--border);
}

.article-content strong {
    color: #222;
}

/* Article source/tip */
.article-source {
    background: #fff8e5;
    border: 1px solid #ffe8a0;
    color: #8a6d3b;
    padding: 10px 15px;
    font-size: 13px;
    margin: 25px 0 15px;
    border-radius: var(--radius);
}

/* Tags */
.article-tags {
    margin: 20px 0 0;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.article-tags a {
    display: inline-block;
    padding: 3px 12px;
    margin: 0 6px 6px 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-light);
    transition: all .2s;
}

.article-tags a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Author Card */
.author-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-card-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-card-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.author-card-info h3 a {
    color: var(--text);
}

.author-card-info p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Prev Next */
.post-nav {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.post-nav-item {
    flex: 1;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    overflow: hidden;
    transition: box-shadow .2s;
}

.post-nav-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.post-nav-thumb {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
}

.post-nav-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-nav-info {
    padding: 12px 15px;
    min-width: 0;
}

.post-nav-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.post-nav-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-nav-title a {
    color: var(--text);
}

.post-nav-title a:hover {
    color: var(--primary);
}

/* ========== RELATED POSTS ========== */
.related-posts {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-top: 20px;
}

.related-posts-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.related-posts-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media(max-width:640px){
    .related-posts-grid{grid-template-columns:1fr}
}

.related-post-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .2s;
    display: block;
    color: var(--text) !important;
}

.related-post-card:hover {
    box-shadow: var(--shadow);
}

.related-post-thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-cat {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 2px;
}

.related-post-info {
    padding: 12px 14px;
}

.related-post-info h3 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== SIDEBAR ========== */
.sidebar-widget {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 20px;
}

.sidebar-widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    position: relative;
    color: var(--text);
}

.sidebar-widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

/* Sidebar post list */
.sidebar-post-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-post-thumb {
    width: 100px;
    height: 65px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
}

.sidebar-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-post-info {
    flex: 1;
    min-width: 0;
}

.sidebar-post-info h4 {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-post-info h4 a {
    color: var(--text);
}

.sidebar-post-info h4 a:hover {
    color: var(--primary);
}

.sidebar-post-info .date {
    font-size: 12px;
    color: var(--text-muted);
}

/* Tag cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-light);
    transition: all .2s;
}

.tag-cloud a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ========== TOC (Table of Contents) ========== */
.geo-toc {
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 0 0 25px;
}

.geo-toc-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 10px;
    color: var(--text);
}

.geo-toc ol {
    list-style: none;
    margin: 0;
    counter-reset: toc;
}

.geo-toc li {
    counter-increment: toc;
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.6;
}

.geo-toc li::before {
    content: counter(toc) ".";
    color: var(--primary);
    margin-right: 6px;
}

.geo-toc a {
    color: var(--text-light);
}

.geo-toc a:hover {
    color: var(--primary);
}

/* ========== FAQ (GEO) ========== */
.geo-faq {
    margin: 30px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.geo-faq h2 {
    background: #f8f9fa;
    padding: 14px 20px;
    margin: 0 !important;
    font-size: 17px;
    border-bottom: none !important;
}

.geo-faq-item {
    border-bottom: 1px solid var(--border-light);
}

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

.geo-faq-question {
    padding: 13px 20px;
    font-weight: 600;
    background: #fafbfc;
    font-size: 15px;
    color: var(--text);
}

.geo-faq-question::before {
    content: "Q ";
    color: var(--primary);
    font-weight: 700;
}

.geo-faq-answer {
    padding: 13px 20px;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}

.geo-faq-answer::before {
    content: "A ";
    color: #22c55e;
    font-weight: 700;
}

/* Keypoints */
.geo-keypoints {
    background: #f0f7ff;
    border: 1px solid #d0e2f7;
    border-radius: var(--radius);
    padding: 18px 22px;
    margin: 20px 0;
}

.geo-keypoints-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 10px;
}

.geo-keypoints li {
    margin-bottom: 5px;
    color: var(--text-light);
    font-size: 15px;
}

.geo-data-highlight {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 12px 16px;
    margin: 18px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 14px;
    color: #166534;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 25px 0 10px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 3px;
    font-size: 13px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    transition: all .2s;
}

.pagination .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination a:hover {
    border-color: var(--primary);
}

/* ========== FOOTER ========== */
.site-footer {
    background: #1e2c3a;
    color: #8a95a5;
    padding: 40px 0 20px;
    margin-top: 30px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

@media(max-width:768px){
    .footer-inner{grid-template-columns:1fr}
    .post-item{flex-direction:column}
    .post-item-thumb{width:100%;height:auto;aspect-ratio:16/10}
    .post-nav{flex-direction:column}
    .article{padding:20px}
    .article-title{font-size:22px}
}

.footer-col h3 {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

.footer-col p {
    font-size: 13px;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #8a95a5;
    font-size: 13px;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 20px auto 0;
    padding: 15px 15px 0;
    border-top: 1px solid rgba(255,255,255,.08);
    text-align: center;
    font-size: 12px;
    color: #5a6675;
}

.footer-bottom a {
    color: #5a6675;
}

.footer-bottom a:hover {
    color: #fff;
}

/* ========== RESPONSIVE ========== */
@media(max-width:960px){
    .container{flex-direction:column}
    .sidebar{width:100%}
}

@media(max-width:768px){
    .article{padding:18px}
    .article-title{font-size:21px}
    .article-content{font-size:15px}
    .post-item{flex-direction:column}
    .post-item-thumb{width:100%;aspect-ratio:16/10;height:auto}
    .post-nav{flex-direction:column}
}
