/* =========================================================
   ScriptZip Blog Detail Page
   Uses existing site color variables
   ========================================================= */

.blog-detail-page {
    width: 100%;
    background: var(--site-background, #fafafa);
    color: var(--site-text, #0C1C31);
}

.blog-detail-page .site-container {
    width: min(1120px, calc(100% - 32px));
    max-width: 1120px;
    margin: 0 auto;
}

/* =========================================================
   Blog Hero
   ========================================================= */

.blog-detail-hero {
    width: 100%;
    max-width: 100%;
    display: block;
    position: relative;
    overflow: hidden;
    background: var(--site-brand, #0755cc);
    color: #ffffff;
    padding: 72px 0 78px;
    margin: 0;
}

.blog-detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 34%),
        radial-gradient(circle at bottom right, rgba(12, 28, 49, 0.24), transparent 38%);
    pointer-events: none;
}

.blog-detail-hero .site-container {
    position: relative;
    z-index: 1;
}

.blog-hero-copy {
    width: 100%;
    max-width: 900px;
}

.blog-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-eyebrow i {
    color: #ffffff;
    font-size: 15px;
    line-height: 1;
}

.blog-detail-hero h1 {
    max-width: 900px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.045em;
}

.blog-hero-intro {
    max-width: 820px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.75;
    font-weight: 400;
}

.blog-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 24px;
}

.blog-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.blog-meta-row i {
    color: #ffffff;
    font-size: 15px;
}

.blog-tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

/* =========================================================
   Body Layout
   ========================================================= */

.blog-body-wrap {
    padding: 56px 0 72px;
    background: var(--site-background, #fafafa);
}

.blog-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
}

.blog-main-content {
    min-width: 0;
    width: 100%;
    display: block;
}

