/* ==========================================================================
   pseo.css — Styles for programmatic SEO pages (launch guides, best-subreddits).
   Adds pullout quotes, insight boxes, strategy steps, example drafts,
   subreddit profile cards, related-page links, and pSEO hero treatment.
   ========================================================================== */

/* --- pSEO Hero --- */
.pseo-hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
  position: relative;
}

.pseo-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.pseo-hero .subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

.pseo-hero-doodle {
  position: absolute;
  top: 1.5rem;
  right: -10px;
  width: 80px;
  height: 80px;
  opacity: 0.6;
  mix-blend-mode: multiply;
}

/* --- Blog Hero Banner --- */
.blog-hero-banner {
  width: 100%;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  margin-bottom: 1rem;
  min-height: 180px;
}

.blog-hero-img {
  max-height: 160px;
  max-width: 280px;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0.85;
}

/* --- Section headings --- */
.pseo-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.75rem;
}

.pseo-section-text {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

/* --- Pullout Quote --- */
.pullout-quote {
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-doodle);
  font-size: 1.25rem;
  color: var(--text-strong);
  line-height: 1.5;
  position: relative;
}

.pullout-quote-attr {
  display: block;
  font-family: var(--font);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 500;
}

/* --- Insight Box --- */
.insight-box {
  border: 1px dashed var(--green-border);
  background: var(--green-soft);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
}

.insight-box strong {
  color: var(--green);
  font-weight: 600;
}

/* --- Strategy Steps --- */
.strategy-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.strategy-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.strategy-step-num {
  font-family: var(--font-doodle);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.strategy-step-content {
  flex: 1;
  min-width: 0;
}

.strategy-step-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.2rem;
}

.strategy-step-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Example Draft Card (mock Reddit post) --- */
.example-draft {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
}

.example-draft-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.example-draft-sub {
  font-weight: 600;
  color: var(--text-strong);
}

.example-draft-body {
  padding: 1rem;
}

.example-draft-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.5rem;
  padding-left: 0.65rem;
  border-left: 2px solid var(--accent);
}

.example-draft-text {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.example-draft-angle {
  display: inline-block;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 3px;
  margin-top: 0.75rem;
}

/* --- Subreddit Card (pSEO version) --- */
.pseo-sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.pseo-sub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: border-color 0.15s;
}

.pseo-sub-card:hover {
  border-color: var(--accent-border);
}

.pseo-sub-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-strong);
  margin-bottom: 0.25rem;
}

.pseo-sub-members {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.pseo-sub-tone {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Subreddit Profile Card (best-subreddits pages) --- */
.sub-profile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.sub-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sub-profile-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-strong);
}

.sub-profile-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
}

.sub-profile-desc {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.sub-profile-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.sub-profile-column {
  padding: 0.65rem 0.85rem;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
}

.sub-profile-column-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sub-profile-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sub-profile-column li {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-left: 0.85rem;
  position: relative;
  margin-bottom: 0.2rem;
}

.sub-profile-column li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.sub-profile-column:first-child li::before {
  background: var(--green);
}

.sub-profile-column:last-child li::before {
  background: var(--red);
}

.sub-profile-tips {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-dashed);
}

.sub-profile-tips strong {
  color: var(--text);
  font-weight: 600;
}

/* --- Quick Jump TOC (pill links) --- */
.toc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 1.5rem;
}

.toc-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.15s;
}

.toc-pill:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}

/* --- CTA Section --- */
.pseo-cta {
  text-align: center;
  padding: 2rem 0;
  margin: 1rem 0;
}

.pseo-cta-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.75rem;
}

.pseo-cta-note {
  display: block;
  font-family: var(--font-doodle);
  font-size: 1rem;
  color: var(--accent);
  opacity: 0.75;
  margin-top: 0.65rem;
  transform: rotate(-1.5deg);
}

/* --- Related Pages Row --- */
.related-pages {
  border-top: 1px dashed var(--border-dashed);
  padding-top: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.related-pages-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.related-pages-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.related-page-link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s;
}

.related-page-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 0.72rem;
  color: var(--text-dim);
  padding-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  margin: 0 0.3rem;
  color: var(--text-dim);
}

