/* =========================================================
   Help & FAQ Page Styles (help.css)
   مدیریت مستقل صفحه راهنما، سوالات متداول، گالری تصاویر و فوتر
   ========================================================= */

:root,
[theme='light'] {
  --bg-color: #f4f6f9;
  --text-color: #1e1e2d;
  --card-bg: #ffffff;
  --navbar-bg: #661fff;
  --navbar-hover: #5815e3;
  --navbar-link-color: #ffffff;
  --menu-hover-bg: rgba(255, 255, 255, 0.15);
  --border-color: #e2e8f0;
  --accent-purple: #661fff;
  --hero-gradient: linear-gradient(145deg, #7a22ff 0%, #5300e8 100%);
  --subtext-color: #64748b;
  --item-border: #f1f5f9;
  --img-bg: #f8f9fa;
  --guide-item-bg: rgba(128, 128, 128, 0.05);
  --guide-item-border: rgba(128, 128, 128, 0.15);
}

[theme='dark'] {
  --bg-color: #121218;
  --text-color: #f1f1f1;
  --card-bg: #1e1e2a;
  --navbar-bg: #1e1538;
  --navbar-hover: #261b46;
  --navbar-link-color: #ffffff;
  --menu-hover-bg: rgba(255, 255, 255, 0.1);
  --border-color: #333346;
  --accent-purple: #8b5cf6;
  --hero-gradient: linear-gradient(145deg, #4f14b8 0%, #2f0676 100%);
  --subtext-color: #94a3b8;
  --item-border: #29293a;
  --img-bg: #1a1a1a;
  --guide-item-bg: rgba(255, 255, 255, 0.03);
  --guide-item-border: rgba(255, 255, 255, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Vazirmatn', sans-serif;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* =================== محتوای صفحه راهنما =================== */
.help-container {
  max-width: 900px;
  margin: 0 auto 35px auto;
  padding: 0 20px 50px 20px;
  width: 100%;
  flex: 1 0 auto;
}

.help-header {
  text-align: center;
  margin-bottom: 35px;
}

.help-header h1 {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--text-color);
  margin-bottom: 12px;
}

.help-header p {
  color: var(--subtext-color);
  font-size: 1.05rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.faq-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.3s ease;
}

.faq-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.faq-question {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-question::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--accent-purple);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.faq-answer {
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--subtext-color);
}

.faq-answer a {
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.faq-answer a:hover {
  text-decoration: underline;
}

.steps-list {
  margin: 1rem 0;
  padding-inline-start: 1.3rem;
  line-height: 1.85;
}

.steps-list li {
  margin-bottom: 0.6rem;
}

/* حذف شماره‌گذاری پیش‌فرض در کارت نتیجه */
.result-links-list {
  list-style: none !important;
  padding-inline-start: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.result-links-list li {
  list-style-type: none !important;
  margin-bottom: 0.75rem;
}

.result-links-list li a {
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.result-links-list li a:hover {
  text-decoration: underline;
  transform: translateX(-4px);
}

html[dir='ltr'] .result-links-list li a:hover {
  transform: translateX(4px);
}

.result-desc {
  margin-bottom: 1rem;
  line-height: 1.8;
  font-weight: 500;
}

/* =================== گالری تصاویر آموزشی =================== */
.guide-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 1.5rem;
}

.guide-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--guide-item-bg);
  border: 1px solid var(--guide-item-border);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.guide-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.guide-item img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 8px;
  background-color: var(--img-bg);
  display: block;
}

.guide-caption {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.4;
}

/* =================== فوتر =================== */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  text-align: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)) 20px;
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--subtext-color);
}

/* =================== مدیاکوئری‌ها (ریسپانسیو) =================== */

@media screen and (max-width: 1024px) {
  .help-container {
    max-width: 760px;
    padding: 0 18px 40px 18px;
    margin: 0 auto 25px auto;
  }

  .guide-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .guide-item img {
    max-height: 380px;
  }
}

@media screen and (max-width: 600px) {
  .help-container {
    padding: 0 14px 30px 14px;
    margin: 0 auto 20px auto;
  }

  .help-header h1 {
    font-size: 1.5rem;
  }

  .faq-card {
    border-radius: 16px;
    padding: 18px 16px;
  }

  .faq-question {
    font-size: 1.05rem;
  }

  .guide-gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .guide-item img {
    max-height: 480px;
  }
}
