/* Blog article + post page layout */
:root {
  --primary-color: #6a11cb;
  --secondary-color: #2575fc;
  --dark-bg: #0f172a;
  --text-light: #f8fafc;
  --text-muted: #94a3b8;
  --blog-text: #ffffff;
  --blog-text-soft: #f1f5f9;
  --blog-muted: #cbd5e1;
}

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-light);
  text-decoration: none;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-light);
}

.header-actions {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-light);
}

.main-footer {
  padding: 48px 0 20px;
  background: #020617;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.main-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links h4 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--text-muted);
  margin: 0 8px;
}

.footer-bottom .qp-footer-feeds {
  margin: 0.75rem 0;
  line-height: 1.7;
}

.footer-bottom .qp-footer-feeds a {
  color: #94a3b8;
  text-decoration: none;
  margin: 0 0.2rem;
}

.footer-bottom .qp-footer-feeds a:hover {
  color: #e2e8f0;
  text-decoration: underline;
}

body.blog-page-body {
  padding-top: 80px;
  color: var(--blog-text);
}

.blog-post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 88px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.75rem 4.5rem;
  align-items: start;
}

.blog-post-main {
  min-width: 0;
}

.blog-post-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #475569 transparent;
  align-self: start;
}

.blog-post-sidebar .widget {
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
  margin-bottom: 0.9rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.blog-post-sidebar .widget-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--blog-muted);
  margin-bottom: 0.65rem;
}

