/* Blog-specific styles */

/* Blog Container */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Blog Listing Page */
.blog-listing {
    min-height: 60vh;
    padding: 4rem 0;
}

.blog-listing-header {
    text-align: center;
    margin-bottom: 4rem;
}

.blog-listing-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #000;
}

.blog-listing-header p {
    font-size: 1.25rem;
    color: #666;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.blog-card {
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.blog-card:hover {
    border-color: #0066cc;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.blog-card-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 2rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.blog-separator {
    color: #ddd;
}

.blog-card-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #000;
}

.blog-card-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.blog-card-read-more {
    color: #0066cc;
    font-weight: 600;
    display: inline-block;
}

/* Blog Post Page */
.blog-post {
    min-height: 60vh;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.blog-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #000;
}

.blog-description {
    font-size: 1.25rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Human Written Badge */
.human-written-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #FFF4D6 0%, #FFE873 100%);
    border: 2px solid #F4B400;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #000;
    box-shadow: 0 2px 8px rgba(244, 180, 0, 0.2);
}

.human-written-badge svg {
    color: #F4B400;
}

/* Blog Layout with TOC */
.blog-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Table of Contents */
.blog-toc {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.toc-nav {
    background: #f9f9f9;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    padding: 1.5rem;
}

.toc-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 1rem;
}

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

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    display: block;
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toc-list a:hover {
    color: #0066cc;
    background: #fff;
}

.toc-list a.active {
    color: #0066cc;
    background: #fff;
    font-weight: 600;
    border-left: 3px solid #0066cc;
}

/* Indent H3 headings in TOC */
.toc-list li.toc-h3 {
    margin-left: 1rem;
}

.toc-list li.toc-h3 a {
    font-size: 0.8125rem;
}

/* Blog Content */
.blog-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333;
    min-width: 0; /* Prevent overflow in grid */
}

.blog-content h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #000;
    line-height: 1.3;
}

.blog-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #000;
    line-height: 1.3;
}

.blog-content p {
    margin-bottom: 0.5rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-content li {
}

.blog-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
}

.blog-content pre {
    background: #f5f5f5;
    padding: 0.2rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.blog-content pre code {
    background: none;
    padding: 0;
    color: #333;
}

.blog-content blockquote {
    border-left: 4px solid #F4B400;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #666;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.blog-content a {
    color: #0066cc;
    text-decoration: underline;
}

.blog-content a:hover {
    color: #004499;
    text-decoration: underline;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.blog-content th,
.blog-content td {
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
}

.blog-content th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Blog Footer */
.blog-footer {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #f0f0f0;
}

.blog-author {
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.author-info {
    text-align: left;
}

.author-name {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.author-bio {
    color: #666;
}

.blog-cta {
    background: linear-gradient(135deg, #FFF4D6 0%, #FFE873 100%);
    border: 2px solid #F4B400;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.blog-cta h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: #000;
}

.blog-cta p {
    color: #333;
    margin-bottom: 1.5rem;
}

.blog-back {
    text-align: center;
}

.btn-back {
    color: #666;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    color: #0066cc;
}

/* Responsive Design */
@media (max-width: 1200px) {
    /* Hide TOC on tablets and below */
    .blog-toc {
        display: none;
    }

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

    .blog-container {
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .blog-container {
        padding: 2rem 1.5rem;
    }

    .blog-listing-header h1 {
        font-size: 2rem;
    }

    .blog-listing-header p {
        font-size: 1rem;
    }

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

    .blog-description {
        font-size: 1rem;
    }

    .blog-content {
        font-size: 1rem;
    }

    .blog-content h2 {
        font-size: 1.5rem;
    }

    .blog-content h3 {
        font-size: 1.25rem;
    }

    .human-written-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
