/* Help Page Styles */
:root {
  --help-primary: #6366f1;
  --help-secondary: #8b5cf6;
  --help-bg: #ffffff;
  --help-text: #1f2937;
  --help-border: #e5e7eb;
  --help-code-bg: #f3f4f6;
  --help-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --help-bg: #1a1a2e;
  --help-text: #e5e7eb;
  --help-border: #374151;
  --help-code-bg: #2d2d44;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.8;
  color: var(--help-text);
  background: var(--help-bg);
  padding: 2rem 1rem;
}

.help-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--help-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--help-shadow);
}

/* Back Button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--help-primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.back-button:hover {
  background: var(--help-secondary);
  transform: translateX(-5px);
}

/* Article Styles */
.help-article {
  margin-bottom: 3rem;
}

.help-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 3px solid var(--help-primary);
}

.help-header h1 {
  font-size: 2.5rem;
  color: var(--help-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.help-meta {
  color: #6b7280;
  font-size: 0.9rem;
  font-style: italic;
}

/* Table of Contents */
.help-toc {
  background: var(--help-code-bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--help-primary);
}

.help-toc h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--help-primary);
}

.help-toc ul {
  list-style: none;
  padding-left: 0;
}

.help-toc li {
  margin-bottom: 0.5rem;
}

.help-toc a {
  color: var(--help-text);
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
}

.help-toc a:hover {
  background: var(--help-primary);
  color: white;
  padding-left: 1rem;
}

/* Sections */
.help-section {
  margin-bottom: 3rem;
  scroll-margin-top: 2rem;
}

.help-section h2 {
  font-size: 2rem;
  color: var(--help-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--help-border);
}

.help-section h3 {
  font-size: 1.4rem;
  color: var(--help-secondary);
  margin: 1.5rem 0 0.75rem;
}

.help-section p {
  margin-bottom: 1rem;
  text-align: justify;
}

/* Lists */
.feature-list,
.tips-list {
  list-style: none;
  padding-left: 0;
}

.feature-list li,
.tips-list li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  border-bottom: 1px solid var(--help-border);
}

.feature-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 1.2rem;
}

.step-list {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
}

.step-list li {
  counter-increment: step-counter;
  margin-bottom: 2rem;
  padding-left: 3rem;
  position: relative;
}

.step-list li:before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background: var(--help-primary);
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.step-list strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--help-primary);
}

.step-list ul {
  margin-top: 0.5rem;
  margin-left: 1.5rem;
}

/* Use Case Grid */
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.use-case-item {
  background: var(--help-code-bg);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--help-primary);
  transition: all 0.3s ease;
}

.use-case-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--help-shadow);
}

.use-case-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--help-primary);
}

/* Example Boxes */
.example-box {
  background: var(--help-code-bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--help-secondary);
}

.example-box h3 {
  color: var(--help-secondary);
  margin-top: 0;
}

.example-box p {
  margin-bottom: 0.5rem;
  font-family: 'Courier New', monospace;
}

.example-box strong {
  color: var(--help-primary);
}

/* FAQ Items */
.faq-item {
  background: var(--help-code-bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--help-primary);
}

.faq-item h3 {
  color: var(--help-primary);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.faq-item p {
  margin-bottom: 0;
}

/* CTA Section */
.help-cta {
  text-align: center;
  background: linear-gradient(135deg, var(--help-primary), var(--help-secondary));
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  margin-top: 3rem;
}

.help-cta h2 {
  color: white;
  border: none;
  margin-bottom: 1rem;
}

.help-cta p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: white;
  color: var(--help-primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Language Divider */
.language-divider {
  margin: 4rem 0;
  border: none;
  height: 3px;
  background: linear-gradient(to right, var(--help-primary), var(--help-secondary), var(--help-primary));
}

/* Footer */
.help-footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 2px solid var(--help-border);
  color: #6b7280;
}

.help-footer a {
  color: var(--help-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.help-footer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .help-container {
    padding: 1rem;
  }

  .help-header h1 {
    font-size: 1.8rem;
  }

  .help-section h2 {
    font-size: 1.5rem;
  }

  .use-case-grid {
    grid-template-columns: 1fr;
  }

  .step-list li {
    padding-left: 2.5rem;
  }

  .step-list li:before {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.9rem;
  }
}

/* RTL Support for Arabic */
[dir="rtl"] .help-toc a:hover {
  padding-left: 0.5rem;
  padding-right: 1rem;
}

[dir="rtl"] .feature-list li,
[dir="rtl"] .tips-list li {
  padding-left: 0;
  padding-right: 2rem;
}

[dir="rtl"] .feature-list li:before {
  left: auto;
  right: 0;
}

[dir="rtl"] .step-list li {
  padding-left: 0;
  padding-right: 3rem;
}

[dir="rtl"] .step-list li:before {
  left: auto;
  right: 0;
}

[dir="rtl"] .use-case-item,
[dir="rtl"] .example-box,
[dir="rtl"] .faq-item {
  border-left: none;
  border-right: 4px solid var(--help-primary);
}

[dir="rtl"] .example-box {
  border-right-color: var(--help-secondary);
}

