/* ============================================================================
   BLOG POST MOBILE OPTIMIZATION
   Universal mobile styles for all individual blog post pages
   ============================================================================ */

/* Prevent horizontal overflow on all blog posts */
body, html {
    overflow-x: hidden;
    max-width: 100vw;
}

* {
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobile optimizations for all blog posts */
@media (max-width: 768px) {
    /* Hero section */
    .blog-post-hero {
        padding: 4rem 0 2rem !important;
    }
    
    /* Container spacing */
    .blog-post-container {
        padding: 1rem 1rem 3rem !important;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Card padding */
    .blog-post-card {
        padding: 1.5rem !important;
        border-radius: 16px !important;
        overflow-x: hidden;
        word-wrap: break-word;
    }
    
    /* Main heading */
    .blog-post-card h1 {
        font-size: 1.85rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Meta information */
    .blog-post-meta {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        margin-bottom: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .blog-post-category,
    .blog-post-date,
    .blog-post-author {
        font-size: 0.8rem !important;
    }
    
    .blog-post-category {
        padding: 0.3rem 0.7rem !important;
    }
    
    /* Content headings */
    .blog-post-content h2 {
        font-size: 1.6rem !important;
        margin-top: 2rem !important;
        margin-bottom: 0.875rem !important;
        line-height: 1.3 !important;
        word-wrap: break-word;
    }
    
    .blog-post-content h3 {
        font-size: 1.35rem !important;
        margin-top: 1.5rem !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.3 !important;
        word-wrap: break-word;
    }
    
    .blog-post-content h4 {
        font-size: 1.15rem !important;
        margin-top: 1.25rem !important;
        margin-bottom: 0.625rem !important;
        word-wrap: break-word;
    }
    
    /* Paragraphs and text */
    .blog-post-content p {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
        margin-bottom: 1.25rem !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Lists */
    .blog-post-content ul,
    .blog-post-content ol {
        margin: 1.25rem 0 !important;
        padding-left: 1.25rem !important;
    }
    
    .blog-post-content li {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 0.625rem !important;
        word-wrap: break-word;
    }
    
    /* Images */
    .blog-post-content img,
    .blog-post-card img,
    img {
        max-width: 100% !important;
        height: auto !important;
        width: 100% !important;
        object-fit: contain !important;
        margin: 1.25rem 0 !important;
    }
    
    /* Code blocks */
    .blog-code,
    .code-block,
    pre {
        padding: 1rem !important;
        margin: 1.25rem 0 !important;
        font-size: 0.75rem !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        border-radius: 8px !important;
    }
    
    .blog-code code,
    .code-block code,
    pre code {
        font-size: 0.75rem !important;
        line-height: 1.5 !important;
    }
    
    /* Callouts and highlights */
    .blog-callout {
        padding: 1.25rem !important;
        margin: 1.5rem 0 !important;
        border-radius: 8px !important;
        overflow-x: hidden;
        word-wrap: break-word;
    }
    
    .blog-callout-title {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .blog-callout p {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
    
    /* CTA sections */
    .blog-cta {
        padding: 2rem 1.5rem !important;
        margin: 2.5rem 0 !important;
        border-radius: 12px !important;
    }
    
    .blog-cta h3 {
        font-size: 1.5rem !important;
        margin-bottom: 0.875rem !important;
    }
    
    .blog-cta p {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .blog-cta .btn {
        width: 100% !important;
        justify-content: center;
    }
    
    /* Comparison grids */
    .comparison-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin: 1.5rem 0 !important;
    }
    
    .comparison-card {
        padding: 1.25rem !important;
        overflow-x: hidden;
    }
    
    .comparison-card h4 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Tables */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        margin: 1.5rem 0;
    }
    
    table th,
    table td {
        font-size: 0.85rem !important;
        padding: 0.75rem 0.5rem !important;
    }
    
    /* Blockquotes */
    blockquote {
        padding: 1rem !important;
        margin: 1.5rem 0 !important;
        font-size: 0.95rem !important;
        border-left: 4px solid var(--accent-primary) !important;
        overflow-x: hidden;
        word-wrap: break-word;
    }
    
    /* Links */
    .blog-post-content a {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Feature grids */
    .feature-grid,
    .tool-grid,
    .step-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin: 1.5rem 0 !important;
    }
    
    /* Cards within content */
    .feature-card,
    .tool-card,
    .step-card {
        padding: 1.25rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Buttons */
    .btn,
    button,
    a.button {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem !important;
        font-size: 0.95rem !important;
    }
    
    /* Navigation elements */
    .blog-nav,
    .blog-related,
    .blog-navigation {
        padding: 1rem !important;
        margin: 1.5rem 0 !important;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .blog-post-container {
        padding: 0.75rem 0.75rem 2.5rem !important;
    }
    
    .blog-post-card {
        padding: 1.25rem !important;
    }
    
    .blog-post-card h1 {
        font-size: 1.65rem !important;
    }
    
    .blog-post-content h2 {
        font-size: 1.4rem !important;
    }
    
    .blog-post-content h3 {
        font-size: 1.2rem !important;
    }
    
    .blog-post-content p,
    .blog-post-content li {
        font-size: 0.875rem !important;
    }
    
    .blog-code,
    .code-block,
    pre {
        font-size: 0.7rem !important;
        padding: 0.75rem !important;
    }
    
    .blog-callout {
        padding: 1rem !important;
    }
    
    .blog-cta {
        padding: 1.5rem 1rem !important;
    }
}