/* =========================================================
   MCD Outdoor — Editorial Article System
   Version: 1.2.1
   Updated: 2026-08-07
   Scope: Single blog posts + validated editorial helper components
   Replace the complete contents of:
   /wp-content/themes/mcd-outdoor/assets/css/components/article-content.css
   ========================================================= */

body.single-post {
    --mcd-forest-900: #173d2d;
    --mcd-forest-700: #244c3a;
    --mcd-forest-500: #3f6b52;

    --mcd-text: #1d382c;
    --mcd-text-muted: #597065;
    --mcd-border: #d7e0da;
    --mcd-surface: #f6f8f6;

    --mcd-page-max: 1180px;
    --mcd-reading-max: 860px;
    --mcd-wide-max: 1020px;

    --mcd-radius: 12px;
}

/* =========================================================
   General protection
   ========================================================= */

body.single-post main {
    overflow: clip;
}

body.single-post .wp-block-post-content > * {
    box-sizing: border-box;
}

/* =========================================================
   Article header
   ========================================================= */

body.single-post .wp-block-post-terms {
    width: min(calc(100% - 40px), 900px);
    margin: clamp(2.75rem, 4vw, 3.75rem) auto 1rem !important;

    color: var(--mcd-forest-700);
    font-family: "Inter", sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.065em;
    line-height: 1.4;
    text-transform: uppercase;
}

body.single-post .wp-block-post-title {
    width: min(calc(100% - 40px), 900px);
    max-width: 900px !important;
    margin: 0 auto 1.25rem !important;

    color: var(--mcd-forest-900);
    font-family: "Poppins", sans-serif;
    font-size: clamp(2.5rem, 2rem + 2vw, 3.75rem) !important;
    font-weight: 700;
    line-height: 1.07 !important;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

body.single-post
.wp-block-group:has(> .wp-block-post-date),
body.single-post
.wp-block-group:has(.wp-block-post-author-name),
body.single-post
.wp-block-group:has(.wp-block-post-author) {
    width: min(calc(100% - 40px), 900px);
    margin-inline: auto !important;
    gap: 0.75rem;
}

body.single-post .wp-block-post-date,
body.single-post .wp-block-post-author,
body.single-post .wp-block-post-author-name {
    color: var(--mcd-text-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}

body.single-post .wp-block-post-featured-image {
    width: min(calc(100% - 40px), var(--mcd-wide-max));
    max-width: var(--mcd-wide-max) !important;
    margin: 2.25rem auto 3.25rem !important;
}

body.single-post .wp-block-post-featured-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--mcd-radius);
}

/* =========================================================
   Main article container
   ========================================================= */

body.single-post .wp-block-post-content {
    width: min(calc(100% - 40px), var(--mcd-page-max));
    max-width: none !important;
    margin-inline: auto !important;
    padding: 0 !important;
}

body.single-post .wp-block-post-content >
:where(
    p,
    ul,
    ol,
    h2,
    h3,
    h4,
    blockquote,
    .mcd-callout
) {
    width: 100%;
    max-width: var(--mcd-reading-max);
    margin-inline: auto !important;
}

body.single-post .wp-block-post-content >
:where(
    .wp-block-image,
    .wp-block-table,
    .mcd-table-section,
    .mcd-sources
) {
    width: 100%;
    max-width: var(--mcd-wide-max);
    margin-inline: auto !important;
}

/* =========================================================
   Body typography
   ========================================================= */

body.single-post .wp-block-post-content p,
body.single-post .wp-block-post-content li {
    color: var(--mcd-text);
    font-family: "Inter", sans-serif;
    font-size: clamp(1.05rem, 1rem + 0.15vw, 1.125rem);
    line-height: 1.72;
}

body.single-post .wp-block-post-content p {
    margin-top: 0;
    margin-bottom: 1.35rem;
}

body.single-post .wp-block-post-content > p:first-of-type {
    color: #315044;
    font-size: clamp(1.125rem, 1.05rem + 0.25vw, 1.25rem);
    line-height: 1.65;
    margin-bottom: 1.75rem;
}

body.single-post .wp-block-post-content ul,
body.single-post .wp-block-post-content ol {
    padding-left: 1.4em;
    margin-top: 1rem;
    margin-bottom: 1.75rem;
}

body.single-post .wp-block-post-content li + li {
    margin-top: 0.65rem;
}

/* =========================================================
   Headings
   ========================================================= */

body.single-post .wp-block-post-content h2 {
    position: relative;

    color: var(--mcd-forest-900);
    font-family: "Poppins", sans-serif;
    font-size: clamp(1.9rem, 1.6rem + 1vw, 2.55rem);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.025em;
    text-wrap: balance;

    margin-top: clamp(3.5rem, 5vw, 4.75rem) !important;
    margin-bottom: 1.4rem !important;
}

