/* EVERYDAY INSIGHT — SHARED ARTICLE STYLES */
:root {
    --ei-green: #678574;
    --ei-green-dark: #527060;
    --ei-heading: #304438;
    --ei-green-text: #465e4e;
    --ei-green-soft: #eef5ef;
    --ei-green-border: #cfe1d7;
    --ei-blue-green: #7196a5;
    --ei-brown: #9c8061;
    --ei-cream: #faf8f4;
    --ei-white: #ffffff;
    --ei-text: #3d3a36;
    --ei-muted: #6f6a64;
    --ei-border: #e7e2da;
    --ei-shadow: 0 14px 35px rgba(61, 58, 54, 0.08);
    --ei-radius: 16px;
    --ei-transition: 0.25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.articles-page {
    margin: 0;
    color: var(--ei-text);
    background: var(--ei-cream);
    font-family: "Inter", Arial, sans-serif;
    line-height: 1.6;
}

.articles-page .container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

/* DIRECTORY HERO */
.articles-page .page-hero {
    padding: 92px 20px;
    text-align: center;
    background:
        radial-gradient(circle at 18% 10%, rgba(113,150,165,.15), transparent 38%),
        linear-gradient(135deg, #dcebe1 0%, #edf4ef 55%, #faf8f4 100%);
    border-bottom: 3px solid var(--ei-brown);
}

.articles-page .page-hero .container { max-width: 900px; }

.articles-page .page-hero h1 {
    margin: 20px 0;
    color: var(--ei-heading);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.3rem, 6vw, 3.8rem);
    line-height: 1.12;
}

.articles-page .page-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: var(--ei-green-text);
    font-size: 1.08rem;
    line-height: 1.8;
}

.articles-page .section-tag,
.articles-page .article-category {
    display: inline-block;
    padding: 7px 15px;
    color: var(--ei-green-dark);
    background: rgba(255,255,255,.75);
    border: 1px solid var(--ei-green-border);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* SEARCH */
.articles-page .article-search {
    padding: 40px 20px;
    background: var(--ei-cream);
}

.articles-page .article-search input {
    display: block;
    width: min(600px, 100%);
    margin: 0 auto;
    padding: 16px 20px;
    color: var(--ei-text);
    background: var(--ei-white);
    border: 1px solid var(--ei-border);
    border-radius: 10px;
    font: inherit;
    outline: none;
    transition: border-color var(--ei-transition), box-shadow var(--ei-transition);
}

.articles-page .article-search input:focus {
    border-color: var(--ei-green);
    box-shadow: 0 0 0 4px rgba(103,133,116,.14);
}

/* FEATURED ARTICLE */
.articles-page .featured-article {
    padding: 88px 20px;
    background: var(--ei-white);
}

.articles-page .featured-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    overflow: hidden;
    background: var(--ei-white);
    border: 1px solid var(--ei-border);
    border-radius: var(--ei-radius);
    box-shadow: var(--ei-shadow);
}

.articles-page .featured-card img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 380px;
    object-fit: cover;
}

/* Use this variant when the image contains words, labels, or a diagram. */
.articles-page .featured-card--contain .featured-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 20px;
    background: #faf8f4;
}

.articles-page .featured-card--contain .featured-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    max-height: 560px;
    object-fit: contain;
    object-position: center;
}

.articles-page .featured-content {
    align-self: center;
    padding: clamp(30px, 5vw, 52px);
}

.articles-page .featured-content h2 {
    margin: 18px 0;
    color: var(--ei-heading);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    line-height: 1.25;
}

.articles-page .featured-content p {
    margin: 0 0 28px;
    color: var(--ei-muted);
    line-height: 1.8;
}

/* DIRECTORY SECTIONS AND CARDS */
.articles-page .article-section {
    padding: 82px 20px;
    background: var(--ei-cream);
}

.articles-page .article-section:nth-of-type(even) { background: var(--ei-white); }

.articles-page .article-section > .container > h2,
.articles-page .article-section .section-header h2 {
    margin: 0 0 38px;
    color: var(--ei-heading);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.articles-page .article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 30px;
}

.articles-page .article-card {
    overflow: hidden;
    background: var(--ei-white);
    border: 1px solid var(--ei-border);
    border-radius: var(--ei-radius);
    box-shadow: var(--ei-shadow);
    transition: transform var(--ei-transition), box-shadow var(--ei-transition);
}

.articles-page .article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 42px rgba(61,58,54,.13);
}

.articles-page .article-card img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* This selector prevents card styles from changing a full article. */
.articles-page .article-card .article-content,
.articles-page .article-card .review-content {
    padding: 28px;
    background: var(--ei-white);
}

.articles-page .article-card h3 {
    margin: 10px 0 14px;
    color: var(--ei-heading);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.45rem;
    line-height: 1.3;
}

