/* ============================================================
   BlackHatSEO.in Blog — article & listing styles
   Loaded only on /blog/ pages, after style.css
   ============================================================ */

/* ---------- Post header meta ---------- */
.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--silver-lo);
}
.post-meta-row .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.post-meta-row svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cat-chip {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 106, 0, 0.10);
  border: 1px solid rgba(255, 106, 0, 0.4);
  color: var(--orange-bright);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Article layout ---------- */
.post-wrap {
  max-width: 800px;
  margin: 0 auto;
}
.post-body { font-size: 1rem; }
.post-body > p:first-child { font-size: 1.05rem; color: var(--text); }
.post-body p { color: var(--body-text); margin-bottom: 17px; }
.post-body strong { color: var(--text); }
.post-body h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  margin: 42px 0 16px;
  padding-top: 6px;
}
.post-body h3 {
  font-size: 1.12rem;
  margin: 26px 0 10px;
  color: var(--silver-mid);
}
.post-body ul,
.post-body ol {
  margin: 0 0 20px;
  padding-left: 0;
}
.post-body ul li {
  position: relative;
  list-style: none;
  padding-left: 28px;
  margin-bottom: 10px;
  color: var(--body-text);
}
.post-body ul li::before {
  content: "\25B8";
  position: absolute;
  left: 2px;
  color: var(--orange);
  font-weight: 800;
}
.post-body ol { counter-reset: oli; }
.post-body ol li {
  list-style: none;
  counter-increment: oli;
  position: relative;
  padding-left: 40px;
  margin-bottom: 12px;
  color: var(--body-text);
}
.post-body ol li::before {
  content: counter(oli);
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 106, 0, 0.12);
  border: 1px solid rgba(255, 106, 0, 0.4);
  color: var(--orange-bright);
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
}
.post-body img { border-radius: 12px; margin: 8px auto 20px; }

/* Inline text links inside articles */
.post-body p a,
.post-body li a,
.post-body td a {
  color: var(--orange-bright);
  font-weight: 600;
  border-bottom: 1px dotted rgba(255, 140, 26, 0.5);
}
.post-body p a:hover,
.post-body li a:hover,
.post-body td a:hover { border-bottom-style: solid; }

/* ---------- Callout boxes ---------- */
.quick-answer,
.key-takeaways {
  background: linear-gradient(135deg, rgba(255, 106, 0, 0.09), rgba(18, 18, 22, 0.85) 55%);
  border: 1px solid rgba(255, 106, 0, 0.35);
  border-left: 4px solid var(--orange);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 26px 0;
}
.quick-answer p { margin-bottom: 0 !important; }
.key-takeaways { border-left-color: var(--wa-green); background: linear-gradient(135deg, rgba(37, 211, 102, 0.07), rgba(18, 18, 22, 0.85) 55%); border-color: rgba(37, 211, 102, 0.3); }
.key-takeaways h2 { margin-top: 0 !important; font-size: 1.15rem !important; color: var(--wa-green); }
.key-takeaways ul { margin-bottom: 0 !important; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 24px 0;
  -webkit-overflow-scrolling: touch;
}
.post-body table.compare { margin: 0; min-width: 560px; }

/* ---------- TOC ---------- */
.toc-box {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 30px 0;
}
.toc-box .toc-title {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-bright);
  margin-bottom: 12px;
}
.toc-box ol {
  margin: 0;
  columns: 2;
  column-gap: 34px;
}
.toc-box ol li {
  list-style: none;
  counter-increment: toci;
  position: relative;
  padding-left: 30px;
  margin-bottom: 9px;
  break-inside: avoid;
}
.toc-box ol li::before {
  content: counter(toci, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--silver-dim);
  letter-spacing: 0.04em;
}
.toc-box ol li a { color: var(--silver-mid); font-size: 0.92rem; font-weight: 600; }
.toc-box ol li a:hover { color: var(--orange-bright); }

/* ---------- Author strip ---------- */
.post-author-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 800px;
  margin: 44px auto 0;
  padding: 20px 24px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.post-author-strip .avatar-sm {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: #140800;
  background: linear-gradient(135deg, var(--silver-hi), var(--silver-lo));
  box-shadow: 0 0 0 2px rgba(255, 106, 0, 0.55);
}
.post-author-strip b { display: block; color: var(--text); font-size: 0.95rem; }
.post-author-strip span { color: var(--muted); font-size: 0.83rem; }

/* ---------- Prev / Next ---------- */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 800px;
  margin: 26px auto 0;
}
.post-nav a {
  display: block;
  padding: 18px 20px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.post-nav a:hover { border-color: rgba(255, 106, 0, 0.55); transform: translateY(-2px); }
.post-nav .pn-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver-lo);
  margin-bottom: 7px;
}
.post-nav .pn-title { color: var(--silver-mid); font-size: 0.9rem; font-weight: 600; line-height: 1.45; }
.post-nav a:hover .pn-title { color: var(--orange-bright); }
.post-nav .next { text-align: right; }

/* ---------- Blog index ---------- */
.chip-bar {
  position: sticky;
  top: 69px;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  padding: 14px 18px;
  margin-bottom: 10px;
  background: rgba(6, 6, 7, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.chip-bar a {
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--silver-mid);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.chip-bar a:hover {
  border-color: rgba(255, 106, 0, 0.55);
  color: var(--orange-bright);
  background: rgba(255, 106, 0, 0.08);
}
.chip-bar a .n {
  color: var(--silver-dim);
  font-size: 0.68rem;
  margin-left: 4px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--card) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.post-card:hover {
  border-color: rgba(255, 106, 0, 0.55);
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 106, 0, 0.08);
}
.post-card .pc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
  font-size: 0.72rem;
  color: var(--silver-lo);
}
.post-card .pc-cat {
  color: var(--orange-bright);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
}
.post-card h3 { font-size: 1.02rem; line-height: 1.42; margin-bottom: 10px; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--orange-bright); }
.post-card p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .pc-link {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--orange-bright);
}

.cat-section { padding-top: 8px; }
.cat-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 26px;
}
.cat-head h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.cat-head .count {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--orange-bright);
  background: rgba(255, 106, 0, 0.10);
  border: 1px solid rgba(255, 106, 0, 0.35);
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.featured-grid { margin-bottom: 64px; }

/* ---------- Responsive ---------- */

/* Mobile hardening */
.post-body,
.post-card h3,
.toc-box ol li a,
.pn-title {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.post-body table.compare { min-width: 560px; } /* scrolls inside .table-wrap on phones */
.post-meta-row .cat-chip { white-space: nowrap; }

@media (max-width: 900px) {
  .toc-box ol { columns: 1; }
  .chip-bar {
    position: static;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 14px 14px 16px;
    overflow-x: visible;
  }
  .chip-bar a { flex: 0 0 auto; }
  .featured-grid { margin-bottom: 44px; }
}
@media (max-width: 640px) {
  .post-meta-row { gap: 8px 14px; }
  .post-author-strip { flex-direction: column; align-items: flex-start; gap: 12px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .quick-answer, .key-takeaways { padding: 18px 18px; }
  .toc-box { padding: 18px 18px; }
  .page-hero h1 { font-size: clamp(1.55rem, 6.4vw, 1.9rem); }
  .cat-head { flex-wrap: wrap; gap: 10px; }
  .chip-bar a { padding: 6px 12px; font-size: 0.74rem; }
}
