/*
 * Joy News Suite — Single Post Page CSS v4.2
 * Strategy: Aggressive theme container escape + full-width 3-column grid
 * Tested against: timebulletin24.com (OceanWP/Elementor-based theme)
 */

/* ══ STEP 1: Kill ALL theme wrappers on single post ════════════════════════ */
body.single-post,
body.single {
    background: var(--jns-bg-site, #f2f2f2) !important;
}

/* Force the theme's content area to be full width */
body.single-post #page,
body.single-post .site,
body.single-post #content,
body.single-post .site-content,
body.single-post .content-area,
body.single-post #primary,
body.single-post .site-main,
body.single-post #main,
body.single-post main,
body.single-post .entry-wrap,
body.single-post .post-wrap,
body.single-post .post-content-wrap,
body.single-post .container,
body.single-post .container-fluid,
body.single-post .elementor-section-wrap,
body.single-post .ocean-row,
body.single-post #wrap,
body.single-post #main-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Remove theme's sidebar if it outputs one */
body.single-post #sidebar,
body.single-post .sidebar,
body.single-post aside.widget-area,
body.single-post #secondary {
    display: none !important;
}

/* Remove theme padding/margin from entry content */
body.single-post .entry-content,
body.single-post .post-entry,
body.single-post .entry-inner,
body.single-post article.post {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    float: none !important;
}

/* ══ STEP 2: Our 3-column grid ══════════════════════════════════════════════ */
.jns-single-wrap {
    display: grid !important;
    grid-template-columns: 270px 1fr 290px !important;
    grid-template-areas: "left main right" !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 20px auto !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
    align-items: start !important;
    position: relative !important;
    z-index: 1 !important;
}

/* ══ Sidebar Left ══════════════════════════════════════════════════════════ */
.jns-single-sidebar--left {
    grid-area: left !important;
    position: sticky !important;
    top: 80px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    min-width: 0 !important;
}

/* ══ Main Content ══════════════════════════════════════════════════════════ */
.jns-single-main {
    grid-area: main !important;
    min-width: 0 !important;  /* critical: prevents grid blowout */
    width: 100% !important;
    overflow: visible !important;
}

/* ══ Sidebar Right ══════════════════════════════════════════════════════════ */
.jns-single-sidebar--right {
    grid-area: right !important;
    position: sticky !important;
    top: 80px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    min-width: 0 !important;
}

