/* 
   Zavia Blog Design System 
   Inspired by Amie (Premium Minimal) & Stalkie (SEO Efficiency)
*/

:root {
    --blog-bg: #ffffff;
    --blog-text: #111111;
    --blog-muted: #666666;
    --blog-accent: #e85d2b;
    --blog-card-bg: #f8f9fa;
    --blog-border: #ececea;
    --blog-max-width: 720px; /* Optimal reading width */
}

/* --- General Typography --- */
.blog-content {
    font-family: 'Manrope', sans-serif;
    color: var(--blog-text);
    line-height: 1.6;
    font-size: 1.125rem;
}

.blog-content h1, 
.blog-content h2, 
.blog-content h3 {
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-top: 2em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

.blog-content h1 { font-size: 3rem; margin-top: 0.5em; }
.blog-content h2 { font-size: 2rem; border-bottom: 1px solid var(--blog-border); padding-bottom: 0.3em; }
.blog-content h3 { font-size: 1.5rem; }

.blog-content p { margin-bottom: 1.5em; }

.blog-content img {
    width: 100%;
    border-radius: 24px;
    margin: 2em 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

/* --- Blog Index / Listing --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.article-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-8px);
}

.card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--blog-card-bg);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 16px;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-category {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--blog-accent);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: block;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* --- Article Layout --- */
.article-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px;
    display: flex;
    gap: 60px;
}

.article-main {
    flex: 1;
    max-width: var(--blog-max-width);
}

.article-sidebar {
    width: 240px;
    position: sticky;
    top: 40px;
    height: fit-content;
}

/* --- Table of Contents (Amie Style) --- */
.toc {
    font-size: 0.9rem;
    border-left: 2px solid var(--blog-border);
    padding-left: 20px;
}

.toc h4 {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    color: var(--blog-muted);
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 12px;
}

.toc a {
    text-decoration: none;
    color: var(--blog-muted);
    transition: color 0.2s;
}

.toc a:hover, .toc a.active {
    color: var(--blog-text);
    font-weight: 700;
}

/* --- Method Box (Stalkie Style) --- */
.method-box {
    background: #fdf6f2;
    border-radius: 24px;
    padding: 32px;
    margin: 32px 0;
    border: 1px solid #fee8db;
}

.method-box h4 {
    margin-top: 0;
    color: var(--blog-accent);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.method-step {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.step-num {
    background: var(--blog-accent);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 1000px) {
    .article-container {
        flex-direction: column;
    }
    .article-sidebar {
        display: none; /* Hide TOC on mobile or move to top */
    }
    .article-main {
        margin: 0 auto;
    }
}
