/* Professional Blog Content Styling - Enhanced V2 */
/* Optimized for readability, modern aesthetics, and interactive components */

.blog-content {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.125rem; /* 18px - optimal reading size */
    line-height: 1.8;
    color: #2d3748;
}

/* Smooth fade-in animation for content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-content > * {
    animation: fadeInUp 0.6s ease-out;
}

/* Typography */
.blog-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #1a202c;
    letter-spacing: -0.025em;
}

.blog-content h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    color: #1a202c;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f7fafc;
}

.blog-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.blog-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: #2d3748;
}

.blog-content h5,
.blog-content h6 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.6;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

/* Paragraphs */
.blog-content p {
    margin-bottom: 1.5rem;
    text-align: left;
}

.blog-content p:first-of-type {
    font-size: 1.125rem;
    color: #4a5568;
}

/* Links */
.blog-content a {
    color: #F25022;
    text-decoration: underline;
    text-decoration-color: rgba(242, 80, 34, 0.3);
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.blog-content a:hover {
    color: #d9441d;
    text-decoration-color: rgba(217, 68, 29, 0.6);
}

/* Lists */
.blog-content ul,
.blog-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-content ul {
    list-style-type: disc;
}

.blog-content ol {
    list-style-type: decimal;
}

.blog-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.blog-content li > ul,
.blog-content li > ol {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Blockquotes */
.blog-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid #F25022;
    background: linear-gradient(to right, rgba(242, 80, 34, 0.05), transparent);
    font-style: italic;
    color: #4a5568;
    border-radius: 0 8px 8px 0;
}

.blog-content blockquote p {
    margin-bottom: 0;
}

.blog-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Code */
.blog-content code {
    background: #f7fafc;
    color: #e53e3e;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-weight: 500;
}

.blog-content pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blog-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Images */
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blog-content figure {
    margin: 2rem 0;
}

.blog-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #718096;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Tables */
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

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

.blog-content th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #cbd5e0;
}

.blog-content tr:hover {
    background: #f7fafc;
}

/* Horizontal Rule */
.blog-content hr {
    border: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
    margin: 3rem 0;
}

/* Callout Boxes */
.blog-content .callout {
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    border-left: 4px solid;
}

.blog-content .callout-info {
    background: rgba(49, 130, 206, 0.1);
    border-color: #3182ce;
    color: #2c5282;
}

.blog-content .callout-warning {
    background: rgba(237, 137, 54, 0.1);
    border-color: #ed8936;
    color: #7c2d12;
}

.blog-content .callout-success {
    background: rgba(72, 187, 120, 0.1);
    border-color: #48bb78;
    color: #22543d;
}

.blog-content .callout-tip {
    background: rgba(159, 122, 234, 0.1);
    border-color: #9f7aea;
    color: #44337a;
}

/* Video Embeds */
.blog-content .video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 2rem 0;
    border-radius: 8px;
}

.blog-content .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Emphasis */
.blog-content strong {
    font-weight: 700;
    color: #1a202c;
}

.blog-content em {
    font-style: italic;
}

/* Section Dividers */
.blog-content section {
    margin: 3rem 0;
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Anchor link hover effect for headings */
.blog-content h2:hover .heading-anchor,
.blog-content h3:hover .heading-anchor,
.blog-content h4:hover .heading-anchor {
    opacity: 1;
}

.blog-content .heading-anchor {
    opacity: 0;
    margin-left: 0.5rem;
    color: #cbd5e0;
    text-decoration: none;
    transition: opacity 0.2s ease;
    font-weight: normal;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .blog-content {
        font-size: 16px;
    }

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

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

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

    .blog-content h4 {
        font-size: 1.125rem;
    }

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

    .blog-content blockquote {
        padding: 1rem 1.5rem;
    }

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

/* Print styles */
@media print {
    .blog-content {
        font-size: 12pt;
    }

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

    .blog-content pre {
        background: #f7fafc;
        color: #000;
        border: 1px solid #e2e8f0;
    }
}

/* ========================================================================== */
/* ENHANCED COMPONENTS - Stats Cards, Callouts, Comparison Blocks           */
/* ========================================================================== */

/* Stats Cards - Display metrics beautifully */
.blog-content .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.blog-content .stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-content .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.blog-content .stat-card.stat-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 10px 25px rgba(72, 187, 120, 0.3);
}

.blog-content .stat-card.stat-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    box-shadow: 0 10px 25px rgba(237, 137, 54, 0.3);
}

