/* ==========================================================================
   Blog styles — Screen Recorder Pro
   Builds on the design tokens defined in style.css (var(--*)).
   ========================================================================== */

/* ---------- Listing ---------- */
.blog-hero {
    text-align: center;
    padding: 3.5rem 1rem 1.5rem;
}
.blog-hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    margin-bottom: 0.75rem;
}
.blog-hero p {
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.075rem;
    line-height: 1.7;
}

.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem auto 2.5rem;
    max-width: 800px;
}
.blog-categories .chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.blog-categories .chip:hover {
    border-color: var(--primary-light);
    color: var(--primary-color);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
    padding-bottom: 3rem;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.post-card a.post-card-img {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-secondary);
}
.post-card a.post-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.post-card:hover a.post-card-img img {
    transform: scale(1.05);
}
.post-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.4rem 1.4rem 1.6rem;
}
.post-card .post-cat {
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}
.post-card h2 {
    font-size: 1.2rem;
    line-height: 1.35;
    margin-bottom: 0.6rem;
}
.post-card h2 a {
    color: var(--text-primary);
    text-decoration: none;
}
.post-card h2 a:hover { color: var(--primary-color); }
.post-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-light);
    font-size: 0.82rem;
}
.post-meta i { color: var(--primary-light); }

/* ---------- Single article ---------- */
.article-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 1.5rem 0 0.5rem;
}
.breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary-color); }
.breadcrumbs span { color: var(--primary-color); }

.article-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2;
    margin: 0.75rem 0 1rem;
}
.article-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.2rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}
.article-byline .author { color: var(--text-secondary); font-weight: 600; }
.article-byline i { color: var(--primary-light); margin-right: 0.3rem; }

.article-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.article-body {
    font-size: 1.075rem;
    line-height: 1.8;
    color: var(--text-secondary);
}
.article-body h2 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}
.article-body h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 1.75rem 0 0.75rem;
}
.article-body p { margin-bottom: 1.25rem; }
.article-body ul,
.article-body ol { margin: 0 0 1.25rem 1.4rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.article-body img,
.article-body figure img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: 0.5rem 0;
}
.article-body figure { margin: 2rem 0; }
.article-body figcaption {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.6rem;
}
.article-body blockquote {
    border-left: 4px solid var(--primary-color);
    background: var(--bg-tertiary);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    color: var(--text-secondary);
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}
.article-body th,
.article-body td {
    border: 1px solid var(--bg-secondary);
    padding: 0.65rem 0.85rem;
    text-align: left;
}
.article-body th { background: var(--bg-secondary); color: var(--text-primary); }

/* Callout / tip box */
.tip-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}
.tip-box strong { color: var(--text-primary); }

/* Inline CTA */
.article-cta {
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 2rem 1.75rem;
    text-align: center;
    margin: 2.5rem 0;
}
.article-cta h3 { color: #fff; font-size: 1.4rem; margin-bottom: 0.6rem; }
.article-cta p { color: rgba(255,255,255,0.92); margin-bottom: 1.25rem; }
.article-cta .btn {
    background: #fff;
    color: var(--primary-color);
    font-weight: 700;
    padding: 0.8rem 1.8rem;
}

/* TOC */
.article-toc {
    background: var(--bg-tertiary);
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin: 0 0 2rem;
}
.article-toc strong { display: block; margin-bottom: 0.6rem; color: var(--text-primary); }
.article-toc ol { margin: 0 0 0 1.1rem; }
.article-toc a { color: var(--text-secondary); text-decoration: none; }
.article-toc a:hover { color: var(--primary-color); }

/* FAQ */
.article-faq { margin: 2.5rem 0; }
.article-faq details {
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.75rem;
    background: var(--bg-primary);
}
.article-faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
}
.article-faq summary::-webkit-details-marker { display: none; }
.article-faq summary::after { content: '+'; float: right; color: var(--primary-color); font-weight: 700; }
.article-faq details[open] summary::after { content: '\2212'; }
.article-faq details p { margin-top: 0.75rem; color: var(--text-secondary); }

/* Author box */
.author-box {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin: 2.5rem 0;
}
.author-box .avatar {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
}
.author-box .who strong { display: block; color: var(--text-primary); }
.author-box .who p { margin: 0.25rem 0 0; color: var(--text-secondary); font-size: 0.92rem; }

/* Related posts */
.related-posts { margin: 3rem 0; }
.related-posts h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }
