/* =========================================================
   Kitchen Worktops Replacement - Blog article styles
   File: css/blog-article.css
   Mobile-friendly version
   ========================================================= */

:root {
    --kwr-ink: #14171c;
    --kwr-text: #3d434d;
    --kwr-muted: #7a808b;
    --kwr-line: #e6e8ec;
    --kwr-soft: #f6f4f0;
    --kwr-accent: #b08a4f;
    --kwr-accent-dark: #8c6c3a;
    --kwr-dark: #12151a;
}

/* ===== Safety net: stop sideways scrolling and oversized media ===== */
html, body { max-width: 100%; overflow-x: hidden; }
.kwr-post-wrap, .kwr-post-wrap *, section.kwr-next, section.kwr-next * { box-sizing: border-box; }
.kwr-post-wrap img, section.kwr-next img { max-width: 100%; height: auto; }
.kwr-post-wrap { overflow-x: hidden; }
.kwr-article, .kwr-post-head { min-width: 0; overflow-wrap: break-word; word-wrap: break-word; }

/* ===== Article header ===== */
.kwr-post-wrap { padding: 70px 0 40px; background: #fff; }

.kwr-post-head {
    max-width: 920px;
    margin: 0 auto 60px;
    text-align: center;
}
.kwr-crumbs {
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--kwr-muted);
    line-height: 1.8;
}
.kwr-crumbs a {
    color: var(--kwr-text);
    text-decoration: none;
    border-bottom: 1px solid var(--kwr-line);
}
.kwr-crumbs a:hover { color: var(--kwr-accent-dark); }
.kwr-crumbs span { margin: 0 8px; opacity: .6; }

.kwr-pill {
    display: inline-block;
    background: var(--kwr-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 7px 16px;
    border-radius: 50px;
    margin-bottom: 22px;
}
.kwr-post-head h1 {
    font-size: clamp(28px, 4.6vw, 54px);
    line-height: 1.15;
    font-weight: 700;
    color: var(--kwr-ink);
    letter-spacing: -.01em;
    margin: 0 0 22px;
    overflow-wrap: break-word;
}
.kwr-lead {
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.65;
    max-width: 760px;
    color: var(--kwr-text);
    margin: 0 auto 26px;
}
.kwr-byline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    font-size: 14px;
    color: var(--kwr-muted);
    margin-bottom: 40px;
}
.kwr-byline strong { color: var(--kwr-ink); }

.kwr-head-img { margin: 0; }
.kwr-head-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow: 0 24px 50px rgba(20, 23, 28, .18);
}

/* ===== Layout ===== */
.kwr-post-grid {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

/* Contents box */
.kwr-toc {
    position: sticky;
    top: 110px;
    border-left: 2px solid var(--kwr-line);
    padding-left: 22px;
}
.kwr-toc-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--kwr-muted);
    margin: 0 0 14px;
}
.kwr-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.kwr-toc li { counter-increment: toc; margin-bottom: 4px; }
.kwr-toc a {
    display: block;
    font-size: 14.5px;
    line-height: 1.4;
    color: var(--kwr-text);
    text-decoration: none;
    padding: 7px 0;
    transition: color .2s, transform .2s;
}
.kwr-toc a::before {
    content: counter(toc, decimal-leading-zero) "  ";
    color: var(--kwr-accent);
    font-weight: 700;
    font-size: 12px;
}
.kwr-toc a:hover { color: var(--kwr-accent-dark); transform: translateX(4px); }

