/* SimpliScale Blog Enhancements
 * Sticky TOC, reading-time badge, byline, pull-quotes, inline charts, related + email module
 */

/* ===== Reading meta row (badges under H1) ===== */
.ss-blog-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 18px auto 8px;
  max-width: 880px;
}
.ss-blog-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
}
.ss-blog-badge.diff-tactical { color: #FF7107; border-color: rgba(255,113,7,0.4); background: rgba(255,113,7,0.08); }
.ss-blog-badge.diff-strategic { color: #5dd8ff; border-color: rgba(93,216,255,0.4); background: rgba(93,216,255,0.06); }
.ss-blog-badge.diff-founder { color: #ffd166; border-color: rgba(255,209,102,0.4); background: rgba(255,209,102,0.06); }
.ss-blog-badge .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.6; }

/* ===== Author byline ===== */
.ss-blog-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin: 22px auto 0;
  max-width: 880px;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
}
.ss-blog-byline img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255,113,7,0.5);
  box-shadow: 0 0 18px rgba(255,113,7,0.25);
}
.ss-blog-byline .ss-byline-name { color: #fff; font-weight: 600; }
.ss-blog-byline .ss-byline-role { color: rgba(255,255,255,0.55); }
.ss-blog-byline .ss-byline-sep { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.3); display: inline-block; }

/* ===== Sticky TOC (desktop only) ===== */
.ss-blog-toc-sticky {
  position: fixed;
  top: 110px;
  left: 24px;
  width: 240px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding: 20px 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  z-index: 50;
  font-size: 13px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,113,7,0.4) transparent;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.ss-blog-toc-sticky.visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.ss-blog-toc-sticky::-webkit-scrollbar { width: 4px; }
