﻿/*
Theme Name: CC News Hybrid
Theme URI: https://ccnews.live
Description: 混合设计新闻主题 - 经典密集网格 + 三栏布局，现代化响应式设计
Version: 1.0
Author: CCNews Team
Author URI: https://ccnews.live
*/

:root {
    --news-red: #DC143C;
    --press-black: #1A1A1A;
    --text-gray: #666666;
    --accent-gold: #D4AF37;
    --border-light: #E5E5E5;
    --bg-light: #F8F8F8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg-light);
    color: var(--press-black);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== HEADER & NAVIGATION ========== */

.site-header {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.brand-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--news-red);
    text-align: center;
    margin-bottom: 10px;
}

.site-tagline {
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.main-navigation {
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 25px;
    list-style: none;
    margin: 0;
    flex-wrap: wrap;
    padding: 0;
}

.nav-menu a {
    color: var(--press-black);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--news-red);
}

/* 移动端汉堡菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--news-red);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* ========== HERO CAROUSEL (嵌入网格) ========== */

.hero-carousel-grid {
    grid-column: span 2;
    grid-row: span 2;
    position: relative;
    overflow: hidden;
    background: #000;
    border-radius: 10px;
    height: 420px;
    width: 100%;
}

.hero-carousel-grid .hero-slider {
    display: flex;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.hero-carousel-grid .hero-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    height: 100%;
    position: relative;
}

.hero-carousel-grid .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-carousel-grid .hero-no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.hero-carousel-grid .hero-placeholder-icon {
    font-size: 80px;
    opacity: 0.3;
}

.hero-carousel-grid .hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
}

.hero-carousel-grid .hero-content {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    color: white;
    z-index: 2;
}

.hero-carousel-grid .hero-category {
    background: var(--news-red);
    color: white;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

.hero-carousel-grid .hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 10px;
}

.hero-carousel-grid .hero-title a {
    color: white;
}

.hero-carousel-grid .hero-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    opacity: 0.9;
}

.hero-carousel-grid .hero-meta i {
    margin-right: 5px;
}

.hero-carousel-grid .hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    color: var(--press-black);
}

.hero-carousel-grid .hero-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.hero-carousel-grid .hero-prev {
    left: 15px;
}

.hero-carousel-grid .hero-next {
    right: 15px;
}

.hero-carousel-grid .hero-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.hero-carousel-grid .hero-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-carousel-grid .hero-indicator.active {
    background: white;
    width: 25px;
    border-radius: 5px;
}
/* 缃戞牸鍜屼笁鏍忓竷灞€鏍峰紡杩藉姞閮ㄥ垎 */

/* ========== ULTRA DENSE GRID SECTION ========== */

.grid-section {
    background: white;
    padding: 30px 0;
}

.grid-container {
    max-width: 98%;
    margin: 0 auto;
    padding: 0 20px;
}

.ultra-dense-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    grid-auto-flow: row;
}

/* Featured Large - 2x2 (轮播图区域) */
.featured-large {
    grid-column: span 2;
    grid-row: span 2;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Standard Card - 1x1 */
.standard-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.standard-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.standard-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.standard-content {
    padding: 15px;
}

.standard-category {
    color: var(--news-red);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.standard-card h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--press-black);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.standard-meta {
    font-size: 0.75rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.standard-meta i {
    margin-right: 5px;
}

/* Tall Card - 1x2 */
.tall-card {
    grid-row: span 2;
}

.tall-card img {
    height: 280px;
}

.tall-card h3 {
    font-size: 1.2rem;
}

.tall-excerpt {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-gray);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Wide Card - 2x1 */
.wide-card {
    grid-column: span 2;
    display: flex;
}

.wide-card img {
    width: 250px;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.wide-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wide-card h3 {
    font-size: 1.1rem;
}

/* ========== THREE COLUMN LAYOUT ========== */

.main-container {
    padding: 40px 0;
    background: var(--bg-light);
}

.container {
    max-width: 1750px;
    margin: 0 auto;
    padding: 0 15px;
}

.three-column-layout {
    display: grid;
    grid-template-columns: 250px minmax(800px, 1100px) 300px;
    gap: 25px;
    align-items: start;
    max-width: 1700px;
    margin: 0 auto;
}

/* Left Sidebar */
.left-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--news-red);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--news-red);
}

.category-item {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-item:hover {
    background: var(--bg-light);
    padding-left: 15px;
}

.category-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    color: inherit;
}

.category-icon {
    color: var(--news-red);
    font-size: 1.1rem;
}

.category-name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.content-header {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--news-red);
}

/* News Card - Horizontal */
.news-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    margin-bottom: 15px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: flex-start;
}

.news-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.news-image-container {
    flex-shrink: 0;
    width: 200px;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
}

.news-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card.no-image .news-image-container {
    display: none;
}

.news-card.no-image {
    padding: 25px;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

.news-category {
    color: var(--news-red);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.news-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--press-black);
}

.news-title a {
    color: inherit;
}

.news-title a:hover {
    color: var(--news-red);
}

.news-excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.75rem;
    color: var(--text-gray);
}

.news-meta i {
    margin-right: 5px;
}

