/* ============================================================
   TECHVANTA360 — Blog Stylesheet
   Loaded only on: single.php, home.php, archive.php, search.php
   ============================================================ */

/* ── BLOG LAYOUT ─────────────────────────────────────────────*/
.blog-layout{display:grid;grid-template-columns:1fr 340px;gap:44px;align-items:start;padding:var(--sp) 0}
.blog-main{}
.blog-aside{position:sticky;top:88px}

/* ── POST LIST (archive / home.php) ─────────────────────────*/
.posts-list{display:grid;gap:28px}
.post-card{background:var(--white);border-radius:var(--r-lg);overflow:hidden;border:1px solid var(--g200);display:grid;grid-template-columns:320px 1fr;transition:all var(--t)}
.post-card:hover{box-shadow:var(--sh-lg);border-color:rgba(14,165,233,.15);transform:translateY(-3px)}
.post-card-thumb{aspect-ratio:16/10;overflow:hidden;position:relative;background:var(--g100)}
.post-card-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s var(--ease)}
.post-card:hover .post-card-thumb img{transform:scale(1.04)}
.post-card-thumb-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:3rem;background:var(--g100)}
.post-card-body{padding:26px 28px;display:flex;flex-direction:column}
.post-card-cat{display:inline-flex;align-items:center;gap:5px}
.post-card-cat a{font-size:.67rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:3px 11px;border-radius:50px;background:rgba(14,165,233,.1);color:var(--accent-dk);transition:background .2s}
.post-card-cat a:hover{background:rgba(14,165,233,.2)}
.post-card-title{font-family:var(--font-head);font-size:1.15rem;font-weight:700;color:var(--navy-deep);margin:12px 0 10px;line-height:1.35;letter-spacing:-.025em}
.post-card-title a{color:inherit;transition:color .2s}
.post-card-title a:hover{color:var(--accent)}
.post-card-excerpt{font-size:.875rem;color:var(--text-muted);line-height:1.68;margin-bottom:18px;flex:1}
.post-card-meta{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:auto}
.post-card-author{display:flex;align-items:center;gap:7px;font-size:.78rem;color:var(--g500)}
.post-card-author img{width:26px;height:26px;border-radius:50%;object-fit:cover}
.post-card-date{font-size:.78rem;color:var(--g400)}
.post-card-read{font-size:.78rem;font-weight:700;color:var(--accent);display:flex;align-items:center;gap:4px;margin-left:auto}
.post-card-read i{font-size:.7rem;transition:transform .2s}
.post-card:hover .post-card-read i{transform:translateX(4px)}

/* ── FEATURED POST (first post, full-width) ──────────────────*/
.post-card.featured{grid-template-columns:1fr;grid-template-rows:auto auto}
.post-card.featured .post-card-thumb{aspect-ratio:21/9}
.post-card.featured .post-card-title{font-size:1.5rem}

/* ── ARCHIVE HEADER ──────────────────────────────────────────*/
.archive-header{margin-bottom:36px;padding-bottom:28px;border-bottom:1px solid var(--g200)}
.archive-header h1{font-family:var(--font-head);font-size:1.8rem;font-weight:800;color:var(--navy-deep);margin-bottom:8px}
.archive-header p{font-size:.92rem;color:var(--text-muted);line-height:1.65}
.archive-count{font-size:.78rem;color:var(--g400);margin-top:6px;font-style:italic}

