/* Kush Architects Blog — consolidated stylesheet
   Header dimensions and navigation follow service-page.css.
   Blog/article layout and responsive behavior are retained.
*/

/* Base */
* { box-sizing: border-box; }

body {
    margin: 0;
    background: #f7f7f5;
    color: #252525;
    font-family: Arial, Helvetica, sans-serif;
}

/* Shared Kush Architects header — matched to service-page.css */
body:not(.homepage-preview) .site-header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 1000;
    width: 100%;
    margin: 0;
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

body:not(.homepage-preview) .site-header .header-contact {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 5%;
    background: #273253;
    color: #fff;
}

body:not(.homepage-preview) .site-header .header-contact-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    width: 100%;
    max-width: 1400px;
    min-height: 26px;
    margin: 0 auto;
}

body:not(.homepage-preview) .site-header .header-contact-inner a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
}

body:not(.homepage-preview) .site-header .header-contact-inner a:hover {
    color: #e2c66f;
}

body:not(.homepage-preview) .site-header .main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: 100%;
    max-width: 1400px;
    min-height: 104px;
    margin: 0 auto;
    padding: 12px 4%;
    background: #fff !important;
    box-sizing: border-box;
}

body:not(.homepage-preview) .site-header .site-logo {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    text-decoration: none;
}

body:not(.homepage-preview) .site-header .site-logo img {
    display: block;
    width: 112px;
    max-width: 100%;
    height: 76px;
    object-fit: contain;
}

body:not(.homepage-preview) .site-header .primary-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: clamp(14px, 1.5vw, 24px);
}

body:not(.homepage-preview) .site-header .primary-navigation a:not(.consultation-link) {
    color: #273253 !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
}

body:not(.homepage-preview) .site-header .primary-navigation a:not(.consultation-link):hover {
    color: #a8792a !important;
}

body:not(.homepage-preview) .site-header .primary-navigation a.consultation-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 28px;
    background: #273253 !important;
    color: #fff !important;
    font-size: 15px;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
}

body:not(.homepage-preview) .site-header .primary-navigation a.consultation-link:hover {
    background: #192644 !important;
}

body:not(.homepage-preview) .site-header .menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 8px;
    border: 1px solid #d5d8e0;
    border-radius: 5px;
    background: #fff;
    color: #273253;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

body:not(.homepage-preview) .site-header .menu-toggle-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Blog header */
.blog-header {
    padding: 36px 0;
    background: #222;
    color: #fff;
}

.blog-header p {
    color: #e5e5e5;
    font-size: .9rem;
}

/* Blog listing cards */
.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.post-image,
.image-placeholder {
    display: block;
    width: 100%;
    height: 230px;
    background: #e9e9e9;
    object-fit: cover;
}

.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.post-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.post-title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

.post-title a:hover { text-decoration: underline; }

.post-excerpt {
    color: #666;
    line-height: 1.7;
}

.read-more {
    align-self: flex-start;
    margin-top: auto;
}

/* Article page layout */
main.container-fluid {
    width: 100%;
    max-width: 100%;
    padding: 0 0 48px !important;
}

.article-wrapper {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Featured image and title overlay */
.featured-hero {
    position: relative;
    width: 100%;
    height: 580px;
    aspect-ratio: auto;
    overflow: hidden;
    margin: 0 0 38px;
    background: #222;
}

.featured-hero-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
}

.featured-hero::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.22) 48%, rgba(0,0,0,0) 100%);
}

.featured-hero-overlay {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    padding: 32px 20px;
    text-align: center;
}

