/*
Theme Name: Business To Mark - Business Focus
Theme URI: https://businesstomark.com
Author: BusinessToMark
Author URI: https://businesstomark.com
Description: Homepage shows only the "Business" category's latest posts, auto-loading more as you scroll (up to 30). Sidebar keeps Categories & Latest Posts. Single posts show related-category posts below, also auto-loading (up to 20).
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: businessmark
*/

/* ===== Reset ===== */
:root{
  --ink:#1a1d23;
  --blue:#0d6efd;
  --muted:#6b7280;
  --line:#e9ecef;
  --bg:#ffffff;
  --bg-soft:#f7f8fa;
}
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:'Segoe UI',Arial,sans-serif;color:var(--ink);background:var(--bg);line-height:1.65;}
a{text-decoration:none;color:var(--blue);}
a:hover{color:#0a58ca;}
img{max-width:100%;height:auto;display:block;}
ul{list-style:none;}
.container{max-width:1180px;margin:0 auto;padding:0 20px;}

/* ===== Header ===== */
.site-header{border-bottom:1px solid var(--line);padding:18px 0;background:#fff;}
.site-header .container{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;}
.site-title{font-size:22px;font-weight:800;color:var(--ink);}
.site-title a{color:var(--ink);}
.site-description{font-size:12px;color:var(--blue);margin-top:2px;}
.main-navigation ul{display:flex;gap:24px;flex-wrap:wrap;}
.main-navigation a{font-size:14px;font-weight:600;color:#3a3f47;}
.main-navigation a:hover{color:var(--blue);}

/* ===== Page heading ===== */
.page-heading{font-size:22px;font-weight:800;margin:26px 0 20px;}

/* ===== Content + Sidebar layout ===== */
.content-layout{display:grid;grid-template-columns:1fr 300px;gap:34px;align-items:start;}
.main-content{min-width:0;}

/* ===== Posts grid (2 columns like the reference) ===== */
.posts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:24px;}
.post-card{border:1px solid var(--line);border-radius:6px;overflow:hidden;display:flex;flex-direction:column;background:#fff;transition:box-shadow .15s ease;}
.post-card:hover{box-shadow:0 6px 16px rgba(0,0,0,.06);}
.post-card .post-thumb img{width:100%;height:190px;object-fit:cover;}
.post-card .post-thumb-placeholder{height:190px;background:var(--bg-soft);display:flex;align-items:center;justify-content:center;color:#c3c7cf;font-size:13px;}
.post-card-body{padding:16px 4px;flex:1;display:flex;flex-direction:column;}
.post-card-body .post-meta{font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;margin-bottom:9px;}
.post-card-body h3{font-size:17px;line-height:1.4;margin-bottom:9px;}
.post-card-body h3 a{color:var(--ink);}
.post-card-body p{font-size:13.5px;color:var(--muted);flex:1;}
.read-more{margin-top:12px;font-size:13px;font-weight:700;}
.no-posts{color:var(--muted);padding:20px 0;}

/* ===== Sidebar widgets ===== */
.sidebar{display:flex;flex-direction:column;gap:24px;}
.widget{border:1px solid var(--line);border-radius:8px;padding:20px;}
.widget-title{font-size:15px;color:var(--ink);margin-bottom:14px;padding-bottom:10px;border-bottom:1px solid var(--line);font-weight:700;}
.widget-list li{padding:9px 0;border-bottom:1px solid #f1f3f5;display:flex;align-items:center;justify-content:space-between;gap:10px;}
.widget-list li:last-child{border-bottom:none;}
.widget-list li a{color:var(--ink);font-size:13.5px;font-weight:600;}
.widget-list li a:hover{color:var(--blue);}
.widget-count{background:#e7f1ff;color:var(--blue);font-size:11.5px;font-weight:700;padding:2px 10px;border-radius:20px;flex-shrink:0;}
.widget-list-posts li{align-items:flex-start;}
.widget-post-thumb{width:52px;height:52px;border-radius:6px;overflow:hidden;flex-shrink:0;}
.widget-post-thumb img{width:100%;height:100%;object-fit:cover;}
.widget-post-info{display:flex;flex-direction:column;gap:4px;}
.widget-post-info a{font-size:13px;line-height:1.4;}
.widget-post-date{font-size:11px;color:var(--muted);}
.widget-empty{font-size:13px;color:var(--muted);}
@media (max-width:900px){.content-layout{grid-template-columns:1fr;}}

/* ===== Related posts / infinite feeds ===== */
.related-posts-wrap{margin-top:44px;}
.related-posts-wrap .section-title{font-size:19px;font-weight:800;margin-bottom:18px;}
.related-loader{text-align:center;padding:16px;color:var(--muted);font-size:13.5px;grid-column:1/-1;}
.related-end-msg{text-align:center;padding:14px;color:var(--muted);font-size:12.5px;}

/* ===== Categories fallback grid (category.php) ===== */
.categories-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;}
.category-card{border:1px solid var(--line);border-radius:8px;padding:20px;text-align:center;}
.category-card .cat-icon{width:44px;height:44px;margin:0 auto 10px;border-radius:50%;background:#e7f1ff;color:var(--blue);display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:700;}
.category-card h3{font-size:15px;margin-bottom:4px;}
.category-card h3 a{color:var(--ink);}
.category-card .cat-count{font-size:12px;color:var(--muted);}
.no-categories{color:var(--muted);padding:16px;}

/* ===== Single / Page ===== */
.single-content, .page-content{padding:0;}
.single-content h1, .page-content h1{margin-bottom:14px;font-size:27px;color:var(--ink);}
.single-content .entry-meta{font-size:12.5px;color:var(--muted);margin-bottom:20px;text-transform:uppercase;letter-spacing:.4px;padding-bottom:16px;border-bottom:1px solid var(--line);}
.entry-content p{margin-bottom:16px;font-size:15.5px;}

/* ===== Generic section (index/category/page use) ===== */
.section{padding:0 0 20px;}
.section-title{font-size:20px;font-weight:800;margin-bottom:20px;}

/* ===== Pagination ===== */
.pagination{margin-top:30px;text-align:center;}
.pagination a, .pagination span{display:inline-block;padding:8px 14px;margin:0 4px;border:1px solid var(--line);border-radius:6px;color:var(--ink);font-size:13.5px;}
.pagination span.current{background:var(--ink);color:#fff;border-color:var(--ink);}

/* ===== Footer ===== */
.site-footer{border-top:1px solid var(--line);padding:24px 0;text-align:center;font-size:13px;color:var(--muted);margin-top:20px;background:var(--bg-soft);}
.site-footer a{color:var(--blue);}

/* ===== Responsive ===== */
@media (max-width:768px){
  .site-header .container{flex-direction:column;align-items:flex-start;gap:10px;}
}
