/* ==========================================================================
   PrivaGuard - Dedicated Blog Post Stylesheet (css/blog-post.css)
   Aesthetic: Midnight Cyber Glassmorphism & High-Readability Editorial Typography
   ========================================================================== */

/* --- Container & Global Spacing --- */
.blog-post-page {
    padding-top: 25px;
    padding-bottom: 90px;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
}

/* --- Breadcrumbs Navigation --- */
.post-breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.post-breadcrumbs a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-breadcrumbs a:hover {
    color: var(--accent);
}

.post-breadcrumbs .separator {
    color: #475569;
    font-size: 11px;
}

.post-breadcrumbs .current {
    color: #cbd5e1;
    font-weight: 500;
}

/* --- Article Header --- */
.article-header {
    max-width: 1140px;
    width: 100%;
    min-width: 0;
    margin: 0 auto 40px auto;
}

.article-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 30px;
    background: rgba(177, 255, 41, 0.08);
    border: 1px solid rgba(177, 255, 41, 0.25);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.article-header h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    color: #fff;
    overflow-wrap: break-word;
    word-break: break-word;
}

.article-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(177, 255, 41, 0.15);
    border: 1px solid rgba(177, 255, 41, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 22px;
    flex-shrink: 0;
}

.author-details {
    min-width: 0;
}

.author-details .author-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #f1f5f9;
}

.author-details .post-date-row {
    font-size: 12.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.author-details .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #64748b;
}

.article-share-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.2s ease;
}

.share-btn:hover {
    background: rgba(177, 255, 41, 0.1);
    border-color: rgba(177, 255, 41, 0.35);
    color: var(--accent);
    transform: translateY(-2px);
}

/* --- 2-Column Article Layout --- */
.article-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 50px;
    max-width: 1140px;
    width: 100%;
    min-width: 0;
    margin: 0 auto;
    align-items: start;
}

/* --- Main Article Body --- */
.article-body-content {
    font-size: 17px;
    line-height: 1.8;
    color: #cbd5e1;
    width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.article-body-content code,
.article-body-content kbd {
    word-break: break-word;
    overflow-wrap: break-word;
}

.article-body-content p {
    margin-bottom: 24px;
}

.article-body-content h2 {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-top: 48px;
    margin-bottom: 18px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    scroll-margin-top: 40px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.article-body-content h2 i {
    color: var(--accent);
    font-size: 26px;
    flex-shrink: 0;
    margin-top: 2px;
}

.article-body-content h3 {
    font-size: 21px;
    font-weight: 700;
    color: #f1f5f9;
    margin-top: 36px;
    margin-bottom: 14px;
    scroll-margin-top: 40px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.article-body-content strong {
    color: #fff;
    font-weight: 700;
}

.article-body-content ul,
.article-body-content ol {
    margin: 0 0 28px 24px;
    padding: 0;
}

.article-body-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

/* --- Highlight Callout Box --- */
.article-callout {
    background: rgba(17, 19, 23, 0.85);
    border-left: 4px solid var(--accent);
    border-radius: 0 16px 16px 0;
    padding: 20px 24px;
    margin: 32px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.article-callout.warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.article-callout.shield {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.06);
}

.callout-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.article-callout .callout-header {
    color: var(--accent);
}

.article-callout.warning .callout-header {
    color: #f59e0b;
}

.article-callout.shield .callout-header {
    color: #10b981;
}

.article-callout p {
    margin-bottom: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #cbd5e1;
}

/* --- Code Block in Blog --- */
.article-code-box {
    background: #090c12;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 24px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: var(--accent);
    overflow-x: auto;
}

/* --- In-Article Conversion CTA Banner --- */
.in-article-cta {
    background: linear-gradient(135deg, rgba(17, 19, 23, 0.95), rgba(8, 13, 24, 0.95));
    border: 1px solid rgba(177, 255, 41, 0.25);
    border-radius: 20px;
    padding: 34px 30px;
    margin: 48px 0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.in-article-cta::before {
    content: '';
    position: absolute;
    top: -50px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(177, 255, 41, 0.15) 0%, transparent 70%);
    filter: blur(30px);
}

.cta-shield-icon {
    font-size: 38px;
    color: var(--accent);
    margin-bottom: 12px;
}

.in-article-cta h3 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}

.in-article-cta p {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 580px;
    margin-bottom: 22px;
}

.in-article-cta .btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 50px;
    background: var(--accent);
    color: #000;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(177, 255, 41, 0.35);
    transition: all 0.25s ease;
}

.in-article-cta .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(177, 255, 41, 0.5);
}

/* --- Sticky Sidebar Table of Contents --- */
.article-sidebar {
    position: sticky;
    top: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    width: 100%;
}

.sidebar-widget {
    background: rgba(17, 19, 23, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 22px 20px;
    backdrop-filter: blur(14px);
}

.widget-title {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: var(--accent);
    font-size: 18px;
}

.toc-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toc-nav-list li a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13.5px;
    line-height: 1.45;
    display: block;
    transition: all 0.2s ease;
}

.toc-nav-list li a:hover,
.toc-nav-list li a.active {
    color: var(--accent);
    padding-left: 6px;
    border-left: 2px solid var(--accent);
}

