/* ============================================================
   blog.css — shared styles for all blog post pages
   ============================================================ */

:root {
    --green: #00c566;
    --green-dark: #00a855;
    --dark: #0d1117;
    --font: 'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    color: #111827;
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.blog-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 66px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.blog-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
}

.blog-nav-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    flex-shrink: 0;
}

.blog-nav-links { display: flex; gap: 28px; }

.blog-nav-links a {
    color: rgba(255,255,255,.55);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color .2s;
}

.blog-nav-links a:hover { color: #fff; }

.blog-nav-cta {
    display: inline-flex;
    align-items: center;
    background: var(--green);
    color: #000;
    font-size: 13px;
    font-weight: 800;
    padding: 9px 22px;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity .2s;
}

.blog-nav-cta:hover { opacity: .85; }

/* ── HERO ── */
.blog-hero {
    background: var(--dark);
    padding: 80px 48px 64px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(0,197,102,.045) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
}

.blog-cat-tag {
    display: inline-block;
    background: rgba(0,197,102,.12);
    border: 1px solid rgba(0,197,102,.3);
    color: var(--green);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: 50px;
    margin-bottom: 26px;
    position: relative;
}

.blog-hero h1 {
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    max-width: 880px;
    margin: 0 auto 22px;
    position: relative;
}

.blog-hero h1 em {
    color: var(--green);
    font-style: normal;
}

.blog-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    color: rgba(255,255,255,.38);
    font-size: 13px;
    flex-wrap: wrap;
    position: relative;
}

.blog-hero-meta .meta-sep { opacity: .4; }

/* ── FEATURED IMAGE ── */
.blog-feat-wrap {
    max-width: 1100px;
    margin: 0 auto;
    height: 480px;
    overflow: hidden;
    border-radius: 0 0 28px 28px;
}

.blog-feat-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-feat-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1f2e 0%, #0d1117 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

/* ── LAYOUT ── */
.blog-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 72px 48px;
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 72px;
    align-items: start;
}

/* ── ARTICLE CONTENT ── */
.blog-article h2 {
    font-size: 27px;
    font-weight: 800;
    color: #111827;
    margin: 52px 0 18px;
    padding-top: 20px;
    border-top: 2px solid #f3f4f6;
    scroll-margin-top: 90px;
}

.blog-article h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.blog-article h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 32px 0 12px;
    scroll-margin-top: 90px;
}

.blog-article p {
    font-size: 16.5px;
    color: #374151;
    line-height: 1.9;
    margin-bottom: 22px;
}

.blog-article ul, .blog-article ol {
    padding-left: 24px;
    margin-bottom: 22px;
}

.blog-article li {
    font-size: 16px;
    color: #374151;
    line-height: 1.85;
    margin-bottom: 10px;
}

.blog-article strong { color: #111827; font-weight: 700; }

.blog-article a { color: var(--green-dark); text-decoration: underline; }

/* Highlight / callout box */
.highlight-box {
    background: linear-gradient(135deg, rgba(0,197,102,.07) 0%, rgba(0,197,102,.03) 100%);
    border-left: 4px solid var(--green);
    border-radius: 0 14px 14px 0;
    padding: 20px 26px;
    margin: 32px 0;
}

.highlight-box p { margin-bottom: 0; font-size: 15.5px; font-style: italic; }

/* Stat row */
.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 36px 0;
}

