/* هدر تست */
.test-hero {
  background: var(--green);
  color: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.test-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.test-hero h1 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.test-hero p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 20px;
}

.test-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.test-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

/* بخش‌های تست */
.test-section {
  background: var(--bg-khak, #f0f8ff);
  border-radius: 16px;
  padding: 30px;
  margin: 25px 0;
  border-right: 5px solid var(--green, #328e6e);
}

.test-section h2 {
  color: var(--black, #000);
  font-size: 1.3rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.test-section h2 i {
  color: var(--green, #328e6e);
  font-size: 1.2em;
}

.test-section p {
  line-height: 1.9;
  margin-bottom: 15px;
}

/* مراحل تست */
.test-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}

.test-step {
  display: flex;
  gap: 20px;
  background: var(--bg-sefid, #fff);
  padding: 20px;
  border-radius: 12px;
  border-right: 4px solid var(--green, #328e6e);
  transition: transform 0.2s ease;
}
.step-number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #328e6e, #57ba57);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
}

.step-content h3 {
  color: var(--black, #000);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.step-content p {
  margin: 0;
  color: var(--black-hover, #333);
  font-size: 0.95rem;
}

/* جدول درجه‌بندی */
.grading-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.grading-table thead {
  background: linear-gradient(135deg, #328e6e, #57ba57);
}

.grading-table th {
  color: #fff;
  padding: 15px 20px;
  text-align: right;
  font-size: 0.95rem;
  font-weight: 700;
}

.grading-table td {
  padding: 15px 20px;
  background: var(--bg-sefid, #fff);
  border-bottom: 1px solid var(--bg-khak2, #dcebf9);
  font-size: 0.95rem;
  color: var(--black, #000);
}

.grading-table tr:last-child td {
  border-bottom: none;
}

.grading-table tr:nth-child(even) td {
  background: var(--bg-khak, #f0f8ff);
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.grade-0 {
  background: #2ecc71;
}
.grade-1 {
  background: #a8d84e;
}
.grade-2 {
  background: #f1c40f;
}
.grade-3 {
  background: #f39c12;
}
.grade-4 {
  background: #e67e22;
}
.grade-5 {
  background: #e74c3c;
}

/* ابزار تعاملی ثبت نتیجه */
.result-tool {
  border-radius: 16px;
  padding: 30px;
  margin: 30px 0;
  border: 2px solid var(--green, #328e6e);
}

.result-tool h2 {
  color: var(--green, #328e6e);
  margin-bottom: 20px;
  text-align: center;
}

.result-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}

.result-btn {
  border-radius: 16px;
  border: 3px solid transparent;
  background: var(--bg-khak);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  gap: 0px;
  transition: all 0.3s ease;
}

.result-btn .number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--black, #000);
}

.result-btn .label {
  font-size: 0.7rem;
  color: var(--black-hover, #666);
}

.result-btn:hover {
  transform: translateY(-4px);
}

.result-btn.active {
  border-color: var(--green, #328e6e);
  transform: scale(1.05);
}

.result-btn.active .number {
  color: var(--green, #328e6e);
}

.result-output {
  text-align: center;
  margin-top: 25px;
  padding: 20px;
  border-radius: 12px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--black, #000);
  line-height: 1.8;
}

.result-output.has-result {
  border-right: 5px solid var(--green, #328e6e);
}

.result-output strong {
  color: var(--green, #328e6e);
  font-size: 1.2rem;
}

/* باکس هشدار */
.warning-box {
  border-right: 5px solid #f39c12;
  padding: 20px 25px;
  border-radius: 12px;
  margin: 25px 0;
}

.warning-box p {
  margin: 0;
  color: #856404;
  line-height: 1.9;
}

.warning-box strong {
  color: #b8860b;
}
/* ریسپانسیو */
@media (max-width: 768px) {
  .test-hero {
    padding: 30px 20px;
  }

  .test-hero h1 {
    font-size: 1.3rem;
  }

  .test-section {
    padding: 20px;
  }

  .test-step {
    flex-direction: column;
    gap: 12px;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .grading-table th,
  .grading-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .result-btn .number {
    font-size: 1.2rem;
  }

  .result-btn .label {
    font-size: 0.6rem;
  }
}
