/* ==========================================
   SARA Test - نسخه سبک و بهینه
   ========================================== */

/* ---------- Container ---------- */
.sara-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 15px;
}

/* ---------- هدر ---------- */
.test-hero img {
  width: 100%;
  height: auto;
  margin-bottom: 20px;
}

/* ---------- فرم مشخصات بیمار ---------- */
.patient-info-form {
  background: var(--bg-khak);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 25px;
  border-right: 5px solid var(--green);
}

.patient-info-form h2 {
  color: var(--green);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.patient-info-form h2 i {
  color: var(--green);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: var(--fs-base-s);
  color: var(--black);
  font-family: "iranp-b", sans-serif;
  font-weight: 700;
}

.form-group input,
.form-group select {
  padding: 10px 15px;
  border: 2px solid var(--bg-khak2);
  border-radius: 10px;
  font-family: inherit;
  font-size: var(--fs-base-s);
  background: var(--bg-sefid);
  color: var(--black);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-light);
}

.form-group input::placeholder {
  color: var(--black-hover);
  opacity: 0.5;
}

/* ---------- نوار پیشرفت ---------- */
.progress-container {
  background: var(--bg-khak);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  border-right: 4px solid var(--green);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: var(--fs-base-s);
  color: var(--black-hover);
  flex-wrap: wrap;
  gap: 10px;
}

.progress-header .current-score {
  color: var(--green);
  font-weight: 700;
}

.progress-bar-bg {
  width: 100%;
  height: 12px;
  background: var(--bg-khak2);
  border-radius: 50px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient);
  border-radius: 50px;
  transition: width 0.5s var(--ease);
}

/* ---------- کارت سوال ---------- */
.question-card {
  background: var(--bg-sefid);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 20px;
  border-right: 5px solid var(--green);
  animation: test-slideIn 0.4s var(--ease);
}

@keyframes test-slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-number {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green-light);
  color: var(--green);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: var(--fs-base-s);
  font-weight: 700;
  margin-bottom: 15px;
}

.question-card h2 {
  color: var(--black);
  font-size: var(--fs-2);
  line-height: 1.5;
  margin-bottom: 10px;
}

.question-card .max-score {
  display: inline-block;
  color: var(--green);
  font-size: var(--fs-base-s);
  font-weight: 700;
  margin-bottom: 20px;
}

.question-instruction {
  background: var(--bg-khak);
  padding: 15px 20px;
  border-radius: 10px;
  border-right: 3px solid var(--green);
  margin-bottom: 20px;
  font-size: var(--fs-base-s);
  line-height: 1.8;
  color: var(--black-hover);
}

.question-instruction i {
  color: var(--green);
  margin-left: 8px;
}

/* ---------- گزینه‌ها ---------- */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 15px 20px;
  background: var(--bg-khak);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  transition: var(--transition);
}

.option-item:hover,
.option-item.selected {
  background: var(--bg-khak2);
  border-color: var(--green);
}

.option-item:hover {
  transform: translateX(-5px);
}

.option-score {
  flex-shrink: 0;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--gradient);
  color: var(--white-s);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--fs-4);
}

.option-text {
  flex: 1;
  color: var(--black);
  font-size: var(--fs-base-s);
  line-height: 1.6;
}

.option-text strong {
  display: block;
  color: var(--green);
  font-family: "iranp-b", sans-serif;
  margin-bottom: 3px;
}

.option-text small {
  color: var(--black-hover);
  opacity: 0.85;
}

/* ---------- دکمه‌های ناوبری ---------- */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 25px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--fs-base-s);
  font-weight: 700;
  transition: var(--transition);
}

.nav-btn.prev {
  background: var(--bg-khak2);
  color: var(--black);
}

.nav-btn.prev:hover {
  background: var(--green-light);
  color: var(--green);
}

.nav-btn.next {
  background: var(--gradient);
  color: var(--white-s);
}

