
/* =========================================================
   EcoFarm — Blog Article Details
   Full-width hero + centered content container
   ========================================================= */

/* 01 — Page */
.blog-article-page {
    min-height: 100vh;
    background: var(--body-bg);
    color: var(--body-text);
    overflow-x: clip;
}

.dark .blog-article-page {
    background: var(--night-body);
    color: var(--night-text);
}

/* 02 — Full-width hero */
.article-hero {
    width: 100%;
    padding: 0;
    margin: 0;
}

.article-cover {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    width: 100%;
    min-height: clamp(300px, 35vw, 480px);
    background-color: #143421;
    background-image:
        linear-gradient(
            180deg,
            rgba(3, 20, 10, .20),
            rgba(3, 20, 10, .84)
        ),
        var(--article-cover-image, none);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
}

.article-cover-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: min(100% - 40px, 1200px);
    min-height: inherit;
    margin-inline: auto;
    padding-block: 26px clamp(34px, 5vw, 60px);
}

.article-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: #e2eee5;
    font-size: .86rem;
    font-weight: 700;
}

.article-breadcrumbs a {
    color: #fff;
}

.article-breadcrumbs .separator {
    color: #a6e7af;
}

.article-cover-caption h1 {
    max-width: 900px;
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(1.8rem, 4.2vw, 3.4rem);
    font-weight: 900;
    line-height: 1.4;
    text-shadow: 0 3px 16px rgba(0, 0, 0, .35);
}

.article-cover-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: #f0f6f1;
    font-size: .9rem;
    font-weight: 700;
}

/* 03 — Main content container */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 28px;

    width: min(100% - 40px, 1200px);
    margin: 28px auto 70px;
}

/* 04 — Article and sidebar cards */
.article-main-card,
.article-side-card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .035);
}

.dark .article-main-card,
.dark .article-side-card {
    background: #112719;
    border-color: var(--night-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}

.article-main-card {
    padding: clamp(22px, 4vw, 48px);
}

/* 05 — Master image */
.article-master-image,
.article-end-media {
    margin: 0 0 30px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #102719;
}

.article-master-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
}

/* 06 — Video or gallery fallback */
.article-end-media {
    margin: 32px 0 0;
}

.article-end-media video {
    display: block;
    width: 100%;
    max-height: 520px;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #06170c;
}

.article-end-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
}

/* 07 — Article content */
.article-body {
    overflow-wrap: anywhere;
}

.article-body h2 {
    margin: 34px 0 12px;
    color: var(--body-text);
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 900;
    line-height: 1.5;
}

.dark .article-body h2 {
    color: #f3f8f4;
}

.article-body h3 {
    margin: 24px 0 8px;
    color: var(--brand-dark);
    font-size: 1.15rem;
    font-weight: 900;
}

.dark .article-body h3 {
    color: #f6b83f;
}

.article-body p {
    margin: 0 0 18px;
    color: #53635a;
    font-size: 1rem;
    line-height: 2.15;
}

.dark .article-body p {
    color: #c2d0c6;
}

.article-body ul,
.article-body ol {
    margin: 0 0 22px;
    padding-inline-start: 24px;
    color: #53635a;
}

.article-body li {
    padding-inline-start: 5px;
    margin-bottom: 10px;
    line-height: 2;
}

.dark .article-body ul,
.dark .article-body ol {
    color: #c2d0c6;
}

.article-body img,
.article-body video {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 22px auto;
    border-radius: 14px;
}

/* 08 — Article callout */
.article-callout {
    margin: 28px 0;
    padding: 20px;
    border: 1px solid rgba(245, 158, 11, .3);
    border-radius: 14px;
    background: rgba(245, 158, 11, .08);
}

.article-callout strong {
    display: block;
    margin-bottom: 5px;
    color: #99620a;
}

.article-callout p {
    margin: 0;
}

.dark .article-callout strong {
    color: #f6c96c;
}

/* 09 — Sidebar */
.article-side-card {
    padding: 22px;
}

.article-side-card + .article-side-card {
    margin-top: 18px;
}

.article-side-card h2 {
    margin: 0 0 14px;
    font-size: 1.12rem;
    font-weight: 900;
}

.article-side-card p {
    margin: 0 0 17px;
    color: #6d7b72;
    font-size: .9rem;
    line-height: 1.9;
}

.dark .article-side-card p {
    color: #b7c7bc;
}

.article-side-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 11px;
    background: var(--brand-dark);
    color: #fff;
    font-size: .9rem;
    font-weight: 900;
    text-align: center;
}

.article-side-link:hover {
    background: #1c6530;
}

.article-side-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-top: 18px;
}

.article-side-list a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--body-text);
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.7;
}

.dark .article-side-list a {
    color: #e0ebe3;
}

.article-side-list a::before {
    content: "";
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin-top: 9px;
    border-radius: 50%;
    background: var(--brand);
}

/* 10 — Sharing */
.article-share-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.dark .article-share-row {
    border-color: rgba(255, 255, 255, .12);
}

.article-share-label {
    margin-inline-end: 4px;
    color: #7b8a80;
    font-size: .86rem;
    font-weight: 800;
}

.article-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--body-text);
    font: inherit;
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
}

.article-share-button:hover {
    border-color: var(--brand-dark);
    color: var(--brand-dark);
}

.dark .article-share-button {
    border-color: var(--night-border);
    color: #e2eee5;
}

.article-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    color: var(--brand-dark);
    font-weight: 900;
}

.dark .article-back-link {
    color: #f6b83f;
}

/* 11 — Related articles container */
.related-blogs-section {
    padding: 0 0 72px;
}

.related-blogs-inner {
    width: min(100% - 40px, 1200px);
    margin-inline: auto;
}

.related-blogs-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.related-blogs-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--brand-dark);
    font-size: .85rem;
    font-weight: 900;
}

.dark .related-blogs-eyebrow {
    color: #f6b83f;
}

.related-blogs-heading h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
}

.related-blogs-heading p {
    margin: 7px 0 0;
    color: #738078;
    font-size: .95rem;
}

.dark .related-blogs-heading p {
    color: #aebdb2;
}

/* 12 — Related article cards */
.related-blogs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.related-blog-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
}

.dark .related-blog-card {
    background: #112719;
    border-color: var(--night-border);
}

.related-blog-card img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}

.related-blog-card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 17px;
}

.related-blog-card h3 {
    margin: 7px 0 10px;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.7;
}

.related-blog-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0 0 12px;
    color: #69786e;
    font-size: .85rem;
    line-height: 1.8;
}

.dark .related-blog-card p {
    color: #b2c1b6;
}

.related-blog-card a.read-related {
    margin-top: auto;
    color: var(--brand-dark);
    font-size: .86rem;
    font-weight: 900;
}

/* 13 — Tablet */
@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .related-blogs-grid {
        grid-template-columns: 1fr;
    }
}

/* 14 — Mobile */
@media (max-width: 640px) {
    .article-cover {
        min-height: 320px;
    }

    .article-cover-inner,
    .article-layout,
    .related-blogs-inner {
        width: calc(100% - 24px);
    }

    .article-main-card {
        padding: 21px 17px;
        border-radius: 16px;
    }

    .article-body p,
    .article-body li {
        font-size: .95rem;
    }

    .related-blogs-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .related-blog-card {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .related-blog-card img {
        min-height: 175px;
    }

    .related-blog-card-content {
        padding: 13px;
    }

    .related-blog-card h3 {
        font-size: .92rem;
    }

    .related-blog-card p {
        font-size: .81rem;
    }
}