.blog-post-sidebar .widget-label {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.blog-post-sidebar .widget-note {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0 0 0.65rem;
  line-height: 1.45;
}

.blog-post-sidebar input[type="search"],
.blog-post-sidebar input[type="email"],
.blog-post-sidebar input[type="text"] {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.blog-subscribe-form .btn-block,
.widget-home .btn-block {
  display: block;
  width: 100%;
  text-align: center;
  border: none;
  cursor: pointer;
}

.founder-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.founder-card img {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(96, 165, 250, 0.45);
}

.founder-name {
  margin: 0;
  font-weight: 700;
  color: #f8fafc;
  font-size: 0.95rem;
}

.founder-role {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.founder-about {
  font-size: 0.82rem;
  color: #93c5fd;
  text-decoration: none;
}

.founder-about:hover { text-decoration: underline; }

.sidebar-trending .trending-card {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  text-decoration: none;
  color: #e2e8f0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.sidebar-trending .trending-card img {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

/* TSBR format body */
.blog-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.blog-breadcrumbs a { color: #93c5fd; text-decoration: none; }
.blog-breadcrumbs li:not(:last-child)::after {
  content: '›';
  margin-left: 0.5rem;
  color: #64748b;
}

.aeo-quick-answer,
.geo-ai-overview,
.what-you-will-learn {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}

.geo-ai-overview {
  border-color: rgba(167, 139, 250, 0.35);
}

.blog-inline-figure {
  margin: 1.5rem 0;
}

.blog-inline-figure img {
  width: 100%;
  border-radius: 12px;
  max-height: 420px;
  object-fit: cover;
}

.blog-inline-figure figcaption {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.4rem;
}

.blog-silo-links .silo-link-list {
  padding-left: 1.1rem;
  line-height: 1.7;
}

/* Post → money page conversion block */
.blog-money-cta {
  margin: 2rem 0;
  padding: 1.35rem 1.5rem;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.1));
  box-shadow: 0 8px 28px rgba(2, 8, 23, 0.25);
}

.blog-money-cta h2 {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
  color: #e2e8f0;
}

.blog-money-cta p {
  margin: 0 0 0.75rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.blog-money-cta .money-page-links {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: #e2e8f0;
  line-height: 1.75;
}

.blog-money-cta .money-page-links a {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 600;
}

.blog-money-cta .money-page-links a:hover {
  color: #bae6fd;
  text-decoration: underline;
}

.blog-money-cta .money-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
}

.blog-money-cta .money-cta-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.blog-money-cta .money-cta-actions .btn-primary {
  background: linear-gradient(90deg, #0ea5e9, #6366f1);
  color: #fff;
}

.blog-money-cta .money-cta-actions .btn-secondary {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

.blog-money-cta .money-cta-actions .btn:hover {
  filter: brightness(1.08);
}

.related-topics-grid,
.related-topics-grid-4x2 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, auto));
  gap: 1rem;
  margin-top: 1rem;
}

.related-topics-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.related-topics-footer {
  margin-top: 1.25rem;
  text-align: center;
}

.homepage-blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 900px) {
  .homepage-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .homepage-blog-grid {
    grid-template-columns: 1fr !important;
  }
}

.related-card {
  display: flex;
  flex-direction: column;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #e2e8f0;
  min-height: 100%;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.related-card:hover {
  border-color: rgba(96, 165, 250, 0.45);
  transform: translateY(-2px);
}

.related-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.related-card-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.related-card-body h3 {
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.3;
  color: #f8fafc;
}

.related-card-body p {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
  flex: 1;
}

.related-card-cta {
  font-size: 0.8rem;
  color: #93c5fd;
}

@media (max-width: 1100px) {
  .related-topics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .related-topics-grid {
    grid-template-columns: 1fr;
  }
}

.blog-post-sidebar .sidebar-toc a {
  color: #93c5fd;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.5;
}

.blog-post-sidebar .sidebar-toc li {
  margin-bottom: 0.45rem;
}

.blog-post-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
  color: var(--blog-text);
  margin: 0.75rem 0 1rem;
}

.post-category {
  color: #60a5fa;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.post-meta,
.blog-post-header .post-meta {
  color: var(--blog-muted);
  margin-bottom: 1.25rem;
}

.post-meta a,
.blog-post-body a {
  color: #93c5fd;
}

.post-hero {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.blog-post-body,
.blog-article {
  color: var(--blog-text);
}

.blog-post-body h2,
.blog-article h2 {
  color: var(--blog-text);
  margin-top: 2rem;
  font-size: 1.5rem;
}

.blog-post-body h3,
.blog-article h3 {
  color: var(--blog-text-soft);
  margin-top: 1.35rem;
  font-size: 1.15rem;
}

.blog-post-body p,
.blog-post-body li,
.blog-article p,
.blog-article li {
  color: var(--blog-text) !important;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.blog-post-body .blog-toc-title,
.blog-article .blog-toc-title {
  color: var(--blog-text);
  font-size: 1rem;
}

.blog-inline-img,
.blog-inline-svg {
  margin: 1rem 0 1.25rem;
}

.blog-inline-img img,
.blog-hero-inline {
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  max-width: 100%;
  height: auto;
}

.blog-inline-left img,
.blog-inline-right img {
  max-width: min(340px, 42%) !important;
}

.blog-inline-center img {
  max-width: min(560px, 92%) !important;
  width: 92% !important;
  margin: 2rem auto !important;
  display: block !important;
}

.blog-inline-center {
  clear: both;
  text-align: center;
  display: block;
  width: 100%;
  margin: 2rem 0;
}

.blog-inline-left {
  float: left;
  max-width: 100%;
}

.blog-inline-right {
  float: right;
  max-width: 100%;
}

.blog-img-caption {
  font-size: 0.8rem;
  color: var(--blog-muted) !important;
  margin-top: 0.35rem;
}

.blog-post-body::after,
.blog-article section::after {
  content: '';
  display: table;
  clear: both;
}

.blog-infographic-wrap {
  margin: 2rem 0;
  clear: both;
}

.blog-infographic-svg {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.blog-video-mid {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin: 2rem 0;
  clear: both;
}

.blog-video-mid iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.blog-callout {
  background: rgba(37, 117, 252, 0.12);
  border-left: 3px solid #2575fc;
  padding: 0.85rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 1.25rem 0;
}

.blog-callout strong {
  color: #fff;
}

.blog-key-takeaways {
  background: rgba(106, 17, 203, 0.15);
  border: 1px solid rgba(106, 17, 203, 0.35);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.blog-key-takeaways h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: #fff;
}

.blog-key-takeaways ul {
  margin: 0;
  padding-left: 1.25rem;
}

.blog-key-takeaways li {
  margin-bottom: 0.5rem;
  color: var(--blog-text-soft);
  line-height: 1.55;
}

.blog-pro-tip {
  background: rgba(16, 185, 129, 0.12);
  border-left-color: #10b981;
}

.blog-warning {
  background: rgba(245, 158, 11, 0.12);
  border-left-color: #f59e0b;
}

.blog-thumbnail-hero {
  margin: 1.25rem 0 1.75rem;
}

.blog-anchor-strip {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.blog-anchor-strip a {
  color: #67e8f9;
  text-decoration: underline;
  margin: 0 0.15rem;
}

.blog-anchor-strip .qp-anchor-brand { color: #a78bfa; }
.blog-anchor-strip .qp-anchor-keyword { color: #34d399; }

.blog-affiliate-cta {
  margin: 2rem 0;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
  text-align: center;
}

.blog-affiliate-cta h3 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.blog-affiliate-meta {
  color: #94a3b8;
  margin-top: 0.75rem;
}

.qp-buy-now:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.blog-author-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 2rem 0;
}

.blog-author-card > .blog-author-avatar,
.blog-author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(56, 189, 248, 0.45);
  background: rgba(15, 23, 42, 0.6);
  display: block;
}

.blog-byline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0 1.25rem;
}

.blog-byline .blog-author-avatar {
  width: 56px;
  height: 56px;
}

.blog-author-meta {
  flex: 1;
  min-width: 0;
}

.blog-author-label {
  color: var(--blog-text) !important;
  font-size: 1.05rem;
  margin-bottom: 0.35rem !important;
}

.blog-author-bio {
  color: var(--blog-muted) !important;
  font-size: 0.9rem;
  margin: 0 !important;
}

.related-reading {
  margin-top: 2.5rem;
  clear: both;
}

.related-reading h2 {
  margin-bottom: 1.25rem;
}

.related-reading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.related-card {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.related-card-image img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.related-card-body {
  padding: 1rem;
}

.related-card-title {
  font-size: 1rem !important;
  margin: 0 0 0.5rem !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
}

.blog-listicle,
.blog-hack-block {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
  clear: both;
}

.blog-listicle h3,
.blog-hack-block h3 {
  color: #fff !important;
  font-size: 1.05rem !important;
  margin: 0 0 0.65rem !important;
}

.blog-listicle ol {
  margin: 0;
  padding-left: 1.25rem;
  color: #fff !important;
}

.blog-listicle li,
.blog-hack-block p {
  color: #f1f5f9 !important;
  margin-bottom: 0.45rem;
}

.blog-search-results {
  margin-top: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
}

.blog-search-hit {
  display: flex;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: inherit;
}

.blog-search-hit:hover {
  background: rgba(255, 255, 255, 0.04);
}

.blog-search-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.blog-search-thumb-fallback {
  display: inline-block;
  background: linear-gradient(135deg, #334155, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-article .blog-toc {
  display: none;
}

.blog-search-hit-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.blog-search-hit-body strong {
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.3;
}

.blog-search-hit-body span {
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.35;
}

.blog-search-hit-body em {
  color: #60a5fa;
  font-size: 0.65rem;
  font-style: normal;
  text-transform: uppercase;
}

.blog-search-empty,
.blog-search-loading {
  color: #94a3b8 !important;
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

.related-card-title a {
  color: var(--blog-text) !important;
  text-decoration: none;
}

.related-card-desc {
  font-size: 0.88rem !important;
  color: var(--blog-muted) !important;
  margin-bottom: 0.75rem !important;
}

.related-card-link {
  font-size: 0.85rem;
  font-weight: 600;
}

.blog-back-link {
  margin-top: 2rem;
}

.blog-back-link a {
  color: #93c5fd;
}

.blog-layout .sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

@media (max-width: 1100px) {
  .related-reading-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .blog-post-layout {
    grid-template-columns: 1fr;
  }
  .blog-post-sidebar {
    position: static;
    max-height: none;
    order: 2;
  }
  .related-reading-grid {
    grid-template-columns: 1fr;
  }
  .blog-inline-left img,
  .blog-inline-right img {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 1rem 0 !important;
  }
}