
/* Blog Specific Styles */
body {
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}
.blog-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 100px 20px 40px;
    font-family: 'Inter', sans-serif;
    color: #333;
    background-color: #ffffff;
}

.blog-section {
    margin-bottom: 64px;
}

/* =========================================
   BLOG LISTING PAGE
   ========================================= */

/* Hero Banner (New Alignment) */
.featured-hero {
    position: relative;
    width: 100%;
    min-height: 460px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(180deg, #D9D9D9 0%, #F0F0F0 100%);
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
    padding: 40px 48px;
}

.featured-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.78) 52%, rgba(255,255,255,.34) 100%);
    pointer-events: none;
}

.featured-hero__bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.72;
    transition: transform 0.65s cubic-bezier(0.65, 0, 0.35, 1);
}

.featured-hero:hover .featured-hero__bg {
    transform: scale(1.03);
}

.featured-hero__content {
    position: relative;
    z-index: 3;
    color: #000;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    gap: 40px;
}

.featured-hero__left {
    display: flex;
    flex-direction: column;
    max-width: 800px;
}

.featured-hero__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.hero-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #555;
    font-weight: 500;
}

.hero-tag-box {
    width: 14px;
    height: 14px;
    background: #B3B3B3;
}

.featured-hero__title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    color: #000;
    font-family: 'Montserrat', sans-serif;
}

.featured-hero__desc {
    font-size: 16px;
    font-weight: 400;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

.featured-hero__right {
    flex-shrink: 0;
}

.featured-hero__btn {
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding: 0 24px;
    border-radius: 8px;
    background-color: #0C3C01;
    color: #fff;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(12, 60, 1, .2);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.featured-hero__btn:hover {
    background-color: #082901;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(12, 60, 1, .26);
}

.featured-hero__btn:focus-visible {
    outline: 3px solid rgba(12, 60, 1, .32);
    outline-offset: 4px;
}

/* List Controls */
.list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-controls__category {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.search-input {
    width: 300px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid #E5E7EB;
    padding: 0 20px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    transition: all 0.35s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

/* Categories */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.category-btn {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}
.category-btn.active, .category-btn:hover {
    background: #0C3C01;
    color: #fff;
    border-color: #0C3C01;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    justify-items: center;
}

/* Entire card is the article link, with content kept in normal document flow. */
.card {
    width: 100%;
    max-width: 397px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fbfcfb;
    border: 1px solid #edf0ed;
    border-radius: 16px;
    color: #111;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(12, 60, 1, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(12, 60, 1, 0.22);
    box-shadow: 0 14px 32px rgba(12, 60, 1, 0.1);
}

.card:focus-visible {
    outline: 3px solid rgba(12, 60, 1, 0.34);
    outline-offset: 4px;
}

.image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eef2ee;
}

.image-inner {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background-color: #D9D9D9;
    transition: transform 0.65s cubic-bezier(0.65, 0, 0.35, 1);
  }

.card:hover .image-inner {
    transform: scale(1.05);
}

.card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px 22px;
}

.card__date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #5c665f;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
}

.dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    background: #0C3C01;
    border-radius: 50%;
}