/* ===== Article body ===== */
.kwr-article { max-width: 760px; width: 100%; }
.kwr-article p {
    font-size: 18px;
    line-height: 1.85;
    color: var(--kwr-text);
    margin: 0 0 24px;
}
.kwr-article p.kwr-intro::first-letter {
    float: left;
    font-size: 76px;
    line-height: .85;
    font-weight: 700;
    color: var(--kwr-accent);
    padding: 6px 12px 0 0;
}
.kwr-article ul { margin: 0 0 26px; padding-left: 22px; }
.kwr-article li {
    font-size: 18px;
    line-height: 1.75;
    color: var(--kwr-text);
    margin-bottom: 10px;
}
.kwr-article h2 {
    font-size: clamp(24px, 3.2vw, 36px);
    line-height: 1.2;
    font-weight: 700;
    color: var(--kwr-ink);
    margin: 64px 0 20px;
    scroll-margin-top: 110px;
}
.kwr-article h2 .kwr-num {
    display: block;
    font-size: 13px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--kwr-accent);
    margin-bottom: 8px;
}
.kwr-article h3 {
    font-size: 21px;
    font-weight: 700;
    color: var(--kwr-ink);
    margin: 34px 0 12px;
}
.kwr-article a {
    color: var(--kwr-accent-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}
.kwr-article a:hover { color: var(--kwr-ink); }

.kwr-figure { margin: 38px 0; }
.kwr-figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(20, 23, 28, .14);
}
.kwr-figure figcaption {
    font-size: 14px;
    color: var(--kwr-muted);
    margin-top: 12px;
    text-align: center;
    line-height: 1.5;
}

/* Quick answer box */
.kwr-quick {
    background: var(--kwr-soft);
    border-left: 4px solid var(--kwr-accent);
    border-radius: 0 14px 14px 0;
    padding: 28px 32px;
    margin: 36px 0;
}
.kwr-quick h3 { margin: 0 0 12px; font-size: 19px; }
.kwr-quick p { font-size: 17px; margin: 0; }

/* Material spec cards */
.kwr-spec {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 28px 0 30px;
}
.kwr-spec div {
    background: #fff;
    border: 1px solid var(--kwr-line);
    border-radius: 12px;
    padding: 18px 20px;
}
.kwr-spec b {
    display: block;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--kwr-accent-dark);
    margin-bottom: 6px;
}
.kwr-spec span { font-size: 15.5px; line-height: 1.55; color: var(--kwr-text); }

