/*
 * SmallBusinessIdeas.in — Archive & Search Page CSS
 * Child theme of Astra. Loaded on archive and search pages only.
 *
 * Post-row styles (.sbi-post-row, .sbi-row-*, .sbi-new-pill,
 * .sbi-sb-*, .sbi-section-label) are duplicated from homepage.css
 * so this file is fully self-contained and doesn't depend on homepage.css.
 *
 * Palette: same as homepage.css
 * #1a1612  near-black
 * #8b1a1a  deep burgundy-red
 * #f5f3ef  cool off-white
 * #dedad4  borders
 * #9e9890  muted text
 * #12100e  dark header bg
 */

/* ─── Override Astra container on archive/search pages ─────── */
.archive .sbi-primary-override,
.search  .sbi-primary-override {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.archive .site-main,
.search  .site-main {
  padding: 0 !important;
  margin: 0 !important;
}

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

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

/* ─── Archive header ────────────────────────────────────────── */
.sbi-arc-header {
  background: #12100e;
  padding: 28px 32px 24px;
  position: relative;
  overflow: hidden;
}
.sbi-arc-header::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 100%;
  background: #8b1a1a;
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.sbi-arc-header-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
}
.sbi-arc-type {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8b1a1a;
  margin-bottom: 8px;
}
.sbi-arc-title {
  font-size: clamp(18px, 3vw, 26px);
  font-weight: normal;
  color: #f5f3ef;
  line-height: 1.3;
  margin: 0 0 8px !important;
  max-width: 600px;
}
.sbi-arc-desc {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #9e9890;
  line-height: 1.6;
  margin: 0 0 6px;
  max-width: 520px;
}
.sbi-arc-count {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #6b6560;
  margin: 0;
}

/* ─── Hide Astra's own breadcrumbs and page-title on archives ── */
.archive .ast-breadcrumbs-wrapper,
.archive .entry-header,
.archive .ast-above-post-title,
.archive .page-header,
.search  .ast-breadcrumbs-wrapper,
.search  .entry-header,
.search  .ast-above-post-title,
.search  .page-header {
  display: none !important;
}

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

/* ─── Search refine box (search.php only) ───────────────────── */
.sbi-arc-search-form {
  display: flex;
  margin-bottom: 24px;
  max-width: 480px;
}
.sbi-arc-search-input {
  flex: 1;
  padding: 9px 14px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  background: #fff;
  border: 1px solid #dedad4;
  border-right: none;
  color: #1a1612;
  outline: none;
  min-width: 0;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.sbi-arc-search-input:focus {
  border-color: #8b1a1a;
  box-shadow: none !important;
}
.sbi-arc-search-btn {
  padding: 9px 20px;
  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-arc-search-btn:hover { background: #a82020; }

/* ─── Post list (identical to homepage) ─────────────────────── */
.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; }

.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; }

.sbi-new-pill {
  display: none;    /* removed per site decision */
}

.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;
}

/* ─── Pagination ────────────────────────────────────────────── */
.sbi-arc-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #dedad4;
  align-items: center;
}
.sbi-arc-pagination a,
.sbi-arc-pagination span {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid #dedad4;
  color: #3a3530;
  background: #fff;
  display: inline-block;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.sbi-arc-pagination a:hover {
  border-color: #8b1a1a;
  color: #8b1a1a;
}
.sbi-arc-pagination .current {
  background: #8b1a1a;
  border-color: #8b1a1a;
  color: #f5f3ef;
}
.sbi-arc-pagination .dots {
  border: none;
  background: none;
  color: #9e9890;
  padding: 6px 4px;
}

/* ─── Empty state ───────────────────────────────────────────── */
.sbi-arc-empty {
  padding: 32px 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #6b6560;
  line-height: 1.7;
}
.sbi-arc-empty p { margin: 0 0 10px; }
.sbi-arc-empty a {
  color: #8b1a1a;
  font-size: 13px;
}
.sbi-arc-empty a:hover { color: #a82020; }

/* ─── Sidebar (shared with homepage sidebar styles) ─────────── */
.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;
}

/* ─── Mobile ────────────────────────────────────────────────── */
@media ( max-width: 768px ) {
  .sbi-arc-header { padding: 20px 16px 18px; }
  .sbi-arc-header::after { display: none; }
  .sbi-arc-body {
    flex-direction: column;
    padding: 20px 16px 32px;
  }
  .sbi-arc-main {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid #dedad4;
    padding-bottom: 28px;
    margin-bottom: 28px;
  }
  .sbi-arc-sidebar { width: 100%; padding-left: 0; }
  /* Hide date on mobile — save space */
  .sbi-row-meta { display: none; }
  .sbi-row-title { margin: 0 !important; }
}

/* Thumbnails hidden only below 360px */
@media ( max-width: 359px ) {
  .sbi-row-thumb-link,
  .sbi-row-no-thumb { display: none; }
}