.title {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 650;
    font-size: 16px;
    line-height: 1.42;
    color: #111;
    overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
    .card,
    .image-inner,
    .featured-hero__bg {
        transition: none;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.35s ease;
}
.page-btn:hover {
    background: #e0e0e0;
}
.page-btn.active {
    background: #2e7d32;
    color: #fff;
}

/* =========================================
   BLOG DETAIL PAGE
   ========================================= */

.blog-hero {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    background-color: #f4f6f4;
}

.blog-hero__media {
    width: 100%;
    height: auto;
    max-height: 760px;
    object-fit: contain;
    display: block;
}

.blog-detail-header {
    margin-bottom: 3rem;
}

.blog-detail__small-headline {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.blog-detail__main-headline {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.blog-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.blog-content__text {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

/* Rich Text Lists */
.blog-content__text ul,
.blog-full-width-block ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.blog-content__text ol,
.blog-full-width-block ol {
    list-style-type: decimal;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.blog-content__text li,
.blog-full-width-block li {
    margin-bottom: 0.5rem;
}

/* Left Media + Right Text block */
.blog-media-block {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: start;
}

.blog-media-block__media {
    width: 819px;
    height: 526px;
    max-width: 100%;
    background-color: #e0e0e0;
    border-radius: 12px;
    object-fit: cover;
}

/* Full width blocks */
.blog-full-width-block {
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

/* Responsive */
@media (max-width: 1024px) {
    /* 1024 stays 3 columns mostly, but maybe adjust gaps */
    .blog-grid {
        column-gap: 24px;
    }
}

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .featured-hero {
        padding: 0 40px;
    }

    /* Tablet & mobile only: the desktop layout puts the text block and the
       article button side by side, which squeezes the
       button off-screen on narrow widths. Stack them instead, in the same
       order they already appear in the markup (meta -> title -> description,
       then the button last). This also fixes the background image looking
       cropped/broken: with the row layout, min-height:460px + a squeezed
       content row left a mismatched box for the image to cover; a shorter,
       purpose-sized box crops the photo far less. Desktop is untouched. */
    .featured-hero {
        min-height: 380px;
    }

    .featured-hero__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

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

    .featured-hero__right {
        width: 100%;
    }

    .featured-hero__btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .list-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .search-input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .featured-hero {
        height: auto;
        padding: 40px 24px;
    }
    .featured-hero__title {
        font-size: 32px;
    }
    
    .blog-content-grid,
    .blog-media-block {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-detail__main-headline {
        font-size: 2rem;
    }
}

/* =========================================
   SEO ARTICLE LAYOUT + STICKY TOC
   ========================================= */
.blog-detail-page { --blog-green: #2d6b47; }
.blog-detail__excerpt { max-width: 850px; color: #555; font-size: 1.08rem; line-height: 1.7; }
.blog-byline { display: flex; align-items: center; gap: 12px; margin-top: 22px; color: #555; }
.blog-byline img,
.blog-author-card img { border-radius: 50%; object-fit: cover; object-position: center 22%; background: #eef2ee; }
.blog-byline div { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.blog-byline strong { color: #1f2a23; }
.blog-byline span { font-size: .88rem; }

.blog-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 64px;
    align-items: start;
    margin-bottom: 64px;
}
.blog-article-layout.without-toc { grid-template-columns: minmax(0, 920px); }
.blog-article-content {
    min-width: 0;
    color: #353b37;
    font-size: 1.08rem;
    line-height: 1.85;
}
.blog-article-content > :first-child { margin-top: 0; }
.blog-article-content h2,
.blog-article-content h3,
.blog-article-content h4,
.blog-article-content h5,
.blog-article-content h6 { color: #13271b; line-height: 1.3; scroll-margin-top: 110px; }
.blog-article-content h2 { margin: 50px 0 18px; font-size: 1.9rem; }
.blog-article-content h3 { margin: 38px 0 14px; font-size: 1.45rem; }
.blog-article-content p { margin: 0 0 22px; }
.blog-article-content a { color: #176a3a; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.blog-article-content img,
.blog-inline-legacy-media img,
.blog-inline-legacy-media video { display: block; max-width: 100%; height: auto; border-radius: 12px; }
.blog-article-content figure { margin: 34px 0; }
.blog-article-content figure img { width: 100%; box-shadow: 0 16px 38px rgba(19, 39, 27, .10); cursor: zoom-in; }
.blog-article-content figcaption { margin-top: 10px; color: #68716b; font-size: .88rem; line-height: 1.55; text-align: center; }
.blog-article-content ul,
.blog-article-content ol { padding-left: 1.6rem; margin: 0 0 24px; }
.blog-article-content ul { list-style: disc outside !important; }
.blog-article-content ol { list-style: decimal outside !important; }
.blog-article-content ul ul { list-style: circle outside !important; }
.blog-article-content ol ol { list-style: lower-alpha outside !important; }
.blog-article-content li { display: list-item; margin: 8px 0; padding-left: 4px; }
.blog-article-content blockquote { margin: 30px 0; padding: 18px 24px; border-left: 4px solid var(--blog-green); background: #f4f7f4; }
.blog-article-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.blog-article-content th,
.blog-article-content td { padding: 10px 12px; border: 1px solid #d9dfdb; }
.blog-inline-legacy-media { margin: 36px 0; }
.blog-inline-legacy-media figcaption { margin-top: 8px; color: #68716b; font-size: .88rem; }

.blog-toc {
    position: sticky;
    top: 110px;
    padding: 20px;
    border: 1px solid #dce3de;
    border-radius: 12px;
    background: #f8faf8;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}
.blog-toc__toggle { width: 100%; padding: 0; border: 0; background: transparent; color: #16261c; font-size: 1rem; font-weight: 700; text-align: left; cursor: pointer; }
.blog-toc__toggle span { float: right; }
.blog-toc ol { margin: 16px 0; padding-left: 20px; }
.blog-toc li { margin: 10px 0; color: #707a73; }
.blog-toc a { color: #4a554e; text-decoration: none; line-height: 1.45; }
.blog-toc a:hover,
.blog-toc a.active { color: var(--blog-green); font-weight: 700; }
.blog-toc__top { display: inline-block; padding-top: 10px; border-top: 1px solid #dce3de; width: 100%; }

.blog-author-card { display: flex; gap: 20px; align-items: flex-start; margin: 0 0 56px; padding: 26px; border: 1px solid #dce3de; border-radius: 12px; background: #fbfcfb; }
.blog-author-card h2 { margin: 0 0 8px; font-size: 1.2rem; }
.blog-author-card p { margin: 0; color: #555; line-height: 1.65; }
.blog-prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 0 0 56px; }
.blog-prev-next a { display: flex; flex-direction: column; padding: 20px; border: 1px solid #dce3de; border-radius: 10px; color: #15251b; text-decoration: none; }
.blog-prev-next a:last-child { text-align: right; }
.blog-prev-next span { color: #778078; font-size: .8rem; text-transform: uppercase; }
.blog-related-section { margin-bottom: 60px; }
.blog-related-section > h2 { margin-bottom: 22px; color: #15251b; }
.blog-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-related-grid a { display: grid; gap: 12px; color: #17271d; text-decoration: none; }
.blog-related-grid img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; }

.blog-preview-banner { margin: 0 0 20px; padding: 12px 16px; border: 1px solid #d89b22; border-radius: 8px; color: #674400; background: #fff7df; font-weight: 700; }
.blog-comments { margin: 0 0 60px; padding-top: 10px; }
.blog-comments > h2 { color: #15251b; }
.blog-comments-empty { color: #68716b; }
.blog-comment-list { display: grid; gap: 16px; margin: 20px 0 30px; }
.blog-comment-list article { padding: 18px; border: 1px solid #dce3de; border-radius: 10px; background: #fbfcfb; }
.blog-comment-list time { margin-left: 12px; color: #778078; font-size: .82rem; }
.blog-comment-list p { margin: 10px 0 0; line-height: 1.65; }
.blog-comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 820px; }
.blog-comment-form label { display: grid; gap: 7px; color: #24362a; font-weight: 600; }
.blog-comment-form input,
.blog-comment-form textarea { width: 100%; padding: 12px 14px; border: 1px solid #c8d0ca; border-radius: 7px; background: #fff; font: inherit; }
.blog-comment-form__message { grid-column: 1 / -1; }
.blog-comment-form button { justify-self: start; min-height: 46px; padding: 0 20px; border: 0; border-radius: 7px; color: #fff; background: var(--blog-green); cursor: pointer; font-weight: 700; }

.blog-newsletter-section { display: flex; justify-content: space-between; align-items: center; gap: 40px; margin: 0 0 80px; padding: 38px; border-radius: 16px; background: #e9eee9; }
.blog-newsletter-section h2 { margin: 0 0 8px; color: #15251b; }
.blog-newsletter-section p { margin: 0; color: #59635c; }
.blog-newsletter-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 10px; min-width: min(100%, 430px); }
.blog-newsletter-form input[type="email"] { min-height: 48px; padding: 0 15px; border: 1px solid #c8d0ca; border-radius: 7px; background: #fff; }
.blog-newsletter-form button { min-height: 48px; padding: 0 22px; border: 0; border-radius: 7px; color: #fff; background: var(--blog-green); cursor: pointer; font-weight: 700; }
.newsletter-message { grid-column: 1 / -1; min-height: 20px; font-size: .85rem; }
.newsletter-message.success { color: #176a3a; }
.newsletter-message.error { color: #a3261e; }
.form-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
    .blog-article-layout { display: flex; flex-direction: column-reverse; gap: 28px; }
    .blog-toc { position: sticky; top: 76px; z-index: 20; width: 100%; max-height: calc(100dvh - 92px); box-sizing: border-box; box-shadow: 0 10px 28px rgba(19, 39, 27, .10); }
    .blog-toc.is-collapsed nav { display: none; }
    .blog-toc.is-collapsed { overflow: hidden; }
    .blog-related-grid { grid-template-columns: 1fr 1fr; }
    .blog-newsletter-section { flex-direction: column; align-items: stretch; }
}

@media (max-width: 600px) {
    .blog-container.blog-detail-page { padding-left: 16px; padding-right: 16px; }
    .blog-hero { border-radius: 12px; overflow: hidden; }
    .blog-hero__media { width: 100%; height: auto; max-height: none; object-fit: contain; }
    .blog-detail-header { margin-bottom: 36px; }
    .blog-detail__small-headline { display: flex; flex-wrap: wrap; gap: 7px 12px; }
    .blog-detail__main-headline { font-size: clamp(1.75rem, 8vw, 2.2rem); line-height: 1.16; overflow-wrap: anywhere; }
    .blog-detail__excerpt { font-size: 1rem; line-height: 1.65; }
    .blog-byline div { flex-direction: column; align-items: flex-start; }
    .blog-article-layout { gap: 22px; }
    .blog-article-content { font-size: 1rem; line-height: 1.72; overflow-wrap: anywhere; }
    .blog-article-content h2 { margin: 40px 0 14px; font-size: clamp(1.45rem, 6.5vw, 1.75rem); scroll-margin-top: 128px; }
    .blog-article-content h3 { margin: 30px 0 12px; font-size: clamp(1.2rem, 5.3vw, 1.4rem); scroll-margin-top: 128px; }
    .blog-article-content h4 { scroll-margin-top: 128px; }
    .blog-article-content figure { margin: 26px 0; }
    .blog-article-content blockquote { margin: 24px 0; padding: 16px 18px; }
    .blog-article-content table { font-size: .9rem; }
    .blog-toc { top: 68px; padding: 16px; max-height: calc(100dvh - 80px); }
    .blog-author-card { flex-direction: column; padding: 20px; }
    .blog-prev-next,
    .blog-related-grid { grid-template-columns: 1fr; }
    .blog-newsletter-section { padding: 26px 20px; }
    .blog-newsletter-form { grid-template-columns: 1fr; min-width: 0; }
    .blog-comment-form { grid-template-columns: 1fr; }
    .blog-comment-form__message { grid-column: auto; }
}

@media (max-width: 390px) {
    .blog-container { padding-left: 12px; padding-right: 12px; }
    .card { height: 370px; }
    .image { height: 248px; }
    .date-pill-bg { top: 232px; }
    .dot { top: 243px; }
    .date-text { top: 236px; }
    .title { top: 280px; }
    .link-row { top: 328px; }
}

.article-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    place-items: center;
    padding: clamp(16px, 4vw, 48px);
    background: rgba(6, 15, 9, .92);
}
.article-image-lightbox.is-open { display: grid; }
.article-image-lightbox img { max-width: min(1200px, 94vw); max-height: 86dvh; border-radius: 12px; object-fit: contain; }
.article-image-lightbox button { position: absolute; top: 16px; right: 18px; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; color: #fff; background: rgba(0,0,0,.35); font-size: 1.7rem; cursor: pointer; }

/* Scalable responsive blog listing */
.blog-container:not(.blog-detail-page) {
    width: min(1240px, calc(100% - clamp(24px, 5vw, 72px)));
    max-width: none;
    padding-inline: 0;
    overflow: clip;
}
.blog-container:not(.blog-detail-page) .blog-section { margin-bottom: clamp(38px, 5vw, 64px); }
.category-filters { min-width: 0; flex: 1 1 auto; flex-wrap: nowrap; align-items: center; }
.category-filters > .category-btn { flex: 0 0 auto; }
.category-filter-rail {
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}
.category-filter-rail::-webkit-scrollbar { display: none; }
.category-btn { min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.list-controls__right { flex: 0 0 min(100%, 300px); }
.list-controls__right form { width: 100%; }
.search-input { max-width: 100%; }
.blog-results-summary { margin: 0 0 18px; color: #5c665f; font: 500 13px/1.5 'Montserrat', sans-serif; }
.blog-results-summary strong { color: #0c3c01; }
.card__summary {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #59635c;
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.blog-load-more-wrap { display: flex; justify-content: center; }
.blog-load-more {
    min-width: 190px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 24px; border: 1px solid #0c3c01; border-radius: 9px;
    background: #0c3c01; color: #fff; font-weight: 650; text-decoration: none;
    transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.blog-load-more:hover, .blog-load-more:focus-visible { background: #082901; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(12,60,1,.2); }
.blog-load-more:focus-visible { outline: 3px solid rgba(12,60,1,.3); outline-offset: 4px; }
.blog-load-more.is-loading { opacity: .7; pointer-events: none; }

@media (max-width: 768px) {
    .blog-container:not(.blog-detail-page) { width: calc(100% - 24px); padding-top: 78px; }
    .featured-hero { min-height: 0; display: block; padding: 0; overflow: hidden; background: #f7f9f7; }
    .featured-hero::after { display: none; }
    .featured-hero__bg { position: static; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; opacity: 1; }
    .featured-hero__content { position: static; display: block; padding: 20px; }
    .featured-hero__meta { flex-wrap: wrap; gap: 8px 14px; }
    .hero-tag { font-size: 12px; }
    .hero-tag-box { width: 8px; height: 8px; border-radius: 50%; }
    .featured-hero__title { margin: 0 0 12px; font-size: clamp(1.45rem, 6.8vw, 2rem); line-height: 1.22; overflow-wrap: anywhere; }
    .featured-hero__desc { font-size: 15px; }
    .featured-hero__right { margin-top: 18px; }
    .list-controls { align-items: stretch; }
    .category-filters { width: 100%; }
    .list-controls__right { width: 100%; flex-basis: auto; }
    .search-input { width: 100%; }
}

@media (max-width: 600px) {
    .blog-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .card { max-width: none; height: auto; }
    .image { height: auto; aspect-ratio: 16 / 10; }
    .title { position: static; font-size: clamp(1rem, 4.8vw, 1.2rem); }
    .card__body { padding: 15px 16px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .blog-load-more { transition: none; }
    .blog-load-more:hover, .blog-load-more:focus-visible { transform: none; }
}

/* Responsive long-form article layout */
.blog-detail-page {
    width: min(1240px, calc(100% - clamp(32px, 6vw, 96px)));
    max-width: none;
    padding-inline: 0;
    overflow: clip;
}
.blog-detail-header { max-width: 920px; margin: 0 0 clamp(28px, 4vw, 48px); }
.blog-detail__main-headline {
    margin: 0 0 18px;
    font-size: clamp(2rem, 4.2vw, 3.5rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.blog-detail__small-headline { flex-wrap: wrap; gap: 8px 18px; }
.blog-detail__excerpt { margin-bottom: 0; }
.blog-byline a { color: inherit; text-underline-offset: 3px; }
.blog-hero { aspect-ratio: 16 / 9; margin-bottom: clamp(36px, 5vw, 64px); }
.blog-hero__media { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.blog-article-layout { grid-template-columns: minmax(0, 780px) minmax(240px, 290px); justify-content: space-between; gap: clamp(36px, 5vw, 64px); }
.blog-article-content { max-width: 780px; overflow-wrap: anywhere; }
.blog-article-content pre,
.blog-article-content code { max-width: 100%; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.blog-article-content iframe,
.blog-article-content video { max-width: 100%; }
.blog-article-content table { scrollbar-width: thin; }
.blog-author-card,
.blog-prev-next,
.blog-related-section,
.blog-newsletter-section,
.blog-comments { max-width: 980px; }
.blog-prev-next a { min-width: 0; }
.blog-prev-next strong { overflow-wrap: anywhere; }
.blog-related-grid a { min-width: 0; }
.blog-related-grid strong { overflow-wrap: anywhere; }
.blog-comment-form input,
.blog-comment-form textarea,
.blog-newsletter-form input { font-size: 16px; }
.blog-comment-form input,
.blog-newsletter-form input,
.blog-comment-form button,
.blog-newsletter-form button { min-height: 48px; }

/* Desktop sections follow the same full-width edge as the navbar and hero. */
@media (min-width: 901px) {
    .blog-detail-header,
    .blog-author-card,
    .blog-prev-next,
    .blog-related-section,
    .blog-newsletter-section,
    .blog-comments {
        width: 100%;
        max-width: none;
    }
    .blog-detail__excerpt { max-width: 100%; }
}

@media (max-width: 900px) {
    .blog-detail-page { width: calc(100% - 40px); padding-top: 84px; }
    .blog-article-layout { max-width: 780px; }
    .blog-toc { position: sticky; }
    .blog-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .blog-detail-page { width: calc(100% - 32px); padding: 76px 0 48px; }
    .blog-detail-header { margin-bottom: 28px; }
    .blog-detail__main-headline { font-size: clamp(1.8rem, 8.3vw, 2.35rem); }
    .blog-hero { height: auto; aspect-ratio: auto; margin-bottom: 32px; }
    .blog-hero__media { height: auto; aspect-ratio: auto; }
    .blog-toc { border-radius: 10px; }
    .blog-author-card { gap: 14px; }
    .blog-prev-next { gap: 14px; }
    .blog-prev-next > span:empty { display: none; }
    .blog-related-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: min(86%, 330px);
        grid-template-columns: none;
        gap: 14px;
        padding: 4px 4px 14px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline mandatory;
        scrollbar-width: none;
    }
    .blog-related-grid::-webkit-scrollbar { display: none; }
    .blog-related-grid a { scroll-snap-align: start; }
    .blog-newsletter-section {
        width: 100%;
        max-width: 100%;
        gap: 22px;
        margin-bottom: 48px;
        padding: 24px 20px;
        box-sizing: border-box;
    }
    .blog-newsletter-section > div,
    .blog-newsletter-form { width: 100%; min-width: 0; max-width: 100%; }
    .blog-newsletter-section h2 { font-size: clamp(1.35rem, 7vw, 1.7rem); line-height: 1.3; }
    .blog-newsletter-form input[type="email"],
    .blog-newsletter-form button { display: block; width: 100%; max-width: 100%; box-sizing: border-box; }
    .blog-comments { margin-bottom: 48px; }
}
