@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
    --primary: #1877F2;
    --primary-dark: #1464d8;
    --primary-light: #e8f0fe;
    --dark: #0a0f1e;
    --text: #1a1f2e;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --white: #ffffff;
    --success: #16a34a;
    --accent: #f59e0b;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
}

/* ── NAV ── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
}
.nav-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
}
.nav-badge {
    font-size: 0.65rem;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.nav-cta {
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.2s;
}
.nav-cta:hover { background: var(--primary-dark); }

/* ── HERO ── */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, #1a2744 100%);
    color: white;
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(24,119,242,0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(24,119,242,0.1) 0%, transparent 50%);
}
.hero-inner { position: relative; max-width: 800px; margin: 0 auto; }
.hero-tag {
    display: inline-block;
    background: rgba(24,119,242,0.2);
    border: 1px solid rgba(24,119,242,0.4);
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.hero h1 {
    font-family: 'Lora', serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.25;
    margin-bottom: 20px;
    font-weight: 700;
}
.hero p {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
}

/* ── ARTICLE HERO ── */
.article-hero {
    background: linear-gradient(135deg, var(--dark) 0%, #1a2744 100%);
    color: white;
    padding: 60px 24px 80px;
    position: relative;
    overflow: hidden;
}
.article-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(24,119,242,0.2) 0%, transparent 60%);
}
.article-hero-inner { position: relative; max-width: 800px; margin: 0 auto; }
.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.article-tag {
    background: rgba(24,119,242,0.25);
    border: 1px solid rgba(24,119,242,0.4);
    color: #93c5fd;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.article-date { font-size: 0.85rem; color: #64748b; }
.article-read-time { font-size: 0.85rem; color: #64748b; }
.article-hero h1 {
    font-family: 'Lora', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.25;
    margin-bottom: 20px;
    font-weight: 700;
}
.article-hero .intro {
    font-size: 1.1rem;
    color: #94a3b8;
    line-height: 1.7;
}
.article-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
}
.author-name { font-size: 0.9rem; font-weight: 600; color: white; }
.author-title { font-size: 0.8rem; color: #64748b; }

/* ── MAIN LAYOUT ── */
.main-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: start;
}
@media (max-width: 768px) {
    .main-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
}

/* ── ARTICLE BODY ── */
.article-body { min-width: 0; }
.article-body h2 {
    font-family: 'Lora', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin: 40px 0 16px;
    line-height: 1.3;
}
.article-body h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin: 28px 0 12px;
}
.article-body p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 20px;
}
.article-body ul, .article-body ol {
    padding-left: 24px;
    margin-bottom: 20px;
}
.article-body li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 8px;
}
.article-body strong { color: var(--text); font-weight: 600; }
.article-body a { color: var(--primary); text-decoration: underline; }

.callout {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin: 28px 0;
}
.callout p { margin: 0; color: #1e40af; font-size: 1rem; }
.callout strong { color: #1e3a8a; }

.warning-callout {
    background: #fef3c7;
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin: 28px 0;
}
.warning-callout p { margin: 0; color: #92400e; font-size: 1rem; }

.success-callout {
    background: #f0fdf4;
    border-left: 4px solid var(--success);
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin: 28px 0;
}
.success-callout p { margin: 0; color: #166534; font-size: 1rem; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 28px 0;
}
.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}
.stat-number {
    font-family: 'Lora', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

.step-list { list-style: none; padding: 0; margin: 20px 0; }
.step-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}
.step-num {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}
.step-content h4 { font-weight: 600; margin-bottom: 4px; color: var(--text); }
.step-content p { margin: 0; font-size: 0.95rem; color: var(--muted); line-height: 1.6; }

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.comparison-table th {
    background: var(--primary);
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}
.comparison-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    color: #374151;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: var(--bg); }

/* ── CTA BOX ── */
.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, #1464d8 100%);
    border-radius: 16px;
    padding: 36px;
    text-align: center;
    color: white;
    margin: 40px 0;
}
.cta-box h3 {
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: white;
}
.cta-box p { color: rgba(255,255,255,0.85); margin-bottom: 24px; font-size: 1rem; }
.cta-btn {
    display: inline-block;
    background: white;
    color: var(--primary);
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform 0.2s;
}
.cta-btn:hover { transform: translateY(-2px); }

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: 80px; }
.sidebar-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}
.sidebar-card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 16px;
}
.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 10px; }
.toc-list a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.4;
    display: flex;
    gap: 8px;
    transition: color 0.2s;
}
.toc-list a::before {
    content: '→';
    color: var(--primary);
    flex-shrink: 0;
}
.toc-list a:hover { color: var(--primary); }

.related-post {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
    text-decoration: none;
    color: var(--text);
}
.related-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.related-title { font-size: 0.875rem; font-weight: 500; line-height: 1.4; color: var(--text); }
.related-title:hover { color: var(--primary); }

.app-card {
    background: linear-gradient(135deg, var(--primary) 0%, #1464d8 100%);
    border-radius: 16px;
    padding: 24px;
    color: white;
    text-align: center;
}
.app-card h3 { color: white; font-size: 1rem; margin-bottom: 8px; }
.app-card p { color: rgba(255,255,255,0.8); font-size: 0.85rem; margin-bottom: 16px; }
.app-btn {
    display: block;
    background: white;
    color: var(--primary);
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    transition: transform 0.2s;
}
.app-btn:hover { transform: translateY(-2px); }

/* ── BLOG INDEX ── */
.blog-grid {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}
.blog-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.card-thumb {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}
.card-body { padding: 24px; }
.card-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}
.card-title {
    font-family: 'Lora', serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 10px;
    color: var(--text);
}
.card-excerpt { font-size: 0.9rem; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--muted);
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.card-read { color: var(--primary); font-weight: 600; }

/* ── FOOTER ── */
footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 40px 24px;
    text-align: center;
    margin-top: 80px;
}
footer a { color: var(--primary); text-decoration: none; }
.footer-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.footer-links a { font-size: 0.875rem; color: #94a3b8; }
.footer-links a:hover { color: white; }
footer p { font-size: 0.85rem; }