.articles-page .article-card p {
    margin: 0 0 22px;
    color: var(--ei-muted);
    line-height: 1.75;
}

.articles-page .article-card a,
.articles-page .featured-content a {
    color: var(--ei-green-dark);
    font-weight: 700;
    text-decoration: none;
}

.articles-page .article-card a:hover,
.articles-page .featured-content a:hover {
    color: var(--ei-brown);
    text-decoration: underline;
}

/* FULL ARTICLE HERO */
.articles-page .article-hero {
    padding: 76px 20px 68px;
    text-align: center;
    background:
        radial-gradient(circle at 18% 10%, rgba(113,150,165,.16), transparent 36%),
        linear-gradient(135deg, #dcebe1 0%, #edf4ef 52%, #faf8f4 100%);
    border-bottom: 3px solid var(--ei-brown);
}

.articles-page .article-hero .container { max-width: 920px; }

.articles-page .article-hero h1 {
    max-width: 850px;
    margin: 18px auto 20px;
    color: var(--ei-heading);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.25rem, 6vw, 4.25rem);
    line-height: 1.1;
}

.articles-page .article-subtitle {
    max-width: 760px;
    margin: 0 auto 22px;
    color: var(--ei-green-text);
    font-size: clamp(1rem, 2.3vw, 1.18rem);
    line-height: 1.75;
}

.articles-page .article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--ei-muted);
    font-size: .9rem;
}

/* FULL ARTICLE IMAGE */
/* ==========================================
   ARTICLE FEATURE IMAGE
========================================== */

.article-image {
    margin: 0;
    padding: 0 20px;
    box-sizing: border-box;
}

.article-image .container {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.article-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0 auto;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(50, 83, 78, .12);
    object-fit: contain;
    object-position: center;
}

/* FULL ARTICLE CONTENT */
.articles-page article.article-content {
    padding: 48px 20px 76px;
    background: var(--ei-cream);
}

.articles-page article.article-content .article-container {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 42px clamp(22px, 5vw, 54px);
    background: var(--ei-white);
    border: 1px solid var(--ei-border);
    border-radius: 18px;
    box-shadow: var(--ei-shadow);
}

.articles-page article.article-content p,
.articles-page article.article-content li {
    color: var(--ei-text);
    font-size: 1.03rem;
    line-height: 1.8;
}

.articles-page article.article-content p { margin: 0 0 1.25em; }

.articles-page article.article-content h2 {
    margin: 2.1em 0 .7em;
    color: var(--ei-heading);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.6rem, 4vw, 2.15rem);
    line-height: 1.25;
}

.articles-page article.article-content h3 {
    margin: 1.7em 0 .55em;
    color: var(--ei-green-dark);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.3rem;
}

.articles-page article.article-content ul,
.articles-page article.article-content ol {
    margin: 0 0 1.5em;
    padding-left: 1.4em;
}

.articles-page article.article-content li { margin-bottom: .45em; }
.articles-page article.article-content li::marker { color: var(--ei-green); }
.articles-page article.article-content strong { color: var(--ei-heading); }

/* AUTHOR NOTES AND DISCLAIMERS */
.articles-page .author-note,
.articles-page .financial-disclaimer,
.articles-page .medical-disclaimer {
    margin: 0 0 28px;
    padding: 18px 20px;
    color: var(--ei-green-text);
    background: var(--ei-green-soft);
    border: 1px solid var(--ei-green-border);
    border-left: 5px solid var(--ei-green);
    border-radius: 10px;
}

.articles-page .financial-disclaimer,
.articles-page .medical-disclaimer { margin-top: 40px; }

.articles-page .author-note p,
.articles-page .financial-disclaimer p,
.articles-page .medical-disclaimer p {
    margin: 0;
    color: inherit;
    font-size: .93rem;
}

/* CALL TO ACTION AND BUTTONS */
.articles-page .article-cta {
    margin-top: 46px;
    padding: 32px;
    text-align: center;
    background: linear-gradient(135deg, #eef5ef, #f8f4ed);
    border: 1px solid var(--ei-green-border);
    border-radius: var(--ei-radius);
}

.articles-page article.article-content .article-cta h2 { margin: 0 0 12px; }

.articles-page article.article-content .article-cta p {
    max-width: 620px;
    margin: 0 auto 20px;
    color: var(--ei-green-text);
}

.articles-page .btn-primary,
.articles-page .article-content .btn-primary {
    display: inline-block;
    margin-top: 8px;
    padding: 12px 22px;
    color: #fff;
    background: var(--ei-green);
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--ei-transition), transform var(--ei-transition), box-shadow var(--ei-transition);
}