.nav-btn.next:hover {
  transform: translateY(-2px);
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ---------- کارت نتیجه ---------- */
.result-card {
  background: var(--bg-khak);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  border: 3px solid var(--green);
  margin-bottom: 25px;
  animation: test-scaleIn 0.5s var(--ease);
}

@keyframes test-scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.result-card h2 {
  color: var(--green);
  font-size: var(--fs-1);
  font-family: "iranp-b", sans-serif;
  margin-bottom: 20px;
}

.total-score {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  margin: 15px 0;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.total-score span {
  font-size: var(--fs-1);
  color: var(--black-hover);
  font-weight: 500;
  -webkit-text-fill-color: var(--black-hover);
}

.severity-label {
  display: inline-block;
  padding: 12px 35px;
  border-radius: 50px;
  font-size: var(--fs-4);
  font-weight: 700;
  color: var(--white-s);
  margin: 15px 0;
}

.severity-none {
  background: var(--gradient);
}
.severity-mild {
  background: linear-gradient(135deg, var(--green2), #a8d84e);
  color: var(--black-s);
}
.severity-moderate {
  background: linear-gradient(135deg, var(--golden-l), var(--golden-d));
  color: var(--black-s);
}
.severity-severe {
  background: linear-gradient(135deg, #e67e22, #d35400);
}
.severity-very-severe {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.result-description {
  background: var(--bg-sefid);
  padding: 20px;
  border-radius: 12px;
  border-right: 4px solid var(--green);
  margin: 20px 0;
  font-size: var(--fs-base-s);
  line-height: 1.9;
  color: var(--black-hover);
  text-align: right;
}

/* ---------- جدول تفسیر ---------- */
.interpretation-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  margin: 20px 0;
  font-size: var(--fs-base-s);
}

.interpretation-table th,
.interpretation-table td {
  padding: 12px 15px;
  text-align: right;
  border-bottom: 1px solid var(--bg-khak2);
}

.interpretation-table thead {
  background: var(--gradient);
  color: var(--white-s);
}

.interpretation-table tbody td {
  background: var(--bg-sefid);
  color: var(--black);
}

.interpretation-table tbody tr:nth-child(even) td {
  background: var(--bg-khak);
}

.interpretation-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- دکمه‌های نتیجه ---------- */
.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 25px;
}

.result-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 25px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--fs-base-s);
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.result-btn.print {
  background: var(--gradient);
  color: var(--white-s);
}
.result-btn.restart {
  background: linear-gradient(135deg, var(--golden-l), var(--golden-d));
  color: var(--black-s);
}
.result-btn.contact {
  background: var(--n-blue);
  color: var(--white-s);
}

.result-btn:hover {
  transform: translateY(-2px);
}

/* ---------- بخش اطلاعاتی ---------- */
.info-section {
  background: var(--bg-khak);
  border-radius: 16px;
  padding: 25px;
  margin-top: 30px;
  border-right: 5px solid var(--green);
}

.info-section h3 {
  color: var(--green);
  font-size: var(--fs-3);
  font-family: "iranp-b", sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.info-section p {
  font-size: var(--fs-base-s);
  line-height: 1.8;
  color: var(--black-hover);
  margin-bottom: 10px;
}

.test-warning-box {
  background: var(--bg-khak2);
  border-right: 5px solid var(--golden-l);
  padding: 20px 25px;
  border-radius: 12px;
  margin-top: 20px;
}

.test-warning-box p {
  margin: 0;
  font-size: var(--fs-base-s);
  line-height: 1.9;
  color: var(--black-hover);
}

.test-warning-box strong {
  color: var(--golden-d);
}

/* ---------- هدر چاپ ---------- */
.print-header {
  display: none;
  text-align: center;
  padding: 15px 0;
  border-bottom: 2px solid var(--green);
  margin-bottom: 20px;
}

.print-header h1 {
  color: var(--green);
  font-size: var(--fs-1);
  margin-bottom: 5px;
}

.print-header .print-info {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 10px;
  font-size: var(--fs-base-s);
  color: var(--black-hover);
  margin-top: 10px;
}

.print-header .print-info strong {
  color: var(--green);
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 768px) {
  .sara-page {
    padding: 15px 10px;
  }
  .question-card {
    padding: 20px 18px;
  }
  .question-card h2 {
    font-size: var(--fs-3);
  }
  .option-item {
    padding: 12px 15px;
    gap: 10px;
  }
  .option-score {
    width: 38px;
    height: 38px;
  }
  .total-score {
    font-size: 3rem;
  }
  .severity-label {
    font-size: var(--fs-base-s);
    padding: 10px 25px;
  }
  .nav-buttons {
    flex-direction: column-reverse;
  }
  .nav-btn {
    width: 100%;
  }
  .result-card {
    padding: 30px 20px;
  }
  .result-actions {
    flex-direction: column;
  }
  .result-btn {
    width: 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- چاپ ---------- */
@media print {
  .progress-container,
  .nav-buttons,
  .result-actions,
  .breadcrumb,
  .site-header,
  .sidebar,
  #component-sidebar1,
  footer,
  .test-hero,
  .patient-info-form {
    display: none !important;
  }

  .print-header {
    display: block !important;
  }

  .result-card,
  .severity-label,
  .interpretation-table thead {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .question-card {
    page-break-inside: avoid;
  }

  .interpretation-table thead {
    background: var(--green) !important;
  }

  .interpretation-table thead th {
    color: var(--white-s) !important;
  }
}
