/* ============================================================
   Blog Pages - Shared Styles
   Builds on /css/help.css (which provides .help-table etc.)

   Spacing scale (em-based, applied via .single-post-txt scope):
     XS  0.5em   tight inline
     S   1em     default paragraph rhythm
     M   1.5em   between block elements
     L   2em     before sub-headings (h3)
     XL  2.5em   before main sections (h2)
     XXL 3em     before/after major blocks (CTA card)
   ============================================================ */

/* Article body typography (scoped so we don't break /help/) */
.single-post-txt {
    font-size: 17px;
    line-height: 1.75;
    color: #2c2c3e;
}

.single-post-txt p {
    margin: 0 0 1em;
}

.single-post-txt p + p { margin-top: 0; }

.single-post-txt h2 {
    margin: 2.5em 0 0.75em;
    font-size: 28px;
    line-height: 1.3;
    color: #1a1a2e;
    font-weight: 700;
}

.single-post-txt h3 {
    margin: 2em 0 0.5em;
    font-size: 21px;
    line-height: 1.35;
    color: #1a1a2e;
    font-weight: 700;
}

.single-post-txt ul,
.single-post-txt ol {
    margin: 1em 0 1.5em;
    padding-left: 1.5em;
}

.single-post-txt li {
    margin-bottom: 0.6em;
    line-height: 1.7;
}

.single-post-txt li:last-child { margin-bottom: 0; }

.single-post-txt code {
    background: #f4f2fa;
    border: 1px solid #e8e6f0;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.92em;
    color: #5a4dd1;
    font-family: 'Courier New', monospace;
}

.single-post-txt a {
    color: #6c5ce7;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.single-post-txt a:hover { color: #5a4dd1; }

.single-post-txt strong { color: #1a1a2e; }

.single-post-txt table.help-table {
    margin: 1.5em 0;
    font-size: 15px;
}

/* Article meta (category + read time row above title) */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #6c5ce7;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-meta-sep { color: #c0bcd0; }

/* Override the existing .single-post-title spacing on blog articles
   (the help pages keep the original 50px / 50px / border-bottom). */
.blog-article .single-post-title {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
}

/* Author byline (below title, above article body) */
.blog-byline {
    margin: 1.25em 0 2em;
    padding: 0.85em 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #555;
    font-size: 15px;
}

.blog-byline strong { color: #1a1a2e; }

/* Inline screenshots */
.blog-screenshot {
    margin: 2em 0;
    text-align: center;
}

.blog-screenshot img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e8e6f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.08);
    cursor: zoom-in;
}

.blog-screenshot-caption {
    margin-top: 0.6em;
    font-size: 14px;
    color: #777;
    font-style: italic;
}

/* Code block (multi-line, e.g. site:operator example) */
.blog-code {
    background: #f8f7fc;
    border: 1px solid #e8e6f0;
    border-radius: 8px;
    padding: 1em 1.25em;
    margin: 1.25em 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #1a1a2e;
    overflow-x: auto;
    line-height: 1.5;
}

/* CTA card at end of article */
.blog-cta-card {
    margin: 3em 0 1em;
    padding: 2em;
    background: linear-gradient(135deg, #f0eeff 0%, #f8f7fc 100%);
    border: 1px solid #d6d0f0;
    border-radius: 16px;
    text-align: center;
}

.blog-cta-card h2 {
    margin: 0 0 0.5em;
    font-size: 26px;
    color: #1a1a2e;
}

.blog-cta-card p {
    color: #444;
    margin: 0 0 1.25em;
    font-size: 16px;
}

.blog-cta-card .btn {
    background: #6c5ce7;
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: background 0.15s;
}

.blog-cta-card .btn:hover { background: #5a4dd1; color: #fff; text-decoration: none; }

/* FAQ section (definition list) */
.blog-faq { margin: 1em 0 0; }

.blog-faq dt {
    font-weight: 700;
    color: #1a1a2e;
    margin-top: 1.5em;
    margin-bottom: 0.4em;
    font-size: 18px;
    line-height: 1.4;
}

.blog-faq dt:first-child { margin-top: 0; }

.blog-faq dd {
    margin: 0;
    color: #2c2c3e;
    line-height: 1.7;
}

.blog-faq dd + dt { margin-top: 1.75em; }

/* Listing page (index.php) */
.blog-list { margin-top: 2em; }

.blog-list-item {
    padding: 1.75em 0;
    border-bottom: 1px solid #eee;
}

.blog-list-item:first-child { padding-top: 0; }
.blog-list-item:last-child { border-bottom: none; }

.blog-list-item h2 {
    margin: 0 0 0.4em;
    font-size: 24px;
    line-height: 1.3;
}

.blog-list-item h2 a {
    color: #1a1a2e;
    text-decoration: none;
}

.blog-list-item h2 a:hover { color: #6c5ce7; }

.blog-list-meta {
    color: #888;
    font-size: 13px;
    margin-bottom: 0.5em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-list-excerpt {
    color: #444;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 0.75em;
}

.blog-list-readmore {
    display: inline-block;
    color: #6c5ce7;
    font-weight: 600;
    text-decoration: none;
}

.blog-list-readmore:hover { text-decoration: underline; }

/* Homepage "Latest from the blog" snippet */
.home-blog-section {
    padding: 5em 0;
    background: #fafaff;
}

.home-blog-section h2 {
    text-align: center;
    margin: 0 0 0.5em;
    color: #1a1a2e;
}

.home-blog-section .lead {
    text-align: center;
    color: #555;
    margin: 0 0 2.5em;
    font-size: 17px;
}

.home-blog-card {
    background: #fff;
    border: 1px solid #e8e6f0;
    border-radius: 12px;
    padding: 1.5em;
    margin-bottom: 1.25em;
    transition: transform 0.15s, box-shadow 0.15s;
}

.home-blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.1);
}

.home-blog-card h3 {
    font-size: 19px;
    margin: 0 0 0.4em;
    line-height: 1.3;
}

.home-blog-card h3 a {
    color: #1a1a2e;
    text-decoration: none;
}

.home-blog-card h3 a:hover { color: #6c5ce7; }

.home-blog-card-meta {
    color: #888;
    font-size: 13px;
    margin-bottom: 0.6em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.home-blog-card-excerpt {
    color: #555;
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
}

.home-blog-card-link {
    display: inline-block;
    margin-top: 0.75em;
    color: #6c5ce7;
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
}

.home-blog-card-link:hover { text-decoration: underline; }
