/* ── Blog Styles — matches V4 Design System ── */

:root {
    --v4-white: #FFFFFF;
    --v4-bg-alt: #F9FAFB;
    --v4-slate-900: #0F172A;
    --v4-slate-700: #374151;
    --v4-slate-500: #6B7280;
    --v4-slate-400: #9CA3AF;
    --v4-border: #E5E7EB;
    --v4-indigo: #4F46E5;
    --v4-indigo-light: #EEF2FF;
    --v4-violet: #7C3AED;
    --v4-green: #059669;
    --v4-green-light: #ECFDF5;
    --v4-font-head: 'Plus Jakarta Sans', sans-serif;
    --v4-font-body: 'Inter', sans-serif;
    --v4-font-mono: 'JetBrains Mono', monospace;
    --v4-radius-card: 12px;
}

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

body {
    font-family: var(--v4-font-body);
    color: var(--v4-slate-700);
    background: var(--v4-white);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    margin: 0;
}

/* ── Nav (reused from index) ── */
#v4-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--v4-border);
}
.v4-container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.v4-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.v4-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: var(--v4-font-head);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--v4-slate-900);
}
.v4-nav-logo-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.v4-nav-logo-icon-inner {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
}
.v4-nav-links {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 32px;
}
.v4-nav-links a {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--v4-slate-700);
    transition: color 0.15s;
}
.v4-nav-links a:hover { color: var(--v4-indigo); }
.v4-nav-actions { display: flex; gap: 12px; align-items: center; }
.v4-btn-nav {
    background: var(--v4-indigo);
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.v4-btn-nav:hover { background: #4338CA; }

/* ── Blog Index Page ── */
.blog-hero {
    padding: 80px 0 56px;
    text-align: center;
    background: linear-gradient(180deg, var(--v4-indigo-light) 0%, var(--v4-white) 100%);
    border-bottom: 1px solid var(--v4-border);
}
.blog-hero-badge {
    display: inline-block;
    background: var(--v4-indigo-light);
    color: var(--v4-indigo);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.blog-hero h1 {
    font-family: var(--v4-font-head);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--v4-slate-900);
    margin: 0 0 16px;
    line-height: 1.15;
}
.blog-hero p {
    font-size: 1.1rem;
    color: var(--v4-slate-500);
    max-width: 560px;
    margin: 0 auto;
}

/* ── Blog Grid ── */
.blog-grid-section { padding: 64px 0 96px; }
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    margin-top: 48px;
}
.blog-card {
    background: var(--v4-white);
    border: 1px solid var(--v4-border);
    border-radius: var(--v4-radius-card);
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.blog-card:hover {
    box-shadow: 0 8px 32px rgba(79,70,229,0.12);
    transform: translateY(-2px);
}
.blog-card-thumb {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.blog-card-body { padding: 24px; }
.blog-card-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--v4-indigo);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.blog-card h2 {
    font-family: var(--v4-font-head);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--v4-slate-900);
    margin: 0 0 10px;
    line-height: 1.35;
}
.blog-card p {
    font-size: 0.9rem;
    color: var(--v4-slate-500);
    margin: 0 0 16px;
    line-height: 1.6;
}
.blog-card-meta {
    font-size: 0.78rem;
    color: var(--v4-slate-400);
    display: flex;
    gap: 12px;
}

/* ── Article Layout ── */
.article-hero {
    padding: 72px 0 48px;
    background: linear-gradient(180deg, var(--v4-indigo-light) 0%, var(--v4-white) 100%);
    border-bottom: 1px solid var(--v4-border);
}
.article-breadcrumb {
    font-size: 0.85rem;
    color: var(--v4-slate-500);
    margin-bottom: 24px;
}
.article-breadcrumb a {
    color: var(--v4-indigo);
    text-decoration: none;
}
.article-breadcrumb a:hover { text-decoration: underline; }
.article-tag {
    display: inline-block;
    background: var(--v4-indigo-light);
    color: var(--v4-indigo);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.article-hero h1 {
    font-family: var(--v4-font-head);
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--v4-slate-900);
    margin: 0 0 20px;
    line-height: 1.2;
    max-width: 760px;
}
.article-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--v4-slate-500);
    flex-wrap: wrap;
}
.article-meta strong { color: var(--v4-slate-700); }

/* ── Article Body ── */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    padding: 56px 0 96px;
    align-items: start;
}
@media (max-width: 900px) {
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { order: -1; }
}

.article-body { min-width: 0; }
.article-body h2 {
    font-family: var(--v4-font-head);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--v4-slate-900);
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}
.article-body h3 {
    font-family: var(--v4-font-head);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--v4-slate-900);
    margin: 2rem 0 0.75rem;
}
.article-body p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--v4-slate-700);
    margin: 0 0 1.25rem;
}
.article-body ul, .article-body ol {
    padding-left: 1.5rem;
    margin: 0 0 1.25rem;
}
.article-body li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--v4-slate-700);
    margin-bottom: 0.4rem;
}
.article-body strong { color: var(--v4-slate-900); font-weight: 600; }
.article-body a { color: var(--v4-indigo); text-decoration: none; }
.article-body a:hover { text-decoration: underline; }

.formula-box {
    background: var(--v4-indigo-light);
    border: 1px solid rgba(79,70,229,0.2);
    border-radius: 10px;
    padding: 24px;
    margin: 28px 0;
    text-align: center;
}
.formula-box .formula {
    font-family: var(--v4-font-mono);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--v4-indigo);
    display: block;
    margin-bottom: 8px;
}
.formula-box .formula-note {
    font-size: 0.85rem;
    color: var(--v4-slate-500);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 0.95rem;
}
.data-table th {
    background: var(--v4-indigo-light);
    color: var(--v4-indigo);
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid rgba(79,70,229,0.2);
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--v4-border);
    color: var(--v4-slate-700);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--v4-bg-alt); }

.callout {
    border-left: 4px solid var(--v4-indigo);
    background: var(--v4-indigo-light);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 28px 0;
}
.callout p { margin: 0; font-size: 0.95rem; color: var(--v4-slate-700); }
.callout strong { color: var(--v4-indigo); }

.callout-green {
    border-left-color: var(--v4-green);
    background: var(--v4-green-light);
}
.callout-green strong { color: var(--v4-green); }

/* ── Sidebar ── */
.article-sidebar { position: sticky; top: 84px; }
.sidebar-card {
    background: var(--v4-white);
    border: 1px solid var(--v4-border);
    border-radius: var(--v4-radius-card);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.sidebar-card h4 {
    font-family: var(--v4-font-head);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--v4-slate-900);
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sidebar-toc { list-style: none; padding: 0; margin: 0; }
.sidebar-toc li { margin-bottom: 10px; }
.sidebar-toc a {
    font-size: 0.875rem;
    color: var(--v4-slate-500);
    text-decoration: none;
    display: block;
    padding: 4px 0;
    border-left: 2px solid transparent;
    padding-left: 12px;
    transition: all 0.15s;
}
.sidebar-toc a:hover {
    color: var(--v4-indigo);
    border-left-color: var(--v4-indigo);
}
.sidebar-cta-card {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    border-radius: var(--v4-radius-card);
    padding: 28px 24px;
    text-align: center;
    color: white;
}
.sidebar-cta-card h4 {
    font-family: var(--v4-font-head);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: white;
}
.sidebar-cta-card p {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
    margin: 0 0 20px;
    line-height: 1.5;
}
.sidebar-cta-btn {
    display: block;
    background: white;
    color: var(--v4-indigo);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.15s;
}
.sidebar-cta-btn:hover { transform: scale(1.02); }

/* ── Article CTA Banner ── */
.article-cta-banner {
    background: linear-gradient(135deg, var(--v4-indigo-light), #F5F3FF);
    border: 1px solid rgba(79,70,229,0.2);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin: 48px 0;
}
.article-cta-banner h3 {
    font-family: var(--v4-font-head);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--v4-slate-900);
    margin: 0 0 10px;
}
.article-cta-banner p {
    color: var(--v4-slate-500);
    margin: 0 0 24px;
    font-size: 1rem;
}
.btn-primary {
    display: inline-block;
    background: var(--v4-indigo);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-primary:hover { background: #4338CA; }

/* ── Footer (reused) ── */
#v4-footer {
    background: #0F172A;
    padding: 64px 0 0;
    color: rgba(255,255,255,0.7);
}
.v4-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.v4-footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.v4-footer-logo-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.v4-footer-logo-icon-inner {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
}
.v4-footer-brand-name {
    font-family: var(--v4-font-head);
    font-weight: 700;
    font-size: 1rem;
    color: white;
}
.v4-footer-tagline { font-size: 0.875rem; line-height: 1.6; max-width: 320px; }
.v4-eu-badge {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.78rem;
    margin-top: 16px;
}
.v4-footer-col-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px;
}
.v4-footer-links { list-style: none; padding: 0; margin: 0; }
.v4-footer-links li { margin-bottom: 8px; }
.v4-footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.875rem; }
.v4-footer-links a:hover { color: white; }
.v4-footer-contact-item { font-size: 0.875rem; margin: 0 0 6px; }
.v4-footer-contact-item a { color: rgba(255,255,255,0.7); text-decoration: none; }
.v4-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    font-size: 0.8rem;
}
.v4-footer-copyright { color: rgba(255,255,255,0.4); }
.v4-footer-bottom-links { list-style: none; padding: 0; margin: 0; display: flex; gap: 20px; }
.v4-footer-bottom-links a { color: rgba(255,255,255,0.4); text-decoration: none; }
.v4-footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* ── Related Articles ── */
.related-section { padding: 48px 0 80px; border-top: 1px solid var(--v4-border); }
.related-section h2 {
    font-family: var(--v4-font-head);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--v4-slate-900);
    margin: 0 0 32px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr; }
    .v4-footer-grid { grid-template-columns: 1fr; }
    .v4-nav-links { display: none; }
    .article-cta-banner { padding: 28px 20px; }
}