body.single-post .wp-block-post-content h2::before {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin-bottom: 1rem;

    border-radius: 999px;
    background: #8aa493;
}

body.single-post .wp-block-post-content h3 {
    color: var(--mcd-forest-900);
    font-family: "Poppins", sans-serif;
    font-size: clamp(1.35rem, 1.18rem + 0.45vw, 1.75rem);
    font-weight: 600;
    line-height: 1.28;
    letter-spacing: -0.015em;

    margin-top: 2.5rem !important;
    margin-bottom: 1rem !important;
}

/* =========================================================
   Links
   ========================================================= */

body.single-post .wp-block-post-content a {
    color: #185b3d;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

body.single-post .wp-block-post-content a:hover,
body.single-post .wp-block-post-content a:focus-visible {
    color: #0f442e;
    text-decoration-thickness: 2px;
}

/* =========================================================
   Article images
   ========================================================= */

body.single-post .wp-block-post-content > .wp-block-image {
    margin-top: 3.25rem !important;
    margin-bottom: 3.25rem !important;
}

body.single-post .wp-block-post-content .wp-block-image img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-inline: auto;

    border-radius: var(--mcd-radius);
}

body.single-post
.wp-block-post-content >
.wp-block-image.mcd-decision-diagram {
    max-width: 720px;
}

body.single-post .mcd-decision-diagram img {
    border: 1px solid var(--mcd-border);
    box-shadow: 0 10px 30px rgba(23, 61, 45, 0.08);
}

body.single-post .wp-element-caption {
    margin-top: 0.85rem;

    color: var(--mcd-text-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
    text-align: center;
}

/* =========================================================
   Editorial callouts
   ========================================================= */

body.single-post .mcd-callout {
    margin-top: 2.25rem !important;
    margin-bottom: 2.75rem !important;
    padding: 1.25rem 1.5rem;

    border: 1px solid var(--mcd-border);
    border-left-width: 6px;
    border-radius: var(--mcd-radius);

    background: var(--mcd-surface);
    box-shadow: 0 8px 24px rgba(23, 61, 45, 0.055);
}

body.single-post .mcd-callout > * {
    width: auto !important;
    max-width: none !important;
    margin-inline: 0 !important;
}

body.single-post .mcd-callout > :first-child {
    margin-top: 0 !important;
}

body.single-post .mcd-callout > :last-child {
    margin-bottom: 0 !important;
}

body.single-post .mcd-callout p {
    font-size: 1.0625rem;
    line-height: 1.66;
}

/* Validated callout structure:
   Group > Paragraph(label) + Paragraph(body) */
body.single-post .wp-block-post-content .mcd-callout > p:first-child {
    margin: 0 0 0.75rem !important;

    color: var(--mcd-forest-900);
    font-family: "Poppins", sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-transform: uppercase;
}

body.single-post .wp-block-post-content .mcd-callout > p:last-child {
    margin: 0 !important;
}

body.single-post .mcd-callout-safety {
    border-left-color: #a86f00;
    background: #fff8e8;
}

body.single-post .mcd-callout-beginner {
    border-left-color: #28679a;
    background: #f0f7fc;
}

body.single-post .mcd-callout-decision {
    border-left-color: var(--mcd-forest-500);
    background: #eef5f0;
}

body.single-post .mcd-callout-regional {
    border-left-color: #715a91;
    background: #f6f2fa;
}

body.single-post .mcd-callout-field {
    border-left-color: #64748b;
    background: #f4f6f8;
}

body.single-post .mcd-callout-emergency {
    border-color: #b42318;
    border-left-color: #b42318;
    background: #fff2f0;
}

/* =========================================================
   Editorial tables
   ========================================================= */

body.single-post figure.wp-block-table.mcd-article-table {
    display: block;
    width: 100%;
    max-width: 960px !important;

    margin-top: 3rem !important;
    margin-bottom: 4rem !important;
    margin-inline: auto !important;

    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;

    border: 1px solid var(--mcd-border);
    border-radius: var(--mcd-radius);
    background: #ffffff;

    box-shadow: 0 8px 24px rgba(23, 61, 45, 0.05);
}

body.single-post figure.wp-block-table.mcd-article-table table {
    width: 100%;
    min-width: 700px;
    margin: 0;

    border: 0;
    border-collapse: collapse;
    table-layout: fixed;

    font-size: 1rem;
}

body.single-post figure.wp-block-table.mcd-article-table thead,
body.single-post figure.wp-block-table.mcd-article-table thead tr,
body.single-post figure.wp-block-table.mcd-article-table thead th {
    background: #244c3a !important;
    background-image: none !important;
    color: #ffffff !important;
}

body.single-post figure.wp-block-table.mcd-article-table thead th {
    box-shadow: inset 0 0 0 9999px #244c3a !important;
}

body.single-post figure.wp-block-table.mcd-article-table thead th strong,
body.single-post figure.wp-block-table.mcd-article-table thead th b {
    color: #ffffff !important;
}

body.single-post figure.wp-block-table.mcd-article-table th {
    padding: 1rem 1.125rem;

    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.2);

    font-family: "Poppins", sans-serif;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    vertical-align: top;
}