/* ══ Article card ══════════════════════════════════════════════════════════ */
.jns-article {
    background: var(--jns-bg-card, #fff);
    border-radius: 8px;
    box-shadow: 0 1px 10px rgba(0,0,0,.07);
    overflow: hidden;
    padding-bottom: 28px;
    width: 100%;
    box-sizing: border-box;
}

/* ══ Breadcrumb ══════════════════════════════════════════════════════════════ */
.jns-article-breadcrumb {
    padding: 12px 24px 0;
    font-size: 12px;
    color: var(--jns-muted, #888);
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.jns-article-breadcrumb a { color: var(--jns-muted, #888); text-decoration: none; }
.jns-article-breadcrumb a:hover { color: var(--jns-accent, #FD0000); }
.jns-bc-cat { color: var(--jns-accent, #FD0000) !important; font-weight: 600; }

/* ══ Title ══════════════════════════════════════════════════════════════════ */
.jns-article-title {
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif) !important;
    font-size: clamp(20px, 2.2vw, 30px) !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
    color: var(--jns-text, #1a1a2e) !important;
    margin: 14px 24px 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
}

/* ══ Meta row ════════════════════════════════════════════════════════════════ */
.jns-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 10px;
    padding: 10px 24px;
    border-bottom: 1px solid var(--jns-surface, #f0f0f0);
    font-size: 12.5px;
    color: var(--jns-muted, #888);
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif);
}
.jns-meta-sep { opacity: .35; }
.jns-meta-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--jns-text, #1a1a2e);
}
.jns-meta-author a { color: inherit; text-decoration: none; }
.jns-meta-author a:hover { color: var(--jns-accent, #FD0000); }
.jns-author-avatar {
    border-radius: 50% !important;
    width: 26px !important;
    height: 26px !important;
    object-fit: cover !important;
    border: 2px solid #eee;
}
.jns-meta-cat-badge {
    background: var(--jns-accent, #FD0000);
    color: #fff !important;
    padding: 2px 9px;
    border-radius: 3px;
    font-size: 10.5px;
    font-weight: 700;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.jns-meta-date,
.jns-meta-time,
.jns-meta-comments { display:inline-flex; align-items:center; gap:4px; }

/* ══ Share bar top ═══════════════════════════════════════════════════════════ */
.jns-article-share--top {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 24px;
    background: var(--jns-surface, #f8f8f8);
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}
.jns-share-lbl { font-size: 12px; font-weight: 700; color: var(--jns-muted, #888); white-space: nowrap; }
.jns-share-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%; border: none;
    cursor: pointer; text-decoration: none;
    transition: transform .15s, opacity .15s; flex-shrink: 0;
}
.jns-share-ico:hover { transform: scale(1.1); }
.jns-share-ico svg { width: 15px; height: 15px; }
.jns-share-ico--fb   { background: #1877F2; color: #fff; }
.jns-share-ico--wa   { background: #25D366; color: #fff; }
.jns-share-ico--tg   { background: #229ED9; color: #fff; }
.jns-share-ico--copy { background: #eeeeee; color: #555; }
.jns-share-short-url {
    font-family: monospace; font-size: 11px; color: var(--jns-accent, #FD0000);
    background: #fff; border: 1px solid #ddd; padding: 3px 9px;
    border-radius: 4px; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 200px; cursor: pointer;
}

/* ══ Featured Image — canvas extend (no crop) ═══════════════════════════════ */
.jns-article-featured-wrap {
    position: relative;
    overflow: hidden;
    max-height: 480px;
    background: var(--jns-surface, #f0f0f0);
    margin: 0;
}
.jns-article-featured-wrap::before {
    content: '';
    position: absolute;
    inset: -20px;
    background-image: var(--jns-bg-img);
    background-size: cover;
    background-position: center;
    filter: blur(22px) brightness(0.45) saturate(1.3);
    z-index: 0;
}
.jns-article-featured-img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: 480px;
    object-fit: contain !important;
    object-position: center;
    display: block;
}

/* ══ Article body ════════════════════════════════════════════════════════════ */
.jns-article-content {
    padding: 24px 24px 0;
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif);
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.95;
    color: var(--jns-text, #1a1a2e);
}
.jns-article-content p { margin: 0 0 1.2em; }
.jns-article-content h2,
.jns-article-content h3,
.jns-article-content h4 {
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif);
    font-weight: 800; margin: 1.5em 0 .5em;
    color: var(--jns-text, #1a1a2e); line-height: 1.35;
}
.jns-article-content h2 { font-size: 1.4em; }
.jns-article-content h3 { font-size: 1.2em; }
.jns-article-content a { color: var(--jns-accent, #FD0000); text-decoration: underline; text-underline-offset: 3px; }
.jns-article-content blockquote {
    border-left: 4px solid var(--jns-accent, #FD0000); margin: 1.4em 0;
    padding: 10px 18px; background: var(--jns-surface, #f8f8f8);
    border-radius: 0 6px 6px 0; font-style: italic; color: var(--jns-muted, #666);
}
.jns-article-content img {
    max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 1em auto;
}
.jns-article-content ul,
.jns-article-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.jns-article-content li { margin-bottom: .4em; }

/* ══ Inline ad ═══════════════════════════════════════════════════════════════ */
.jns-article-ad-inline {
    margin: 20px 24px; text-align: center;
    background: var(--jns-surface, #f8f8f8); border-radius: 8px; padding: 10px;
}

/* ══ Tags ═══════════════════════════════════════════════════════════════════ */
.jns-article-tags {
    display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
    padding: 16px 24px; border-top: 1px solid var(--jns-surface, #f0f0f0);
    margin-top: 20px; font-family: var(--jns-font, 'Hind Siliguri', sans-serif);
}
.jns-tags-lbl { font-size: 12.5px; font-weight: 700; color: var(--jns-muted, #888); }
.jns-tag {
    display: inline-block; background: var(--jns-surface, #f0f0f0);
    color: var(--jns-text, #333); padding: 3px 11px; border-radius: 20px;
    font-size: 11.5px; text-decoration: none; font-weight: 500;
    transition: background .15s, color .15s;
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif);
}
.jns-tag:hover { background: var(--jns-accent, #FD0000); color: #fff; }

/* ══ Author box ══════════════════════════════════════════════════════════════ */
.jns-author-box {
    display: flex; align-items: flex-start; gap: 14px;
    margin: 20px 24px; padding: 18px;
    background: var(--jns-surface, #f8f8f8);
    border: 1px solid #eee; border-radius: 8px;
    border-left: 4px solid var(--jns-accent, #FD0000);
}
.jns-author-box-avatar {
    border-radius: 50% !important; width: 64px !important; height: 64px !important;
    object-fit: cover !important; flex-shrink: 0;
    border: 3px solid var(--jns-accent, #FD0000);
}
.jns-author-box-name { margin: 0 0 5px; font-size: 15px; font-weight: 700; font-family: var(--jns-font, 'Hind Siliguri', sans-serif); }
.jns-author-box-name a { color: var(--jns-text, #1a1a2e); text-decoration: none; }
.jns-author-box-name a:hover { color: var(--jns-accent, #FD0000); }
.jns-author-box-bio { font-size: 13px; color: var(--jns-muted, #666); margin: 0; line-height: 1.6; font-family: var(--jns-font, 'Hind Siliguri', sans-serif); }

/* ══ Share bottom ════════════════════════════════════════════════════════════ */
.jns-article-share--bottom {
    padding: 18px 24px; border-top: 2px solid var(--jns-surface, #f0f0f0);
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif);
}
.jns-article-share--bottom strong { display: block; margin-bottom: 10px; font-size: 13.5px; color: var(--jns-text, #1a1a2e); }
.jns-share-row { display: flex; gap: 10px; flex-wrap: wrap; }
.jns-share-btn-full {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border-radius: 6px; font-size: 13px;
    font-weight: 700; text-decoration: none;
    transition: opacity .15s, transform .15s; flex: 1; justify-content: center;
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif);
}
.jns-share-btn-full:hover { opacity: .88; transform: translateY(-1px); }
.jns-share-btn-full--fb { background: #1877F2; color: #fff; }
.jns-share-btn-full--wa { background: #25D366; color: #fff; }

/* ══ Comments ═══════════════════════════════════════════════════════════════ */
.jns-comments-wrap {
    background: var(--jns-bg-card, #fff); border-radius: 8px;
    padding: 24px; margin-top: 16px;
    box-shadow: 0 1px 8px rgba(0,0,0,.05);
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif);
}
.jns-comments-wrap #reply-title,
.jns-comments-wrap .comments-title {
    font-size: 18px; font-weight: 800; margin: 0 0 18px;
    padding-bottom: 10px; border-bottom: 2px solid var(--jns-accent, #FD0000);
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif); color: var(--jns-text, #1a1a2e);
}
.jns-comments-wrap input[type="text"],
.jns-comments-wrap input[type="email"],
.jns-comments-wrap textarea {
    width: 100%; padding: 9px 13px; border: 1.5px solid #e0e0e0;
    border-radius: 6px; font-size: 14px;
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif);
    transition: border-color .2s; box-sizing: border-box;
}
.jns-comments-wrap input:focus,
.jns-comments-wrap textarea:focus { border-color: var(--jns-accent, #FD0000); outline: none; }
.jns-comments-wrap input[type="submit"],
.jns-comments-wrap .submit {
    background: var(--jns-accent, #FD0000) !important; color: #fff !important;
    border: none !important; padding: 10px 26px !important; border-radius: 6px !important;
    font-size: 14px !important; font-weight: 700 !important; cursor: pointer !important;
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif) !important;
}

/* ══ Related posts section ════════════════════════════════════════════════════ */
.jns-related-section {
    background: var(--jns-bg-card, #fff); border-radius: 8px;
    padding: 24px; margin-top: 16px;
    box-shadow: 0 1px 8px rgba(0,0,0,.05);
}

/* ══ Sidebar common ════════════════════════════════════════════════════════ */
.jns-single-sidebar { font-family: var(--jns-font, 'Hind Siliguri', sans-serif); }

.jns-sb-ad {
    background: var(--jns-bg-card, #fff); border-radius: 8px;
    padding: 10px; text-align: center;
    box-shadow: 0 1px 8px rgba(0,0,0,.05);
}
.jns-ad-lbl {
    display: block; font-size: 9.5px; color: #bbb;
    letter-spacing: .5px; text-transform: uppercase; margin-bottom: 5px;
}
.jns-sb-widget {
    background: var(--jns-bg-card, #fff); border-radius: 8px;
    padding: 16px 14px; box-shadow: 0 1px 8px rgba(0,0,0,.05);
}
.jns-sb-widget-title {
    margin: 0 0 12px; font-size: 14px; font-weight: 800;
    color: var(--jns-text, #1a1a2e);
    padding-bottom: 9px; border-bottom: 2px solid var(--jns-accent, #FD0000);
    font-family: var(--jns-font, 'Hind Siliguri', sans-serif);
}
.jns-sb-widget-title a { color: inherit; text-decoration: none; }
.jns-sb-widget-title a:hover { color: var(--jns-accent, #FD0000); }

/* Popular posts */
.jns-sb-popular { list-style: none; margin: 0; padding: 0; }
.jns-sb-popular-item {
    display: flex; gap: 8px; padding: 8px 0;
    border-bottom: 1px solid var(--jns-surface, #f5f5f5); align-items: flex-start;
}
.jns-sb-popular-item:last-child { border-bottom: none; }
.jns-sb-num { font-size: 20px; font-weight: 800; color: var(--jns-accent, #FD0000); opacity: .55; min-width: 28px; line-height: 1; }
.jns-sb-popular-body { display: flex; gap: 7px; flex: 1; min-width: 0; }
.jns-sb-popular-thumb { flex: 0 0 58px; height: 44px; overflow: hidden; border-radius: 4px; display: block; background: var(--jns-surface, #f0f0f0); }
.jns-sb-popular-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.jns-sb-popular-title { margin: 0 0 3px; font-size: 12px; font-weight: 600; line-height: 1.4; font-family: var(--jns-font, 'Hind Siliguri', sans-serif); }
.jns-sb-popular-title a { color: var(--jns-text, #1a1a2e); text-decoration: none; }
.jns-sb-popular-title a:hover { color: var(--jns-accent, #FD0000); }
.jns-sb-popular-date { font-size: 10.5px; color: var(--jns-muted, #888); }

/* Category posts sidebar */
.jns-sb-cat-posts { display: flex; flex-direction: column; gap: 10px; }
.jns-sb-cat-item { display: flex; gap: 8px; align-items: flex-start; }
.jns-sb-cat-thumb { flex: 0 0 66px; height: 50px; overflow: hidden; border-radius: 4px; display: block; background: var(--jns-surface, #f0f0f0); }
.jns-sb-cat-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.jns-sb-cat-title { margin: 0 0 3px; font-size: 12px; font-weight: 600; line-height: 1.4; font-family: var(--jns-font, 'Hind Siliguri', sans-serif); }
.jns-sb-cat-title a { color: var(--jns-text, #1a1a2e); text-decoration: none; }
.jns-sb-cat-title a:hover { color: var(--jns-accent, #FD0000); }
.jns-sb-cat-item time { font-size: 10.5px; color: var(--jns-muted, #888); }

/* Related posts sidebar */
.jns-sb-related-item { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--jns-surface, #f5f5f5); }
.jns-sb-related-item:last-child { border-bottom: none; }
.jns-sb-related-thumb { flex: 0 0 66px; height: 50px; overflow: hidden; border-radius: 4px; display: block; background: var(--jns-surface, #f0f0f0); }
.jns-sb-related-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.jns-sb-related-body h4 { margin: 0 0 3px; font-size: 12px; font-weight: 600; line-height: 1.45; font-family: var(--jns-font, 'Hind Siliguri', sans-serif); }
.jns-sb-related-body h4 a { color: var(--jns-text, #1a1a2e); text-decoration: none; }
.jns-sb-related-body h4 a:hover { color: var(--jns-accent, #FD0000); }
.jns-sb-related-body time { font-size: 10.5px; color: var(--jns-muted, #888); }

/* ══ Ad placeholder box ═══════════════════════════════════════════════════ */
.jns-ad-placeholder-box {
    width: 100%; max-width: 270px; height: 220px;
    background: linear-gradient(135deg, #f5f5f5, #ebebeb);
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px; color: #ccc; font-size: 12px;
    margin: 0 auto;
}

/* ══ Tablet: 2-col, hide left sidebar ═══════════════════════════════════════ */
@media (max-width: 1100px) {
    .jns-single-wrap {
        grid-template-columns: 1fr 270px !important;
        grid-template-areas: "main right" !important;
    }
    .jns-single-sidebar--left { display: none !important; }
}

/* ══ Mobile: 1-col ════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .jns-single-wrap {
        grid-template-columns: 1fr !important;
        grid-template-areas: "main" !important;
        padding: 0 10px !important;
        gap: 12px !important;
        margin: 10px auto !important;
    }
    .jns-single-sidebar--left,
    .jns-single-sidebar--right { display: none !important; }

    .jns-article-title  { font-size: 19px !important; margin: 12px 16px 0 !important; }
    .jns-article-meta   { padding: 8px 16px; font-size: 11.5px; }
    .jns-article-content{ padding: 16px 16px 0; font-size: 15px; }
    .jns-article-share--top { padding: 7px 16px; }
    .jns-author-box     { margin: 14px 16px; padding: 12px; }
    .jns-article-tags   { padding: 12px 16px; }
    .jns-article-share--bottom { padding: 14px 16px; }
    .jns-comments-wrap  { padding: 16px; }
    .jns-related-section{ padding: 16px; }
}

/* ══ Mobile sticky bottom share bar ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .jns-mobile-share-sticky {
        position: fixed; bottom: 0; left: 0; right: 0;
        background: #fff; border-top: 1px solid #eee;
        box-shadow: 0 -3px 12px rgba(0,0,0,.1);
        z-index: 9999; display: flex; justify-content: space-around; padding: 7px 0;
    }
    .jns-mobile-share-sticky a,
    .jns-mobile-share-sticky button {
        display: flex; flex-direction: column; align-items: center; gap: 2px;
        font-size: 10px; color: #555; text-decoration: none;
        background: none; border: none; cursor: pointer;
        font-family: var(--jns-font, 'Hind Siliguri', sans-serif);
    }
    .jns-mobile-share-sticky svg { width: 22px; height: 22px; }
    .jns-mobile-share-sticky .jns-ms-fb  { color: #1877F2; }
    .jns-mobile-share-sticky .jns-ms-wa  { color: #25D366; }
    .jns-mobile-share-sticky .jns-ms-tg  { color: #229ED9; }
    .jns-mobile-share-sticky .jns-ms-cpy { color: #555; }
    body.single-post { padding-bottom: 60px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   ASTRA THEME — SPECIFIC FIXES
   timebulletin24.com uses Astra. These rules override Astra's layout system.
   ══════════════════════════════════════════════════════════════════════════ */

/* Kill Astra's layout containers on single post */
body.single-post .ast-container,
body.single-post .ast-row,
body.single-post .ast-grid-row,
body.single-post #ast-content-id,
body.single-post .ast-article-post,
body.single-post .ast-single-post-order,
body.single-post .entry-content-wrap,
body.single-post .ast-author-box,
body.single-post #content .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Astra sidebar — completely kill it */
body.single-post #secondary.widget-area,
body.single-post .ast-right-sidebar,
body.single-post .ast-left-sidebar,
body.single-post .widget-area,
body.single-post .sidebar-area,
body.single-post #sidebar,
body.single-post [class*="ast-"][class*="sidebar"] {
    display: none !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Astra sets #primary to 70% or 75% — force full width */
body.single-post #primary,
body.single-post #primary.content-area,
body.single-post .ast-layout-above-header-wrap,
body.single-post #content #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Astra article wrapper */
body.single-post .ast-post-format-,
body.single-post article.post,
body.single-post .hentry {
    max-width: 100% !important;
    padding: 0 !important;
}

/* Astra entry content max-width reset */
body.single-post .entry-content > *,
body.single-post .entry-content p,
body.single-post .entry-content h1,
body.single-post .entry-content h2,
body.single-post .entry-content h3 {
    max-width: 100% !important;
}

/* Astra sets a site-content row — make it block */
body.single-post #content,
body.single-post .site-content {
    display: block !important;
    overflow: visible !important;
}

/* The key issue from screenshot: right side Facebook widget overflowing.
   This happens because Astra's .ast-container is narrower than our grid.
   Solution: make our wrap break OUT of Astra's container using negative margins */
.jns-single-wrap {
    /* Break out of any constraining parent */
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    overflow: visible !important;
    /* Ensure grid doesn't overflow viewport */
    max-width: min(1400px, 100vw) !important;
    overflow-x: hidden !important;
}

/* Prevent any child from overflowing the grid */
.jns-single-sidebar--right,
.jns-single-sidebar--left {
    overflow: hidden !important;
    overflow-y: auto !important;
}

.jns-single-sidebar--right > *,
.jns-single-sidebar--left > * {
    overflow: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
}

/* Specifically kill Astra social icons widget if it appears outside our layout */
body.single-post .ast-container .widget_media_image img,
body.single-post .ast-container .widget_social_icons,
body.single-post #secondary .widget {
    max-width: 100% !important;
}

/* Astra sticky header height variable — adjust sticky top accordingly */
.jns-single-sidebar--left,
.jns-single-sidebar--right {
    top: max(80px, var(--ast-sticky-header-height, 80px)) !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   ASTRA THEME — SAFE SIDEBAR FIXES (no white screen)
   ══════════════════════════════════════════════════════════════════════════ */

/* Astra sidebar wrappers */
body.single-post #secondary,
body.single-post #secondary.widget-area,
body.single-post .ast-right-sidebar,
body.single-post .ast-left-sidebar,
body.single-post .ast-sidebar-wrap,
body.single-post .sidebar-area {
    display: none !important;
    width: 0 !important;
    overflow: hidden !important;
    flex: 0 !important;
    min-width: 0 !important;
}

/* Generic sidebar containers */
body.single-post .widget-area:not(.jns-single-sidebar),
body.single-post aside:not(.jns-single-sidebar):not(.jns-single-sidebar--left):not(.jns-single-sidebar--right) {
    display: none !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Facebook / Social widget images that overflow */
body.single-post .widget_facebook_likebox,
body.single-post .widget_facebook_likebox *,
body.single-post .fb-page,
body.single-post .fb-page > span,
body.single-post .fb-page iframe {
    max-width: 100% !important;
    max-height: 400px !important;
    overflow: hidden !important;
}

/* Constrain social icon images site-wide on single post */
body.single-post .widget img,
body.single-post .textwidget img {
    max-width: 100% !important;
    height: auto !important;
}

/* Prevent grid blowout from oversized content */
.jns-single-wrap {
    overflow-x: hidden !important;
}
.jns-single-sidebar--right,
.jns-single-sidebar--left {
    overflow: hidden !important;
    max-width: 100% !important;
}
.jns-single-sidebar--right > *,
.jns-single-sidebar--left > * {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
}
