/*
Theme Name: Business To Mark - Insider Pro
Theme URI: https://businesstomark.com
Author: BusinessToMark
Author URI: https://businesstomark.com
Description: Business Insider-style theme for BusinessToMark.com. Homepage shows exactly 6 fixed categories in order (Business Review, Tech Review, Business Legal & Compliance, AI Technology, Digital Marketing, Startup & Entrepreneurship), each with its own posts only (max 10). Sidebar has a tabbed "Latest" widget plus a Banner Ad widget area. Single posts show a sidebar with Latest Posts & Categories. Multi-column footer included.
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;
  --red:#d0011b;
  --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:1220px;margin:0 auto;padding:0 20px;}

/* ===== Masthead ===== */
.masthead{border-bottom:1px solid var(--line);padding:16px 0 12px;}
.masthead .container{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;}
.site-title{font-size:30px;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);}
.masthead-actions{display:flex;align-items:center;gap:14px;}
.search-toggle-wrap{position:relative;}
.search-toggle-btn{background:none;border:none;cursor:pointer;width:36px;height:36px;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:44px;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:210px;}
.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;}
.main-navigation{overflow-x:auto;}
.main-navigation ul{display:flex;gap:24px;padding:12px 0;}
.main-navigation a{font-size:13.5px;font-weight:700;color:var(--ink);white-space:nowrap;}
.main-navigation a:hover{color:var(--blue);text-decoration:none;}

/* ===== Ticker strip (top 4 headlines) ===== */
.ticker-strip{background:var(--bg-soft);border-bottom:1px solid var(--line);}
.ticker-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0;padding:16px 20px;}
.ticker-item{padding:0 18px;border-left:1px solid var(--line);}
.ticker-item:first-child{border-left:none;padding-left:0;}
.ticker-eyebrow{display:block;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:var(--muted);margin-bottom:6px;}
.ticker-title{display:block;font-size:13.5px;font-weight:700;color:var(--ink);line-height:1.4;}
.ticker-item:hover .ticker-title{color:var(--blue);}

/* ===== Homepage layout ===== */
.insider-layout{display:grid;grid-template-columns:1fr 320px;gap:34px;align-items:start;padding:30px 0 10px;}
.main-content{min-width:0;}

/* ===== Category block ===== */
.category-block{padding-bottom:36px;margin-bottom:36px;border-bottom:1px solid var(--line);}
.category-block:last-child{border-bottom:none;}
.block-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:16px;}
.block-head h2{font-size:22px;font-weight:800;position:relative;padding-bottom:8px;}
.block-head h2::after{content:"";position:absolute;left:0;bottom:0;width:36px;height:3px;background:var(--red);}
.block-head .more-link{font-size:13px;font-weight:700;color:var(--blue);white-space:nowrap;}

