/*
Theme Name: LBGraphics Child
Theme URI: https://github.com/ModularTheGod/lbgraphics-theme
Template: lbgraphics
Author: LB Graphics
Author URI: https://github.com/ModularTheGod
Description: Starter child theme for an LB Graphics client site. Override design tokens in tokens.css and template parts in template-parts/. See README.md.
Version: 0.1.0
Requires at least: 6.8
Tested up to: 7.1
Requires PHP: 8.3
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lbgraphics-child
*/

/*
 * Site-specific CSS goes here. It loads after the parent stylesheet. Prefer
 * changing tokens in tokens.css over hard-coding colours in this file.
 */

/* 2026-11-01 footer latest-post card (child functions.php). Only exists when posts are published. */
.lbg-ft-row > nav:has(.lbg-ft-post){display:contents}
.lbg-ft-post{border:1px solid var(--border);border-radius:var(--radius,.5rem);padding:1rem 1.125rem;max-width:20rem;flex:0 1 20rem}
.lbg-ft-post__meta{margin:0;color:var(--s-meta);font-size:.75rem;text-transform:uppercase;letter-spacing:.08em}
.lbg-ft-post__title{margin:.35rem 0 .5rem;font-weight:600;line-height:1.35}
.lbg-ft-post__title a{color:inherit;text-decoration:none}
.lbg-ft-post__title a:hover,.lbg-ft-post__title a:focus-visible{text-decoration:underline}
.lbg-ft-post__more{display:inline-flex;align-items:center;gap:.35rem;min-height:2.75rem;color:var(--link,currentColor)}
@media (width<=767px){.lbg-ft-post{max-width:none;flex:none;width:100%}}

/* 2026-11-01 single-post polish (blog launch). Scoped to single posts only. */
body.single-post .post-thumbnail img{aspect-ratio:1200/630}
body.single-post .entry-meta{margin-block-end:.75rem}
body.single-post .entry-content figure{margin:2rem 0}
body.single-post .entry-content figure img{width:100%;height:auto;border-radius:var(--radius,.5rem)}
body.single-post .entry-content li+li{margin-block-start:.4rem}
body.single-post .entry-content{overflow-wrap:anywhere}
body.single-post #secondary .widget+.widget{margin-block-start:2rem}
body.single-post #secondary .widget_recent_comments{display:none}

/* 2026-11-01 blog sidebar tidy (single posts + blog index): space the widgets, smaller headings, hide the empty Recent Comments block. */
:is(body.single-post,body.blog) #secondary .widget+.widget{margin-block-start:2rem}
:is(body.single-post,body.blog) #secondary .wp-block-heading{font-size:1.25rem;margin:0 0 .75rem}
:is(body.single-post,body.blog) #secondary .widget:has(.wp-block-latest-comments.no-comments){display:none}

/* ===== 2026-11-01 blog styling (Owen approved): blog index + single posts only. Brand tokens, both modes. ===== */
/* No sidebar: content spans the full site container. */
:is(body.blog,body.single-post) #secondary{display:none}
:is(body.blog,body.single-post) .site-main__inner{grid-column:content-start/aside-end;padding-block:3rem 4.5rem}
/* Title band */
:is(body.blog,body.single-post) .lbg-title{background:var(--card);border-block-end:1px solid var(--border)}
body.blog .lbg-title .lbg-container{padding-block:1.5rem 1rem}
/* Blog index: post-card grid matching .lbg-card */
body.blog .post-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(20rem,100%),1fr));gap:2rem}
body.blog .post-list>article{display:flex;flex-direction:column;margin:0;background:var(--card);color:var(--card-foreground);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;transition:border-color .2s}
body.blog .post-list>article:hover{border-color:var(--primary)}
body.blog .post-list .post-thumbnail{display:block;margin:0;aspect-ratio:1200/630;overflow:hidden}
body.blog .post-list .post-thumbnail img{width:100%;height:100%;object-fit:cover;border-radius:0;display:block}
body.blog .post-list .entry-header{padding:1.5rem 1.5rem 0}
body.blog .post-list .entry-title{font-size:1.375rem;line-height:1.25;margin:0 0 .5rem}
body.blog .post-list .entry-title a{color:inherit;text-decoration:none}
body.blog .post-list .entry-title a:hover{color:var(--primary)}
body.blog .post-list .entry-meta{font-size:.8125rem;color:var(--muted-foreground);margin:0}
body.blog .post-list .entry-meta a{color:inherit}
body.blog .post-list .entry-content{max-width:none;margin:0;padding:1rem 1.5rem 1.5rem;color:var(--muted-foreground);font-size:.9375rem;line-height:1.6}
body.blog .post-list .entry-content p{margin:0;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
/* Single post: one readable ~720px column, centred in the site container, title aligned to it */
body.single-post .lbg-title__stack{max-width:calc(720px + 48px);margin-inline:auto;width:100%}
body.single-post .site-main__inner>article{max-width:720px;margin-inline:auto}
body.single-post article .entry-content{max-width:none}
body.single-post article .entry-meta{font-size:.875rem;color:var(--muted-foreground);margin:0 0 1.25rem}
body.single-post article .entry-meta a{color:inherit}
body.single-post article .post-thumbnail{margin:0 0 2rem}
body.single-post article .post-thumbnail img{width:100%;height:auto;aspect-ratio:1200/630;object-fit:cover;border-radius:var(--radius)}
body.single-post .entry-content>h2{font-size:clamp(1.5rem,1.2rem + 1.2vw,2rem);line-height:1.2;margin:3rem 0 1rem}
body.single-post .entry-content>h3{font-size:1.25rem;line-height:1.3;margin:2rem 0 .5rem}
body.single-post .entry-content>p,body.single-post .entry-content li{font-size:1.0625rem;line-height:1.7}
body.single-post .entry-content figure img{width:100%;height:auto}
@media (max-width:767px){
 :is(body.blog,body.single-post) .site-main__inner{padding-block:2rem 3rem}
 body.single-post .entry-content>p,body.single-post .entry-content li{font-size:1rem}
}
