/**
 * Blog Single Post CSS
 * Applied only on single blog posts
 */

/* Target only single blog posts */
body.single-post .entry-content,
body.single-post .site-main article {
    
    /* Headings - Matching global hierarchy */
    h1 {
        font-size: 2.5rem;
        font-weight: 700;
        color: #24262e;
        margin-bottom: 20px;
    }
    
    h2 {
        font-size: 2rem;
        font-weight: 700;
        color: #24262e;
        margin: 40px 0 20px;
        padding-bottom: 12px;
        border-bottom: 2px solid #f0f0f0;
        position: relative;
    }
    
    h2::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 60px;
        height: 3px;
        background: linear-gradient(135deg, #e4b565, #d4a03a);
        border-radius: 2px;
    }
    
    h3 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #24262e;
        margin: 30px 0 15px;
    }
    
    h4 {
        font-size: 1.25rem;
        font-weight: 600;
        color: #24262e;
        margin: 25px 0 12px;
    }
    
    h5 {
        font-size: 1.125rem;
        font-weight: 600;
        color: #24262e;
        margin: 20px 0 10px;
    }
    
    h6 {
        font-size: 1rem;
        font-weight: 600;
        color: #24262e;
        margin: 15px 0 10px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    /* Paragraphs */
    p {
        color: #495057;
        margin-bottom: 20px;
    }
    
    /* Links */
    a {
        color: #e4b565;
        text-decoration: none;
        transition: color 0.2s ease;
    }
    
    a:hover {
        color: #c89c3c;
        text-decoration: underline;
    }
    
    a.btn {
        color: white;
        text-decoration: none;
        transition: color 0.2s ease;
    }
    
    /* Lists */
    ul, ol {
        margin: 20px 0 20px 30px;
        padding: 0;
    }
    
    li {
        font-size: 1rem;
        line-height: 1.7;
        color: #555;
        margin-bottom: 10px;
    }
    
    /* Blockquotes */
    blockquote {
        background: #f8f9fa;
        border-left: 4px solid #e4b565;
        padding: 20px 30px;
        margin: 30px 0;
        font-style: italic;
        font-size: 1.1rem;
        line-height: 1.6;
        color: #333;
        border-radius: 0 12px 12px 0;
    }
    
    blockquote p {
        margin-bottom: 0;
    }
    
    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Code blocks */
    pre, code {
        background: #f5f5f5;
        padding: 2px 6px;
        border-radius: 4px;
        font-family: monospace;
        font-size: 0.9rem;
    }
    
    pre {
        padding: 15px;
        overflow-x: auto;
    }
    
    /* Breadcrumb Navigation */
    .pix-breadcrumb {
        margin-bottom: 30px;
    }
    
    .pix-breadcrumb h1 {
        font-size: 2rem !important;
        margin-bottom: 10px;
    }
    
    .pix-breadcrumb .breadcrumb {
        background: transparent;
        padding: 10px 0;
    }
    
    .pix-breadcrumb a {
        font-size: 0.875rem;
    }
}

/* Post Meta Information */
body.single-post .entry-meta {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

body.single-post .entry-meta span {
    font-size: 0.875rem;
    color: #888;
    margin-right: 20px;
}

body.single-post .entry-meta a {
    color: #666;
}

/* Featured Image */
body.single-post .post-thumbnail img {
    width: 100%;
}

/* Tags & Categories */
body.single-post .tags-links {
    margin: 30px 0;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

body.single-post .tags-links a {
    display: inline-block;
    background: #f5f5f5;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
    color: #666;
    text-decoration: none;
}

body.single-post .tags-links a:hover {
    background: #e4b565;
    color: #fff;
}

/* Author Box */
body.single-post .author-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

body.single-post .author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0;
}

body.single-post .author-info h4 {
    margin-top: 0;
    margin-bottom: 5px;
}

body.single-post .author-info p {
    margin-bottom: 0;
}

/* Comments Section */
body.single-post .comments-area {
    margin-top: 40px;
}

body.single-post .comments-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
}

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