.featured-hero-title {
    position: relative;
    inset: auto;
    width: min(100%, 1200px);
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: clamp(1.8rem, 3.5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.3px;
    overflow-wrap: anywhere;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

/* Article intro and body */
.article-wrapper > .lead,
.article-content,
.article-wrapper > .answer-summary,
.article-wrapper > .key-takeaways,
.article-wrapper > .ai-summary,
.article-wrapper > hr,
.article-wrapper > a.btn,
.article-wrapper > h1.fw-bold {
    width: min(100% - 40px, 850px);
    margin-right: auto;
    margin-left: auto;
}

.article-wrapper > .lead {
    margin-top: 0;
    margin-bottom: 28px;
    color: #555 !important;
    font-size: 1.12rem;
    line-height: 1.75;
}

.article-content {
    box-sizing: border-box;
    min-width: 0;
    max-width: 850px;
    color: #292929;
    font-size: 1.0625rem;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: .85rem;
    color: #202020;
    font-weight: 700;
    line-height: 1.35;
}

.article-content h2 { font-size: clamp(1.45rem, 2vw, 1.8rem); }
.article-content h3 { font-size: clamp(1.2rem, 1.6vw, 1.45rem); }

.article-content h2:first-child,
.article-content h3:first-child { margin-top: 0; }

.article-content p { margin-bottom: 1.15rem; }

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content li { margin-bottom: .4rem; }

.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    border-radius: 10px;
    object-fit: contain;
}

.article-content figure {
    max-width: 100%;
    margin: 1.5rem 0;
}

.article-content iframe { max-width: 100%; }

.article-content pre {
    overflow-x: auto;
    padding: 1rem;
    border-radius: 8px;
    background: #f5f5f5;
}

.article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid #b49a75;
    background: #fff;
    color: #555;
}

/* Summary panels */
.answer-summary,
.key-takeaways,
.ai-summary {
    padding: 22px 24px;
    border: 1px solid #e8e2d8;
    border-radius: 12px;
    background: #fff;
    color: #333;
    line-height: 1.75;
}

.answer-summary {
    margin-top: 0;
    border-left: 4px solid #b49a75;
    background: #fffdf9;
}

.key-takeaways { margin-top: 36px !important; }

.ai-summary {
    margin-top: 22px !important;
    border-color: #e5e2dc;
    background: #f1f0ec;
}

.answer-summary h2,
.key-takeaways h2,
.ai-summary h2 {
    margin-top: 0;
    color: #222;
    font-size: 1.25rem;
    line-height: 1.35;
}

.key-takeaways ul { margin: 0; padding-left: 1.25rem; }

.key-takeaways li {
    margin-bottom: .5rem;
    padding-left: .15rem;
}

.key-takeaways li:last-child { margin-bottom: 0; }

.article-wrapper > hr {
    margin-top: 42px !important;
    margin-bottom: 28px !important;
    border-color: #ddd;
    opacity: 1;
}

.article-wrapper > a.btn {
    display: inline-block;
    width: auto;
    margin-left: max(20px, calc((100% - 850px) / 2));
}

/* Footer */
footer { font-size: .92rem; }

/* Tablet */
@media (max-width: 1100px) {
    body:not(.homepage-preview) .site-header .main-header {
        gap: 16px;
        padding-inline: 3%;
    }

    body:not(.homepage-preview) .site-header .site-logo img {
        width: 94px;
        height: 68px;
    }

    body:not(.homepage-preview) .site-header .primary-navigation { gap: 12px; }

    body:not(.homepage-preview) .site-header .primary-navigation a:not(.consultation-link) {
        font-size: 14px;
    }

    body:not(.homepage-preview) .site-header .primary-navigation a.consultation-link {
        padding-inline: 16px;
        font-size: 14px;
    }
}

@media (max-width: 900px) {
    body:not(.homepage-preview) .site-header .main-header {
        min-height: 78px;
        padding: 10px 20px;
    }

    body:not(.homepage-preview) .site-header .site-logo img {
        width: 78px;
        height: 58px;
    }

    body:not(.homepage-preview) .site-header .menu-toggle {
        display: inline-flex;
        flex: 0 0 auto;
    }

    body:not(.homepage-preview) .site-header .primary-navigation {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 1001;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 20px 20px;
        border-top: 1px solid #eee;
        background: #fff;
        box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
    }

    body:not(.homepage-preview) .site-header .primary-navigation.is-open { display: flex; }

    body:not(.homepage-preview) .site-header .primary-navigation a:not(.consultation-link) {
        display: block;
        padding: 12px 4px;
        font-size: 15px;
        white-space: normal;
    }

    body:not(.homepage-preview) .site-header .primary-navigation a.consultation-link {
        margin-top: 8px;
        white-space: normal;
    }

    .blog-header { padding: 30px 0; }

    .featured-hero {
        height: 480px;
        aspect-ratio: auto;
        margin-bottom: 28px;
    }

    .featured-hero-title {
        padding: 22px 22px 25px;
        font-size: clamp(1.4rem, 4.5vw, 2rem);
    }

    .article-content { font-size: 1rem; line-height: 1.8; }

    .answer-summary,
    .key-takeaways,
    .ai-summary { padding: 19px 20px; }
}