body.single-post figure.wp-block-table.mcd-article-table td {
    padding: 1rem 1.125rem;

    border: 0;
    border-right: 1px solid var(--mcd-border);
    border-bottom: 1px solid var(--mcd-border);

    color: var(--mcd-text);
    line-height: 1.55;
    text-align: left;
    vertical-align: top;
}

body.single-post figure.wp-block-table.mcd-article-table th:first-child,
body.single-post figure.wp-block-table.mcd-article-table td:first-child {
    width: 38%;
}

body.single-post figure.wp-block-table.mcd-article-table th:last-child,
body.single-post figure.wp-block-table.mcd-article-table td:last-child {
    width: 62%;
    border-right: 0;
}

body.single-post figure.wp-block-table.mcd-article-table tbody tr:nth-child(even) {
    background: #f5f8f6;
}

body.single-post figure.wp-block-table.mcd-article-table tbody tr:last-child td {
    border-bottom: 0;
}

/* =========================================================
   Sources and Further Reading
   ========================================================= */

body.single-post .wp-block-post-content .mcd-sources {
    display: block;
    width: 100% !important;
    max-width: var(--mcd-wide-max) !important;

    margin: 5rem auto 4rem !important;
    padding: clamp(1.5rem, 3vw, 2.25rem) !important;

    border: 1px solid var(--mcd-border);
    border-radius: var(--mcd-radius);

    background: #f5f8f6;
    box-shadow: 0 8px 24px rgba(23, 61, 45, 0.045);
}

body.single-post .wp-block-post-content .mcd-sources > * {
    width: auto !important;
    max-width: none !important;
    margin-inline: 0 !important;
}

body.single-post .wp-block-post-content .mcd-sources h2 {
    margin: 0 0 1rem !important;
    padding: 0 !important;

    font-size: clamp(1.8rem, 1.55rem + 0.8vw, 2.3rem);
}

body.single-post .wp-block-post-content .mcd-sources h2::before {
    display: none;
}

body.single-post .wp-block-post-content .mcd-sources-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

body.single-post .wp-block-post-content .mcd-sources-list li {
    margin: 0 !important;
    padding: 1rem 0 !important;

    border-bottom: 1px solid #dbe3dd;

    font-size: 1rem;
    line-height: 1.55;
}

body.single-post .wp-block-post-content .mcd-sources-list li:last-child {
    border-bottom: 0;
}

/* Source rows are complete descriptive links.
   Keep the full Authority — Source title visibly identifiable as one link. */
body.single-post .wp-block-post-content .mcd-sources-list a {
    color: #285a40;
    text-decoration-line: underline !important;
    text-decoration-style: solid;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(40, 90, 64, 0.45);
    text-underline-offset: 0.2em;
    overflow-wrap: anywhere;

    transition:
        color 200ms ease,
        text-decoration-color 200ms ease,
        text-decoration-thickness 200ms ease;
}

body.single-post .wp-block-post-content .mcd-sources-list a:hover,
body.single-post .wp-block-post-content .mcd-sources-list a:focus-visible {
    color: #173326;
    text-decoration-color: currentColor;
    text-decoration-thickness: 2px;
}

/* =========================================================
   Tablet — up to 1023px
   ========================================================= */

@media (max-width: 1023px) {
    body.single-post .wp-block-post-content {
        width: min(calc(100% - 48px), 900px);
    }

    body.single-post .wp-block-post-title,
    body.single-post .wp-block-post-terms,
    body.single-post .wp-block-post-featured-image,
    body.single-post
    .wp-block-group:has(> .wp-block-post-date),
    body.single-post
    .wp-block-group:has(.wp-block-post-author-name),
    body.single-post
    .wp-block-group:has(.wp-block-post-author) {
        width: min(calc(100% - 48px), 820px);
    }

    body.single-post .wp-block-post-title {
        font-size: clamp(2.65rem, 5.6vw, 3.55rem) !important;
        line-height: 1.08 !important;
    }

    body.single-post .wp-block-post-content >
    :where(
        p,
        ul,
        ol,
        h2,
        h3,
        h4,
        blockquote,
        .mcd-callout
    ) {
        max-width: 760px;
    }

    body.single-post .wp-block-post-content >
    :where(
        .wp-block-image,
        .wp-block-table,
        .mcd-sources
    ) {
        max-width: 860px;
    }
}