/* Sidebar Mini CTA */
.sidebar-cta-card {
    background: linear-gradient(135deg, rgba(17, 19, 23, 0.9), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 18px;
    padding: 22px 20px;
    text-align: center;
}

.sidebar-cta-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.sidebar-cta-card p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.sidebar-cta-card .btn-side-download {
    display: block;
    width: 100%;
    padding: 9px 0;
    border-radius: 10px;
    background: rgba(177, 255, 41, 0.12);
    border: 1px solid rgba(177, 255, 41, 0.35);
    color: var(--accent);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-cta-card .btn-side-download:hover {
    background: var(--accent);
    color: #000;
}

/* --- Author Bio Card --- */
.author-bio-card {
    background: rgba(17, 19, 23, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 24px;
    margin-top: 60px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-bio-card .bio-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(177, 255, 41, 0.15);
    border: 1px solid rgba(177, 255, 41, 0.3);
    color: var(--accent);
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-bio-card .bio-content {
    min-width: 0;
}

.author-bio-card .bio-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.author-bio-card .bio-content p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 0;
}

/* --- Related Posts Grid --- */
.related-posts-section {
    margin-top: 65px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.related-posts-section h3 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.related-card {
    background: rgba(17, 19, 23, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    border-color: rgba(177, 255, 41, 0.3);
    transform: translateY(-3px);
}

.related-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.related-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.45;
    margin-bottom: 8px;
    flex: 1;
}

.related-read-more {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   PrivaGuard Blog Post Responsive Breakpoints
   Sequence: Desktop (1200px) -> Laptop (1024px) -> Tablet (992px)
             -> Small Tablet (768px) -> Mobile (576px) -> Small Mobile (375px)
   ========================================================================== */

/* 1. Desktop (1200px) */
@media (max-width: 1200px) {
    .article-header {
        max-width: 100%;
        padding: 0 10px;
    }

    .article-layout-grid {
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 36px;
        padding: 0 10px;
    }
}

/* 2. Laptop (1024px) */
@media (max-width: 1024px) {
    .article-header h1 {
        font-size: 36px;
    }

    .article-layout-grid {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 28px;
    }

    .sidebar-widget,
    .sidebar-cta-card {
        padding: 18px 16px;
    }
}

/* 3. Tablet (992px) */
@media (max-width: 992px) {
    .article-header h1 {
        font-size: 32px;
    }

    .article-layout-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .article-body-content h2 {
        font-size: 25px;
        margin-top: 38px;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* 4. Small Tablet (768px) */
@media (max-width: 768px) {
    .blog-post-page {
        padding-top: 15px;
        padding-bottom: 70px;
    }

    .article-header {
        margin-bottom: 30px;
        padding: 0;
    }

    .article-header h1 {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 16px;
    }

    .article-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding-bottom: 18px;
    }

    .article-share-links {
        width: 100%;
        justify-content: flex-start;
    }

    .article-layout-grid {
        padding: 0;
        gap: 32px;
    }

    .article-body-content {
        font-size: 16px;
        line-height: 1.75;
    }

    .article-body-content h2 {
        font-size: 22px;
        margin-top: 32px;
    }

    .article-body-content h3 {
        font-size: 19px;
        margin-top: 28px;
    }

    .article-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .author-bio-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 18px;
        margin-top: 45px;
        gap: 14px;
    }

    .related-posts-section {
        margin-top: 45px;
        padding-top: 30px;
    }

    .related-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 5. Mobile (576px) */
@media (max-width: 576px) {
    .blog-post-page {
        padding-top: 10px;
        padding-bottom: 50px;
    }

    .post-breadcrumbs {
        justify-content: flex-start;
        font-size: 12px;
        margin-bottom: 20px;
    }

    .article-category-badge {
        font-size: 11px;
        padding: 4px 12px;
        margin-bottom: 14px;
    }

    .article-header h1 {
        font-size: 24px;
        line-height: 1.32;
    }

    .author-info {
        gap: 10px;
    }

    .author-avatar {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .author-details .author-name {
        font-size: 13.5px;
    }

    .author-details .post-date-row {
        font-size: 11.5px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .article-body-content {
        font-size: 15.5px;
        line-height: 1.7;
    }

    .article-body-content p {
        margin-bottom: 18px;
    }

    .article-body-content h2 {
        font-size: 20px;
        gap: 8px;
    }

    .article-body-content h2 i {
        font-size: 22px;
    }

    .article-body-content h3 {
        font-size: 17.5px;
        margin-top: 24px;
    }

    .article-body-content ul,
    .article-body-content ol {
        margin: 0 0 22px 18px;
    }

    .article-callout {
        padding: 16px 18px;
        margin: 24px 0;
        border-radius: 0 12px 12px 0;
    }

    .article-callout p {
        font-size: 14px;
    }

    .article-code-box {
        padding: 12px 14px;
        font-size: 13px;
        margin: 18px 0;
    }

    .in-article-cta {
        padding: 26px 18px;
        margin: 36px 0;
        border-radius: 16px;
    }

    .cta-shield-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }

    .in-article-cta h3 {
        font-size: 21px;
    }

    .in-article-cta p {
        font-size: 14px;
        margin-bottom: 18px;
    }

    .in-article-cta .btn-cta {
        width: 100%;
        justify-content: center;
        padding: 11px 20px;
        font-size: 14px;
    }

    .sidebar-widget {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .sidebar-cta-card {
        padding: 18px 16px;
        border-radius: 14px;
    }
}

/* 6. Small Mobile (375px) */
@media (max-width: 375px) {
    .post-breadcrumbs {
        font-size: 11px;
        gap: 4px;
    }

    .article-header h1 {
        font-size: 21px;
        line-height: 1.35;
    }

    .author-details .post-date-row {
        font-size: 11px;
    }

    .share-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .article-body-content {
        font-size: 15px;
    }

    .article-body-content h2 {
        font-size: 18.5px;
    }

    .article-body-content h3 {
        font-size: 16.5px;
    }

    .in-article-cta h3 {
        font-size: 19px;
    }

    .in-article-cta .btn-cta {
        font-size: 13.5px;
        padding: 10px 16px;
    }

    .author-bio-card .bio-avatar {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}