/* Blog Specific Styles */
.blog-container {
    max-width: 1000px;
    /* Reduced from 1200px for better readability focus */
    margin: 60px auto;
    padding: 0 20px;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.blog-title {
    font-size: 3.5rem;
    /* Larger, more impactful */
    line-height: 1.1;
    margin-bottom: 25px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.blog-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    font-family: 'Inter', sans-serif;
}

.blog-separator {
    color: var(--border-color);
}

.blog-featured-image {
    margin-bottom: 60px;
    border-radius: 16px;
    overflow: hidden;
    background-color: var(--bg-card);
    /* Placeholder color */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blog-featured-image img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    display: block;
}

/* Content Wrapper */
.blog-content-wrapper {
    display: grid;
    grid-template-columns: 200px 1fr;
    /* Tighter sidebar */
    gap: 60px;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    grid-template-areas: "sidebar content";
}

.blog-content-wrapper.no-sidebar {
    grid-template-columns: 1fr;
    grid-template-areas: "content";
    max-width: 700px;
    /* Center single column nicely */
}

/* Sidebar / TOC */
.blog-sidebar {
    position: sticky;
    top: 120px;
    /* Account for fixed header */
    height: fit-content;
    grid-area: sidebar;
}

.toc {
    border-left: 2px solid var(--border-color);
    padding-left: 15px;
}

.toc h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 600;
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: 12px;
}

.toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: block;
    line-height: 1.4;
}

.toc a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.toc-3 {
    padding-left: 15px;
    font-size: 0.85rem;
}

/* Blog Body */
.blog-body {
    grid-area: content;
    font-family: 'Merriweather', 'Georgia', serif;
    font-size: 20px;
    /* Larger body text */
    line-height: 1.9;
    color: var(--text-primary);
    max-width: 680px;
    /* Optimal reading line length */
    margin: 0 auto;
    /* Center if sidebar is hidden */
}

.blog-body h2 {
    font-family: 'Inter', sans-serif;
    font-size: 2.2rem;
    margin-top: 60px;
    margin-bottom: 25px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.blog-body h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.7rem;
    margin-top: 45px;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.blog-body p {
    margin-bottom: 30px;
}

.blog-body img {
    max-width: 130%;
    /* Break out of container slightly for emphasis */
    width: 130%;
    margin-left: -15%;
    height: auto;
    border-radius: 12px;
    margin-top: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.blog-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 30px;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 50px 0;
    line-height: 1.6;
}

/* Suggested Posts */
.suggested-posts {
    max-width: 1000px;
    margin: 100px auto;
    border-top: 1px solid var(--border-color);
    padding-top: 60px;
}

.suggested-posts h3,
.suggested-prerolls h3 {
    font-size: 1.8rem;
    margin-bottom: 40px;
    font-weight: 700;
}

.suggested-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.suggested-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.suggested-card:hover {
    transform: translateY(-5px);
}

.suggested-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.suggested-card h4 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.suggested-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

/* Prerolls Section */
.suggested-prerolls {
    max-width: 1000px;
    margin: 80px auto;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .blog-container {
        padding: 0 15px;
        margin: 30px auto;
    }

    .blog-title {
        font-size: 2.5rem;
    }

    .blog-content-wrapper {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        display: none;
    }

    .blog-body img {
        max-width: 100%;
        width: 100%;
        margin-left: 0;
    }

    .suggested-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}