/* =========================================================
   Mobile — up to 600px
   ========================================================= */

@media (max-width: 600px) {
    body.single-post .wp-block-post-content {
        width: calc(100% - 32px);
    }

    body.single-post .wp-block-post-title,
    body.single-post .wp-block-post-terms,
    body.single-post .wp-block-post-featured-image,
    body.single-post
    .wp-block-group:has(> .wp-block-post-date),
    body.single-post
    .wp-block-group:has(.wp-block-post-author-name),
    body.single-post
    .wp-block-group:has(.wp-block-post-author) {
        width: calc(100% - 32px);
    }

    body.single-post .wp-block-post-terms {
        margin-top: 2.25rem !important;
        margin-bottom: 0.8rem !important;
        font-size: 0.8125rem;
    }

    body.single-post .wp-block-post-title {
        font-size: clamp(2rem, 9.5vw, 2.45rem) !important;
        line-height: 1.08 !important;
        letter-spacing: -0.03em;
    }

    body.single-post
    .wp-block-group:has(> .wp-block-post-date),
    body.single-post
    .wp-block-group:has(.wp-block-post-author-name),
    body.single-post
    .wp-block-group:has(.wp-block-post-author) {
        flex-wrap: wrap;
        margin-top: 0.75rem !important;
    }

    body.single-post .wp-block-post-featured-image {
        margin-top: 1.5rem !important;
        margin-bottom: 2.25rem !important;
    }

    body.single-post .wp-block-post-content p,
    body.single-post .wp-block-post-content li {
        font-size: 1.0625rem;
        line-height: 1.68;
    }

    body.single-post .wp-block-post-content h2 {
        font-size: clamp(1.8rem, 7.6vw, 2.1rem);
        line-height: 1.16;

        margin-top: 3.25rem !important;
        margin-bottom: 1.15rem !important;
    }

    body.single-post .wp-block-post-content h3 {
        font-size: clamp(1.3rem, 5.8vw, 1.55rem);
        line-height: 1.28;

        margin-top: 2.1rem !important;
    }

    body.single-post .mcd-callout {
        margin-top: 1.75rem !important;
        margin-bottom: 2.25rem !important;

        padding: 1rem 1.0625rem;
        border-left-width: 5px;
    }

    body.single-post .mcd-callout p {
        font-size: 1rem;
        line-height: 1.62;
    }

    body.single-post .wp-block-post-content > .wp-block-image {
        margin-top: 2.5rem !important;
        margin-bottom: 2.5rem !important;
    }

    body.single-post
    .wp-block-post-content >
    .wp-block-image.mcd-decision-diagram {
        width: 100%;
        max-width: 100%;
    }

    body.single-post figure.wp-block-table.mcd-article-table {
        width: 100%;

        margin-top: 2.25rem !important;
        margin-bottom: 3rem !important;

        border-radius: 8px;
    }

    body.single-post figure.wp-block-table.mcd-article-table table {
        min-width: 680px;
        font-size: 0.9375rem;
    }

    body.single-post figure.wp-block-table.mcd-article-table th,
    body.single-post figure.wp-block-table.mcd-article-table td {
        padding: 0.875rem 1rem;
    }

    body.single-post .wp-block-post-content .mcd-sources {
        margin-top: 3.5rem !important;
        margin-bottom: 3rem !important;
        padding: 1.125rem !important;
    }

    body.single-post .wp-block-post-content .mcd-sources h2 {
        font-size: clamp(1.7rem, 7.2vw, 2rem);
        line-height: 1.18;
    }

    body.single-post .wp-block-post-content .mcd-sources-list li {
        padding: 0.875rem 0 !important;
        font-size: 0.9375rem;
        line-height: 1.55;
    }
}

/* =========================================================
   Validated shared editorial helpers — post v1.1
   These rules preserve later approved cluster/card behavior.
   ========================================================= */

/* Weather-Ready cluster reading width */
.wp-block-post-content .mcd-cluster-content {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: min(960px, calc(100vw - 2rem)) !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

/* Guide-card label and title alignment */
.wp-block-post-content .mcd-guide-card > p:first-child {
    display: block;
    width: 100%;
    margin: 0 0 1.1rem !important;
    text-align: center !important;
    box-sizing: border-box;
}

.wp-block-post-content .mcd-guide-card > h3 {
    text-align: center !important;
}

.wp-block-post-content .mcd-guide-card + h2 {
    margin-top: 3.5rem !important;
}

@media (max-width: 600px) {
    .wp-block-post-content .mcd-guide-card > p:first-child {
        margin: 0 0 0.85rem !important;
    }
}

