/* =========================================================
   BLOG TEMPLATE — Complete Styles
   Target: .single-post-content (main content area)
   ========================================================= */

/* ---------------------------------------------------------
   1. CONTENT BASE
--------------------------------------------------------- */

.single-post-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    font-family: "Mullish", sans-serif;
}

/* ---------------------------------------------------------
   2. HEADINGS
--------------------------------------------------------- */

.single-post-content h1,
.single-post-content h1 b,
.single-post-content h1 strong {
    font-family: Poppins, sans-serif !important;
    font-size: 50px !important;
    font-weight: 600 !important;
    line-height: 65px !important;
    color: rgb(47, 49, 61) !important;
    margin: 0 0 28px 0 !important;
    padding: 0 !important;
}

.single-post-content h2,
.single-post-content h2 b,
.single-post-content h2 strong {
    font-family: Poppins, sans-serif !important;
    font-size: 40px !important;
    font-weight: 600 !important;
    line-height: 55px !important;
    color: rgb(47, 49, 61) !important;
    margin: 76px 0 22px 0 !important;
    padding: 0 !important;
}

.single-post-content > h1:first-child,
.single-post-content > h2:first-child,
.single-post-content > h3:first-child {
    margin-top: 0 !important;
}

.single-post-content h3,
.single-post-content h3 b,
.single-post-content h3 strong {
    font-family: Poppins, sans-serif !important;
    font-size: 30px !important;
    font-weight: 600 !important;
    line-height: 40px !important;
    color: rgb(47, 49, 61) !important;
    margin: 42px 0 12px 0 !important;
    padding: 0 !important;
}

.single-post-content h4,
.single-post-content h4 b,
.single-post-content h4 strong {
    font-family: Poppins, sans-serif !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    line-height: 34px !important;
    color: rgb(47, 49, 61) !important;
    margin: 34px 0 10px 0 !important;
    padding: 0 !important;
}

.single-post-content h5,
.single-post-content h5 b,
.single-post-content h5 strong {
    font-family: Poppins, sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 28px !important;
    color: rgb(47, 49, 61) !important;
    margin: 28px 0 8px 0 !important;
    padding: 0 !important;
}

.single-post-content h6,
.single-post-content h6 b,
.single-post-content h6 strong {
    font-family: Poppins, sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 26px !important;
    color: rgb(47, 49, 61) !important;
    margin: 24px 0 6px 0 !important;
    padding: 0 !important;
}

/* ---------------------------------------------------------
   3. PARAGRAPHS & TEXT
--------------------------------------------------------- */

.single-post-content p,
.single-post-content li,
.single-post-content td,
.single-post-content th,
.single-post-content span {
    font-family: "Mullish", sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 30px !important;
    color: rgb(47, 49, 61) !important;
}

.single-post-content p {
    margin: 0 0 28px 0 !important;
    padding: 0 !important;
}

.single-post-content b,
.single-post-content strong {
    font-weight: 600 !important;
}

/* ---------------------------------------------------------
   4. LINKS — Base + Hover Effect
--------------------------------------------------------- */

.single-post-content a {
    color: #1079EA !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.single-post-content a:hover {
    color: #1079EA !important;
    text-decoration: underline !important;
}

/* Link hover fill effect (JS wraps links with .blog-link-fill-text) */
.single-post-content a[data-blog-link-effect="active"],
.single-post-content a[data-blog-link-effect="active"]:hover,
.single-post-content a[data-blog-link-effect="active"]:focus,
.single-post-content a[data-blog-link-effect="active"]:visited {
    color: rgb(47, 49, 61) !important;
    font-family: "Mullish", sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 26px !important;
    text-decoration: none !important;
    border: 0 !important;
    box-shadow: none !important;
    background: none !important;
    outline: none !important;
}

.single-post-content a[data-blog-link-effect="active"]::before,
.single-post-content a[data-blog-link-effect="active"]::after,
.single-post-content a[data-blog-link-effect="active"] span::before,
.single-post-content a[data-blog-link-effect="active"] span::after {
    display: none !important;
    content: none !important;
}