/* --- Index Page Card Grid --- */
.pseo-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.pseo-index-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
}

.pseo-index-card:hover {
  border-color: var(--accent-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.pseo-index-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.35rem;
}

.pseo-index-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.pseo-index-card-arrow {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.65rem;
}

/* --- Blog: Table of Contents --- */
.blog-toc {
  margin: 1.5rem 0;
}

.blog-toc-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

/* --- Blog: Section Wrapper --- */
.blog-section {
  margin-bottom: 2rem;
}

/* --- Blog: Reading Time Badge --- */
.reading-time {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  margin-top: 0.65rem;
}

/* --- Blog: Comparison Table --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

.comparison-table th {
  text-align: left;
  padding: 0.65rem 1rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-strong);
  font-size: 0.78rem;
}

.comparison-table td {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  color: var(--text);
  line-height: 1.5;
}

.comparison-table tr:nth-child(even) td {
  background: var(--bg-muted);
}

/* --- Blog: Checklist Items --- */
.checklist-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
}

.checklist-item::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid var(--green);
  border-radius: 4px;
  background: var(--green-soft);
}

/* --- Blog: Case Study Card --- */
.case-study-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.case-study-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.35rem;
}

.case-study-card-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
}

.case-study-card-body {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .pseo-hero h1 {
    font-size: 1.6rem;
  }

  .pseo-hero-doodle {
    display: none;
  }

  .blog-hero-banner {
    min-height: 120px;
    padding: 1.5rem 1rem;
  }

  .blog-hero-img {
    max-height: 110px;
    max-width: 200px;
  }

  .pseo-sub-grid {
    grid-template-columns: 1fr;
  }

  .sub-profile-columns {
    grid-template-columns: 1fr;
  }

  .pseo-index-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Compare: Updated Badge --- */
.updated-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-soft);
  border: 1px dashed var(--green-border);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  margin-top: 0.65rem;
}

/* --- Compare: Table --- */
.compare-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 540px;
}

.compare-table caption {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  padding-bottom: 0.65rem;
}

.compare-table th {
  text-align: left;
  padding: 0.65rem 0.85rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-strong);
  font-size: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

.compare-table td {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  color: var(--text);
  line-height: 1.45;
}

.compare-table tr:nth-child(even) td {
  background: var(--bg-muted);
}

.compare-table tr:first-child td {
  font-weight: 600;
  color: var(--text-strong);
}

/* --- Compare: Tool Review Card --- */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: border-color 0.15s;
}

.tool-card:hover {
  border-color: var(--accent-border);
}

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.tool-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong);
}

.rating-stars {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.tool-card-oneliner {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

/* --- Compare: Pros & Cons --- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.pros-cons-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

.pros-title {
  color: var(--green);
}

.cons-title {
  color: var(--red);
}

.pros-list, .cons-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pros-list li, .cons-list li {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-left: 0.85rem;
  position: relative;
  margin-bottom: 0.2rem;
  line-height: 1.5;
}

.pros-list li::before, .cons-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.pros-list li::before {
  background: var(--green);
}

.cons-list li::before {
  background: var(--red);
}

.tool-card-best-for {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
  padding: 0.5rem 0.75rem;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
}

.tool-card-best-for strong {
  color: var(--text-strong);
}

.tool-card-link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.tool-card-link:hover {
  text-decoration: underline;
}

/* --- Compare: FAQ --- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--bg-card);
}

.faq-question {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.5rem;
}

.faq-answer {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.65;
}

/* --- Compare: Index Section Titles --- */
.compare-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 1rem;
  margin-top: 2rem;
}

/* --- Compare: Responsive --- */
@media (max-width: 768px) {
  .pros-cons {
    grid-template-columns: 1fr;
  }

  .tool-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

@media (max-width: 480px) {
  .pseo-hero {
    padding: 2rem 0 1rem;
  }

  .pseo-hero h1 {
    font-size: 1.35rem;
  }

  .pullout-quote {
    font-size: 1.1rem;
    padding: 1rem 1.25rem;
  }

  .strategy-step {
    padding: 0.85rem 1rem;
  }
}
