/* =========================================
   GOODWILL CRAFTS - SINGLE BLOG
   Forest, Walnut & Ivory Theme
========================================= */

.single-blog-page {
    --sb-bg: #F8F6F1;
    --sb-card: #FFFFFF;
    --sb-forest: #263D32;
    --sb-walnut: #773F1A;
    --sb-copper: #B87950;
    --sb-text: #30352F;
    --sb-muted: #77766F;
    --sb-border: #E5E0D5;

    background: var(--sb-bg);
    color: var(--sb-text);
    padding-bottom: 70px;
    position: relative;
}

.single-blog-page *,
.single-blog-page *::before,
.single-blog-page *::after {
    box-sizing: border-box;
}

.single-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* READING PROGRESS */

.sb-reading-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 10;
    background: var(--sb-border);
}

.sb-reading-progress-bar {
    width: 0;
    height: 100%;
    background: var(--sb-copper);
}

/* BREADCRUMB */

.sb-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 32px 0 25px;
    font-size: 12px;
    color: var(--sb-muted);
}

.sb-breadcrumb a {
    color: var(--sb-forest);
    text-decoration: none;
    transition: color .3s ease;
}

.sb-breadcrumb a:hover {
    color: var(--sb-copper);
}

.sb-breadcrumb-current {
    color: var(--sb-muted);
    overflow-wrap: anywhere;
}

/* HEADER */

.sb-post-header {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 35px 0 42px;
}

.sb-category-badge {
    display: inline-block;
    padding: 8px 17px;
    margin-bottom: 23px;
    background: rgba(184, 121, 80, .12);
    color: var(--sb-walnut);
    border: 1px solid rgba(184, 121, 80, .25);
    border-radius: 30px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.single-blog-page .single-title {
    color: var(--sb-forest);
    font-size: clamp(32px, 4.5vw, 54px);
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -1.5px;
    margin: 0 0 20px;
    overflow-wrap: anywhere;
}

.sb-post-excerpt {
    max-width: 760px;
    margin: 0 auto 25px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--sb-muted);
}

.sb-post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
    color: var(--sb-muted);
}

.sb-meta-author {
    color: var(--sb-forest);
    font-weight: 500;
}

.sb-meta-icon {
    color: var(--sb-copper);
    margin-right: 4px;
}

.sb-meta-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--sb-copper);
}

/* FEATURED IMAGE */

.sb-featured-image {
    width: 100%;
    max-height: 560px;
    margin: 0 auto 65px;
    border-radius: 8px;
    overflow: hidden;
    background: #E5E0D5;
}

.sb-hero-image {
    display: block;
    width: 100%;
    height: 560px;
    object-fit: cover;
    object-position: center;
}

/* ARTICLE LAYOUT */

.sb-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 65px;
    align-items: start;
    max-width: 1080px;
    margin: 0 auto;
}

.sb-main-content {
    min-width: 0;
}

/* TABLE OF CONTENTS */

.sb-toc {
    border: 1px solid var(--sb-border);
    background: var(--sb-card);
    padding: 20px 24px;
    margin-bottom: 40px;
    border-radius: 6px;
}

.sb-toc-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--sb-forest);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.sb-toc-arrow {
    color: var(--sb-copper);
    font-size: 22px;
}

