/*
 * SmallBusinessIdeas.in — Custom Homepage CSS (v2)
 * Child theme of Astra. Loaded on front page only.
 *
 * Palette
 * #1a1612  near-black (body, headings)
 * #8b1a1a  deep burgundy-red (accent)
 * #f5f3ef  cool off-white (page bg)
 * #dedad4  borders / dividers
 * #9e9890  secondary / muted text
 * #12100e  hero background
 */

/* ─── Override Astra's container on front page only ────────── */
.home .sbi-primary-override {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.home .site-main {
  padding: 0 !important;
  margin: 0 !important;
}

/* ─── Base scope ────────────────────────────────────────────── */
.sbi-home-wrap *,
.sbi-home-wrap *::before,
.sbi-home-wrap *::after {
  box-sizing: border-box;
}
.sbi-home-wrap {
  font-family: Georgia, 'Times New Roman', serif;
  color: #1a1612;
  background: #f5f3ef;
  width: 100%;
}
.sbi-home-wrap a {
  text-decoration: none;
  color: inherit;
}
.sbi-home-wrap h1,
.sbi-home-wrap h2,
.sbi-home-wrap h3 {
  margin: 0;
  padding: 0;
}

/* ─── FIX #2: Override Astra's blue link colour on titles ──── */
.sbi-feat-title a,
.sbi-row-title a {
  color: #1a1612 !important;
  text-decoration: none !important;
}
.sbi-feat-title a:hover,
.sbi-row-title a:hover {
  color: #8b1a1a !important;
}

/* ─── Hero ──────────────────────────────────────────────────── */
.sbi-hero {
  background: #12100e;
  padding: 36px 32px 32px;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.sbi-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 180px;
  height: 100%;
  background: #8b1a1a;
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.sbi-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
}
.sbi-hero-kicker {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8b1a1a;
  margin: 0 0 10px;
}
.sbi-hero-h1 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: normal;
  color: #f5f3ef;
  line-height: 1.3;
  margin: 0 0 10px;
}
.sbi-hero-sub {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #9e9890;
  line-height: 1.65;
  margin: 0 0 20px;
  max-width: 480px;
}
.sbi-search-form {
  display: flex;
  max-width: 500px;
}
.sbi-search-input {
  flex: 1;
  padding: 10px 14px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  background: #2a2520;
  border: none;
  color: #f5f3ef;
  outline: none;
  min-width: 0;
  border-radius: 0 !important;
  box-shadow: none !important;
  height: auto !important;
}
.sbi-search-input::placeholder { color: #6b6560; }
.sbi-search-input:focus {
  background: #332e28;
  box-shadow: none !important;
}
.sbi-search-btn {
  padding: 10px 22px;
  background: #8b1a1a;
  color: #f5f3ef;
  border: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 0 !important;
}
.sbi-search-btn:hover,
.sbi-search-btn:focus { background: #a82020; }

/* ─── ADD #4: Trust strip ───────────────────────────────────── */
.sbi-trust-strip {
  background: #1e1b17;
  border-bottom: 1px solid #2e2b26;
  padding: 10px 32px;
}
.sbi-trust-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.sbi-trust-item {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #9e9890;
}
.sbi-trust-num {
  color: #c8a882;
  font-weight: bold;
}
.sbi-trust-sep {
  color: #3e3b36;
  font-size: 14px;
}

/* ─── Category strip ────────────────────────────────────────── */
.sbi-cat-strip {
  background: #ffffff;
  border-bottom: 1px solid #dedad4;
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 32px;
  white-space: nowrap;
}
.sbi-cat-strip::-webkit-scrollbar { display: none; }
.sbi-cat-link {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #6b6560;
  padding: 11px 14px 10px;
  border-bottom: 2px solid transparent;
  flex-shrink: 0;
  transition: color 0.1s, border-color 0.1s;
}
.sbi-cat-link:hover,
.sbi-cat-link:focus {
  color: #8b1a1a;
  border-bottom-color: #8b1a1a;
}

/* ─── Content area ──────────────────────────────────────────── */
.sbi-content-area {
  display: flex;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 32px 48px;
}
.sbi-main {
  flex: 1;
  min-width: 0;
  padding-right: 28px;
  border-right: 1px solid #dedad4;
}
.sbi-sidebar {
  width: 220px;
  flex-shrink: 0;
  padding-left: 24px;
}

/* ─── Featured 2-up grid ────────────────────────────────────── */
.sbi-featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #dedad4;
  border: 1px solid #dedad4;
  margin-bottom: 28px;
}
.sbi-feat-card {
  background: #ffffff;
  display: flex;
  flex-direction: column;
}
.sbi-feat-thumb-link {
  display: block;
  overflow: hidden;
  line-height: 0;
}
.sbi-feat-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}
.sbi-feat-thumb-link:hover .sbi-feat-thumb { opacity: 0.88; }
.sbi-feat-body {
  padding: 14px 16px 18px;
  flex: 1;
}
.sbi-feat-cat {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #8b1a1a;
  display: block;
  margin-bottom: 6px;
}
.sbi-feat-cat:hover { color: #a82020; }
.sbi-feat-title {
  font-size: 16px;
  font-weight: normal;
  line-height: 1.4;
  margin: 0 0 8px !important;
}
.sbi-feat-meta {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: #9e9890;
  margin: 0;
}

/* ─── ADD #3: Topic hub tiles ───────────────────────────────── */
.sbi-hubs-wrap {
  margin-bottom: 8px;
}
.sbi-hubs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.sbi-hub-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 8px 12px;
  background: #ffffff;
  border: 1px solid #dedad4;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.sbi-hub-tile:hover {
  border-color: #8b1a1a;
  background: #fff8f8;
}
.sbi-hub-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 6px;
  display: block;
}
.sbi-hub-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #1a1612;
  display: block;
  margin-bottom: 3px;
}
.sbi-hub-tile:hover .sbi-hub-label { color: #8b1a1a; }
.sbi-hub-count {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  color: #9e9890;
  display: block;
}

/* ─── Section header row (label + optional inline view-all) ─── */
.sbi-section-hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 2px solid #8b1a1a;
  margin-bottom: 16px;
  padding-bottom: 5px;
}
.sbi-section-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8b1a1a;
  display: inline-block;
  /* no border-bottom here — it's on .sbi-section-hd now */
}
.sbi-section-viewall {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: #8b1a1a;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: color 0.1s;
}
.sbi-section-viewall:hover { color: #a82020; }

/* ─── Hub groups (Browse by Topic — one group per parent cat) ── */
.sbi-hub-group {
  margin-bottom: 16px;
}
.sbi-hub-group:last-child { margin-bottom: 0; }
.sbi-hub-group-label {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #9e9890;
  margin-bottom: 8px;
}

/* ─── Post list ─────────────────────────────────────────────── */
.sbi-post-list {
  display: flex;
  flex-direction: column;
}
.sbi-post-row {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #dedad4;
  align-items: flex-start;
}
.sbi-post-row:last-child { border-bottom: none; }
.sbi-row-thumb-link {
  flex-shrink: 0;
  display: block;
  width: 96px;
  height: 64px;
  overflow: hidden;
  line-height: 0;
}
.sbi-row-thumb {
  width: 96px;
  height: 64px;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}
.sbi-row-thumb-link:hover .sbi-row-thumb { opacity: 0.85; }
.sbi-row-no-thumb {
  flex-shrink: 0;
  width: 96px;
  height: 64px;
  background: #dedad4;
}
.sbi-row-info { flex: 1; min-width: 0; }

/* ─── Meta top row (category + New pill) ────────────────────── */
.sbi-row-meta-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.sbi-row-cat {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8b1a1a;
}
.sbi-row-cat:hover { color: #a82020; }

/* ─── ADD #5: New pill ──────────────────────────────────────── */
.sbi-new-pill {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #8b1a1a;
  color: #f5f3ef;
  padding: 2px 6px;
  line-height: 1.4;
  vertical-align: middle;
}

.sbi-row-title {
  font-size: 15px;
  font-weight: normal;
  line-height: 1.4;
  margin: 0 0 5px !important;
}
.sbi-row-meta {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: #9e9890;
  margin: 0;
}

/* ─── View all button ───────────────────────────────────────── */
.sbi-viewall {
  text-align: center;
  padding: 20px 0 4px;
}
.sbi-viewall a {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #8b1a1a;
  border: 1px solid #8b1a1a;
  padding: 8px 24px;
  display: inline-block;
  letter-spacing: 0.5px;
  transition: background 0.15s, color 0.15s;
}
.sbi-viewall a:hover {
  background: #8b1a1a;
  color: #f5f3ef;
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.sbi-sb-banner {
  background: #12100e;
  padding: 16px;
  margin-bottom: 20px;
  border-left: 4px solid #8b1a1a;
}
.sbi-sb-banner-title {
  font-size: 14px;
  color: #f5f3ef;
  line-height: 1.4;
  font-weight: normal;
  margin: 0 0 5px;
}
.sbi-sb-banner-sub {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: #9e9890;
  margin: 0;
}
.sbi-sb-box {
  background: #ffffff;
  border: 1px solid #dedad4;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.sbi-sb-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #1a1612;
  border-bottom: 1px solid #dedad4;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.sbi-sb-cat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #f0ece6;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #3a3530;
  transition: color 0.1s;
}
.sbi-sb-cat-row:last-child { border-bottom: none; }
.sbi-sb-cat-row:hover { color: #8b1a1a; }
.sbi-sb-count {
  font-size: 11px;
  color: #8b1a1a;
  min-width: 20px;
  text-align: right;
}
.sbi-sb-pop-row {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #3a3530;
  padding: 7px 0;
  border-bottom: 1px solid #f0ece6;
  line-height: 1.4;
  transition: color 0.1s;
}
.sbi-sb-pop-row:last-child { border-bottom: none; }
.sbi-sb-pop-row:hover { color: #8b1a1a; }

/* ─── Astra: hide breadcrumbs / page title on front page ─────── */
.home .ast-breadcrumbs-wrapper,
.home .entry-header.ast-no-thumbnail,
.home .ast-above-post-title,
.home .page-header {
  display: none !important;
}

/* ─── Mobile ────────────────────────────────────────────────── */
@media ( max-width: 768px ) {
  .sbi-hero { padding: 24px 18px; }
  .sbi-hero::after { display: none; }
  .sbi-trust-strip { padding: 10px 16px; }
  .sbi-trust-sep { display: none; }
  .sbi-cat-strip { padding: 0 16px; }
  .sbi-content-area {
    flex-direction: column;
    padding: 20px 16px 32px;
  }
  .sbi-main {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid #dedad4;
    padding-bottom: 28px;
    margin-bottom: 28px;
  }
  .sbi-sidebar { width: 100%; padding-left: 0; }
  .sbi-hubs-grid { grid-template-columns: repeat(4, 1fr); }
}

@media ( max-width: 600px ) {
  .sbi-featured-grid { grid-template-columns: 1fr; }
  .sbi-feat-thumb { height: 180px; }
  .sbi-search-form { flex-direction: column; }
  .sbi-search-btn { padding: 10px; text-align: center; }
  .sbi-hubs-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .sbi-hub-tile { padding: 10px 4px 8px; }
  .sbi-hub-icon { font-size: 16px; }
  .sbi-hub-label { font-size: 10px; }
  .sbi-hub-count { display: none; }
}

@media ( max-width: 400px ) {
  .sbi-row-thumb-link,
  .sbi-row-no-thumb { display: none; }
  .sbi-hubs-grid { grid-template-columns: repeat(4, 1fr); }
}
