.h1-replacement {
    font-size: clamp(1.5rem, 4vw, 2.5rem);

}

/* Article styles for DIY vs Professional post */
.article-content {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
    color: #222;
    line-height: 1.65;
    font-size: 1rem;
}

.article-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.article-featured {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.article-meta {
    color: #666;
    margin-top: 0.5rem;
}

.article-intro p {
    font-size: 1.05rem;
    color: #333;
}

.methods-list h3 {
    margin: 0.2rem 0;
}

.methods-list>li {
    margin-bottom: 3rem;
}

.methods-list p,
.areas-list li {
    margin: 0.25rem 0 0.6rem 0;
}

.areas-list {
    columns: 1;
    margin-left: 0;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 2rem 0;
}

.comparison-table th,
.comparison-table td {
    border: 1px solid #e6e6e6;
    padding: 0.6rem 0.8rem;
    text-align: left;
}

.comparison-table thead th {
    background: #faf3e6;
    color: #222;
}

/* Responsive table: horizontal-scroll fallback for narrow viewports */
.comparison-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Improve desktop padding and zebra rows */
.comparison-table th,
.comparison-table td {
    padding: 0.75rem 1rem;
    text-align: left;
}

.comparison-table tbody tr:nth-child(odd) {
    background: #fcfcfc;
}

/* Mobile: stacked table cards with inline labels (no HTML change required) */
@media (max-width: 640px) {
    .comparison-table thead {
        display: none;
    }

    .comparison-table,
    .comparison-table tbody,
    .comparison-table tr,
    .comparison-table td {
        display: block;
        width: 100%;
    }

    .comparison-table tr {
        margin: 0 0 1rem 0;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 0.6rem;
        background: #fff;
    }

    .comparison-table td {
        padding: 0.45rem 0.5rem;
        border: none;
        position: relative;
        padding-left: 46%;
    }

    .comparison-table td:before {
        position: absolute;
        left: 0.75rem;
        top: 0.45rem;
        width: 40%;
        white-space: nowrap;
        font-weight: 700;
        color: #333;
    }

    /* Labels inserted via nth-child to avoid editing HTML */
    .comparison-table tr td:nth-child(1):before {
        content: "Method";
    }

    .comparison-table tr td:nth-child(2):before {
        content: "Cost";
    }

    .comparison-table tr td:nth-child(3):before {
        content: "Lifespan";
    }

    .comparison-table tr td:nth-child(4):before {
        content: "Risk";
    }

    .comparison-table tr td:nth-child(5):before {
        content: "Best For";
    }
}

/* Small tweak: ensure table wrapper looks neat */
.comparison-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.comparison-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.cta {
    font-weight: 700;
    margin-top: 1rem;
}

.cta-link {
    white-space: nowrap;
    background: #db9423;
    color: #fff;
    padding: 0.2rem 0.9rem;
    text-decoration: none;
}

@media (max-width: 800px) {
    .article-content {
        padding: 0 1rem;
    }

    .article-featured {
        max-height: 260px;
    }
}

/* General article improvements: typography, spacing and image sizing */
.article-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: #222;
}

.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(16, 24, 40, 0.06);
}

/* Featured image smaller on large screens for better composition */
.article-featured {
    width: 100%;
    max-width: 820px;
    height: auto;
    margin: 0.5rem auto 1.25rem;
    display: block;
}

/* Method images (under each method) — keep compact and memorable */
.methods-list .method-img {
    max-width: 420px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0.75rem auto 0.9rem;
    border-radius: 8px;
}

/* Decorative blur for a single illustrative image (use sparingly) */
.method-img.blur {
    filter: blur(5px);
    transition: filter 300ms ease-in-out;
}

/* Prefer reduced motion and avoid blur transitions on reduced-motion devices */
@media (prefers-reduced-motion: reduce) {
    .method-img.blur {
        transition: none;
    }
}


/* Pull-quote refinement */
.pull-quote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(90deg, #f7fbff, #ffffff);
    border-left: 4px solid #0077cc;
    font-style: italic;
    border-radius: 6px;
}

/* CTA improvements */
.article-cta {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    background: #0077cc;
    color: #fff;
    padding: 1rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.article-cta .cta-action a {
    background: #fff;
    color: #0077cc;
    padding: 0.55rem 0.9rem;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
}

/* Table polish */
/* Wrapper to enable horizontal scrolling on small screens */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Base table styling */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* keeps columns readable on desktop */
}

.comparison-table th,
.comparison-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.comparison-table tbody tr:nth-child(odd) {
    background: #fbfbfb;
}




/* ----- Mobile Card Layout (<480px) ----- */
@media (max-width: 650px) {

    .comparison-table,
    .comparison-table thead,
    .comparison-table tbody,
    .comparison-table th,
    .comparison-table td,
    .comparison-table tr {
        display: block;
    }

    .comparison-table thead {
        display: none;
        /* hide header row */
    }

    .comparison-table tr {
        margin-bottom: 1rem;
        background: #fff;
        border: 1px solid #eee;
        padding: 0.5rem;
    }

    .comparison-table td {
        position: relative;
        padding-left: 50%;
        text-align: left;
        border: none;
    }

    .comparison-table td::before {
        content: attr(data-label);
        /* show column name */
        position: absolute;
        left: 1rem;
        top: 0;
        font-weight: bold;
        white-space: nowrap;
    }
}

@media (max-width: 520px) {
    .comparison-table td {

        padding-left: 20%;

    }
}


/* Readability tweaks */
.article-content h2 {
    font-size: 1.35rem;
    margin-top: 1.6rem;
    color: #0f172a;
}

.article-content h3 {
    font-size: 1.05rem;
    margin-top: 1.1rem;
    color: #0b1220;
}

.article-content p {
    font-size: 1rem;
    margin-bottom: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .two-col {
        grid-template-columns: 1fr;
    }

    .methods-list .method-img {
        max-width: 100%;
    }

    .article-featured {
        max-width: 100%;
    }
}

@media (max-width: 930px) {
    .article-content {
        padding: 0 1rem;
        font-size: 0.98rem;
    }

    .article-cta {
        flex-direction: column;
        align-items: stretch;
    }
}