/* Right Sidebar */
.right-sidebar {
    position: sticky;
    top: 100px;
}

.trending-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-item:hover {
    padding-left: 8px;
}

.trending-item a {
    display: flex;
    gap: 12px;
    width: 100%;
    color: inherit;
}

.trending-rank {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--news-red);
    min-width: 30px;
}

.trending-text {
    flex: 1;
}

.trending-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 5px;
}

.trending-meta {
    font-size: 0.7rem;
    color: var(--text-gray);
}

/* 简化版trending列表 - 仅标题 */
.trending-item-simple {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.trending-item-simple:last-child {
    border-bottom: none;
}

.trending-item-simple .trending-title {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.trending-item-simple .trending-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.trending-item-simple .trending-title a:hover {
    color: #c41e3a;
}

/* Loading & No More Posts */
.loading-spinner {
    text-align: center;
    padding: 40px;
    display: none;
}

.loading-spinner.active {
    display: block;
}

.spinner {
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--news-red);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-more-posts {
    text-align: center;
    padding: 40px;
    color: var(--text-gray);
    display: none;
}

.no-more-posts.active {
    display: block;
}

.end-line {
    height: 1px;
    background: var(--border-light);
    margin: 20px auto;
    width: 200px;
}

/* Footer */
.site-footer {
    background: var(--press-black);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-info h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    color: var(--news-red);
    margin-bottom: 10px;
}

.footer-info p {
    margin-bottom: 10px;
    opacity: 0.8;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ========== RESPONSIVE DESIGN ========== */

/* 超大屏幕优化 */
@media (min-width: 1800px) {
    .container {
        max-width: 1940px;
    }
    
    .three-column-layout {
        grid-template-columns: 280px minmax(1000px, 1200px) 350px;
        gap: 30px;
        max-width: 1890px;
        margin: 0 auto;
    }
}

@media (max-width: 1400px) {
    .ultra-dense-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .featured-large {
        height: 350px;
    }
    
    .three-column-layout {
        grid-template-columns: 200px 1fr 250px;
        gap: 20px;
    }

    .news-image-container {
        width: 160px;
        height: 120px;
    }
}

@media (max-width: 1200px) {
    .ultra-dense-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .featured-large {
        height: 320px;
    }
    
    .hero-carousel-grid .hero-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 992px) {
    .ultra-dense-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-large {
        height: 280px;
    }
    
    .three-column-layout {
        grid-template-columns: 1fr;
    }

    .left-sidebar,
    .right-sidebar {
        position: static;
    }

    .sidebar-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .sidebar-title {
        grid-column: 1 / -1;
    }

    .trending-item {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .ultra-dense-grid {
        grid-template-columns: 1fr;
    }

    .featured-large,
    .tall-card,
    .wide-card {
        grid-column: span 1;
        grid-row: span 1;
        height: auto;
    }
    
    .featured-large {
        height: 300px;
    }

    .wide-card {
        flex-direction: column;
    }

    .wide-card img {
        width: 100%;
        height: 200px;
    }

    .news-card {
        flex-direction: column;
    }

    .news-image-container {
        width: 100%;
        height: 200px;
    }

    .sidebar-section {
        grid-template-columns: 1fr;
    }
    
    .hero-carousel-grid .hero-title {
        font-size: 1.2rem;
    }
    
    .hero-carousel-grid .hero-content {
        bottom: 15px;
        left: 15px;
        right: 15px;
    }

    /* 移动端 Header 样式 */
    .site-header {
        position: relative;
        padding: 18px 0;
        width: 100%;
        max-width: 100%;
    }

    .header-container {
        position: relative;
        padding: 0 20px;
        width: 100%;
        max-width: 100% !important;
        margin: 0 auto;
    }

    .brand-logo {
        font-size: 2rem;
        text-align: left;
        margin-bottom: 0;
    }

    .site-tagline {
        display: none;
    }

    /* 确保容器占满全宽 */
    body.single .container,
    body.category .container {
        max-width: 100%;
        padding: 0;
    }

    body.single .main-container,
    body.category .main-container {
        padding: 20px 0;
    }

    /* 显示汉堡菜单按钮 */
    .mobile-menu-toggle {
        display: flex;
    }

    /* 隐藏桌面导航 */
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 999;
        padding-top: 60px;
    }

    .main-navigation.mobile-menu-open {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }

    .nav-menu .menu-item {
        border-bottom: 1px solid #eee;
    }

    .nav-menu a {
        display: block;
        padding: 15px 10px;
        font-size: 1rem;
        color: var(--press-black);
    }

    .nav-menu .menu-item.active a {
        color: var(--news-red);
        font-weight: 700;
    }

    /* 菜单打开时的遮罩 */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }

    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 576px) {
    .grid-container {
        padding: 0 10px;
    }

    .mobile-menu-toggle {
        width: 30px;
        height: 24px;
        right: 15px;
    }

    .main-navigation {
        width: 280px;
    }

    .nav-menu {
        padding: 15px;
    }

    .nav-menu a {
        font-size: 1rem;
        padding: 15px 10px;
    }
}

/* ============================================
   单篇文章页面样式 (Single Post Page)
   ============================================ */

.single-post {

}

.post-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.post-categories {
    margin-bottom: 15px;
}

.post-categories .category-badge {
    display: inline-block;
    background: #c41e3a;
    color: white;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    margin-right: 8px;
    transition: background 0.3s ease;
}

.post-categories .category-badge:hover {
    background: #a01729;
}

.post-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0 0 20px 0;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta i {
    color: #c41e3a;
}

.post-thumbnail {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.post-content p {
    margin-bottom: 1.5em;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 400;
    line-height: 1.3;
    color: #1a1a1a;
}

.post-content h2 {
    font-size: 1.75rem;
    border-bottom: 2px solid #c41e3a;
    padding-bottom: 10px;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
}

.post-content img {
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
}

.post-content figure {
    max-width: 100%;
    margin: 20px 0;
}

.post-content iframe,
.post-content video,
.post-content embed {
    max-width: 100%;
    height: auto;
}

.post-content table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

.post-content blockquote {
    border-left: 4px solid #c41e3a;
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #555;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
}

.post-content ul,
.post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content a {
    color: #c41e3a;
    text-decoration: underline;
}

.post-content a:hover {
    color: #a01729;
}

.post-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.post-tags i {
    color: #c41e3a;
}

.post-tags a {
    display: inline-block;
    background: #f5f5f5;
    color: #555;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background: #c41e3a;
    color: white;
}

.post-navigation {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #eee;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.post-navigation a {
    display: block;
    padding: 15px 20px;
    background: #f9f9f9;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.post-navigation a:hover {
    background: #c41e3a;
    color: white;
}

.nav-previous a {
    text-align: left;
}

.nav-next a {
    text-align: right;
}

/* 相关文章区域 */
.related-posts {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1a1a1a;
}

.section-title i {
    color: #c41e3a;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post-card {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-post-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 15px;
}

.related-post-category {
    margin-bottom: 10px;
}

.related-post-category .category-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
}

.related-post-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.related-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: #c41e3a;
}

.related-post-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #999;
}

