/* components/style-quiz/style-quiz.css */

/* تم کلی صفحه کوییز - تم روشن مینیمال */
.style-quiz-container {
  padding: 40px 0;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #1e293b;
  font-family: 'Outfit', 'Vazirmatn', sans-serif;
  direction: rtl;
}

/* کارت اصلی کوییز */
.quiz-card {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.01);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* هدر کوییز و کنترلر پیشرفت */
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 15px;
}

/* دکمه بازگشت */
.back-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.back-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* دکمه رد کردن */
.skip-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  transition: color 0.2s ease;
}
.skip-btn:hover {
  color: #0f172a;
}

/* نوار پیشرفت */
.progress-wrapper {
  flex-grow: 1;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.progress-bar-bg {
  width: 100%;
  height: 5px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: #eab308;
  border-radius: 99px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 5px rgba(234, 179, 8, 0.2);
}
.progress-text {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
}

/* بدنه مراحل */
.quiz-steps-wrapper {
  position: relative;
  min-height: 290px;
}
.quiz-step {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}
.quiz-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* عناوین مراحل */
.step-title {
  font-size: 19px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 5px;
  color: #0f172a;
}
.step-desc {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  margin-bottom: 20px;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

/* استایل مرحله Intro */
.intro-content {
  text-align: center;
  padding: 10px 0;
}
.intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: #a16207;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 12px;
  animation: pulse 2s infinite;
}
.intro-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #0f172a;
}
.intro-title span {
  color: #ca8a04;
}
.intro-desc {
  font-size: 13px;
  color: #64748b;
  max-width: 500px;
  margin: 0 auto 20px auto;
  line-height: 1.6;
}
.intro-features {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.feat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 11px;
  color: #475569;
  font-weight: 600;
}
.feat-item i {
  color: #ca8a04;
  font-size: 13px;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* دکمه‌های اصلی */
.quiz-btn-primary {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(202, 138, 4, 0.15);
}
.quiz-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(202, 138, 4, 0.25);
}
.quiz-btn-primary:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

.quiz-btn-secondary {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.quiz-btn-secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* گرید گزینه‌ها */
.options-grid {
  display: grid;
  gap: 15px;
  margin-bottom: 15px;
}
.options-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.options-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.options-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* کارت گزینه */
.option-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  user-select: none;
}
.option-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.option-card.selected {
  background: rgba(234, 179, 8, 0.03);
  border-color: #eab308;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.08);
}

/* آیکون کارت */
.card-icon {
  font-size: 22px;
  color: #64748b;
  transition: all 0.2s ease;
}
.option-card:hover .card-icon {
  color: #475569;
}
.option-card.selected .card-icon {
  color: #ca8a04;
  transform: scale(1.05);
}

/* برچسب‌های کارت */
.card-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  transition: color 0.2s ease;
}
.option-card.selected .card-label {
  color: #0f172a;
}
.card-sublabel {
  font-size: 10px;
  color: #64748b;
  margin-top: -3px;
  line-height: 1.4;
}

/* تیک انتخاب */
.option-card::after {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 14px;
  color: #ca8a04;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.15s ease;
}
.option-card.selected::after {
  opacity: 1;
  transform: scale(1);
}

/* طرح تمام‌صفحه و بزرگ برای کارت‌های عکس‌دار (مراحل ۴ و ۶) */
#step_shape .option-card,
#step_material .option-card {
  padding: 0;
  align-items: stretch;
  overflow: hidden;
}

#step_shape .option-card .card-label,
#step_material .option-card .card-label {
  padding: 10px 4px 6px 4px;
  margin: 0;
  display: block;
}

#step_shape .option-card .card-sublabel,
#step_material .option-card .card-sublabel {
  padding: 0 4px 12px 4px;
  margin: 0;
  display: block;
}

