/* ───────────────────────────────────────────
   SocialPulses Help Center — Custom Styles
   Inspired by Buffer Help Center design
   ─────────────────────────────────────────── */

/* ── Help Layout ── */
.help-wrapper {
  display: flex;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.help-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  align-self: flex-start;
  max-height: calc(100vh - var(--nav-h) - 4rem);
  overflow-y: auto;
  padding-right: 0.5rem;
}

.help-sidebar::-webkit-scrollbar { width: 4px; }
.help-sidebar::-webkit-scrollbar-track { background: transparent; }
.help-sidebar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.help-sidebar h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.help-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  margin-bottom: 0.125rem;
  text-decoration: none;
}

.help-sidebar nav a:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.help-sidebar nav a.active {
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
  font-weight: 600;
}

.help-sidebar nav a i {
  width: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.help-sidebar nav a.active i {
  color: #6366f1;
}

.help-main {
  flex: 1;
  min-width: 0;
}

/* ── Help Hero / Header ── */
.help-hero {
  padding: calc(var(--nav-h) + 3rem) 0 3.5rem;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.04), transparent);
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.help-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.help-hero p {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 1.75rem;
}

/* ── Search Bar ── */
.help-search {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.help-search input {
  width: 100%;
  padding: 0.875rem 1.25rem 0.875rem 3rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.help-search input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12), var(--shadow-md);
}

.help-search .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.125rem;
  pointer-events: none;
}

/* ── Category Cards Grid ── */
.help-categories {
  padding: 3.5rem 0;
}

.help-categories h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.help-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.help-category-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.help-category-card:hover {
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
  transform: translateY(-2px);
}

.help-category-card .cat-icon {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
  font-size: 1.125rem;
}

.help-category-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.help-category-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Popular Articles ── */
.help-popular {
  padding: 0 0 3.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.help-popular h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.375rem;
  color: var(--text-primary);
}

.help-popular-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.75rem;
}

.help-popular-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  text-decoration: none;
}

.help-popular-item:hover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.03);
}

.help-popular-item i {
  color: #6366f1;
  font-size: 0.875rem;
  width: 1rem;
  text-align: center;
}

.help-popular-item span {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Contact Support Section ── */
.help-contact {
  padding: 3rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.help-contact h2 {
  font-size: 1.375rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.help-contact p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.help-contact .btn {
  background: #6366f1;
  color: #fff;
}

.help-contact .btn:hover {
  background: #5558e6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ── Category Page ── */
.help-category-header {
  padding: calc(var(--nav-h) + 2rem) 0 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.help-category-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.375rem;
  color: var(--text-primary);
}

.help-category-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.help-article-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.help-article-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  text-decoration: none;
}

.help-article-item:hover {
  border-color: #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.help-article-item .article-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
  font-size: 0.8125rem;
}

.help-article-item h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.1875rem;
  color: var(--text-primary);
}

.help-article-item p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Article Page ── */
.help-article {
  padding: calc(var(--nav-h) + 1.5rem) 0 3rem;
}

.help-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.help-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.help-breadcrumb a:hover {
  color: #6366f1;
}

.help-breadcrumb .sep {
  color: var(--border-color);
  font-size: 0.625rem;
}

.help-article h1 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.help-article .article-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.help-article .article-content {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.help-article .article-content h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
  font-weight: 700;
}

.help-article .article-content h3 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--text-primary);
  font-weight: 600;
}

.help-article .article-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.help-article .article-content ul,
.help-article .article-content ol {
  margin: 0 0 1.25rem 1.5rem;
  color: var(--text-secondary);
}

.help-article .article-content li {
  margin-bottom: 0.375rem;
}

.help-article .article-content ul li {
  list-style: disc;
}

.help-article .article-content ol li {
  list-style: decimal;
}

.help-article .article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.help-article .article-content code {
  background: var(--gray-100);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-family: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace;
  color: var(--text-primary);
}

.help-article .article-content pre {
  background: var(--gray-100);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 0 0 1.25rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.6;
  font-family: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace;
}

.help-article .article-content blockquote {
  border-left: 3px solid #6366f1;
  padding: 0.75rem 1rem;
  margin: 0 0 1.25rem;
  background: rgba(99, 102, 241, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.help-article .article-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin: 1rem 0;
}

.help-article .article-content .tip-box {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.help-article .article-content .tip-box i {
  color: #6366f1;
  font-size: 1rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.help-article .article-content .tip-box p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.875rem;
}

.help-article .article-content .warning-box {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.help-article .article-content .warning-box i {
  color: #f59e0b;
  font-size: 1rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.help-article .article-content .warning-box p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.875rem;
}

/* ── Steps ── */
.help-steps {
  counter-reset: step-counter;
  margin: 0 0 1.5rem;
  padding: 0;
}

.help-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: box-shadow 0.15s ease;
}

.help-step:hover {
  box-shadow: var(--shadow-sm);
}

.help-step .step-num {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: #6366f1;
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  font-family: "Space Grotesk", sans-serif;
}

.help-step .step-body {
  flex: 1;
  min-width: 0;
}

.help-step .step-body p {
  margin: 0 0 0.25rem;
  color: var(--text-secondary);
}

.help-step .step-body p:last-child {
  margin-bottom: 0;
}

.help-step .step-body strong {
  color: var(--text-primary);
}

/* ── Feedback Section ── */
.help-feedback {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-color);
}

.help-feedback p {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.help-feedback .feedback-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.help-feedback .feedback-btns button {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.help-feedback .feedback-btns button:hover {
  border-color: #6366f1;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.05);
}

/* ── Related Articles ── */
.help-related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.help-related h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.help-related a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #6366f1;
  text-decoration: none;
  transition: color 0.15s ease;
}

.help-related a:hover {
  color: #5558e6;
  text-decoration: underline;
}

.help-related a i {
  font-size: 0.75rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .help-wrapper {
    flex-direction: column;
    gap: 0;
    padding: 0 1rem 3rem;
  }

  .help-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    padding-right: 0;
  }

  .help-sidebar h3 {
    display: none;
  }

  .help-sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
  }

  .help-sidebar nav a {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    white-space: nowrap;
  }

  .help-sidebar nav a i {
    display: none;
  }

  .help-category-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .help-popular-list {
    grid-template-columns: 1fr;
  }

  .help-popular {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .help-article h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .help-hero {
    padding: calc(var(--nav-h) + 2rem) 0 2rem;
  }

  .help-category-card {
    padding: 1rem;
  }

  .help-step {
    flex-direction: column;
    gap: 0.625rem;
    padding: 1rem;
  }

  .help-step .step-num {
    width: 1.625rem;
    height: 1.625rem;
    font-size: 0.75rem;
  }
}
