﻿/* =========================================================
   pages-blog.css
   Blog article detail pages
   ========================================================= */

.article-detail {
    padding: 0 0 3.5rem;
}

/* =========================================================
   HERO IMAGE
   ========================================================= */

.article-hero {
    width: min(1250px, 92%);
    margin: 1.6rem auto 0;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.35);
}

    /* Default behavior (most pages): cinematic crop */
    .article-hero img {
        width: 100%;
        height: 480px;
        object-fit: cover;
        object-position: bottom center;
        display: block;
    }

    /* NEW: Contain mode (show the whole image, no cropping)
   Use by adding: class="article-hero article-hero--contain" in the view */
    .article-hero.article-hero--contain {
        overflow: visible; /* allow full image to render */
    }

        .article-hero.article-hero--contain img {
            height: auto; /* critical: prevents cropping */
            max-height: none;
            object-fit: contain; /* safe override */
            object-position: center; /* neutral framing */
        }

/* Mobile defaults */
@media (max-width: 900px) {
    .article-hero img {
        height: 300px;
    }

    /* Mobile contain mode should still show full image */
    .article-hero.article-hero--contain img {
        height: auto;
    }
}

/* =========================================================
   ARTICLE BODY
   ========================================================= */

.article-body {
    width: min(860px, 92%);
    margin: 1.35rem auto 0;
    background: rgba(0,0,0,.40);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    padding: 1.6rem 1.6rem 1.8rem;
    color: #eaeaea;
}

    .article-body h1 {
        font-size: clamp(1.9rem, 2.6vw, 2.6rem);
        margin-bottom: .5rem;
    }

.article-subtitle {
    margin: 0 0 1.25rem 0;
    font-size: 1.05rem;
    opacity: .80;
}

.article-body h2 {
    margin-top: 1.4rem;
    font-size: 1.45rem;
}

.article-body p {
    line-height: 1.75;
    opacity: .92;
}

.article-body strong {
    color: #ffffff;
    font-weight: 950;
}

.article-body ul {
    margin: .75rem 0 1.1rem 1.15rem;
}

.article-body li {
    margin: .45rem 0;
    opacity: .92;
}

    .article-body li::marker {
        color: var(--green);
    }

.article-end {
    margin-top: 1.6rem;
    padding-top: 1rem;
    opacity: .80;
    font-weight: 900;
    border-top: 1px solid rgba(255,255,255,.10);
}

@media (max-width: 900px) {
    .article-body {
        padding: 1.25rem 1.15rem 1.35rem;
    }
}

/* =========================================================
   INLINE IMAGES (NON-HERO)
   ========================================================= */

/* General inline images stay responsive */
.article-body img {
    max-width: 100%;
    height: auto;
}

/* Graphic wrapper (charts, visual blocks) */
.article-graphic {
    margin: 28px 0;
    display: flex;
    justify-content: center;
}

.article-graphic--small img {
    width: 100%;
    max-width: 720px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* FINAL FIX: Controlled chart sizing */
.article-body .article-graphic img {
    width: 100%;
    max-width: 720px; /* Adjust 640–760 if desired */
    height: auto;
    display: block;
    border-radius: 14px;
}

/* =========================================================
   OPTIONAL UTILITY
   ========================================================= */

.preserve-lines {
    white-space: pre-line;
}
