/* =========================================================
   FORCENEXA BLOG EXTRA — Page-level finishing layer
   Load AFTER blog.css on both Blog Index and Blog Details.
   ========================================================= */

/* Keep listing and article content aligned with the site's Bootstrap container. */
.fn-blog-page .container {
    position: relative;
}

/* Image fallbacks remain visible if an image URL fails. */
.fn-blog-page .fn-featured-image img,
.fn-blog-page .fn-blog-card-image img,
.fn-blog-page .fn-post-cover img,
.fn-blog-page .fn-collage-main img,
.fn-blog-page .fn-collage-side img,
.fn-blog-page .fn-visual-tile img {
    color: transparent;
}

.fn-blog-page .fn-featured-image:has(img[style*="display: none"]) .fn-featured-placeholder,
.fn-blog-page .fn-blog-card-image:has(img[style*="display: none"]) .fn-blog-placeholder,
.fn-blog-page .fn-post-cover:has(img[style*="display: none"]) .fn-post-cover-fallback,
.fn-blog-page .fn-collage-main:has(img[style*="display: none"]) .fn-collage-fallback,
.fn-blog-page .fn-collage-side:has(img[style*="display: none"]) .fn-collage-fallback,
.fn-blog-page .fn-visual-tile:has(img[style*="display: none"]) .fn-tile-fallback {
    z-index: 0;
}

/* Ensure the card content has a consistent rhythm when excerpts vary. */
.fn-blog-page .fn-blog-card-body {
    min-height: 225px;
}

.fn-blog-page .fn-blog-card-body .fn-card-bottom {
    width: 100%;
}

/* Improve article reading measure and anchor navigation. */
.fn-post-page .fn-post-article {
    max-width: 100%;
}

.fn-post-page .fn-post-section {
    scroll-margin-top: 100px;
}

.fn-post-page .fn-post-section:last-of-type {
    margin-bottom: 28px;
}

/* Bootstrap accordion variables are scoped to this component only. */
.fn-post-page .fn-post-faq .accordion-button::after {
    width: 13px;
    height: 13px;
    background-size: 13px;
}

.fn-post-page .fn-post-faq .accordion-button:not(.collapsed)::after {
    transform: rotate(-180deg);
}

/* Modal stays above sticky site headers and mobile navigation. */
.fn-blog-page .fn-share-modal {
    z-index: 10050;
}

/* Prevent long titles/URLs from forcing horizontal overflow. */
.fn-blog-page .fn-ranking-items a,
.fn-blog-page .fn-blog-card-body h3,
.fn-blog-page .fn-featured-content h3,
.fn-blog-page .fn-post-hero h1,
.fn-blog-page .fn-toc a {
    overflow-wrap: anywhere;
}

/* Fine-tune tablet sidebar and mobile tap targets. */
@media (max-width: 991.98px) {
    .fn-blog-page .fn-blog-sidebar {
        box-shadow: 0 6px 22px rgba(20, 33, 61, .045);
    }
}

@media (max-width: 575.98px) {
    .fn-blog-page .fn-category {
        min-height: 47px;
    }

    .fn-blog-page .fn-social-links a,
    .fn-blog-page .fn-share-options a,
    .fn-blog-page .fn-share-options button {
        width: 40px;
        height: 40px;
    }

    .fn-blog-page .fn-blog-card-body {
        min-height: 0;
    }

    .fn-blog-page .fn-blog-card-body .fn-card-bottom {
        padding-top: 18px;
    }
}
