/* Article Page Responsive Styles */

/* Base styles for article content */
.entry-header {
    margin-bottom: 1.5rem;
    padding: 0 15px;
}

.entry-title {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
    word-wrap: break-word;
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--text-grey);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    padding: 0 15px;
}

.entry-meta i {
    margin-right: 5px;
    width: 16px;
    text-align: center;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    padding: 0 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.entry-content img {
    max-width: 100% !important;
    height: auto !important;
    margin: 1.5rem 0 !important;
    border-radius: 8px;
}

.entry-content iframe,
.entry-content embed,
.entry-content object {
    max-width: 100% !important;
    height: auto !important;
}

/* ===========================================
   ADDITIONAL MOBILE OPTIMIZATIONS
   =========================================== */

/* Responsive adjustments for mobile */
@media (max-width: 991.98px) {
    /* Layout adjustments */
    .blog-container .row {
        display: flex;
        flex-direction: column;
        margin-left: 0;
        margin-right: 0;
    }
    
    .cm_blog_page .col-lg-8, 
    .cm_blog_page .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Article title */
    .entry-title {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    /* Meta information */
    .entry-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .entry-meta > span {
        display: inline-flex;
        align-items: center;
        margin-right: 0.75rem;
        white-space: nowrap;
    }
    
    .entry-meta i {
        margin-right: 0.25rem;
    }
    
    /* Content area */
    .entry-content {
        font-size: 1rem;
        line-height: 1.7;
        padding: 0 15px;
    }
    
    /* Sidebar */
    .sidebar {
        margin-top: 2rem;
        padding: 0 15px;
    }
    
    /* Widgets */
    .widget-box {
        margin-bottom: 1.5rem;
    }
    
    /* Social sharing */
    .social-share {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin: 1.5rem 0;
        padding: 0 15px;
    }
    
    .social-share .btn {
        flex: 1 0 calc(50% - 0.5rem);
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    /* Comments */
    .comments-area {
        padding: 0 15px;
    }
    
    /* Related posts */
    .related-posts {
        padding: 0 15px;
    }
    
    /* Fix for tables */
    .entry-content table {
        width: 100% !important;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix for images in content */
    .entry-content figure {
        margin: 1.5rem 0;
        max-width: 100%;
    }
    
    .entry-content figure img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Fix for iframes in content */
    .entry-content iframe {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9;
    }
    
    /* Additional Mobile Optimizations */
    /* Base font size for better readability */
    body {
        font-size: 15px;
        line-height: 1.6;
    }

    /* Article title adjustments */
    .entry-title {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin: 10px 0;
        word-wrap: break-word;
    }

    /* Content area */
    .entry-content {
        font-size: 0.95rem;
        line-height: 1.7;
        padding: 0 10px;
    }

    /* Images and media */
    .entry-content img {
        max-width: 100% !important;
        height: auto !important;
        margin: 15px 0 !important;
    }

    /* Tables */
    .entry-content table {
        width: 100% !important;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 15px 0;
    }

    /* Headings */
    .entry-content h1 { font-size: 1.4rem; margin: 1.2rem 0 0.8rem; }
    .entry-content h2 { font-size: 1.3rem; margin: 1.1rem 0 0.7rem; }
    .entry-content h3 { font-size: 1.2rem; margin: 1rem 0 0.6rem; }
    .entry-content h4 { font-size: 1.1rem; margin: 0.9rem 0 0.5rem; }
    .entry-content h5 { font-size: 1rem; margin: 0.8rem 0 0.4rem; }
    .entry-content h6 { font-size: 0.9rem; margin: 0.7rem 0 0.3rem; }

    /* Lists and paragraphs */
    .entry-content p {
        margin: 0 0 1rem;
    }

    .entry-content ul,
    .entry-content ol {
        margin: 0 0 1rem 1.5rem;
        padding: 0;
    }

    /* Blockquotes */
    .entry-content blockquote {
        margin: 1.2rem 0;
        padding: 0.8rem 1rem;
        font-size: 0.95em;
    }

    /* Code blocks */
    .entry-content pre {
        font-size: 0.85em;
        padding: 0.8rem;
        overflow-x: auto;
    }

    /* Responsive iframes */
    .entry-content .fluid-width-video-wrapper {
        position: relative;
        padding-bottom: 56.25%; /* 16:9 */
        height: 0;
        overflow: hidden;
        margin: 15px 0;
    }

    .entry-content .fluid-width-video-wrapper iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    /* Sidebar adjustments */
    .sidebar {
        margin-top: 20px;
        padding: 0 10px;
    }

    /* Social sharing buttons */
    .social-share .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    /* Comments section */
    .comment-list .comment {
        padding: 10px;
        margin-bottom: 15px;
    }

    .comment-meta {
        font-size: 0.85rem;
    }

    /* Related posts */
    .related-posts {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .entry-title {
        font-size: 1.3rem !important;
    }
    
    .entry-content {
        font-size: 0.9rem;
    }
    
    .entry-meta {
        font-size: 0.8rem;
    }
}