.articles-page .btn-primary:hover,
.articles-page .btn-primary:focus-visible,
.articles-page .article-content .btn-primary:hover,
.articles-page .article-content .btn-primary:focus-visible {
    color: #fff;
    background: var(--ei-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(82,112,96,.25);
}

/* NEWSLETTER */
.articles-page .newsletter {
    padding: 90px 20px;
    text-align: center;
    background: var(--ei-white);
}

.articles-page .newsletter h2 {
    margin: 0 0 18px;
    color: var(--ei-heading);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.articles-page .newsletter > p {
    max-width: 650px;
    margin: 0 auto 36px;
    color: var(--ei-muted);
    line-height: 1.8;
}

.articles-page .newsletter-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px;
    margin-top: 45px;
}

.articles-page .newsletter-benefits,
.articles-page .newsletter-form {
    padding: 36px;
    text-align: left;
    background: var(--ei-green-soft);
    border: 1px solid var(--ei-green-border);
    border-radius: var(--ei-radius);
}

.articles-page .newsletter-benefits h3 {
    margin: 0 0 20px;
    color: var(--ei-heading);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.7rem;
}

.articles-page .newsletter-benefits ul { margin: 0; padding: 0; list-style: none; }
.articles-page .newsletter-benefits li {
    padding: 12px 0;
    color: var(--ei-green-text);
    border-bottom: 1px solid var(--ei-green-border);
}
.articles-page .newsletter-benefits li:last-child { border-bottom: 0; }

.articles-page #kit-newsletter,
.articles-page .newsletter-form iframe,
.articles-page .newsletter-form form {
    width: 100%;
    max-width: 100%;
    border: 0;
}

/* FACEBOOK SHARE */
.articles-page .share-section {
    margin: 60px 0 0;
    padding: 30px;
    text-align: center;
    background: var(--ei-green-soft);
    border: 1px solid var(--ei-green-border);
    border-radius: var(--ei-radius);
}

.articles-page .share-section h3 {
    margin: 0 0 12px;
    color: var(--ei-heading);
    font-family: "Playfair Display", Georgia, serif;
}

.articles-page .share-section p { margin: 0 0 20px; color: var(--ei-green-text); }

.articles-page .share-facebook {
    padding: 12px 22px;
    color: #fff;
    background: #1877f2;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--ei-transition), transform var(--ei-transition);
}

.articles-page .share-facebook:hover { background: #166fe5; transform: translateY(-2px); }
/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 768px) {
    .articles-page .page-hero,
    .articles-page .article-hero {
        padding: 58px 18px 50px;
    }

    .articles-page .featured-article,
    .articles-page .article-section,
    .articles-page .newsletter {
        padding: 64px 16px;
    }

    .articles-page .featured-card,
    .articles-page .newsletter-container {
        grid-template-columns: 1fr;
    }

    .articles-page .featured-card img {
        min-height: 0;
        height: 270px;
    }

    /* Complete article image — no cropping */
    .articles-page .article-image {
        margin: 0;
        padding: 22px 10px 0;
    }

    .articles-page .article-image img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        margin: 0 auto;
        border-radius: 12px;
        object-fit: contain;
    }

    .articles-page article.article-content {
        padding: 26px 10px 52px;
    }

    .articles-page article.article-content .article-container {
        padding: 30px 22px;
        border-radius: 12px;
    }
}


@media (max-width: 480px) {
    .articles-page .container {
        width: min(100% - 28px, 1180px);
    }

    .articles-page .page-hero h1,
    .articles-page .article-hero h1 {
        font-size: 2.15rem;
    }

    .articles-page .article-meta {
        gap: 5px;
        font-size: 0.82rem;
    }

    .articles-page .featured-content,
    .articles-page .article-card .article-content,
    .articles-page .article-card .review-content,
    .articles-page .newsletter-benefits,
    .articles-page .newsletter-form {
        padding: 24px;
    }

    /* Smaller spacing for the image on phones */
    .articles-page .article-image {
        padding: 16px 0 0;
    }

    .articles-page .article-image img {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        border-radius: 10px;
        object-fit: contain;
    }

    .articles-page .article-cta,
    .articles-page .share-section {
        padding: 24px 18px;
    }
}

/* ==========================================
   ARTICLE SHARE SECTION
========================================== */

.articles-page .share-section {
    width: min(760px, calc(100% - 40px));
    margin: 0 auto 60px;
    padding: 32px 24px;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            #eef5ef 0%,
            #f8f4ed 100%
        );

    border: 1px solid #cfe1d7;
    border-radius: 16px;

    box-shadow:
        0 12px 30px rgba(61, 58, 54, 0.07);
}

.articles-page .share-section h3 {
    margin: 0 0 10px;

    color: #304438;

    font-family:
        "Playfair Display",
        Georgia,
        serif;

    font-size: clamp(1.45rem, 4vw, 1.8rem);
    line-height: 1.3;
}

