/*
Theme Name: JustNews Inspired
Theme URI: https://www.qudaoren.com
Description: 受JustNews主题启发现代简洁的新闻/博客主题，包含白色背景、蓝色主色调、清晰的布局结构
Version: 1.0.0
Author: Qudaoren
Author URI: https://www.qudaoren.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: justnews-inspired
Tags: blog, news, two-columns, right-sidebar, custom-menu, featured-images, post-formats, theme-options
*/

/* ==========================================
   CSS Reset & Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #333333;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #007AFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.2rem;
}

/* ==========================================
   Layout & Container
   ========================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-main {
    flex: 0 0 calc(70% - 30px);
    max-width: calc(70% - 30px);
}

.col-sidebar {
    flex: 0 0 calc(30% - 30px);
    max-width: calc(30% - 30px);
}

/* ==========================================
   Header
   ========================================== */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.header-top {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
    padding: 8px 0;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top-info {
    font-size: 13px;
    color: #666;
}

.header-top-social a {
    color: #666;
    margin-left: 15px;
    font-size: 13px;
}

.header-main {
    padding: 20px 0;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: #007AFF;
    margin: 0;
}

.site-title a {
    color: inherit;
}

.site-description {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Navigation */
.main-navigation {
    border-top: 1px solid #e5e5e5;
    background-color: #ffffff;
}

.main-navigation ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 15px 20px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: #007AFF;
    border-bottom-color: #007AFF;
    background-color: #f8f9fa;
}

/* ==========================================
   Hero Slider
   ========================================== */
.hero-slider {
    background-color: #f8f9fa;
    padding: 30px 0;
    margin-bottom: 40px;
}

.hero-slider .container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.hero-main {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hero-main img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.hero-main .hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #ffffff;
}

.hero-main h2 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.hero-main h2 a {
    color: #ffffff;
}

.hero-main .hero-meta {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

.hero-secondary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hero-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.hero-item .hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #ffffff;
}

.hero-item h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.hero-item h3 a {
    color: #ffffff;
}

/* ==========================================
   Category Bar
   ========================================== */
.category-bar {
    background-color: #ffffff;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.category-bar .container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-bar-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding: 8px 0;
}

.category-bar-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    display: inline-block;
    padding: 6px 15px;
    background-color: #f8f9fa;
    color: #666;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background-color: #007AFF;
    color: #ffffff;
}

/* ==========================================
   Main Content Area
   ========================================== */
.main-content {
    padding: 30px 0;
    min-height: 600px;
}

/* Post List */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.post-item {
    display: flex;
    gap: 20px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.post-item:last-child {
    border-bottom: none;
}

.post-thumbnail {
    flex: 0 0 300px;
    overflow: hidden;
    border-radius: 8px;
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-meta a {
    color: #999;
}

.post-meta a:hover {
    color: #007AFF;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-title a {
    color: #1a1a1a;
}

.post-title a:hover {
    color: #007AFF;
}

.post-excerpt {
    color: #666;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 15px;
    flex-grow: 1;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}

.post-footer .post-stats {
    display: flex;
    gap: 15px;
}

.post-footer .post-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    min-width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    padding: 0 15px;
    border-radius: 5px;
    background-color: #f8f9fa;
    color: #333;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    background-color: #007AFF;
    color: #ffffff;
}

/* ==========================================
   Sidebar
   ========================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007AFF;
}

/* Widget: Post List */
.widget-post-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.widget-post-item {
    display: flex;
    gap: 15px;
}

.widget-post-item .post-thumb {
    flex: 0 0 80px;
}

.widget-post-item .post-thumb img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.widget-post-item .post-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.4;
}

.widget-post-item .post-info h4 a {
    color: #333;
}

.widget-post-item .post-info h4 a:hover {
    color: #007AFF;
}

.widget-post-item .post-meta {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* Widget: Tabs */
.widget-tabs {
    display: flex;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 20px;
}

.widget-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.widget-tab.active,
.widget-tab:hover {
    color: #007AFF;
    border-bottom-color: #007AFF;
}

/* Widget: Quick News */
.widget-quick-news {
    max-height: 400px;
    overflow-y: auto;
}

.quick-news-item {
    padding: 12px 0;
    border-bottom: 1px dashed #e5e5e5;
}

.quick-news-item:last-child {
    border-bottom: none;
}

.quick-news-item h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.quick-news-item h4 a {
    color: #333;
}

.quick-news-item h4 a:hover {
    color: #007AFF;
}

.quick-news-item .news-meta {
    font-size: 12px;
    color: #999;
}

/* Widget: Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f8f9fa;
    color: #666;
    border-radius: 15px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.tag-cloud a:hover {
    background-color: #007AFF;
    color: #ffffff;
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-widget-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007AFF;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #bdc3c7;
    font-size: 14px;
}

.footer-widget a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #95a5a6;
}

.footer-bottom a {
    color: #95a5a6;
}

/* ==========================================
   Single Post
   ========================================== */
.single-post {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 30px;
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.post-header .post-meta {
    justify-content: center;
    font-size: 14px;
}

.post-thumbnail-single {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.post-thumbnail-single img {
    width: 100%;
    height: auto;
}

.post-body {
    font-size: 17px;
    line-height: 1.9;
    color: #333;
}

.post-body p {
    margin-bottom: 1.8rem;
}

.post-body h2,
.post-body h3,
.post-body h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-body img {
    margin: 2rem 0;
    border-radius: 8px;
}

.post-footer-single {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.post-tags {
    margin-bottom: 20px;
}

.post-tags span {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f8f9fa;
    color: #666;
    border-radius: 15px;
    font-size: 13px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 30px 0;
}

.post-nav-link {
    flex: 1;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.post-nav-link:hover {
    background-color: #007AFF;
}

.post-nav-link:hover h4 {
    color: #ffffff;
}

.post-nav-link h4 {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.post-nav-link small {
    font-size: 12px;
    color: #999;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
    .hero-main img {
        height: 300px;
    }
    
    .hero-item img {
        height: 140px;
    }
    
    .hero-main h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-slider .container {
        grid-template-columns: 1fr;
    }
    
    .col-main,
    .col-sidebar {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .post-item {
        flex-direction: column;
    }
    
    .post-thumbnail {
        flex: 0 0 auto;
    }
    
    .post-thumbnail img {
        height: 250px;
    }
    
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .site-header {
        position: relative;
    }
    
    .main-navigation ul {
        flex-direction: column;
    }
    
    .main-navigation a {
        border-bottom: 1px solid #e5e5e5;
    }
    
    .post-header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .hero-main img {
        height: 250px;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .widget {
        padding: 20px;
    }
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-center {
    text-align: center;
}

.text-muted {
    color: #999;
}

.bg-light {
    background-color: #f8f9fa;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: #007AFF;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #0056b3;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #007AFF;
    color: #007AFF;
}

.btn-outline:hover {
    background-color: #007AFF;
    color: #ffffff;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-item {
    animation: fadeIn 0.5s ease;
}

/* ==========================================
   WordPress Classes
   ========================================== */
.alignleft {
    float: left;
    margin: 0 20px 20px 0;
}

.alignright {
    float: right;
    margin: 0 0 20px 20px;
}

.aligncenter {
    display: block;
    margin: 0 auto 20px;
}
