/*
Theme Name: Business To Mark
Theme URI: https://businesstomark.com
Author: BusinessToMark
Author URI: https://businesstomark.com
Description: A bold, editorial news-style theme for BusinessToMark.com — big masthead, category navigation with search, per-category homepage sections (max 8 posts each), sidebar with latest posts & categories, and related posts with infinite scroll (up to 15).
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 & base ===== */
:root{
  --ink:#0e0e0e;
  --blue:#1857c4;
  --muted:#6b7280;
  --line:#e4e4e4;
  --bg:#ffffff;
  --bg-soft:#f6f6f4;
  --tag-bg:#eef3fc;
}
*{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.55;}
a{text-decoration:none;color:var(--blue);}
a:hover{text-decoration:underline;}
img{max-width:100%;height:auto;display:block;}
ul{list-style:none;}
.container{max-width:1200px;margin:0 auto;padding:0 20px;}

/* ===== Masthead ===== */
.masthead{border-bottom:1px solid var(--line);padding:18px 0 14px;}
.masthead .container{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;}
.site-title{
  font-size:34px;
  font-weight:900;
  letter-spacing:-.5px;
  text-transform:uppercase;
  color:var(--ink);
  font-family:Arial,'Helvetica Neue',sans-serif;
}
.site-title a{color:var(--ink);}
.site-description{display:none;}

.masthead-actions{display:flex;align-items:center;gap:14px;}
.search-toggle-wrap{position:relative;}
.search-toggle-btn{
  background:none;border:none;cursor:pointer;
  width:38px;height:38px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:var(--ink);
}
.search-toggle-btn:hover{background:var(--bg-soft);}
.header-search-form{
  position:absolute;right:0;top:46px;
  background:#fff;border:1px solid var(--line);border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,.1);
  padding:10px;display:none;z-index:50;
}
.header-search-form.is-open{display:flex;gap:8px;}
.header-search-form input[type="search"]{
  border:1px solid var(--line);border-radius:6px;padding:8px 10px;font-size:14px;width:220px;
}
.header-search-form button{
  background:var(--ink);color:#fff;border:none;border-radius:6px;padding:8px 14px;font-size:13px;font-weight:700;cursor:pointer;
}