.blog-content .stat-card.stat-info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    box-shadow: 0 10px 25px rgba(66, 153, 225, 0.3);
}

.blog-content .stat-card.stat-brand {
    background: linear-gradient(135deg, #F25022 0%, #d9441d 100%);
    box-shadow: 0 10px 25px rgba(242, 80, 34, 0.3);
}

.blog-content .stat-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
}

.blog-content .stat-label {
    font-size: 0.875rem;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.blog-content .stat-description {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 0.5rem;
}

/* Comparison Blocks - Side-by-side comparisons */
.blog-content .comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0;
}

.blog-content .comparison-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.blog-content .comparison-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #cbd5e0 0%, #cbd5e0 100%);
    transition: background 0.3s ease;
}

.blog-content .comparison-card.winner {
    border-color: #48bb78;
    box-shadow: 0 10px 25px rgba(72, 187, 120, 0.15);
}

.blog-content .comparison-card.winner::before {
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
}

.blog-content .comparison-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.blog-content .comparison-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a202c;
}

.blog-content .comparison-badge {
    display: inline-block;
    background: #48bb78;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.blog-content .comparison-feature {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.blog-content .comparison-feature::before {
    content: '✓';
    color: #48bb78;
    font-weight: bold;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.blog-content .comparison-feature.feature-missing::before {
    content: '✗';
    color: #fc8181;
}

/* Enhanced Callout Boxes with Icons */
.blog-content .callout {
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 12px;
    border-left: 4px solid;
    position: relative;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.blog-content .callout-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-content .callout-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* TL;DR / Summary Box */
.blog-content .tldr {
    background: linear-gradient(135deg, #fef5e7 0%, #fdebd0 100%);
    border-color: #f39c12;
    border-left-width: 6px;
    padding: 2rem;
    margin: 2.5rem 0;
}

.blog-content .tldr-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #d68910;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-content .tldr ul {
    margin: 0;
    padding-left: 1.5rem;
}

.blog-content .tldr li {
    color: #7d6608;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Code Blocks with Copy Button */
.blog-content .code-block-wrapper {
    position: relative;
    margin: 2rem 0;
}

.blog-content .code-block-header {
    background: #1a202c;
    color: #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 8px 8px 0 0;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-content .code-language {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.blog-content .copy-code-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-content .copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.blog-content .copy-code-btn.copied {
    background: #48bb78;
    border-color: #48bb78;
}

/* Image with Zoom Effect */
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
}

.blog-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #F25022 0%, #f39c12 100%);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Table of Contents */
.blog-content .table-of-contents {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin: 2.5rem 0;
}

.blog-content .toc-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.blog-content .toc-list a {
    color: #4a5568;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 0.25rem 0;
}

.blog-content .toc-list a:hover {
    color: #F25022;
    padding-left: 0.5rem;
}

.blog-content .toc-list .toc-level-2 {
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.blog-content .toc-list .toc-level-3 {
    padding-left: 3rem;
    font-size: 0.9rem;
}

/* Pros/Cons Lists */
.blog-content .pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2.5rem 0;
}

.blog-content .pros-card,
.blog-content .cons-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.blog-content .pros-card {
    border-top: 4px solid #48bb78;
}

.blog-content .cons-card {
    border-top: 4px solid #fc8181;
}

.blog-content .pros-title,
.blog-content .cons-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-content .pros-title {
    color: #38a169;
}

.blog-content .cons-title {
    color: #e53e3e;
}

.blog-content .pros-list,
.blog-content .cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-content .pros-list li,
.blog-content .cons-list li {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.blog-content .pros-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
}

.blog-content .cons-list li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: #fc8181;
    font-weight: bold;
}

/* Timeline Component */
.blog-content .timeline {
    position: relative;
    padding: 2rem 0;
    margin: 2.5rem 0;
}

.blog-content .timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #F25022 0%, #f39c12 100%);
}

.blog-content .timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2rem;
}

.blog-content .timeline-marker {
    position: absolute;
    left: 11px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #F25022;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #F25022;
}

.blog-content .timeline-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: #F25022;
    margin-bottom: 0.5rem;
}

.blog-content .timeline-content {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
    .blog-content .stats-grid {
        grid-template-columns: 1fr;
    }

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

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

    .blog-content .stat-value {
        font-size: 2.5rem;
    }

    .blog-content .timeline::before {
        left: 10px;
    }

    .blog-content .timeline-item {
        padding-left: 50px;
    }
}