/* Good habits / best avoided */
.kwr-proscons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 10px 0 30px;
}
.kwr-proscons > div { border-radius: 14px; padding: 24px 26px; }
.kwr-pros { background: #f1f7f2; }
.kwr-cons { background: #faf1ef; }
.kwr-proscons h4 {
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 12px;
}
.kwr-pros h4 { color: #2f6b3f; }
.kwr-cons h4 { color: #9a3b2e; }
.kwr-proscons ul { margin: 0; padding-left: 18px; }
.kwr-proscons li { font-size: 16px; line-height: 1.6; color: var(--kwr-text); margin-bottom: 6px; }

/* Comparison table (scrolls inside its own box on small screens) */
.kwr-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 34px 0;
    border-radius: 14px;
    border: 1px solid var(--kwr-line);
    box-shadow: 0 10px 30px rgba(20, 23, 28, .06);
    max-width: 100%;
}
.kwr-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; }
.kwr-table th {
    background: var(--kwr-dark);
    color: #fff;
    text-align: left;
    padding: 16px 18px;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.kwr-table td {
    padding: 15px 18px;
    border-top: 1px solid var(--kwr-line);
    color: var(--kwr-text);
    vertical-align: top;
}
.kwr-table tr:nth-child(even) td { background: #fafaf8; }
.kwr-table td:first-child { font-weight: 700; color: var(--kwr-ink); }

/* Decision guide */
.kwr-decide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 30px 0;
}
.kwr-article .kwr-decide a {
    display: block;
    background: var(--kwr-dark);
    color: #fff;
    text-decoration: none;
    border-radius: 14px;
    padding: 26px 28px;
    transition: transform .3s, background .3s;
}
.kwr-article .kwr-decide a:hover { transform: translateY(-5px); background: #1d222a; color: #fff; }
.kwr-decide small {
    display: block;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--kwr-accent);
    margin-bottom: 8px;
}
.kwr-decide strong { display: block; font-size: 19px; line-height: 1.35; font-weight: 600; }

/* FAQ */
.kwr-faq details {
    border: 1px solid var(--kwr-line);
    border-radius: 12px;
    margin-bottom: 12px;
    background: #fff;
    overflow: hidden;
}
.kwr-faq summary {
    cursor: pointer;
    list-style: none;
    padding: 20px 56px 20px 24px;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--kwr-ink);
    position: relative;
}
.kwr-faq summary::-webkit-details-marker { display: none; }
.kwr-faq summary::after {
    content: "+";
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    color: var(--kwr-accent);
}
.kwr-faq details[open] summary::after { content: "\2212"; }
.kwr-faq details p { padding: 0 24px 22px; margin: 0; font-size: 17px; }

/* Call to action */
.kwr-cta {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 18px;
    overflow: hidden;
    margin: 64px 0 0;
    color: #fff;
}
.kwr-cta::before { content: ""; position: absolute; inset: 0; background: rgba(12, 14, 18, .82); }
.kwr-cta-inner { position: relative; padding: 56px 48px; text-align: center; }
.kwr-article .kwr-cta h2 {
    color: #fff;
    margin: 0 0 14px;
    font-size: clamp(24px, 3.4vw, 38px);
}
.kwr-article .kwr-cta p { color: rgba(255, 255, 255, .9); max-width: 560px; margin: 0 auto 28px; }
.kwr-article .kwr-btn {
    display: inline-block;
    background: var(--kwr-accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 16px 36px;
    border-radius: 50px;
    margin: 6px;
    text-align: center;
    transition: background .25s, transform .25s;
}
.kwr-article .kwr-btn:hover { background: var(--kwr-accent-dark); color: #fff; transform: translateY(-3px); }
.kwr-article .kwr-btn.alt { background: transparent; border: 2px solid #fff; padding: 14px 34px; }
.kwr-article .kwr-btn.alt:hover { background: #fff; color: var(--kwr-ink); }

/* =========================================================
   READ NEXT
   ========================================================= */
section.kwr-next {
    background: var(--kwr-soft);
    padding: 80px 0;
    margin-top: 70px;
    clear: both;
    overflow: hidden;
}
section.kwr-next .kwr-next-heading {
    text-align: center;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
    font-weight: 700;
    color: var(--kwr-ink);
    margin: 0 0 40px;
    padding: 0;
}
section.kwr-next a.kwr-next-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    max-width: 940px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(20, 23, 28, .1);
    text-decoration: none;
    color: var(--kwr-text);
    transition: transform .3s ease, box-shadow .3s ease;
}
section.kwr-next a.kwr-next-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 52px rgba(20, 23, 28, .16);
    text-decoration: none;
}
section.kwr-next .kwr-next-media {
    display: block;
    position: relative;
    flex: 0 0 46%;
    max-width: 46%;
    min-height: 280px;
    overflow: hidden;
    background: #e9e6df;
}
section.kwr-next .kwr-next-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}
section.kwr-next a.kwr-next-card:hover .kwr-next-media img { transform: scale(1.06); }
section.kwr-next .kwr-next-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    padding: 40px 44px;
    text-align: left;
}
section.kwr-next .kwr-next-tag {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--kwr-accent-dark);
    margin-bottom: 12px;
}
section.kwr-next .kwr-next-title {
    display: block;
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.25;
    font-weight: 700;
    color: var(--kwr-ink);
    margin-bottom: 14px;
}
section.kwr-next .kwr-next-text {
    display: block;
    font-size: 16.5px;
    line-height: 1.7;
    color: var(--kwr-text);
    margin-bottom: 22px;
}
section.kwr-next .kwr-next-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--kwr-accent-dark);
    transition: gap .3s ease, color .3s ease;
}
section.kwr-next a.kwr-next-card:hover .kwr-next-more { gap: 16px; color: var(--kwr-ink); }

/* =========================================================
   TABLET (up to 991px)
   ========================================================= */
@media (max-width: 991px) {
    .kwr-post-wrap { padding: 56px 0 30px; }
    .kwr-post-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }
    .kwr-toc {
        position: static;
        border-left: 0;
        border: 1px solid var(--kwr-line);
        border-radius: 12px;
        padding: 20px 22px;
        background: var(--kwr-soft);
    }
    .kwr-toc ol {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 24px;
    }
    .kwr-article { max-width: 100%; }
    .kwr-post-head { margin-bottom: 44px; }
    section.kwr-next .kwr-next-body { padding: 32px 30px; }
}

/* =========================================================
   PHONES (up to 767px)
   ========================================================= */
