/* Blog Content Styling */

/* Main content container */
.blog-content {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    line-height: 1.8;
    color: #333;
    font-size: 1.1rem;
    text-align: justify;
}

/* Headings */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a252f;
}

.blog-content h1 { font-size: 2.5rem; }
.blog-content h2 { font-size: 2rem; }
.blog-content h3 { font-size: 1.75rem; }
.blog-content h4 { font-size: 1.5rem; }
.blog-content h5 { font-size: 1.25rem; }
.blog-content h6 { font-size: 1.1rem; }

/* Paragraphs */
.blog-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
    hyphens: auto;
}

/* Lists */
.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

/* Blockquotes */
.blog-content blockquote {
    border-left: 4px solid #4f46e5;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: #f8fafc;
    font-style: italic;
    color: #475569;
}

.blog-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Links */
.blog-content a {
    color: #4f46e5;
    text-decoration: none;
    border-bottom: 1px solid rgba(79, 70, 229, 0.3);
    transition: all 0.2s ease;
}

.blog-content a:hover {
    color: #4338ca;
    border-bottom-color: #4338ca;
}

/* Images */
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Image captions */
.blog-content figure {
    margin: 2rem 0;
}

.blog-content figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Code blocks */
.blog-content pre {
    background-color: #f1f5f9;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

.blog-content code {
    background-color: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

/* Tables */
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.blog-content th,
.blog-content td {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
}

.blog-content th {
    background-color: #f8fafc;
    font-weight: 600;
    text-align: left;
}

.blog-content tr:nth-child(even) {
    background-color: #f8fafc;
}

/* Horizontal rule */
.blog-content hr {
    border: 0;
    height: 1px;
    background-color: #e2e8f0;
    margin: 2rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-content {
        font-size: 1rem;
    }
    
    .blog-content h1 { font-size: 2rem; }
    .blog-content h2 { font-size: 1.75rem; }
    .blog-content h3 { font-size: 1.5rem; }
    .blog-content h4 { font-size: 1.25rem; }
    .blog-content h5 { font-size: 1.1rem; }
    .blog-content h6 { font-size: 1rem; }
}

/* Accessibility improvements */
.blog-content :focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Additional elements */
.blog-content iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Callout boxes */
.blog-content .callout {
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    background-color: #f0f9ff;
    border-left: 4px solid #0ea5e9;
}

.blog-content .callout-warning {
    background-color: #fffbeb;
    border-left-color: #f59e0b;
}

.blog-content .callout-danger {
    background-color: #fef2f2;
    border-left-color: #ef4444;
}

.blog-content .callout-success {
    background-color: #f0fdf4;
    border-left-color: #10b981;
}

/* Highlight text */
.blog-content mark {
    background-color: rgba(250, 204, 21, 0.2);
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

/* Footnotes */
.blog-content .footnote {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* Improve spacing between elements */
.blog-content * + h2,
.blog-content * + h3 {
    margin-top: 2.5rem;
}

/* Fix for nested lists */
.blog-content ul ul,
.blog-content ol ol,
.blog-content ul ol,
.blog-content ol ul {
    margin-bottom: 0;
}/* Table o
f Contents Styling */
.toc-card {
    background-color: #f8fafc;
    border-left: 4px solid #4f46e5 !important;
    margin-bottom: 2rem;
}

.toc-list {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
}

.toc-list li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.toc-list a {
    color: #4f46e5;
    text-decoration: none;
    display: inline-block;
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.toc-list a:hover {
    color: #4338ca;
    border-bottom-color: #4338ca;
    transform: translateX(5px);
}

/* Author info box */
.author-info {
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin-top: 3rem;
    padding: 1.5rem 0;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Print styles */
@media print {
    .blog-content {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .blog-content img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    .blog-content h2, 
    .blog-content h3 {
        page-break-after: avoid;
    }
    
    .blog-content p, 
    .blog-content li {
        page-break-inside: avoid;
    }
    
    .blog-content a {
        text-decoration: underline;
        color: #000 !important;
    }
}

/* Reading time indicator */
.reading-time {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.reading-time i {
    margin-right: 0.5rem;
}

/* Syntax highlighting for code blocks */
.blog-content pre code {
    display: block;
    padding: 1rem;
    overflow-x: auto;
    background-color: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
}

/* Responsive video embeds */
.blog-content .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.blog-content .video-container iframe,
.blog-content .video-container object,
.blog-content .video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}/* Just
ified text improvements */
.blog-content p, 
.blog-content li, 
.blog-content blockquote p {
    text-align: justify;
    word-break: normal;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

/* Ensure proper spacing in justified text */
.blog-content p + p {
    text-indent: 0;
    margin-top: -0.5rem;
}

/* Improve readability on mobile with justified text */
@media (max-width: 576px) {
    .blog-content p {
        text-align: justify;
        font-size: 1rem;
        line-height: 1.7;
        letter-spacing: -0.01em;
    }
    
    /* Slightly increase word spacing for better justified appearance on small screens */
    .blog-content {
        word-spacing: 0.05em;
    }
}