/* ===== Category nav bar ===== */
.cat-navbar{border-bottom:1px solid var(--line);background:#fff;}
.cat-navbar .container{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.main-navigation{overflow-x:auto;}
.main-navigation ul{display:flex;gap:26px;padding:13px 0;}
.main-navigation a{
  font-size:14px;font-weight:700;color:var(--ink);white-space:nowrap;
}
.main-navigation a:hover{color:var(--blue);text-decoration:none;}

/* ===== Trending strip ===== */
.trending-strip{background:var(--bg-soft);border-bottom:1px solid var(--line);}
.trending-strip .container{display:flex;align-items:center;gap:10px;padding:10px 20px;overflow-x:auto;}
.trending-strip .t-label{
  font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.5px;
  color:#fff;background:var(--ink);padding:4px 9px;border-radius:3px;flex-shrink:0;
}
.trending-strip a{font-size:13px;font-weight:600;color:#33363b;white-space:nowrap;flex-shrink:0;}
.trending-strip a:hover{color:var(--blue);}
.trending-strip .dot{color:var(--line);flex-shrink:0;}

/* ===== Category Section (homepage) ===== */
.category-section{padding:38px 0;border-bottom:1px solid var(--line);}
.category-section:last-of-type{border-bottom:none;}
.cat-section-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:20px;}
.cat-section-head h2{font-size:24px;font-weight:800;}
.cat-section-head .more-link{font-size:13.5px;font-weight:700;color:var(--blue);white-space:nowrap;}

.hero-row{display:grid;grid-template-columns:1fr 1fr;gap:26px;margin-bottom:26px;}
.hero-card{display:block;}
.hero-card .hero-thumb{height:230px;background:var(--bg-soft);border-radius:2px;overflow:hidden;margin-bottom:14px;}
.hero-card .hero-thumb img{width:100%;height:100%;object-fit:cover;}
.hero-card .hero-thumb.placeholder{display:flex;align-items:center;justify-content:center;color:#c7c7c7;font-size:13px;}
.hero-eyebrow{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:var(--blue);margin-bottom:8px;display:block;}
.hero-card h3{font-size:20px;line-height:1.32;color:var(--ink);margin-bottom:8px;}
.hero-card:hover h3{color:var(--blue);}
.hero-card .hero-meta{font-size:12px;color:var(--muted);}

.list-columns{display:grid;grid-template-columns:1fr 1fr;gap:0 34px;}
.list-row{
  display:grid;grid-template-columns:1fr 76px;gap:14px;align-items:center;
  padding:15px 0;border-top:1px solid var(--line);
}
.list-row .list-thumb{width:76px;height:60px;background:var(--bg-soft);border-radius:2px;overflow:hidden;}
.list-row .list-thumb img{width:100%;height:100%;object-fit:cover;}
.list-row h4{font-size:14.5px;line-height:1.4;color:var(--ink);font-weight:700;}
.list-row:hover h4{color:var(--blue);}
.list-row .list-meta{font-size:11.5px;color:var(--muted);margin-top:5px;}
.no-posts{color:var(--muted);font-size:14px;padding:6px 0;}

/* ===== Generic post cards (single/category/index archives, sidebar widgets) ===== */
.posts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:22px;}
.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,.07);}
.post-card .post-thumb img{width:100%;height:170px;object-fit:cover;}
.post-card .post-thumb-placeholder{height:170px;background:var(--bg-soft);display:flex;align-items:center;justify-content:center;color:#c7c7c7;font-size:13px;}
.post-card-body{padding:16px 18px;flex:1;display:flex;flex-direction:column;}
.post-card-body .post-meta{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;margin-bottom:9px;}
.post-card-body h3{font-size:16.5px;line-height:1.4;margin-bottom:8px;}
.post-card-body h3 a{color:var(--ink);}
.post-card-body p{font-size:13px;color:var(--muted);flex:1;}
.read-more{margin-top:12px;font-size:12.5px;font-weight:700;}

/* ===== Categories grid (category.php fallback use) ===== */
.categories-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;}
.category-card{border:1px solid var(--line);border-radius:6px;padding:20px;text-align:center;}
.category-card .cat-icon{width:44px;height:44px;margin:0 auto 10px;border-radius:50%;background:var(--tag-bg);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;}

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

/* ===== Content + Sidebar layout ===== */
.content-layout{display:grid;grid-template-columns:1fr 300px;gap:34px;align-items:start;padding:30px 0;}
.main-content{min-width:0;}
.sidebar{display:flex;flex-direction:column;gap:22px;}
.widget{border:1px solid var(--line);border-radius:6px;padding:20px;}
.widget-title{font-size:14px;text-transform:uppercase;letter-spacing:.4px;color:var(--ink);margin-bottom:14px;padding-bottom:10px;border-bottom:2px solid var(--ink);font-weight:800;}
.widget-list li{padding:10px 0;border-bottom:1px solid #f1f1ef;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:700;}
.widget-list li a:hover{color:var(--blue);}
.widget-count{background:var(--tag-bg);color:var(--blue);font-size:11px;font-weight:700;padding:2px 9px;border-radius:20px;flex-shrink:0;}
.widget-list-posts li{align-items:flex-start;}
.widget-post-thumb{width:52px;height:52px;border-radius:4px;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:10.5px;color:var(--muted);}
.widget-empty{font-size:13px;color:var(--muted);}
@media (max-width:900px){.content-layout{grid-template-columns:1fr;}}

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

/* ===== Single / Page ===== */
.single-content, .page-content{padding:0;}
.single-content h1, .page-content h1{margin-bottom:14px;font-size:30px;line-height:1.25;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:16px;}

/* ===== 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:4px;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:26px 0;text-align:center;font-size:13px;color:var(--muted);background:var(--bg-soft);margin-top:10px;}
.site-footer a{color:var(--blue);}

/* ===== Responsive ===== */
@media (max-width:860px){
  .hero-row{grid-template-columns:1fr;}
  .list-columns{grid-template-columns:1fr;}
  .site-title{font-size:26px;}
}
