/*
Theme Name: BusinessToMark
Theme URI: https://www.businesstomark.com
Author: BusinessToMark
Description: Custom news-style WordPress theme for BusinessToMark. Homepage and navigation are restricted to seven fixed categories (Business News, Tech Review, Business Legal & Compliance, Startup & Entrepreneurship, Digital Marketing, Leadership & Management, E-commerce & Online Business). Includes a Yahoo-News-style hero, an AJAX "load more" latest-posts grid capped at 20 posts, sponsor/ad widget areas, and AJAX-loaded related posts on single articles.
Version: 1.0
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: businesstomark
*/

:root{
  --btm-purple:#6001d2;
  --btm-text:#111318;
  --btm-muted:#5b6270;
  --btm-border:#e6e8ec;
  --btm-bg:#f7f7f8;
  --btm-white:#ffffff;
  --btm-red:#e0004d;
}

*{box-sizing:border-box;}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--btm-text);
  background:var(--btm-bg);
}
a{color:inherit;text-decoration:none;}
a:hover{text-decoration:underline;}
img{max-width:100%;display:block;}
.container{max-width:1240px;margin:0 auto;padding:0 20px;}

/* ---------- Header ---------- */
.btm-header{background:var(--btm-white);border-bottom:1px solid var(--btm-border);position:sticky;top:0;z-index:50;}
.btm-header-inner{display:flex;align-items:center;gap:24px;padding:14px 0;}
.btm-logo{font-size:22px;font-weight:800;color:var(--btm-purple);white-space:nowrap;}
.btm-search{flex:1;display:flex;align-items:center;background:var(--btm-bg);border:1px solid var(--btm-border);border-radius:24px;padding:8px 16px;max-width:480px;}
.btm-search input{border:0;background:transparent;outline:0;flex:1;font-size:14px;}
.btm-search button{border:0;background:var(--btm-purple);color:#fff;width:32px;height:32px;border-radius:50%;cursor:pointer;}

.btm-nav{display:flex;flex-wrap:wrap;row-gap:8px;gap:22px;padding:12px 0;border-top:1px solid var(--btm-border);}
.btm-nav a{font-weight:600;font-size:14px;white-space:nowrap;color:var(--btm-text);padding:4px 0;}
.btm-nav a:hover{color:var(--btm-purple);text-decoration:none;border-bottom:2px solid var(--btm-purple);}
.btm-nav a.btm-nav-contact{color:var(--btm-purple);}
@media(max-width:640px){
  .btm-nav{gap:14px;}
}

/* ---------- Hero ---------- */
.btm-hero{display:grid;grid-template-columns:2fr 1fr;gap:20px;margin:20px 0;}
.btm-hero-main{background:#fff;border:1px solid var(--btm-border);border-radius:8px;overflow:hidden;display:grid;grid-template-columns:1.1fr 1fr;}
.btm-hero-main img{width:100%;height:100%;object-fit:cover;min-height:260px;}
.btm-hero-main-body{padding:22px;display:flex;flex-direction:column;justify-content:center;}
.btm-cat-pill{display:inline-block;background:var(--btm-purple);color:#fff;font-size:11px;font-weight:700;padding:3px 10px;border-radius:12px;text-transform:uppercase;letter-spacing:.04em;margin-bottom:10px;width:fit-content;}
.btm-hero-main-body h1{font-size:26px;line-height:1.25;margin:0 0 10px;}
.btm-hero-main-body p{color:var(--btm-muted);font-size:14px;line-height:1.5;margin:0 0 12px;}
.btm-byline{font-size:12px;color:var(--btm-muted);}

.btm-ad-slot{background:#fff;border:1px dashed #c9cdd6;border-radius:8px;display:flex;align-items:center;justify-content:center;min-height:260px;color:#9aa0ab;font-size:13px;text-align:center;padding:16px;}
.btm-ad-slot .widget{width:100%;}

.btm-hero-sub{display:grid;grid-template-columns:repeat(5,1fr);gap:16px;margin-top:18px;}
.btm-hero-sub-item img{width:100%;height:110px;object-fit:cover;border-radius:6px;margin-bottom:8px;}
.btm-hero-sub-item h4{font-size:13.5px;line-height:1.35;margin:0 0 6px;}
.btm-hero-sub-item .btm-source{font-size:11px;color:var(--btm-muted);}

/* ---------- Section layout ---------- */
.btm-section-title{display:flex;align-items:center;gap:8px;font-size:18px;font-weight:800;margin:34px 0 16px;}
.btm-main-grid{display:grid;grid-template-columns:2.3fr 1fr;gap:24px;align-items:start;}

.btm-post-list{display:flex;flex-direction:column;gap:0;}
.btm-post-row{display:flex;gap:16px;padding:18px 0;border-bottom:1px solid var(--btm-border);}
.btm-post-row img{width:220px;height:130px;object-fit:cover;border-radius:6px;flex-shrink:0;}
.btm-post-row-body{flex:1;}
.btm-post-row-body .btm-cat-tag{font-size:11px;font-weight:700;color:var(--btm-purple);text-transform:uppercase;letter-spacing:.03em;}
.btm-post-row-body h3{font-size:18px;line-height:1.3;margin:6px 0 8px;}
.btm-post-row-body p{font-size:13.5px;color:var(--btm-muted);margin:0 0 8px;line-height:1.5;}
.btm-meta{font-size:12px;color:var(--btm-muted);}

.btm-loadmore-wrap{text-align:center;margin:26px 0;}
.btm-loadmore{background:var(--btm-purple);color:#fff;border:0;padding:12px 30px;border-radius:24px;font-weight:700;font-size:14px;cursor:pointer;}
.btm-loadmore:hover{opacity:.9;}
.btm-loadmore[disabled]{opacity:.5;cursor:default;}
.btm-loadmore-msg{font-size:13px;color:var(--btm-muted);margin-top:8px;}

/* ---------- Sidebar (used on home + single) ---------- */
.btm-sidebar > *{margin-bottom:22px;}
.btm-widget{background:#fff;border:1px solid var(--btm-border);border-radius:8px;padding:18px;}
.btm-widget h3{font-size:15px;font-weight:800;margin:0 0 14px;}
.btm-sidebar-post{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid var(--btm-border);}
.btm-sidebar-post:last-child{border-bottom:0;}
.btm-sidebar-post img{width:70px;height:56px;object-fit:cover;border-radius:5px;flex-shrink:0;}
.btm-sidebar-post h4{font-size:13px;line-height:1.35;margin:0;}
.btm-cat-list a{display:block;padding:8px 0;border-bottom:1px solid var(--btm-border);font-size:13.5px;font-weight:600;}
.btm-cat-list a:last-child{border-bottom:0;}

/* ---------- Single article ---------- */
.btm-article-wrap{display:grid;grid-template-columns:2.3fr 1fr;gap:24px;align-items:start;margin:24px 0;}
.btm-article{background:#fff;border:1px solid var(--btm-border);border-radius:8px;padding:26px;}
.btm-article .btm-cat-pill{margin-bottom:12px;}
.btm-article h1{font-size:30px;line-height:1.3;margin:0 0 12px;}
.btm-article .btm-byline{margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid var(--btm-border);}
.btm-article-body{font-size:16px;line-height:1.75;color:#242731;}
.btm-article-body p{margin:0 0 18px;}
.btm-article-body img{border-radius:6px;margin:18px 0;}
.btm-article-thumb{width:100%;height:auto;border-radius:6px;margin-bottom:18px;}

.btm-related{margin-top:34px;padding-top:24px;border-top:1px solid var(--btm-border);}
.btm-related h2{font-size:18px;font-weight:800;margin:0 0 16px;}
.btm-related-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;}
.btm-related-item img{width:100%;height:120px;object-fit:cover;border-radius:6px;margin-bottom:8px;}
.btm-related-item .btm-cat-tag{font-size:10.5px;font-weight:700;color:var(--btm-purple);text-transform:uppercase;}
.btm-related-item h4{font-size:13.5px;line-height:1.35;margin:5px 0 0;}
.btm-related-loadmore-wrap{text-align:center;margin-top:18px;}

/* ---------- Footer ---------- */
.btm-footer{background:#14161c;color:#c7c9d1;margin-top:50px;padding:40px 0 26px;}
.btm-footer .container{display:flex;justify-content:space-between;flex-wrap:wrap;gap:20px;}
.btm-footer a{color:#c7c9d1;}
.btm-footer-cats{display:flex;gap:16px;flex-wrap:wrap;font-size:13px;}
.btm-footer-bottom{text-align:center;font-size:12px;color:#7c7f8a;margin-top:24px;}

/* ---------- Responsive ---------- */
@media(max-width:900px){
  .btm-hero{grid-template-columns:1fr;}
  .btm-hero-main{grid-template-columns:1fr;}
  .btm-hero-sub{grid-template-columns:repeat(2,1fr);}
  .btm-main-grid,.btm-article-wrap{grid-template-columns:1fr;}
  .btm-post-row{flex-direction:column;}
  .btm-post-row img{width:100%;height:180px;}
  .btm-related-grid{grid-template-columns:1fr;}
}