body.single-post .comment {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

body.single-post .comment-author {
    font-weight: 600;
    color: #24262e;
}

body.single-post .comment-metadata {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

/* Related Posts */
body.single-post .related-posts {
    margin-top: 40px;
}

body.single-post .related-posts h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
}

/* ============================================
   TABLE STYLES (WordPress Block Tables)
   ============================================ */

/* Base Table Styles */
.wp-block-table {
    margin: 30px 0;
    overflow-x: auto;
    display: block;
    width: 100%;
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wp-block-table thead th {
    background: linear-gradient(135deg, #24262e, #1a1c23);
    color: #fff;
    font-weight: 700;
    padding: 14px 16px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.wp-block-table tbody td {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.wp-block-table tbody tr:last-child td {
    border-bottom: none;
}

.wp-block-table tbody tr:hover {
    background: #f8f9fa;
}

/* Fixed Layout Table */
.wp-block-table .has-fixed-layout {
    table-layout: fixed;
}

/* Striped Table (Optional) */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background: #f8f9fa;
}

/* Responsive Table */
@media (max-width: 768px) {
    .wp-block-table {
        font-size: 12px;
    }
    
    .wp-block-table thead th,
    .wp-block-table tbody td {
        padding: 10px 12px;
    }
}

/* ============================================
   BLOG TABLE OF CONTENTS (TOC)
   ============================================ */

.blog-toc {
    background: #f8f9fa;
    border-left: 4px solid #e4b565;
    border-radius: 12px;
    padding: 20px 25px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.blog-toc h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #24262e;
    margin: 0 0 15px 0;
    padding: 0;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-toc h3::before {
    content: '📖';
    font-size: 1.25rem;
}

.blog-toc ol {
    margin: 0;
    padding-left: 20px;
    list-style: none;
    counter-reset: toc-counter;
}

.blog-toc ol li {
    counter-increment: toc-counter;
    margin-bottom: 8px;
    position: relative;
    padding-left: 5px;
}

.blog-toc > ol > li {
    font-weight: 600;
    margin-bottom: 12px;
}

.blog-toc ol li::before {
    content: counter(toc-counter) ".";
    color: #e4b565;
    font-weight: 600;
    margin-right: 8px;
}

.blog-toc ol ol {
    counter-reset: sub-counter;
    padding-left: 25px;
    margin-top: 8px;
}

.blog-toc ol ol li {
    font-weight: normal;
    margin-bottom: 6px;
}

.blog-toc ol ol li::before {
    content: counter(toc-counter) "." counter(sub-counter) ".";
    color: #999;
    font-weight: normal;
}

.blog-toc ol ol li {
    counter-increment: sub-counter;
}

.blog-toc a {
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.blog-toc a:hover {
    color: #e4b565;
    text-decoration: none;
    padding-left: 3px;
}

.blog-toc > ol > li > a {
    font-weight: 600;
    color: #24262e;
}

.blog-toc > ol > li > a:hover {
    color: #e4b565;
}

/* Responsive */
@media (max-width: 768px) {
    body.single-post .entry-content h1 {
        font-size: 1.75rem;
    }
    
    body.single-post .entry-content h2 {
        font-size: 1.5rem;
    }
    
    body.single-post .entry-content h3 {
        font-size: 1.25rem;
    }
    
    body.single-post .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .blog-toc {
        padding: 15px 18px;
    }
    
    .blog-toc h3 {
        font-size: 1.1rem;
    }
    
    .blog-toc ol {
        padding-left: 15px;
    }
    
    .blog-toc ol ol {
        padding-left: 18px;
    }
    
    .blog-toc a {
        font-size: 0.85rem;
    }
    
    /* Table responsive */
    .wp-block-table {
        font-size: 12px;
    }
    
    .wp-block-table thead th,
    .wp-block-table tbody td {
        padding: 8px 10px;
    }
}