/* ── SINGLE POST ─────────────────────────────────────────────*/
.single-post{}
/* Post header */
.post-header{margin-bottom:36px}
.post-header-meta{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.post-header-cat a{font-size:.67rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:4px 12px;border-radius:50px;background:rgba(14,165,233,.1);color:var(--accent-dk)}
.post-header-date,.post-header-read{font-size:.8rem;color:var(--g400)}
.post-header-read::before{content:'·';margin-right:14px;color:var(--g300)}
.post-title{font-family:var(--font-head);font-size:clamp(1.9rem,3.5vw,2.9rem);font-weight:800;color:var(--navy-deep);line-height:1.18;letter-spacing:-.035em;margin-bottom:16px}
.post-subtitle{font-size:1.1rem;color:var(--text-muted);line-height:1.7;margin-bottom:24px}
/* Author strip */
.post-author-strip{display:flex;align-items:center;gap:12px;padding:16px 0;border-top:1px solid var(--g200);border-bottom:1px solid var(--g200);margin-bottom:32px}
.post-author-strip img{width:46px;height:46px;border-radius:50%;object-fit:cover}
.post-author-avatar-placeholder{width:46px;height:46px;border-radius:50%;background:linear-gradient(135deg,#667eea,#764ba2);display:flex;align-items:center;justify-content:center;font-family:var(--font-head);font-weight:700;color:#fff;font-size:.95rem}
.post-author-name{font-family:var(--font-head);font-size:.9rem;font-weight:700;color:var(--navy-deep)}
.post-author-role{font-size:.75rem;color:var(--g400);margin-top:1px}
.post-share{margin-left:auto;display:flex;align-items:center;gap:8px}
.post-share span{font-size:.75rem;color:var(--g400);font-weight:500}
.share-btn{width:32px;height:32px;border-radius:8px;background:var(--g100);display:flex;align-items:center;justify-content:center;color:var(--g600);font-size:.8rem;transition:all .2s}
.share-btn:hover{background:var(--accent);color:#fff}
/* Featured image */
.post-featured-img{width:100%;aspect-ratio:21/9;object-fit:cover;border-radius:var(--r-lg);margin-bottom:36px}
/* Post body */
.post-content{font-size:1.02rem;line-height:1.82;color:#2d3748}
.post-content h2{font-family:var(--font-head);font-size:1.6rem;font-weight:800;color:var(--navy-deep);margin:2.2em 0 .7em;letter-spacing:-.03em}
.post-content h3{font-family:var(--font-head);font-size:1.22rem;font-weight:700;color:var(--navy-deep);margin:1.8em 0 .6em}
.post-content h4{font-family:var(--font-head);font-size:1.04rem;font-weight:700;margin:1.5em 0 .5em}
.post-content p{margin-bottom:1.3em}
.post-content a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.post-content a:hover{color:var(--accent-dk)}
.post-content ul,.post-content ol{margin:1em 0 1.3em 1.6em}
.post-content ul{list-style:disc}.post-content ol{list-style:decimal}
.post-content li{margin-bottom:.45em;line-height:1.72}
.post-content blockquote{border-left:4px solid var(--accent);padding:18px 24px;margin:1.8em 0;background:var(--g50);border-radius:0 var(--r) var(--r) 0;font-style:italic;font-size:1.06rem;color:var(--g600);line-height:1.75}
.post-content blockquote p{margin:0}
.post-content img{border-radius:var(--r);margin:1.6em 0;width:100%;height:auto}
.post-content table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:.92rem;overflow:hidden;border-radius:var(--r)}
.post-content th{background:var(--navy-deep);color:#fff;padding:11px 14px;font-family:var(--font-head);font-size:.8rem;letter-spacing:.04em;text-align:left}
.post-content td{border-bottom:1px solid var(--g200);padding:10px 14px;vertical-align:top}
.post-content tr:nth-child(even) td{background:var(--g50)}
/* Code */
.post-content code{background:var(--g100);border:1px solid var(--g200);padding:2px 6px;border-radius:5px;font-size:.88em;font-family:monospace}
.post-content pre{background:#0f172a;border-radius:var(--r);padding:20px 22px;overflow-x:auto;margin:1.5em 0}
.post-content pre code{background:none;border:none;padding:0;color:#e2e8f0;font-size:.88rem;line-height:1.6}
/* Post footer */
.post-footer{margin-top:48px;padding-top:32px;border-top:1px solid var(--g200)}
.post-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:32px}
.post-tag{font-size:.72rem;font-weight:700;color:var(--navy-mid);background:var(--g100);padding:5px 12px;border-radius:50px;transition:all .2s}
.post-tag:hover{background:var(--accent);color:#fff}
/* Author bio box */
.post-author-box{background:var(--g50);border-radius:var(--r-lg);padding:28px;display:flex;gap:20px;margin-bottom:40px;border:1px solid var(--g200)}
.post-author-box img{width:72px;height:72px;border-radius:50%;object-fit:cover;flex-shrink:0}
.post-author-box-placeholder{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,#667eea,#764ba2);display:flex;align-items:center;justify-content:center;font-family:var(--font-head);font-weight:700;color:#fff;font-size:1.4rem;flex-shrink:0}
.post-author-box-info h3{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--navy-deep);margin-bottom:4px}
.post-author-box-info p{font-size:.85rem;color:var(--text-muted);line-height:1.65}
/* Related posts */
.related-posts{margin-top:44px}
.related-posts h2{font-family:var(--font-head);font-size:1.4rem;font-weight:800;color:var(--navy-deep);margin-bottom:24px;letter-spacing:-.03em}
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.related-card{border-radius:var(--r);overflow:hidden;border:1px solid var(--g200);transition:all var(--t);background:var(--white)}
.related-card:hover{transform:translateY(-4px);box-shadow:var(--sh-md)}
.related-thumb{aspect-ratio:16/10;overflow:hidden;background:var(--g100)}
.related-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.related-card:hover .related-thumb img{transform:scale(1.05)}
.related-thumb-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:2rem}
.related-body{padding:14px 16px}
.related-body h3{font-family:var(--font-head);font-size:.88rem;font-weight:700;color:var(--navy-deep);line-height:1.38}
.related-body h3 a{color:inherit;transition:color .2s}
.related-body h3 a:hover{color:var(--accent)}
.related-date{font-size:.72rem;color:var(--g400);margin-top:5px}
/* Comments */
.comments-section{margin-top:48px;padding-top:36px;border-top:1px solid var(--g200)}
.comments-section h2{font-family:var(--font-head);font-size:1.4rem;font-weight:800;color:var(--navy-deep);margin-bottom:28px}
.comment-list .comment{padding:20px 0;border-bottom:1px solid var(--g100)}
.comment-meta{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.comment-author img{width:38px;height:38px;border-radius:50%}
.comment-author-name{font-weight:700;font-size:.9rem;color:var(--navy-deep)}
.comment-date{font-size:.75rem;color:var(--g400)}
.comment-text p{font-size:.9rem;color:var(--text-muted);line-height:1.7}
.comment-reply a{font-size:.78rem;font-weight:700;color:var(--accent);transition:opacity .2s}
.comment-form input,.comment-form textarea{width:100%;padding:11px 16px;border:1.5px solid var(--g200);border-radius:var(--r);font-family:var(--font-body);font-size:.9rem;outline:none;transition:border .2s;background:var(--white);color:var(--text)}
.comment-form input:focus,.comment-form textarea:focus{border-color:var(--accent)}
.comment-form textarea{resize:vertical;min-height:130px}
.comment-form .submit{background:var(--accent);color:#fff;font-family:var(--font-head);font-weight:700;padding:12px 28px;border-radius:50px;border:none;cursor:pointer;font-size:.92rem;transition:all .25s}
.comment-form .submit:hover{background:var(--accent-dk);transform:translateY(-1px)}

/* ── SIDEBAR ─────────────────────────────────────────────────*/
.sidebar-widget{margin-bottom:28px}
.widget-title{font-family:var(--font-head);font-size:1rem;font-weight:800;color:var(--navy-deep);margin-bottom:16px;padding-bottom:10px;border-bottom:2px solid var(--accent);letter-spacing:-.02em}
/* Recent posts widget */
.widget_recent_entries ul{display:grid;gap:10px}
.widget_recent_entries li{font-size:.84rem}
.widget_recent_entries li a{color:var(--navy-deep);font-weight:600;line-height:1.4;transition:color .2s}
.widget_recent_entries li a:hover{color:var(--accent)}
.widget_recent_entries .post-date{display:block;font-size:.72rem;color:var(--g400);margin-top:2px}
/* Categories widget */
.widget_categories ul{display:grid;gap:6px}
.widget_categories li a{display:flex;justify-content:space-between;align-items:center;font-size:.84rem;color:var(--navy-deep);padding:6px 0;border-bottom:1px solid var(--g100);transition:color .2s}
.widget_categories li a:hover{color:var(--accent)}
/* Tag cloud */
.widget_tag_cloud .tagcloud{display:flex;flex-wrap:wrap;gap:6px}
.widget_tag_cloud .tag-cloud-link{font-size:.75rem !important;font-weight:700;color:var(--navy-mid);background:var(--g100);padding:4px 12px;border-radius:50px;transition:all .2s}
.widget_tag_cloud .tag-cloud-link:hover{background:var(--accent);color:#fff}
/* Search widget */
.widget_search .search-form{max-width:100%}
/* CTA sidebar widget */
.sidebar-cta{background:var(--navy-deep);border-radius:var(--r-lg);padding:24px;border:1px solid rgba(255,255,255,.06)}
.sidebar-cta h3{font-family:var(--font-head);font-size:1rem;font-weight:800;color:#fff;margin-bottom:10px}
.sidebar-cta p{font-size:.83rem;color:rgba(255,255,255,.5);line-height:1.65;margin-bottom:16px}

/* ── NO RESULTS ──────────────────────────────────────────────*/
.no-results{text-align:center;padding:72px 0}
.no-results .no-results-icon{font-size:4rem;margin-bottom:20px;opacity:.3}
.no-results h2{font-family:var(--font-head);font-size:1.6rem;font-weight:800;color:var(--navy-deep);margin-bottom:12px}
.no-results p{color:var(--text-muted);max-width:420px;margin-inline:auto;margin-bottom:28px}

/* ── RESPONSIVE BLOG ─────────────────────────────────────────*/
@media(max-width:1000px){
  .blog-layout{grid-template-columns:1fr;gap:44px}
  .blog-aside{position:static}
  .post-card{grid-template-columns:1fr}
  .post-card-thumb{max-height:260px}
  .related-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:640px){
  .related-grid{grid-template-columns:1fr}
  .post-author-box{flex-direction:column}
  .post-share{margin-left:0}
  .post-author-strip{flex-wrap:wrap}
}