.block-top{display:grid;grid-template-columns:1.3fr 1fr;gap:28px;margin-bottom:20px;}
.hero-card{display:block;}
.hero-thumb{height:260px;background:var(--bg-soft);border-radius:2px;overflow:hidden;margin-bottom:12px;}
.hero-thumb img{width:100%;height:100%;object-fit:cover;}
.hero-thumb.placeholder{display:flex;align-items:center;justify-content:center;color:#c7c7c7;font-size:13px;}
.hero-card h3{font-size:20px;line-height:1.32;color:var(--ink);margin-bottom:6px;}
.hero-card:hover h3{color:var(--blue);}
.hero-meta{font-size:11.5px;color:var(--muted);text-transform:uppercase;font-weight:700;}

.side-list{display:flex;flex-direction:column;}
.list-row{display:grid;grid-template-columns:1fr 76px;gap:14px;align-items:center;padding:13px 0;border-top:1px solid var(--line);}
.side-list .list-row:first-child{border-top:none;}
.list-thumb{width:76px;height:58px;background:var(--bg-soft);border-radius:2px;overflow:hidden;}
.list-thumb img{width:100%;height:100%;object-fit:cover;}
.list-row h4{font-size:14px;line-height:1.4;color:var(--ink);font-weight:700;}
.list-row:hover h4{color:var(--blue);}
.list-meta{font-size:11px;color:var(--muted);text-transform:uppercase;font-weight:700;margin-top:4px;}

.block-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;}
.grid-card{display:block;}
.grid-thumb{height:140px;background:var(--bg-soft);border-radius:2px;overflow:hidden;margin-bottom:10px;}
.grid-thumb img{width:100%;height:100%;object-fit:cover;}
.grid-thumb.placeholder{display:flex;align-items:center;justify-content:center;color:#c7c7c7;font-size:12px;}
.grid-card h4{font-size:14.5px;line-height:1.4;color:var(--ink);font-weight:700;margin-bottom:6px;}
.grid-card:hover h4{color:var(--blue);}
.grid-meta{font-size:11px;color:var(--muted);text-transform:uppercase;font-weight:700;}
.no-posts{color:var(--muted);padding:16px 0;}

/* ===== Sidebar (homepage): tabbed Latest + Banner Ad ===== */
.sidebar-home{display:flex;flex-direction:column;gap:22px;position:sticky;top:16px;}
.widget{border:1px solid var(--line);border-radius:8px;padding:18px;}
.widget-title{font-size:16px;font-weight:800;margin-bottom:14px;padding-bottom:10px;border-bottom:2px solid var(--red);}
.latest-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 6px;}
.tab-btn{font-size:11.5px;font-weight:700;padding:6px 12px;border-radius:20px;border:1px solid var(--line);background:#fff;color:#444;cursor:pointer;}
.tab-btn.is-active{background:var(--ink);color:#fff;border-color:var(--ink);}
.latest-panel{display:none;}
.latest-panel.is-active{display:block;}
.latest-list li{padding:11px 0;border-top:1px dotted var(--line);}
.latest-list li:first-child{border-top:none;}
.latest-time{display:block;font-size:10.5px;color:var(--red);font-weight:700;margin-bottom:4px;}
.latest-list li a{font-size:13.5px;font-weight:600;color:var(--ink);line-height:1.4;}
.latest-list li a:hover{color:var(--blue);}
.widget-empty{font-size:13px;color:var(--muted);}

.widget-banner-ad{text-align:center;background:var(--bg-soft);}
.widget-banner-ad img{margin:0 auto;border-radius:4px;}
.widget-banner-placeholder .widget-empty{font-size:12.5px;line-height:1.6;}

/* ===== Single post / page content-layout (with regular sidebar) ===== */
.content-layout{display:grid;grid-template-columns:1fr 300px;gap:34px;align-items:start;padding:30px 0;}
.sidebar{display:flex;flex-direction:column;gap:22px;}
.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);}
@media (max-width:1024px){.insider-layout{grid-template-columns:1fr;}.sidebar-home{position:static;}}
@media (max-width:900px){.content-layout{grid-template-columns:1fr;}}

/* ===== Generic post cards (related posts, category.php, index.php) ===== */
.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;}

/* ===== Related posts on single ===== */
.related-posts-wrap{margin-top:40px;}
.related-posts-wrap .section-title{font-size:19px;font-weight:800;margin-bottom:18px;}

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

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

/* ===== Pagination ===== */
.pagination{margin-top:24px;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 (multi-column, Business Insider style) ===== */
.site-footer-pro{background:var(--bg-soft);border-top:1px solid var(--line);margin-top:20px;padding:40px 0 0;}
.footer-top{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:30px;padding-bottom:30px;border-bottom:1px solid var(--line);}
.footer-logo{font-size:20px;font-weight:900;text-transform:uppercase;margin-bottom:10px;}
.footer-col h5{font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);margin-bottom:14px;}
.footer-col ul li{margin-bottom:10px;}
.footer-col ul li a{font-size:13.5px;color:#33363b;}
.footer-col ul li a:hover{color:var(--blue);}
.footer-bottom{padding:18px 0;text-align:center;font-size:12.5px;color:var(--muted);}
@media (max-width:820px){.footer-top{grid-template-columns:1fr 1fr;}}

/* ===== Responsive ===== */
@media (max-width:900px){
  .block-top{grid-template-columns:1fr;}
  .block-grid{grid-template-columns:repeat(2,1fr);}
  .ticker-grid{grid-template-columns:1fr 1fr;}
}
@media (max-width:600px){
  .block-grid{grid-template-columns:1fr;}
  .ticker-grid{grid-template-columns:1fr;}
  .ticker-item{border-left:none;border-top:1px solid var(--line);padding:12px 0 0;margin-top:12px;}
  .ticker-item:first-child{border-top:none;margin-top:0;padding-top:0;}
  .site-title{font-size:24px;}
}