.blog-sidebar {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* =========================================================
   Featured Image
   ========================================================= */

.blog-featured-image {
    margin: 0 0 26px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--site-border-strong, #f4f4f4);
    background: var(--site-surface, #ffffff);
}

.blog-featured-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* =========================================================
   Quick Answer Box
   ========================================================= */

.blog-answer-box {
    margin-bottom: 28px;
    padding: 22px;
    border: 1px solid rgba(var(--site-brand-rgb, 31, 159, 179), 0.22);
    border-left: 4px solid var(--site-brand, #0755cc);
    border-radius: 14px;
    background: var(--site-brand-soft, #f8f8f8);
}

.blog-answer-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--site-brand-strong, #0755cc);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-answer-label i {
    font-size: 15px;
}

.blog-answer-box p {
    margin: 0;
    color: var(--site-text, #0C1C31);
    font-size: 16px;
    line-height: 1.75;
    font-weight: 500;
}

/* =========================================================
   Recommended Tool CTA
   ========================================================= */

.blog-tool-cta {
    display: flex;
    gap: 18px;
    margin: 0 0 34px;
    padding: 24px;
    border: 1px solid var(--site-border-strong, #f4f4f4);
    border-radius: 14px;
    background: var(--site-surface, #ffffff);
}

.blog-tool-cta-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 54px;
    border-radius: 14px;
    background: var(--site-brand-tint, #f4f4f4);
    color: var(--site-brand, #0755cc);
    font-size: 25px;
}

.blog-tool-cta-copy {
    min-width: 0;
}

.blog-tool-cta-copy span {
    display: block;
    margin-bottom: 6px;
    color: var(--site-brand, #0755cc);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-tool-cta-copy h2 {
    margin: 0 0 8px;
    color: var(--site-text, #0C1C31);
    font-size: 23px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.blog-tool-cta-copy p {
    margin: 0 0 16px;
    color: var(--site-text-soft, #38485E);
    font-size: 15px;
    line-height: 1.7;
}

/* =========================================================
   Main Blog Content
   ========================================================= */

.blog-content-card {
    display: block;
    width: 100%;
    background: transparent;
    color: var(--site-text, #0C1C31);
}

.blog-detail-content {
    display: block;
    width: 100%;
    color: var(--site-text, #0C1C31);
    font-size: 16px;
    line-height: 1.8;
    visibility: visible;
    opacity: 1;
}

.blog-detail-content h2 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--site-text, #0C1C31);
    margin: 42px 0 16px;
    letter-spacing: -0.02em;
}

.blog-detail-content h2:first-child {
    margin-top: 0;
}

.blog-detail-content h3 {
    font-size: 22px;
    font-weight: 750;
    line-height: 1.4;
    color: var(--site-text, #0C1C31);
    margin: 32px 0 14px;
    letter-spacing: -0.01em;
}

.blog-detail-content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--site-text-soft, #38485E);
    margin: 0 0 18px;
}

.blog-detail-content ul {
    padding-left: 22px;
    margin: 0 0 24px;
}

.blog-detail-content li {
    font-size: 16px;
    line-height: 1.75;
    color: var(--site-text-soft, #38485E);
    margin-bottom: 10px;
}

.blog-detail-content li::marker {
    color: var(--site-brand, #0755cc);
}

.blog-detail-content strong {
    color: var(--site-text, #0C1C31);
    font-weight: 800;
}

.blog-detail-content a {
    color: var(--site-brand, #0755cc);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(var(--site-brand-rgb, 31, 159, 179), 0.34);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.blog-detail-content a:hover {
    color: var(--site-brand-strong, #0755cc);
    border-bottom-color: var(--site-brand-strong, #0755cc);
}

.blog-detail-content pre {
    background: var(--site-overlay, #0C1C31);
    color: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.blog-detail-content pre code {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 14px;
    line-height: 1.7;
    color: inherit;
    white-space: pre;
}

.blog-detail-content p code,
.blog-detail-content li code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.92em;
    background: var(--site-brand-tint, #f4f4f4);
    color: var(--site-brand-strong, #0755cc);
    padding: 3px 6px;
    border-radius: 5px;
}

/* =========================================================
   Ad Cards
   ========================================================= */

.blog-inline-ad {
    margin: 36px 0;
}

.blog-ad-card {
    display: flex;
    gap: 14px;
    padding: 18px;
    border: 1px dashed rgba(var(--site-brand-rgb, 31, 159, 179), 0.28);
    border-radius: 14px;
    background: var(--site-brand-soft, #f8f8f8);
}

.blog-ad-icon,
.sidebar-ad-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: 12px;
    background: var(--site-surface, #ffffff);
    color: var(--site-brand, #0755cc);
    font-size: 22px;
}

.blog-ad-label {
    display: block;
    margin-bottom: 4px;
    color: var(--site-brand-strong, #0755cc);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-ad-card p,
.sidebar-ad-panel p {
    margin: 0;
    color: var(--site-text-soft, #38485E);
    font-size: 14px;
    line-height: 1.6;
}

/* =========================================================
   Related Tools Section
   ========================================================= */

.blog-related-section {
    margin-top: 44px;
    padding-top: 34px;
    border-top: 1px solid var(--site-border-strong, #f4f4f4);
}

.section-title-wrap {
    max-width: 760px;
    margin-bottom: 22px;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--site-brand, #0755cc);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.section-title-wrap h2 {
    margin: 0 0 10px;
    color: var(--site-text, #0C1C31);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.section-title-wrap p {
    margin: 0;
    color: var(--site-text-soft, #38485E);
    font-size: 16px;
    line-height: 1.7;
}

.blog-tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.blog-tool-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--site-border-strong, #f4f4f4);
    border-radius: 14px;
    background: var(--site-surface, #ffffff);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.blog-tool-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--site-brand-rgb, 31, 159, 179), 0.30);
    background: var(--site-brand-soft, #f8f8f8);
}

.blog-tool-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    border-radius: 14px;
    background: var(--site-brand-tint, #f4f4f4);
    color: var(--site-brand, #0755cc);
    font-size: 22px;
}

.blog-tool-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.blog-tool-content strong {
    color: var(--site-text, #0C1C31);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}

.blog-tool-content small {
    margin-top: 4px;
    color: var(--site-text-soft, #38485E);
    font-size: 13px;
    line-height: 1.5;
}

.blog-tool-arrow {
    margin-left: auto;
    color: var(--site-brand, #0755cc);
    font-size: 22px;
}

/* =========================================================
   Sidebar
   ========================================================= */

.sidebar-panel {
    padding: 22px;
    border: 1px solid var(--site-border-strong, #f4f4f4);
    border-radius: 14px;
    background: var(--site-surface, #ffffff);
}

.sidebar-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--site-brand, #0755cc);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.4;
    text-transform: uppercase;
}

.sidebar-title i {
    font-size: 15px;
}

.sidebar-featured-tool {
    text-align: left;
}

.sidebar-featured-tool-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 14px;
    background: var(--site-brand-tint, #f4f4f4);
    color: var(--site-brand, #0755cc);
    font-size: 23px;
}

.sidebar-featured-tool h2 {
    margin: 0 0 8px;
    color: var(--site-text, #0C1C31);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}

.sidebar-featured-tool p {
    margin: 0 0 16px;
    color: var(--site-text-soft, #38485E);
    font-size: 14px;
    line-height: 1.65;
}

.sidebar-ad-panel {
    display: flex;
    gap: 14px;
    border-style: dashed;
    background: var(--site-brand-soft, #f8f8f8);
}

.sidebar-link-list,
.sidebar-post-list,
.sidebar-tag-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-link-list a,
.sidebar-post-list a {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 0;
    color: var(--site-text-soft, #38485E);
    text-decoration: none;
    border-bottom: 1px solid var(--site-border-strong, #f4f4f4);
    transition: color 0.2s ease;
}

.sidebar-link-list a:last-child,
.sidebar-post-list a:last-child {
    border-bottom: 0;
}

.sidebar-link-list a:hover,
.sidebar-post-list a:hover {
    color: var(--site-brand, #0755cc);
}

.sidebar-post-list a {
    flex-direction: column;
}

.sidebar-post-list strong {
    color: inherit;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 750;
}

.sidebar-post-list small {
    color: var(--site-text-muted, #5f7394);
    font-size: 12px;
    line-height: 1.4;
}

.sidebar-tag-list {
    flex-direction: row;
    flex-wrap: wrap;
}

.sidebar-tag-list span {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--site-brand-tint, #f4f4f4);
    color: var(--site-brand-strong, #0755cc);
    font-size: 12px;
    font-weight: 700;
}

/* =========================================================
   Buttons inside blog page
   ========================================================= */

.blog-detail-page .btn-primary {
    background: var(--site-brand, #0755cc);
    border-color: var(--site-brand, #0755cc);
    color: #ffffff;
}

.blog-detail-page .btn-primary:hover,
.blog-detail-page .btn-primary:focus {
    background: var(--site-brand-strong, #0755cc);
    border-color: var(--site-brand-strong, #0755cc);
    color: #ffffff;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 991.98px) {
    .blog-layout-grid {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }

    .blog-tool-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .blog-detail-page .site-container {
        width: min(100% - 24px, 1120px);
    }

    .blog-detail-hero {
        padding: 48px 0 54px;
    }

    .blog-detail-hero h1 {
        font-size: 34px;
        line-height: 1.12;
        letter-spacing: -0.03em;
    }

    .blog-hero-intro {
        margin-top: 14px;
        font-size: 16px;
        line-height: 1.65;
    }

    .blog-meta-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 20px;
    }

    .blog-meta-row span {
        width: 100%;
        border-radius: 10px;
    }

    .blog-tag-row {
        gap: 8px;
        margin-top: 16px;
    }

    .blog-tag {
        min-height: 32px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .blog-body-wrap {
        padding: 38px 0 54px;
    }

    .blog-answer-box {
        padding: 18px;
        border-radius: 12px;
    }

    .blog-tool-cta {
        flex-direction: column;
        padding: 20px;
    }

    .blog-tool-cta-copy h2 {
        font-size: 21px;
    }

    .blog-detail-content h2 {
        font-size: 24px;
        margin-top: 34px;
    }

    .blog-detail-content h3 {
        font-size: 20px;
        margin-top: 28px;
    }

    .blog-detail-content p,
    .blog-detail-content li {
        font-size: 15px;
    }

    .blog-detail-content pre {
        padding: 16px;
        border-radius: 8px;
        margin: 20px 0;
    }

    .blog-detail-content pre code {
        font-size: 13px;
    }

    .blog-ad-card,
    .sidebar-ad-panel {
        flex-direction: column;
    }

    .blog-tool-card {
        align-items: flex-start;
    }

    .blog-tool-arrow {
        display: none;
    }
}