.related-post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.related-post-meta i {
    color: #c41e3a;
}

.no-related-posts {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .single-post {
        padding: 30px 20px;
    }

    .post-title {
        font-size: 1.6rem;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .single-post {
        padding: 0;
    }

    .post-title {
        font-size: 1.4rem;
    }

    .post-content {
        font-size: 1rem;
        overflow-x: hidden;
    }

    /* 防止所有内容元素溢出 */
    .post-content img,
    .post-content figure,
    .post-content iframe,
    .post-content video,
    .post-content embed,
    .post-content object {
        max-width: 100% !important;
        height: auto !important;
        width: auto !important;
    }

    .post-content table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .post-content pre {
        overflow-x: auto;
        max-width: 100%;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    /* 移动端：隐藏左侧边栏，优化内容宽度 */
    body.single .left-sidebar,
    body.category .left-sidebar {
        display: none !important;
    }

    body.single .three-column-layout,
    body.category .three-column-layout {
        grid-template-columns: 1fr 280px;
        gap: 15px;
        width: 100%;
        padding: 0 15px;
    }

    body.single .main-content,
    body.category .main-content {
        padding: 15px;
        box-shadow: none;
        width: 100%;
        margin: 0;
    }

    body.single .news-card,
    body.category .news-card {
        padding: 15px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

    body.single .right-sidebar,
    body.category .right-sidebar {
        padding: 15px;
        width: 280px;
    }
}

/* 超小屏幕：进一步优化 */
@media (max-width: 576px) {
    /* Header 优化 */
    .site-header {
        padding: 15px 0;
        width: 100%;
        max-width: 100%;
    }

    .header-container {
        padding: 0 15px;
        width: 100%;
        max-width: 100% !important;
    }

    .brand-logo {
        font-size: 1.8rem;
    }

    /* 隐藏左侧边栏，右侧边栏移到底部 */
    body.single .left-sidebar,
    body.category .left-sidebar {
        display: none !important;
    }

    body.single .three-column-layout,
    body.category .three-column-layout {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0 10px;
        width: 100%;
    }

    body.single .main-content,
    body.category .main-content {
        width: 100%;
        padding: 15px;
        margin: 0;
        box-shadow: none;
        overflow-x: hidden;
        max-width: 100%;
    }

    body.single .right-sidebar,
    body.category .right-sidebar {
        width: 100%;
        margin-top: 20px;
        padding: 15px;
        overflow-x: hidden;
    }

    body.single .news-card,
    body.category .news-card {
        padding: 15px;
        margin-bottom: 12px;
        overflow-x: hidden;
    }

    body.single .post-content,
    body.category .post-content {
        padding: 0;
        overflow-x: hidden;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* 确保所有媒体元素不溢出 */
    body.single .post-content img,
    body.category .post-content img,
    body.single .post-content figure,
    body.category .post-content figure,
    body.single .post-content iframe,
    body.category .post-content iframe {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 简化侧边栏项目 */
    .trending-item-simple {
        padding: 10px 0;
    }

    .trending-item-simple .trending-title {
        font-size: 0.9rem;
    }
}
