/* ==========================================================================
   Single Post Template Styles
   ========================================================================== */

/* Post Header */
.single-post-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a2a5e 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.single-post-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(253, 95, 23, 0.1);
    border-radius: 50%;
}

.single-post-header .entry-header {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.single-post-header .entry-title {
    color: #fff;
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.2;
}

.single-post-header .entry-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.single-post-header .entry-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-post-header .entry-meta svg {
    width: 16px;
    height: 16px;
    fill: var(--primary-color);
}

.single-post-header .entry-meta a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.single-post-header .entry-meta a:hover {
    color: var(--primary-color);
}

.single-post-header .cat-links a:hover {
    color: var(--primary-color);
}

/* Featured Image */
.post-thumbnail {
    margin-bottom: 50px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.single .entry-content p {
    margin-bottom: 20px;
}

.single .entry-content ul,
.single .entry-content ol {
    margin-left: 30px;
    margin-bottom: 25px;
}

.single .entry-content li {
    margin-bottom: 12px;
    line-height: 1.9;
}

.single .entry-content ul li::marker {
    color: var(--primary-color);
}

.single .entry-content blockquote {
    border-left: 5px solid var(--primary-color);
    padding: 25px 35px;
    margin: 40px 0;
    background: var(--background-light);
    font-style: italic;
    font-size: 18px;
    color: var(--text-muted);
    position: relative;
}

.single .entry-content blockquote::before {
    content: '"';
    font-size: 80px;
    line-height: 1;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    top: 10px;
    left: 10px;
}

.single .entry-content img {
    border-radius: 0;
    box-shadow: var(--shadow-md);
    margin: 35px 0;
}

.single .entry-content .wp-block-image {
    margin: 40px 0;
}

.single .entry-content .wp-block-image figcaption {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 15px;
    font-style: italic;
}

/* Entry Footer (Tags) */
.entry-footer {
    margin-top: 50px;
    padding: 30px;
    background: var(--background-light);
    border-left: 4px solid var(--primary-color);
}

.entry-footer .tags-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.entry-footer .tags-links a {
    display: inline-block;
    padding: 8px 15px;
    background: #fff;
    color: var(--secondary-color);
    font-size: 13px;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.entry-footer .tags-links a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Post Navigation */
.post-navigation {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 2px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.post-navigation .nav-links {
    display: contents;
}

.post-navigation a {
    display: block;
    padding: 25px;
    background: var(--background-light);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-decoration: none;
}

.post-navigation a:hover {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.post-navigation .nav-title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.4;
}

.post-navigation .nav-previous {
    text-align: left;
}

.post-navigation .nav-next {
    text-align: right;
}

/* Comments Section */
.comments-area {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 2px solid var(--border-color);
}

/* Author Box */
.author-box {
    margin-top: 60px;
    padding: 40px;
    background: var(--background-light);
    border-radius: 0;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.author-box .author-avatar {
    flex-shrink: 0;
}

.author-box .author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
}

.author-box .author-info h4 {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.author-box .author-info p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 15px;
}

.author-box .author-social a {
    display: inline-block;
    margin-right: 10px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.author-box .author-social a:hover {
    color: var(--primary-color);
}

/* Related Posts */
.related-posts {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 2px solid var(--border-color);
}

.related-posts h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 40px;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Responsive */
@media (max-width: 991px) {
    .single-post-header {
        padding: 60px 0 40px;
    }

    .single .entry-content h3 {
        font-size: 24px;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .author-box {
        padding: 30px;
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .single-post-header {
        padding: 40px 0 30px;
    }

    .single-post-header .entry-title {
        font-size: 28px;
    }

    .single .entry-content h2 {
        font-size: 24px;
        margin-top: 30px;
    }

    .single .entry-content h3 {
        font-size: 20px;
    }

    .single .entry-content blockquote {
        padding: 20px 25px;
        font-size: 16px;
    }

    .post-thumbnail {
        margin-bottom: 30px;
    }

    .post-navigation a {
        padding: 20px;
    }

    .post-navigation .nav-title {
        font-size: 16px;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .author-box {
        flex-direction: column;
        padding: 25px;
        text-align: center;
    }

    .author-box .author-avatar {
        margin: 0 auto;
    }
}

/* ==========================================================================
   Single Post Layout Styles (Sidebar Support)
   ========================================================================== */
/* Layout Container */
.single-post-wrapper {
    padding: 80px 0;
    background: #fff;
}

.single-post-layout {
    display: grid;
    gap: 40px;
}

/* 带侧边栏布局 */
.has-sidebar .single-post-layout {
    grid-template-columns: 1fr 350px;
}

.has-sidebar.sidebar-left .single-post-layout {
    grid-template-columns: 350px 1fr;
}

.has-sidebar.sidebar-left .site-main {
    order: 2;
}

.has-sidebar.sidebar-left .widget-area {
    order: 1;
}

/* 无侧边栏布局 - 内容宽度控制 */
.no-sidebar .site-main {
    margin: 0 auto;
}

.no-sidebar.content-narrow .site-main {
    max-width: 700px;
}

.no-sidebar.content-medium .site-main {
    max-width: 900px;
}

.no-sidebar.content-wide .site-main {
    max-width: 1200px;
}

/* 移除旧的容器样式冲突 */
.single-post-wrapper .site-main {
    padding: 0;
    background: transparent;
}

/* 响应式布局 */
@media (max-width: 991px) {
    .single-post-wrapper {
        padding: 60px 0;
    }

    .has-sidebar .single-post-layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .has-sidebar.sidebar-left .site-main,
    .has-sidebar .widget-area {
        order: initial;
    }
}

@media (max-width: 767px) {
    .single-post-wrapper {
        padding: 40px 0;
    }

    .single-post-layout {
        gap: 40px;
    }

    .no-sidebar .site-main {
        max-width: 100%;
    }
}