.articles-page .share-section p {
    max-width: 560px;
    margin: 0 auto 22px;

    color: #465e4e;

    font-family:
        "Inter",
        Arial,
        sans-serif;

    font-size: 0.98rem;
    line-height: 1.7;
}

/* ==========================================
   SHARE BUTTON CONTAINER
========================================== */

.articles-page .share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ==========================================
   ALL SHARE BUTTONS
========================================== */

.articles-page .share-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 44px;
    padding: 11px 18px;

    border: none;
    border-radius: 9px;

    font-family:
        "Inter",
        Arial,
        sans-serif;

    font-size: 0.92rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

/* ==========================================
   FACEBOOK
========================================== */

.articles-page .share-facebook {
    color: #ffffff;
    background: #1877f2;
}

.articles-page .share-facebook:hover,
.articles-page .share-facebook:focus-visible {
    color: #ffffff;
    background: #166fe5;

    transform: translateY(-2px);

    box-shadow:
        0 8px 18px rgba(24, 119, 242, 0.24);
}

/* ==========================================
   X / TWITTER
========================================== */

.articles-page .share-x {
    color: #ffffff;
    background: #202020;
}

.articles-page .share-x:hover,
.articles-page .share-x:focus-visible {
    color: #ffffff;
    background: #000000;

    transform: translateY(-2px);

    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.20);
}

/* ==========================================
   EMAIL
========================================== */

.articles-page .share-email {
    color: #ffffff;
    background: #678574;
}

.articles-page .share-email:hover,
.articles-page .share-email:focus-visible {
    color: #ffffff;
    background: #527060;

    transform: translateY(-2px);

    box-shadow:
        0 8px 18px rgba(82, 112, 96, 0.24);
}

/* ==========================================
   COPY LINK
========================================== */

.articles-page .share-copy {
    color: #465e4e;
    background: #ffffff;

    border: 1px solid #cfe1d7;
}

.articles-page .share-copy:hover,
.articles-page .share-copy:focus-visible {
    color: #304438;
    background: #dcebe1;
    border-color: #678574;

    transform: translateY(-2px);

    box-shadow:
        0 8px 18px rgba(82, 112, 96, 0.16);
}

/* ==========================================
   KEYBOARD FOCUS
========================================== */

.articles-page .share-buttons button:focus-visible {
    outline: 3px solid rgba(113, 150, 165, 0.38);
    outline-offset: 3px;
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 600px) {

    .articles-page .share-section {
        width: min(100% - 24px, 760px);
        margin-bottom: 40px;
        padding: 26px 18px;
        border-radius: 12px;
    }

    .articles-page .share-buttons {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .articles-page .share-buttons button {
        width: 100%;
    }

}
/* ==========================================
   FORCE SHARE SECTION TO THE CENTER
========================================== */

body.articles-page .share-section {
    display: block;
    width: min(760px, calc(100% - 40px));
    margin: 50px auto 60px;
    padding: 32px 24px;

    text-align: center;

    background: linear-gradient(
        135deg,
        #eef5ef,
        #f8f4ed
    );

    border: 1px solid #cfe1d7;
    border-radius: 16px;
}

body.articles-page .share-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

body.articles-page .share-section h3 {
    width: 100%;
    margin: 0 auto 10px;
    color: #304438;
    text-align: center;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.7rem;
}

body.articles-page .share-section p {
    width: 100%;
    max-width: 560px;
    margin: 0 auto 22px;
    color: #465e4e;
    text-align: center;
    line-height: 1.7;
}

body.articles-page .share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 600px) {

    body.articles-page .share-section {
        width: calc(100% - 24px);
        padding: 26px 18px;
    }

    body.articles-page .share-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    body.articles-page .share-buttons button {
        width: 100%;
    }
}
/* ==========================================
   FINAL FIX — SHOW COMPLETE ARTICLE IMAGES
   Keep this at the bottom of articles.css
========================================== */

body.articles-page .article-image,
figure.article-image,
section.article-image {
    display: block !important;
    width: 75 !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 22px 20px 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

body.articles-page .article-image .container,
figure.article-image > .container,
section.article-image > .container {
    display: block !important;
    width: 100% !important;
    max-width: 500px !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
}

body.articles-page .article-image img,
figure.article-image img,
section.article-image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
    object-fit: contain !important;
    object-position: center !important;
}

/* Override old inline article rules that used a 480px crop. */
.article-image img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
}


/* TABLET */

@media (max-width: 768px) {
    body.articles-page .article-image {
        padding: 18px 14px 0 !important;
    }

    body.articles-page .article-image img {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        border-radius: 12px !important;
        object-fit: contain !important;
    }
}


/* MOBILE */

@media (max-width: 480px) {
    body.articles-page .article-image {
        padding: 14px 8px 0 !important;
    }

    body.articles-page .article-image img {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        border-radius: 10px !important;
        object-fit: contain !important;
    }
}