.stat-box {
    background: #f8fafc;
    border-radius: 16px;
    padding: 22px 16px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.stat-num {
    font-size: 34px;
    font-weight: 800;
    color: var(--green-dark);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* Table */
.blog-table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0 36px;
    font-size: 14.5px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.blog-table th {
    background: #111827;
    color: #fff;
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .04em;
}

.blog-table td {
    padding: 13px 18px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: top;
    line-height: 1.6;
}

.blog-table tr:last-child td { border-bottom: none; }
.blog-table tr:nth-child(even) td { background: #f9fafb; }

.badge-green {
    display: inline-block;
    background: var(--green-dark);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 4px;
}

/* ── SIDEBAR ── */
.blog-sidebar { position: sticky; top: 86px; }

.sidebar-toc {
    background: #f8fafc;
    border-radius: 18px;
    padding: 26px;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}

.sidebar-toc h4 {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.sidebar-toc ol { padding-left: 0; list-style: none; counter-reset: toc; }

.sidebar-toc ol li { counter-increment: toc; }

.sidebar-toc a {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13.5px;
    color: #374151;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    transition: color .2s;
    line-height: 1.4;
}

.sidebar-toc a::before {
    content: counter(toc);
    min-width: 20px;
    height: 20px;
    background: #e9ecef;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    transition: background .2s, color .2s;
}

.sidebar-toc li:last-child a { border-bottom: none; }
.sidebar-toc a:hover { color: var(--green-dark); }
.sidebar-toc a:hover::before { background: var(--green); color: #fff; }

.sidebar-cta {
    background: linear-gradient(145deg, #0d1117 0%, #1a2234 100%);
    border-radius: 18px;
    padding: 28px 24px;
    text-align: center;
    border: 1px solid rgba(0,197,102,.2);
}

.sidebar-cta-icon { font-size: 30px; margin-bottom: 14px; }

.sidebar-cta h4 {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.3;
}

.sidebar-cta p {
    font-size: 13px;
    color: rgba(255,255,255,.45);
    margin-bottom: 20px;
    line-height: 1.65;
}

.sidebar-cta-btn {
    display: block;
    background: var(--green);
    color: #000;
    font-size: 14px;
    font-weight: 800;
    padding: 13px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: opacity .2s;
    margin-bottom: 10px;
}

.sidebar-cta-btn:hover { opacity: .85; }

.sidebar-cta-secondary {
    display: block;
    color: rgba(255,255,255,.35);
    font-size: 12px;
    text-decoration: none;
    transition: color .2s;
}

.sidebar-cta-secondary:hover { color: rgba(255,255,255,.7); }

/* ── BOTTOM CTA ── */
.blog-bottom-cta {
    background: var(--dark);
    padding: 90px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-bottom-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(0,197,102,.04) 1px, transparent 1px);
    background-size: 44px 44px;
}

.blog-bottom-cta h2 {
    font-size: clamp(26px, 3.5vw, 44px);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    position: relative;
}

.blog-bottom-cta h2 em { color: var(--green); font-style: normal; }

.blog-bottom-cta p {
    font-size: 16px;
    color: rgba(255,255,255,.45);
    max-width: 540px;
    margin: 0 auto 40px;
    line-height: 1.75;
    position: relative;
}

.blog-cta-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.btn-cta-green {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--green);
    color: #000;
    font-size: 15px;
    font-weight: 800;
    padding: 15px 30px;
    border-radius: 12px;
    text-decoration: none;
    transition: opacity .2s;
}

.btn-cta-green:hover { opacity: .85; }

.btn-cta-outline {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: transparent;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 15px 30px;
    border-radius: 12px;
    text-decoration: none;
    border: 1.5px solid rgba(255,255,255,.18);
    transition: border-color .2s;
}

.btn-cta-outline:hover { border-color: rgba(255,255,255,.5); }

/* ── RELATED POSTS ── */
.blog-related {
    background: #f8fafc;
    padding: 72px 48px;
    border-top: 1px solid #e5e7eb;
}

.blog-related h3 {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 32px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 860px;
    margin: 0 auto;
}

.related-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px 24px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow .2s, transform .2s;
}

.related-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.09); transform: translateY(-3px); }

.related-card .rel-cat {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--green-dark);
}

.related-card .rel-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
}

.related-card .rel-link {
    font-size: 13px;
    color: var(--green-dark);
    font-weight: 600;
    margin-top: 4px;
}

/* ── FOOTER ── */
.blog-footer {
    background: #0a0e16;
    padding: 24px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.blog-footer span { font-size: 13px; color: rgba(255,255,255,.25); }
.blog-footer a { font-size: 13px; color: var(--green); text-decoration: none; }
.blog-footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media(max-width:960px) {
    .blog-container { grid-template-columns: 1fr; padding: 52px 28px; gap: 0; }
    .blog-sidebar { position: static; margin-top: 48px; }
    .blog-feat-wrap { height: 320px; }
    .blog-hero { padding: 64px 28px 48px; }
    .blog-nav { padding: 0 24px; }
    .blog-nav-links { display: none; }
    .stat-row { grid-template-columns: 1fr 1fr; }
    .blog-related { padding: 56px 28px; }
    .related-grid { grid-template-columns: 1fr; }
    .blog-bottom-cta { padding: 72px 28px; }
    .blog-footer { padding: 20px 28px; }
}

@media(max-width:600px) {
    .blog-feat-wrap { height: 220px; border-radius: 0; }
    .blog-hero h1 { font-size: 26px; }
    .blog-hero-meta { flex-direction: column; gap: 6px; }
    .blog-hero-meta .meta-sep { display: none; }
    .blog-article h2 { font-size: 22px; }
    .blog-article h3 { font-size: 18px; }
    .blog-article p, .blog-article li { font-size: 15px; }
    .stat-row { grid-template-columns: 1fr; }
    .blog-table { font-size: 13px; }
    .blog-table th, .blog-table td { padding: 10px 12px; }
    .blog-cta-btns { flex-direction: column; align-items: center; }
    .blog-footer { flex-direction: column; text-align: center; }
}