.sb-toc-list {
    margin: 20px 0 0;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sb-toc-list li {
    color: var(--sb-copper);
    padding-left: 5px;
}

.sb-toc-list a {
    color: var(--sb-muted);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.6;
}

.sb-toc-list a:hover {
    color: var(--sb-walnut);
}

.sb-toc-list .sb-toc-subitem {
    margin-left: 20px;
}

.sb-toc-content.is-collapsed {
    display: none;
}

/* ARTICLE CONTENT */

.sb-article-content {
    font-size: 16px;
    line-height: 1.95;
    color: #4F514B;
    overflow-wrap: break-word;
}

.sb-article-content > * {
    max-width: 100%;
}

.sb-article-content p {
    margin: 0 0 24px;
}

.sb-article-content h2 {
    color: var(--sb-forest);
    font-size: 30px;
    line-height: 1.35;
    margin: 48px 0 20px;
    font-weight: 600;
    scroll-margin-top: 100px;
}

.sb-article-content h3 {
    color: var(--sb-forest);
    font-size: 22px;
    margin: 35px 0 15px;
    line-height: 1.4;
    scroll-margin-top: 100px;
}

.sb-article-content h4 {
    color: var(--sb-walnut);
    font-size: 18px;
    margin: 28px 0 12px;
}

.sb-article-content a {
    color: var(--sb-walnut);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sb-article-content ul,
.sb-article-content ol {
    padding-left: 25px;
    margin-bottom: 25px;
}

.sb-article-content li {
    padding-left: 5px;
    margin-bottom: 10px;
}

.sb-article-content blockquote {
    margin: 35px 0;
    padding: 20px 25px;
    border-left: 4px solid var(--sb-copper);
    background: #F0EDE5;
    color: var(--sb-forest);
    font-size: 18px;
    font-style: italic;
}

.sb-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.sb-article-content figure {
    margin: 30px 0;
}

.sb-article-content figcaption {
    color: var(--sb-muted);
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
}

.sb-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 14px;
}

.sb-article-content th,
.sb-article-content td {
    border: 1px solid var(--sb-border);
    padding: 12px;
    text-align: left;
}

.sb-article-content th {
    background: var(--sb-forest);
    color: white;
}

.sb-article-content pre {
    overflow-x: auto;
    padding: 20px;
    background: #263D32;
    color: white;
    border-radius: 5px;
}

.sb-article-content iframe {
    max-width: 100%;
}

.sb-article-content .wp-block-embed {
    margin: 30px 0;
}

.sb-page-links {
    margin: 30px 0;
}

/* SIDEBAR */

.sb-sidebar {
    position: relative;
}

.sb-sidebar-inner {
    padding: 28px;
    background: var(--sb-forest);
    color: white;
    border-radius: 6px;
    position: sticky;
    top: 30px;
}

.sb-sidebar-eyebrow {
    color: #D5AD8F;
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 600;
}

.sb-sidebar-inner h3 {
    font-size: 23px;
    line-height: 1.4;
    color: white;
    margin: 20px 0 15px;
}

.sb-sidebar-inner p {
    color: #D8DED8;
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 25px;
}

.sb-sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--sb-copper);
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 3px;
    transition: .3s ease;
}

.sb-sidebar-btn:hover {
    background: #A66843;
    color: white;
}

.sb-sidebar-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    color: #E7C7AF;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* TAGS */

.sb-post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    border-top: 1px solid var(--sb-border);
    padding-top: 25px;
    margin-top: 40px;
}

.sb-tags-heading {
    color: var(--sb-forest);
    font-size: 13px;
    font-weight: 600;
}

.sb-post-tags a {
    display: inline-block;
    padding: 7px 12px;
    background: #EEEAE1;
    color: var(--sb-walnut);
    border-radius: 3px;
    text-decoration: none;
    font-size: 11px;
    margin: 0 4px 5px 0;
}

.sb-post-tags a:hover {
    background: var(--sb-forest);
    color: white;
}

/* SHARE */

.sb-share-section {
    border-top: 1px solid var(--sb-border);
    padding-top: 25px;
    margin-top: 30px;
}

.sb-share-heading {
    display: block;
    color: var(--sb-forest);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.sb-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sb-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background: white;
    border: 1px solid var(--sb-border);
    color: var(--sb-forest);
    text-decoration: none;
    font-family: inherit;
    font-size: 11px;
    border-radius: 3px;
    cursor: pointer;
    transition: .3s ease;
}

.sb-share-btn:hover {
    background: var(--sb-forest);
    border-color: var(--sb-forest);
    color: white;
}

.sb-copy-message {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--sb-forest);
}

/* POST NAVIGATION */

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    max-width: 1080px;
    margin: 55px auto 65px;
    padding: 25px 0;
    border-top: 1px solid var(--sb-border);
    border-bottom: 1px solid var(--sb-border);
}