@media (max-width: 767px) {
    .kwr-post-wrap { padding: 36px 0 20px; }
    .kwr-post-wrap .container,
    section.kwr-next .container {
        padding-left: 18px;
        padding-right: 18px;
    }

    .kwr-post-head { text-align: left; margin-bottom: 32px; }
    .kwr-crumbs { font-size: 12px; margin-bottom: 16px; }
    .kwr-pill { font-size: 11px; padding: 6px 14px; margin-bottom: 16px; }
    .kwr-post-head h1 { font-size: 28px; line-height: 1.2; margin-bottom: 16px; }
    .kwr-lead { font-size: 16.5px; line-height: 1.6; margin: 0 0 20px; }
    .kwr-byline { justify-content: flex-start; font-size: 13px; margin-bottom: 26px; }
    .kwr-head-img img { border-radius: 12px; }

    .kwr-toc ol { grid-template-columns: minmax(0, 1fr); }
    .kwr-toc a { padding: 9px 0; font-size: 15px; }

    .kwr-article p,
    .kwr-article li { font-size: 16.5px; line-height: 1.75; }
    .kwr-article p { margin-bottom: 20px; }
    .kwr-article p.kwr-intro::first-letter { font-size: 56px; padding: 4px 10px 0 0; }
    .kwr-article h2 { font-size: 25px; margin: 44px 0 16px; scroll-margin-top: 80px; }
    .kwr-article h2 .kwr-num { font-size: 12px; }
    .kwr-article h3 { font-size: 19px; margin: 26px 0 10px; }
    .kwr-article ul { padding-left: 20px; }

    .kwr-figure { margin: 28px 0; }
    .kwr-figure img { border-radius: 10px; }
    .kwr-figure figcaption { font-size: 13px; }

    .kwr-quick { padding: 20px 20px; margin: 28px 0; border-radius: 0 12px 12px 0; }
    .kwr-quick p { font-size: 16px; }

    .kwr-spec,
    .kwr-proscons,
    .kwr-decide { grid-template-columns: minmax(0, 1fr); }
    .kwr-proscons > div { padding: 20px; }
    .kwr-article .kwr-decide a { padding: 22px 20px; }

    .kwr-table-wrap { margin: 26px -18px; border-radius: 0; border-left: 0; border-right: 0; }
    .kwr-table { font-size: 14px; min-width: 560px; }
    .kwr-table th, .kwr-table td { padding: 12px 14px; }

    .kwr-faq summary { font-size: 16.5px; padding: 16px 48px 16px 18px; }
    .kwr-faq summary::after { right: 18px; }
    .kwr-faq details p { padding: 0 18px 18px; font-size: 16px; }

    .kwr-cta { margin-top: 44px; border-radius: 14px; }
    .kwr-cta-inner { padding: 36px 20px; }
    .kwr-article .kwr-btn,
    .kwr-article .kwr-btn.alt {
        display: block;
        width: 100%;
        margin: 10px 0 0;
        padding: 15px 20px;
    }

    section.kwr-next { padding: 48px 0; margin-top: 44px; }
    section.kwr-next .kwr-next-heading { margin-bottom: 26px; }
    section.kwr-next a.kwr-next-card { flex-direction: column; }
    section.kwr-next .kwr-next-media {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        min-height: 0;
        height: 210px;
    }
    section.kwr-next .kwr-next-body { padding: 24px 20px 28px; }
    section.kwr-next .kwr-next-text { font-size: 16px; margin-bottom: 18px; }
}

/* =========================================================
   SMALL PHONES (up to 380px)
   ========================================================= */
@media (max-width: 380px) {
    .kwr-post-head h1 { font-size: 25px; }
    .kwr-article h2 { font-size: 23px; }
    .kwr-article p,
    .kwr-article li { font-size: 16px; }
    .kwr-lead { font-size: 16px; }
    .kwr-table { min-width: 520px; font-size: 13.5px; }
    section.kwr-next .kwr-next-media { height: 190px; }
    section.kwr-next .kwr-next-title { font-size: 20px; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    .kwr-toc a,
    .kwr-article .kwr-decide a,
    .kwr-article .kwr-btn,
    section.kwr-next a.kwr-next-card,
    section.kwr-next .kwr-next-media img,
    section.kwr-next .kwr-next-more {
        transition: none;
    }
}