/* عکس فریم‌ها در بخش انتخاب فریم دلخواه */
.shape-img-wrapper {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  transition: all 0.25s ease;
  padding: 0;
  box-sizing: border-box;
}
.option-card:hover .shape-img-wrapper {
  background: #f8fafc;
}
.option-card.selected .shape-img-wrapper {
  background: rgba(234, 179, 8, 0.02);
  border-bottom-color: rgba(234, 179, 8, 0.2);
}
.shape-quiz-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06));
  transition: transform 0.3s ease;
}
.option-card:hover .shape-quiz-img {
  transform: scale(1.05);
}

/* پیش‌نمایش پالت رنگ‌ها */
.color-palette-preview {
  display: flex;
  gap: 4px;
  margin-bottom: 2px;
}
.color-palette-preview span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* فوتر کوییز با دکمه‌های کنترل */
.quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

/* راهنمای سایز تعاملی */
.size-hint-box {
  margin-top: 20px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
  padding: 12px;
}
.hint-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #ca8a04;
  cursor: pointer;
  font-weight: 700;
  user-select: none;
}
.hint-content {
  margin-top: 8px;
  font-size: 12px;
  color: #475569;
  line-height: 1.6;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
}
.hint-content ul {
  margin: 6px 12px 0 0;
  padding: 0;
}
.hint-content li {
  margin-bottom: 3px;
}

/* صفحه بارگذاری نهایی و اسکنر - تم روشن */
.quiz-loading-screen {
  width: 100%;
  min-height: 290px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease forwards;
}
.loading-wrapper {
  text-align: center;
  max-width: 380px;
  width: 90%;
}

/* رینگ اسکن تعاملی */
.scanner-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid rgba(202, 138, 4, 0.06);
  border-top: 3px solid #ca8a04;
  margin: 0 auto 25px auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 1.5s linear infinite;
}
.scanner-dot {
  width: 6px;
  height: 6px;
  background: #ca8a04;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  right: 12px;
  box-shadow: 0 0 8px #ca8a04;
}
.glasses-icon-center {
  width: 50px;
  height: 50px;
  background: #f8fafc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  animation: spinCounter 1.5s linear infinite reverse;
}
.glasses-icon-center i {
  color: #ca8a04;
  font-size: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes spinCounter {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #0f172a;
}
.loading-bar-wrapper {
  width: 100%;
  height: 5px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 12px;
}
.loading-bar-fill {
  height: 100%;
  background: #ca8a04;
  border-radius: 99px;
  width: 0%;
  box-shadow: 0 0 6px rgba(202, 138, 4, 0.3);
}
.loading-status-text {
  font-size: 12px;
  color: #475569;
}

/* ریسپانسیو و موبایل بهینه‌سازی شده */
@media (max-width: 768px) {
  .style-quiz-container {
    padding: 30px 0;
  }
  .quiz-card {
    padding: 25px 20px;
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  }
  .options-grid.cols-3,
  .options-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .step-title {
    font-size: 18px;
  }
  .step-desc {
    font-size: 12px;
    margin-bottom: 20px;
  }
  .intro-title {
    font-size: 22px;
  }
  .intro-desc {
    font-size: 13px;
    margin-bottom: 20px;
  }
  .feat-item {
    width: 100%;
    justify-content: center;
    padding: 6px 12px;
  }
  .card-sublabel {
    display: none; /* مخفی کردن توضیحات فرعی فریم‌ها در موبایل جهت خلوت شدن ظاهر */
  }
  .option-card {
    padding: 15px 8px;
    border-radius: 10px;
  }
  .card-icon {
    font-size: 22px;
  }
  .shape-img-wrapper {
    height: 90px;
  }
}

@media (max-width: 480px) {
  .options-grid.cols-2,
  .options-grid.cols-3,
  .options-grid.cols-4 {
    grid-template-columns: 1fr;
  }
  .quiz-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 20px;
  }
  .progress-wrapper {
    order: -1;
  }
  .back-btn, .skip-btn {
    justify-content: center;
  }
}