.post-navigation a {
    color: var(--sb-forest);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.post-navigation a:hover {
    color: var(--sb-copper);
}

/* RELATED ARTICLES */

.sb-related-section {
    padding: 30px 0 70px;
    border-top: 1px solid var(--sb-border);
}

.sb-related-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.sb-related-eyebrow {
    color: var(--sb-copper);
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 600;
}

.sb-related-heading h2 {
    color: var(--sb-forest);
    font-size: 30px;
    margin: 10px 0 0;
}

.sb-view-all {
    color: var(--sb-walnut);
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
}

.sb-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.sb-related-card {
    background: var(--sb-card);
    border: 1px solid var(--sb-border);
    border-radius: 5px;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}

.sb-related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(38, 61, 50, .08);
}

.sb-related-image {
    display: block;
    position: relative;
    height: 220px;
    background: #E5E0D5;
    overflow: hidden;
}

.sb-related-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .5s ease;
}

.sb-related-card:hover .sb-related-image img {
    transform: scale(1.05);
}

.sb-related-category {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 7px 11px;
    background: var(--sb-forest);
    color: white;
    font-size: 10px;
    border-radius: 2px;
}

.sb-related-content {
    padding: 20px;
}

.sb-related-date {
    color: var(--sb-muted);
    font-size: 11px;
}

.sb-related-content h3 {
    font-size: 17px;
    line-height: 1.5;
    margin: 12px 0 18px;
}

.sb-related-content h3 a {
    color: var(--sb-forest);
    text-decoration: none;
}

.sb-related-read {
    color: var(--sb-walnut);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

/* BOTTOM CTA */

.sb-bottom-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 35px;
    padding: 55px 60px;
    background: var(--sb-forest);
    border-radius: 6px;
    color: white;
}

.sb-bottom-cta-content {
    max-width: 650px;
}

.sb-cta-eyebrow {
    color: #D5AD8F;
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 600;
}

.sb-bottom-cta h2 {
    color: white;
    font-size: 30px;
    line-height: 1.35;
    margin: 15px 0;
}

.sb-bottom-cta p {
    color: #D8DED8;
    font-size: 13px;
    line-height: 1.8;
    margin: 0;
}

.sb-bottom-cta-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 175px;
}

.sb-cta-primary,
.sb-cta-secondary {
    display: block;
    text-align: center;
    padding: 14px 20px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: .3s ease;
}

.sb-cta-primary {
    background: var(--sb-copper);
    color: white;
}

.sb-cta-primary:hover {
    background: #A66843;
    color: white;
}

.sb-cta-secondary {
    border: 1px solid rgba(255,255,255,.5);
    color: white;
}

.sb-cta-secondary:hover {
    background: white;
    color: var(--sb-forest);
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1024px) {

    .sb-article-layout {
        grid-template-columns: minmax(0, 1fr) 250px;
        gap: 35px;
    }

    .sb-sidebar-inner {
        padding: 22px;
    }

    .sb-hero-image {
        height: 450px;
    }

    .sb-bottom-cta {
        padding: 40px;
    }

}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .single-container {
        width: calc(100% - 30px);
    }

    .sb-breadcrumb {
        padding: 22px 0 15px;
        gap: 7px;
        font-size: 10px;
    }

    .sb-post-header {
        padding: 25px 0 30px;
    }

    .single-blog-page .single-title {
        font-size: 34px;
        letter-spacing: -.8px;
        line-height: 1.25;
    }

    .sb-post-excerpt {
        font-size: 14px;
        line-height: 1.7;
    }

    .sb-post-meta {
        gap: 10px;
        font-size: 10px;
    }

    .sb-featured-image {
        margin-bottom: 35px;
        border-radius: 5px;
    }

    .sb-hero-image {
        height: 330px;
    }

    .sb-article-layout {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .sb-article-content {
        font-size: 15px;
        line-height: 1.85;
    }

    .sb-article-content h2 {
        font-size: 25px;
        margin-top: 38px;
    }

    .sb-article-content h3 {
        font-size: 20px;
    }

    .sb-toc {
        padding: 17px;
        margin-bottom: 30px;
    }

    .sb-sidebar-inner {
        position: static;
    }

    .post-navigation {
        margin: 40px auto;
    }

    .post-navigation a {
        font-size: 11px;
    }

    .sb-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .sb-related-image {
        height: 170px;
    }

    .sb-related-content {
        padding: 15px;
    }

    .sb-related-content h3 {
        font-size: 15px;
    }

    .sb-bottom-cta {
        flex-direction: column;
        align-items: stretch;
        padding: 32px 25px;
        gap: 25px;
    }

    .sb-bottom-cta h2 {
        font-size: 25px;
    }

    .sb-bottom-cta-actions {
        width: 100%;
    }

}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .single-blog-page .single-title {
        font-size: 28px;
    }

    .sb-hero-image {
        height: 250px;
    }

    .sb-post-meta {
        gap: 8px;
    }

    .sb-meta-divider {
        width: 3px;
        height: 3px;
    }

    .sb-related-grid {
        grid-template-columns: 1fr;
    }

    .sb-related-image {
        height: 220px;
    }

    .sb-related-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .sb-related-heading h2 {
        font-size: 25px;
    }

    .sb-share-buttons {
        gap: 7px;
    }

    .sb-share-btn {
        padding: 9px 11px;
        font-size: 10px;
    }

    .sb-bottom-cta {
        padding: 28px 20px;
    }

    .sb-bottom-cta h2 {
        font-size: 22px;
    }

}