/* Mobile */
@media (max-width: 600px) {
    body:not(.homepage-preview) .site-header .header-contact {
        min-height: 42px;
        padding: 8px 12px;
    }

    body:not(.homepage-preview) .site-header .header-contact-inner {
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px 12px;
    }

    body:not(.homepage-preview) .site-header .header-contact-inner a { font-size: 11px; }

    body:not(.homepage-preview) .site-header .main-header {
        min-height: 70px;
        padding: 8px 16px;
    }

    body:not(.homepage-preview) .site-header .site-logo img {
        width: 68px;
        height: 52px;
    }

    .blog-header { padding: 26px 0; }
    .blog-header h1 { font-size: 2rem; }

    .post-image,
    .image-placeholder { height: 210px; }

    .post-body { padding: 18px; }

    .featured-hero {
        height: 400px;
        aspect-ratio: auto;
        margin-bottom: 24px;
    }

    .featured-hero-overlay {
        gap: 14px;
        padding: 24px 16px;
    }

    .featured-hero-title {
        padding: 18px 16px 20px;
        font-size: clamp(1.5rem, 7vw, 2rem);
        line-height: 1.25;
    }

    .article-wrapper > .lead,
    .article-content,
    .article-wrapper > .answer-summary,
    .article-wrapper > .key-takeaways,
    .article-wrapper > .ai-summary,
    .article-wrapper > hr,
    .article-wrapper > h1.fw-bold {
        width: calc(100% - 32px);
    }

    .article-wrapper > .lead { font-size: 1rem; line-height: 1.7; }
    .article-content h2 { font-size: 1.4rem; }
    .article-content h3 { font-size: 1.2rem; }

    .answer-summary,
    .key-takeaways,
    .ai-summary {
        padding: 17px 18px;
        border-radius: 10px;
    }

    .answer-summary h2,
    .key-takeaways h2,
    .ai-summary h2 { font-size: 1.15rem; }

    .article-wrapper > a.btn { margin-left: 16px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .post-card { transition: none; }
}


/* =========================================================
   Responsive rich-content tables (CKEditor output)
   One horizontal scroller per table, never per cell.
   ========================================================= */
.article-content figure.table,
.project-description-content figure.table,
.service-content-section .service-description figure.table,
.service-content-section .service-full-width-content figure.table,
.ck-content figure.table {
    display: block;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.article-content figure.table table,
.project-description-content figure.table table,
.service-content-section .service-description figure.table table,
.service-content-section .service-full-width-content figure.table table,
.ck-content figure.table table {
    box-sizing: border-box;
    width: 100%;
    min-width: 560px;
    max-width: none;
    margin: 0;
    border-collapse: collapse;
    table-layout: auto;
}

.article-content figure.table th,
.article-content figure.table td,
.project-description-content figure.table th,
.project-description-content figure.table td,
.service-content-section .service-description figure.table th,
.service-content-section .service-description figure.table td,
.service-content-section .service-full-width-content figure.table th,
.service-content-section .service-full-width-content figure.table td,
.ck-content figure.table th,
.ck-content figure.table td {
    min-width: 0;
    max-width: none;
    padding: 10px 12px;
    border: 1px solid #d9dee7;
    vertical-align: top;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: normal;
}

.article-content figure.table th,
.project-description-content figure.table th,
.service-content-section .service-description figure.table th,
.service-content-section .service-full-width-content figure.table th {
    background: #f1f3f6;
    color: #202938;
    font-weight: 700;
}

/* CKEditor editing surface: prevent cell-level scrollbars. */
.ck-editor__editable .table td,
.ck-editor__editable .table th {
    overflow: visible !important;
    white-space: normal !important;
    min-width: 0;
}

@media (max-width: 600px) {
    .article-content figure.table,
    .project-description-content figure.table,
    .service-content-section .service-description figure.table,
    .service-content-section .service-full-width-content figure.table,
    .ck-content figure.table {
        max-width: 100%;
        margin: 1.25rem 0;
    }

    .article-content figure.table th,
    .article-content figure.table td,
    .project-description-content figure.table th,
    .project-description-content figure.table td,
    .service-content-section .service-description figure.table th,
    .service-content-section .service-description figure.table td,
    .service-content-section .service-full-width-content figure.table th,
    .service-content-section .service-full-width-content figure.table td {
        padding: 8px 10px;
        font-size: 14px;
    }
}

/* =========================================================
   Blog article media sizing
   Keep CKEditor video figures inside the article column.
   ========================================================= */
.article-content figure.rich-video {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 1.5rem 0;
    overflow: hidden;
}

.article-content figure.rich-video > p {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1rem;
}

.article-content figure.rich-video > p:last-child {
    margin-bottom: 0;
}

.article-content figure.rich-video video,
.article-content video {
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #111;
    border-radius: 10px;
}


@media (max-width: 600px) {
    .article-content figure.rich-video {
        margin: 1.25rem 0;
    }

    .article-content figure.rich-video video,
    .article-content video {
        border-radius: 8px;
    }
}



/* Article breadcrumb — centered inside the 580px hero, below the H1 */
.blog-breadcrumb {
    width: 100%;
    max-width: 1100px;
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, .92);
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
}

.blog-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-breadcrumb li { min-width: 0; }

.blog-breadcrumb li + li::before {
    content: "/";
    display: inline-block;
    margin-right: 8px;
    color: rgba(255, 255, 255, .85);
}

.blog-breadcrumb a {
    color: #fff;
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    color: #e2c66f;
    text-decoration: underline;
}

.blog-breadcrumb [aria-current="page"] {
    color: #fff;
    overflow-wrap: anywhere;
}


@media (max-width: 600px) {
    .blog-breadcrumb { font-size: 12px; }
    .blog-breadcrumb ol { gap: 5px; }
    .blog-breadcrumb li + li::before { margin-right: 5px; }
}

/* =========================================================
   Final article table + hyperlink styling
   Homepage link palette: navy normal, gold on hover.
   Scoped to article content; header, footer, cards and buttons
   retain their existing styles.
   ========================================================= */

/* All article tables: supports CKEditor and plain HTML tables. */
.article-content table {
    width: 100%;
    max-width: 100%;
    border: 1px solid #d9dee7;
    border-collapse: collapse;
    border-spacing: 0;
    color: #292929;
    line-height: 1.55;
    table-layout: auto;
}

.article-content table th,
.article-content table td {
    padding: 10px 12px;
    border: 1px solid #d9dee7;
    vertical-align: top;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.article-content table th {
    background: #f1f3f6;
    color: #202938;
    font-weight: 700;
}

.article-content table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.article-content table p {
    margin-top: 0;
    margin-bottom: .5rem;
}

.article-content table p:last-child {
    margin-bottom: 0;
}

/* Plain HTML tables have no CKEditor figure wrapper to scroll. */
@media (max-width: 600px) {
    .article-content table:not(figure.table table) {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
}

/* Article text links match the Homepage's navy/gold link treatment. */
.article-content a:not(.btn) {
    color: #273253 !important;
    font-weight: 700;
    text-decoration: none !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .18s ease;
}

.article-content a:not(.btn):visited {
    color: #273253 !important;
}

.article-content a:not(.btn):hover {
    color: #a8792a !important;
    text-decoration: none !important;
}

.article-content a:not(.btn):focus-visible {
    color: #a8792a !important;
    text-decoration: underline !important;
    outline: 2px solid #a8792a;
    outline-offset: 3px;
    border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .article-content a:not(.btn) {
        transition: none;
    }
}