.ss-blog-toc-sticky::-webkit-scrollbar-thumb { background: rgba(255,113,7,0.4); border-radius: 4px; }
.ss-blog-toc-sticky h4 {
  color: #FF7107;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 12px;
}
.ss-blog-toc-sticky ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ss-blog-toc-sticky li {
  margin: 0;
  padding: 0;
}
.ss-blog-toc-sticky a {
  display: block;
  padding: 6px 10px;
  margin: 2px 0;
  border-left: 2px solid transparent;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  line-height: 1.45;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  border-radius: 4px;
}
.ss-blog-toc-sticky a:hover { color: #fff; background: rgba(255,255,255,0.04); }
.ss-blog-toc-sticky a.is-h3 { padding-left: 22px; font-size: 12px; }
.ss-blog-toc-sticky a.active {
  color: #FF7107;
  border-left-color: #FF7107;
  background: rgba(255,113,7,0.08);
}
@media (max-width: 1280px) { .ss-blog-toc-sticky { left: 12px; width: 210px; } }
@media (max-width: 1100px) { .ss-blog-toc-sticky { display: none; } }
@media (max-width: 900px)  { .ss-blog-toc-sticky { display: none !important; } }

/* ===== Pull-quote ===== */
.ss-pullquote {
  margin: 36px 0;
  padding: 24px 28px;
  background: linear-gradient(180deg, rgba(255,113,7,0.05) 0%, rgba(255,113,7,0.02) 100%);
  border-left: 3px solid #FF7107;
  border-radius: 0 14px 14px 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.4;
  color: rgba(255,255,255,0.92);
  position: relative;
}
.ss-pullquote::before {
  content: '"';
  position: absolute;
  top: -6px;
  left: 18px;
  font-size: 3.4rem;
  color: rgba(255,113,7,0.35);
  font-family: 'Instrument Serif', Georgia, serif;
  line-height: 1;
}

/* ===== Inline charts ===== */
.ss-chart {
  margin: 32px 0;
  padding: 24px 26px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}
.ss-chart-title {
  font-size: 13px;
  font-weight: 600;
  color: #FF7107;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  margin: 0 0 4px;
}
.ss-chart-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin: 0 0 16px;
}
.ss-chart svg { width: 100%; height: auto; display: block; }
.ss-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}
.ss-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ss-chart-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ===== Related + email module ===== */
.ss-blog-end {
  max-width: 1100px;
  margin: 80px auto 40px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
}
.ss-blog-related,
.ss-blog-subscribe {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 30px 28px;
  backdrop-filter: blur(10px);
}
.ss-blog-related h3,
.ss-blog-subscribe h3 {
  font-size: 14px;
  font-weight: 600;
  color: #FF7107;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 16px;
}
.ss-related-list { display: flex; flex-direction: column; gap: 12px; }
.ss-related-item {
  display: block;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  color: rgba(255,255,255,0.92);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: all 0.25s ease;
}
.ss-related-item:hover {
  border-color: rgba(255,113,7,0.4);
  background: rgba(255,113,7,0.06);
  transform: translateX(4px);
}
.ss-related-item .ss-related-tag {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #FF7107;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.ss-blog-subscribe p {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin: 0 0 16px;
  line-height: 1.5;
}
.ss-blog-subscribe form { display: flex; flex-direction: column; gap: 10px; }
.ss-blog-subscribe input[type="email"] {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}
.ss-blog-subscribe input[type="email"]:focus { border-color: #FF7107; }
.ss-blog-subscribe button {
  background: #FF7107;
  color: #0a0a0a;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.ss-blog-subscribe button:hover { background: #ff8a33; box-shadow: 0 0 24px rgba(255,113,7,0.4); transform: translateY(-1px); }
.ss-blog-subscribe button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.ss-blog-subscribe .ss-sub-success { display: none; color: #5dff9d; font-size: 13px; margin-top: 6px; }
.ss-blog-subscribe.is-success .ss-sub-success { display: block; }
.ss-blog-subscribe.is-success form { display: none; }

@media (max-width: 768px) {
  .ss-blog-end { grid-template-columns: 1fr; gap: 18px; margin: 60px auto 24px; }
  .ss-pullquote { padding: 18px 20px; font-size: 1.15rem; }
  .ss-chart { padding: 18px 18px; }
  .ss-blog-byline { font-size: 13px; padding: 0 16px; }
}

/* ===== Hub: filter chips + email banner + reading-time badges ===== */
.ss-hub-banner {
  max-width: 1100px;
  margin: 0 auto 30px;
  padding: 22px 28px;
  background: linear-gradient(135deg, rgba(255,113,7,0.10) 0%, rgba(255,113,7,0.03) 100%);
  border: 1px solid rgba(255,113,7,0.25);
  border-radius: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  backdrop-filter: blur(10px);
}
.ss-hub-banner-text strong { display: block; font-size: 17px; color: #fff; margin-bottom: 4px; }
.ss-hub-banner-text span { font-size: 13px; color: rgba(255,255,255,0.65); }
.ss-hub-banner form { display: flex; gap: 8px; flex: 1 1 280px; max-width: 420px; }
.ss-hub-banner input {
  flex: 1;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.ss-hub-banner input:focus { border-color: #FF7107; }
.ss-hub-banner button {
  background: #FF7107;
  color: #0a0a0a;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}
.ss-hub-banner button:hover { background: #ff8a33; }
.ss-hub-banner.is-success { text-align: center; justify-content: center; color: #5dff9d; }
.ss-hub-banner.is-success form,
.ss-hub-banner.is-success .ss-hub-banner-text { display: none; }

.ss-hub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 auto 40px;
  max-width: 900px;
  padding: 0 20px;
}
.ss-filter-chip {
  padding: 8px 18px;
  border-radius: 30px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.ss-filter-chip:hover { color: #fff; border-color: rgba(255,113,7,0.4); }
.ss-filter-chip.active {
  background: rgba(255,113,7,0.15);
  border-color: rgba(255,113,7,0.6);
  color: #FF7107;
}
.ss-card-hidden { display: none !important; }

@media (max-width: 768px) {
  .ss-hub-banner { padding: 18px 20px; flex-direction: column; align-items: stretch; }
  .ss-hub-banner form { max-width: none; }
}