/* =========================================
   DARK MODE SUPPORT
========================================= */

body.dark .single-blog-page {
    --sb-bg: #1D2621;
    --sb-card: #26332C;
    --sb-forest: #DCE7DC;
    --sb-walnut: #D9A47F;
    --sb-text: #E7E8E3;
    --sb-muted: #B3BDB5;
    --sb-border: #3B4940;
}

body.dark .sb-article-content {
    color: #D0D8D1;
}

body.dark .sb-article-content blockquote,
body.dark .sb-post-tags a {
    background: #303D35;
    color: #E4C2A7;
}

body.dark .sb-share-btn {
    background: #26332C;
    color: #E4E8E3;
    border-color: #465349;
}

body.dark .sb-share-btn:hover {
    background: #B87950;
    color: white;
}

body.dark .sb-toc {
    background: #26332C;
}

body.dark .sb-related-card {
    background: #26332C;
}

body.dark .sb-related-content h3 a {
    color: #E1E9E2;
}

body.dark .sb-sidebar-inner {
    background: #18241D;
}

body.dark .sb-article-content th {
    background: #18241D;
}

body.dark .sb-article-content td {
    border-color: #465349;
}

/* =========================================
   SINGLE BLOG - BREADCRUMB TOP FIX
========================================= */

.single-blog-page {
    position: relative;
    padding-top: 1px;
}

.sb-breadcrumb {
    position: relative !important;
    top: auto !important;
    z-index: 1;
    margin-top: 25px;
    padding-top: 25px;
    padding-bottom: 25px;
    background: transparent;
}

/* Prevent breadcrumb from sticking */
.single-blog-page .sb-breadcrumb {
    position: static !important;
}

/* Mobile spacing */
@media (max-width: 768px) {
    .sb-breadcrumb {
        margin-top: 15px;
        padding-top: 20px;
        padding-bottom: 18px;
    }
}


/* =========================================
   CATEGORY ARCHIVE DESCRIPTION
========================================= */

.bc-category-description {
    max-width: 760px;
    margin: 15px auto 0;
    color: #77766F;
    font-size: 15px;
    line-height: 1.8;
}

.bc-category-description p {
    margin: 0 0 10px;
}

.bc-category-description a {
    color: #773F1A;
}

@media (max-width: 768px) {

    .bc-category-description {
        font-size: 13px;
        line-height: 1.7;
    }

}

/* TAG ARCHIVE DESCRIPTION */

.bc-tag-description {
    max-width: 760px;
    margin: 15px auto 0;
    color: #77766F;
    font-size: 15px;
    line-height: 1.8;
}

.bc-tag-description p {
    margin: 0;
}

.bc-tag-description a {
    color: #773F1A;
}

@media (max-width: 768px) {
    .bc-tag-description {
        font-size: 13px;
        line-height: 1.7;
    }
}