.single-post-content .blog-link-fill-text {
    display: inline !important;
    padding: 0 2px 1px !important;
    border-radius: 2px !important;
    color: rgb(47, 49, 61) !important;
    font-family: "Mullish", sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 26px !important;
    text-decoration: none !important;
    background: linear-gradient(#1079EA, #1079EA) no-repeat left bottom / 100% 2px !important;
    transition: background-size 0.28s ease, background-color 0.28s ease, color 0.2s ease !important;
    -webkit-box-decoration-break: clone !important;
    box-decoration-break: clone !important;
}

.single-post-content a[data-blog-link-effect="active"]:hover .blog-link-fill-text,
.single-post-content a[data-blog-link-effect="active"]:focus-visible .blog-link-fill-text {
    color: rgb(47, 49, 61) !important;
    background: linear-gradient(#DCEEFF, #DCEEFF) no-repeat left bottom / 100% 100% !important;
}

/* ---------------------------------------------------------
   5. LISTS
--------------------------------------------------------- */

.single-post-content ul,
.single-post-content ol {
    margin: 0 0 28px 24px !important;
    padding: 0 !important;
}

.single-post-content li {
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
}

.single-post-content ul li {
    list-style: disc !important;
}

.single-post-content ol li {
    list-style: decimal !important;
}

.single-post-content li > ul,
.single-post-content li > ol {
    margin-top: 10px !important;
    margin-bottom: 0 !important;
}

/* ---------------------------------------------------------
   6. IMAGES
--------------------------------------------------------- */

.single-post-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 36px 0 !important;
    padding: 0 !important;
    border-radius: 18px !important;
}

.single-post-content figure {
    margin: 36px 0 !important;
}

.single-post-content figcaption {
    font-size: 14px !important;
    line-height: 22px !important;
    color: #6b7280 !important;
    text-align: center !important;
    margin-top: 12px !important;
}

.single-post-content img.alignleft {
    float: left;
    margin: 8px 28px 28px 0 !important;
}

.single-post-content img.alignright {
    float: right;
    margin: 8px 0 28px 28px !important;
}

.single-post-content img.aligncenter {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ---------------------------------------------------------
   7. BLOCKQUOTES
--------------------------------------------------------- */

.single-post-content blockquote {
    margin: 36px 0 !important;
    padding: 28px 32px !important;
    background: #f8fafc !important;
    border-left: 4px solid #1079EA !important;
    border-radius: 0 12px 12px 0 !important;
    font-style: italic !important;
}

.single-post-content blockquote p {
    margin: 0 !important;
    font-size: 20px !important;
    line-height: 32px !important;
    color: rgb(47, 49, 61) !important;
}

.single-post-content blockquote p:last-child {
    margin-bottom: 0 !important;
}

/* ---------------------------------------------------------
   8. CODE BLOCKS
--------------------------------------------------------- */

.single-post-content code {
    font-family: "SF Mono", Monaco, "Cascadia Code", monospace !important;
    font-size: 15px !important;
    background: #f1f5f9 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    color: #1e293b !important;
}

.single-post-content pre {
    margin: 32px 0 !important;
    padding: 24px !important;
    background: #0f172a !important;
    border-radius: 12px !important;
    overflow-x: auto !important;
}

.single-post-content pre code {
    background: transparent !important;
    padding: 0 !important;
    color: #e2e8f0 !important;
    font-size: 14px !important;
    line-height: 24px !important;
}

/* ---------------------------------------------------------
   9. TABLES — Branded Styling
--------------------------------------------------------- */

.single-post-content table {
    --tbl-navy: #080B1E;
    --tbl-blue: #2FA8F4;
    --tbl-sky: #EAF7FF;
    --tbl-soft: #F8FCFF;
    --tbl-line: #D9EAF5;

    width: 100% !important;
    margin: 32px 0 !important;
    text-align: center;
    border: 1px solid var(--tbl-line) !important;
    border-top: 4px solid var(--tbl-blue) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(8, 11, 30, .07);
}

/* Header row */
.single-post-content table tr:first-child > * {
    padding: 20px !important;
    background: var(--tbl-navy) !important;
    border-color: rgba(255, 255, 255, .12) !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.single-post-content table tr:first-child > * :is(p, span, strong, b, a) {
    color: #fff !important;
}

/* Body cells */
.single-post-content table tr:not(:first-child) > * {
    padding: 19px 20px !important;
    border: 0 !important;
    border-right: 1px solid var(--tbl-line) !important;
    border-bottom: 1px solid var(--tbl-line) !important;
    background: #fff;
    color: #40406A !important;
    font-size: 15px;
    line-height: 1.55;
    vertical-align: top;
}

/* First column highlight */
.single-post-content table tr:not(:first-child) > *:first-child {
    background: var(--tbl-sky) !important;
    color: var(--tbl-navy) !important;
    font-weight: 600;
}

/* Alternating rows */
.single-post-content table tr:nth-child(odd):not(:first-child) > *:not(:first-child) {
    background: var(--tbl-soft);
}

/* Hover */
.single-post-content table tr:not(:first-child):hover > * {
    background: #F1F9FE !important;
}

.single-post-content table tr:not(:first-child):hover > *:first-child {
    background: #DDF2FF !important;
}

/* Clean edges */
.single-post-content table tr > *:last-child {
    border-right: 0 !important;
}

.single-post-content table tr:last-child > * {
    border-bottom: 0 !important;
}

/* ---------------------------------------------------------
   10. HORIZONTAL RULE
--------------------------------------------------------- */

.single-post-content hr {
    margin: 48px 0 !important;
    border: 0 !important;
    border-top: 1px solid #e5e7eb !important;
}

/* ---------------------------------------------------------
   11. TABLE OF CONTENTS — Sticky Sidebar
--------------------------------------------------------- */

:root {
    --toc-top: 165px;
    --toc-left: 48px;
    --toc-width: 300px;
    --toc-title-color: #111111;
    --toc-link-color: #8c93a8;
    --toc-active-color: #3c3f4f;
    --toc-line-color: #eef1f5;
    --toc-active-line: #0775E6;
}

.blog-toc {
    position: fixed;
    top: var(--toc-top);
    left: var(--toc-left);
    width: var(--toc-width);
    max-width: var(--toc-width);
    max-height: calc(100vh - var(--toc-top) - 35px);
    z-index: 50;
    background: transparent;
    padding: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-110%);
    transition: opacity 0.25s ease, transform 0.32s ease;
}

.blog-toc.toc-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.blog-toc.toc-hidden-footer {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-110%);
}

.blog-toc .toc-title {
    font-family: Poppins, sans-serif !important;
    color: var(--toc-title-color) !important;
    font-size: 22px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
    margin: 0 0 22px 0 !important;
    padding: 0 !important;
}

.blog-toc .toc-body {
    position: relative;
    padding-left: 28px;
    max-height: calc(100vh - var(--toc-top) - 90px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

.blog-toc .toc-body::-webkit-scrollbar {
    display: none;
}

.blog-toc .toc-body::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--toc-line-color);
    border-radius: 999px;
}

.blog-toc .toc-list {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-toc .toc-item {
    list-style: none;
    margin: 0 0 18px 0;
    padding: 0;
    position: relative;
}

.blog-toc .toc-link {
    display: block;
    font-family: "Mullish", sans-serif !important;
    color: var(--toc-link-color) !important;
    font-size: 13px !important;
    line-height: 20px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: color 0.2s ease;
}

.blog-toc .toc-link:hover {
    color: #111111 !important;
}

.blog-toc .toc-link.toc-active {
    color: var(--toc-active-color) !important;
    font-weight: 600 !important;
}

.blog-toc .toc-item.toc-active-item::before {
    content: "";
    position: absolute;
    left: -29px;
    top: 50%;
    width: 5px;
    height: 34px;
    background: var(--toc-active-line) !important;
    border-radius: 999px;
    transform: translateY(-50%);
    z-index: 10;
}

/* TOC Compact mode */
.blog-toc.toc-compact .toc-title {
    font-size: 16px !important;
}

.blog-toc.toc-compact .toc-body {
    padding-left: 20px;
}

.blog-toc.toc-compact .toc-item {
    margin-bottom: 11px;
}

.blog-toc.toc-compact .toc-link {
    font-size: 11.5px !important;
    line-height: 1.34 !important;
}

.blog-toc.toc-compact .toc-item.toc-active-item::before {
    left: -21px;
    width: 4px;
    height: 26px;
}

/* ---------------------------------------------------------
   12. TOC — Small Laptop (1181px - 1550px)
--------------------------------------------------------- */

@media (min-width: 1181px) and (max-width: 1550px) {
    :root {
        --toc-left: 24px;
        --toc-width: 230px;
    }

    .blog-toc {
        left: 24px !important;
        width: 230px !important;
        max-width: 230px !important;
    }

    .blog-toc .toc-title {
        font-size: 18px !important;
    }

    .blog-toc .toc-body {
        padding-left: 22px;
    }

    .blog-toc .toc-item {
        margin-bottom: 12px;
    }

    .blog-toc .toc-link {
        font-size: 11.5px !important;
        line-height: 1.45 !important;
    }

    /* Shift content to clear TOC */
    .single-post-content {
        width: calc(100vw - 330px) !important;
        max-width: 900px !important;
        margin-left: 200px !important;
        margin-right: 30px !important;
    }
}

/* ---------------------------------------------------------
   13. TOC — Mobile/Tablet (sticky card above content)
--------------------------------------------------------- */

@media (max-width: 1180px) {
    .blog-toc {
        display: block;
        position: sticky;
        top: 82px;
        left: auto;
        width: 100%;
        max-width: 100%;
        max-height: none;
        margin: 0 0 28px 0;
        padding: 0;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        z-index: 30;
    }

    .blog-toc .toc-title {
        font-size: 17px !important;
        line-height: 24px !important;
        margin-bottom: 14px !important;
    }

    .blog-toc .toc-body {
        background: #f7f7f7;
        border-radius: 14px;
        padding: 22px 18px;
        max-height: 260px;
    }

    .blog-toc .toc-body::before {
        display: none;
    }

    .blog-toc .toc-link {
        font-size: 15px !important;
        line-height: 22px !important;
        color: #111827 !important;
    }

    .blog-toc .toc-link.toc-active {
        color: #111827 !important;
        font-weight: 600 !important;
    }

    .blog-toc .toc-item.toc-active-item::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .blog-toc {
        top: 72px;
        margin-bottom: 24px;
    }

    .blog-toc .toc-body {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .blog-toc .toc-title {
        font-size: 16px !important;
        line-height: 22px !important;
    }

    .blog-toc .toc-link {
        font-size: 14.5px !important;
        line-height: 21px !important;
    }
}

/* ---------------------------------------------------------
   14. MOBILE CONTENT (max-width: 767px)
--------------------------------------------------------- */

@media (max-width: 767px) {
    .single-post-content {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .single-post-content h1,
    .single-post-content h1 b,
    .single-post-content h1 strong {
        font-size: 34px !important;
        line-height: 44px !important;
        margin: 0 0 22px 0 !important;
    }

    .single-post-content h2,
    .single-post-content h2 b,
    .single-post-content h2 strong {
        font-size: 28px !important;
        line-height: 38px !important;
        margin: 48px 0 16px 0 !important;
    }

    .single-post-content h3,
    .single-post-content h3 b,
    .single-post-content h3 strong {
        font-size: 24px !important;
        line-height: 32px !important;
        margin: 32px 0 10px 0 !important;
    }

    .single-post-content h4,
    .single-post-content h4 b,
    .single-post-content h4 strong {
        font-size: 20px !important;
        line-height: 28px !important;
        margin: 26px 0 8px 0 !important;
    }

    .single-post-content h5,
    .single-post-content h5 b,
    .single-post-content h5 strong {
        font-size: 18px !important;
        line-height: 26px !important;
        margin: 22px 0 6px 0 !important;
    }

    .single-post-content p,
    .single-post-content li,
    .single-post-content td,
    .single-post-content th,
    .single-post-content span {
        font-size: 16px !important;
        line-height: 27px !important;
    }

    .single-post-content p {
        margin-bottom: 22px !important;
    }

    .single-post-content img {
        margin: 28px 0 !important;
        border-radius: 14px !important;
    }

    .single-post-content blockquote {
        padding: 20px 24px !important;
        margin: 28px 0 !important;
    }

    .single-post-content blockquote p {
        font-size: 17px !important;
        line-height: 28px !important;
    }

    /* Mobile table */
    .single-post-content table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .single-post-content table tr > * {
        min-width: 160px !important;
        padding: 12px 14px !important;
    }

    /* Mobile link effect */
    .single-post-content a[data-blog-link-effect="active"],
    .single-post-content .blog-link-fill-text {
        font-size: 16px !important;
        line-height: 24px !important;
    }
}

/* ---------------------------------------------------------
   15. SMALL MOBILE (max-width: 480px)
--------------------------------------------------------- */

@media (max-width: 480px) {
    .single-post-content h1,
    .single-post-content h1 b,
    .single-post-content h1 strong {
        font-size: 30px !important;
        line-height: 38px !important;
    }

    .single-post-content h2,
    .single-post-content h2 b,
    .single-post-content h2 strong {
        font-size: 26px !important;
        line-height: 34px !important;
    }

    .single-post-content h3,
    .single-post-content h3 b,
    .single-post-content h3 strong {
        font-size: 22px !important;
        line-height: 30px !important;
    }

    .single-post-content p,
    .single-post-content li,
    .single-post-content td,
    .single-post-content th,
    .single-post-content span {
        font-size: 16px !important;
        line-height: 26px !important;
    }
}

/* ---------------------------------------------------------
   16. UTILITY
--------------------------------------------------------- */

/* WordPress align classes */
.single-post-content .alignleft {
    float: left;
    margin: 8px 28px 28px 0;
}

.single-post-content .alignright {
    float: right;
    margin: 8px 0 28px 28px;
}

.single-post-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Clear floats */
.single-post-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Screen reader text (WordPress accessibility) */
.single-post-content .screen-reader-text {
    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;
}