/* ==========================================================================
   بخش‌های مکمل سئو و راهنمای استایل (/style-quiz SEO Content)
   ========================================================================== */

.quiz-seo-wrapper {
  max-width: 900px;
  margin: 50px auto 10px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.quiz-seo-section {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.quiz-section-header {
  text-align: center;
  margin-bottom: 28px;
}

.quiz-sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef08a;
  color: #854d0e;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.quiz-section-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.4;
}

.quiz-section-desc {
  font-size: 14px;
  color: #64748b;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ۱. کارت‌های ۳ مرحله عملکرد */
.quiz-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.quiz-info-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px 18px;
  position: relative;
  text-align: center;
  transition: all 0.3s ease;
}

.quiz-info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e1;
}

.info-card-step {
  position: absolute;
  top: -12px;
  right: 18px;
  width: 26px;
  height: 26px;
  background: #eab308;
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(234, 179, 8, 0.3);
}

.info-card-icon {
  width: 50px;
  height: 50px;
  background: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 20px;
  color: #ca8a04;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.quiz-info-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.quiz-info-card p {
  font-size: 13px;
  color: #64748b;
  line-height: 1.7;
  margin: 0;
}

/* ۲. ماتریس فرم چهره و فریم متناسب */
.face-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.face-matrix-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.face-matrix-card:hover {
  border-color: #facc15;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.03);
}

.face-matrix-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.face-badge {
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.face-matrix-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.face-matrix-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 12px;
}

.face-matrix-match,
.face-matrix-avoid {
  font-size: 12px;
  line-height: 1.6;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
}

.face-matrix-match {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.face-matrix-match strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}

.face-matrix-avoid {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.face-matrix-avoid strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}

.face-matrix-footer {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px dashed #e2e8f0;
  text-align: center;
}

.face-matrix-footer p {
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 15px;
}

.face-matrix-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.matrix-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.matrix-btn:hover {
  background: #1e293b;
  color: #fde047;
  transform: translateY(-2px);
}

.matrix-btn-alt {
  background: #eab308;
  color: #0f172a;
}

.matrix-btn-alt:hover {
  background: #ca8a04;
  color: #ffffff;
}

.matrix-btn-sub {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.matrix-btn-sub:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ۳. آکاردئون سوالات متداول (FAQ) */
.quiz-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.quiz-faq-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.quiz-faq-item.active {
  border-color: #ca8a04;
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(202, 138, 4, 0.05);
}

.quiz-faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: right;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  gap: 12px;
  transition: color 0.2s ease;
}

.quiz-faq-question:hover {
  color: #ca8a04;
}

.quiz-faq-question i {
  color: #94a3b8;
  font-size: 13px;
  transition: transform 0.3s ease, color 0.2s ease;
  flex-shrink: 0;
}

.quiz-faq-item.active .quiz-faq-question i {
  transform: rotate(180deg);
  color: #ca8a04;
}

.quiz-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
  padding: 0 20px;
  color: #475569;
  font-size: 13.5px;
  line-height: 1.8;
}

.quiz-faq-item.active .quiz-faq-answer {
  max-height: 350px;
  padding: 0 20px 18px;
}

.quiz-faq-answer p {
  margin: 0;
}

/* بهینه‌سازی واکنش‌گرایی برای موبایل */
@media (max-width: 768px) {
  .quiz-seo-wrapper {
    margin-top: 35px;
    gap: 25px;
  }
  .quiz-seo-section {
    padding: 22px 16px;
    border-radius: 14px;
  }
  .quiz-section-title {
    font-size: 18px;
  }
  .quiz-steps-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .face-matrix-grid {
    grid-template-columns: 1fr;
  }
  .face-matrix-links {
    flex-direction: column;
    width: 100%;
  }
  .matrix-btn {
    width: 100%;
    justify-content: center;
  }
  .quiz-faq-question {
    font-size: 13.5px;
    padding: 14px 16px;
  }
  .quiz-faq-answer {
    font-size: 13px;
  }
}

