/* Shared styles for psychological test pages */

.test-page {
  padding-top: 100px;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-off) 0%, white 200px);
}

.test-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px;
}

.test-intro {
  background: white;
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.test-intro .icon {
  font-size: 72px;
  margin-bottom: 20px;
}

.test-intro h1 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 12px;
}

.test-intro p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.test-meta-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 20px 0;
  margin: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.test-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.test-meta-item .num {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 24px;
  font-weight: 800;
}

.disclaimer {
  background: #FFF8E6;
  border: 1px solid #F6E05E;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 13px;
  color: #744210;
  line-height: 1.7;
  text-align: right;
}

.disclaimer strong { color: #975A16; }

.quiz {
  background: white;
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-md);
  display: none;
}

.quiz.active { display: block; }

.progress-bar {
  height: 8px;
  background: var(--bg-off);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--gradient);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 100px;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-weight: 600;
}

.question {
  display: none;
  animation: fadeIn 0.4s ease;
}

.question.active { display: block; }

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

.question h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.5;
}

.question .q-intro {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: var(--bg-off);
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
  font-weight: 500;
  text-align: right;
  font-family: 'Tajawal', sans-serif;
  width: 100%;
}

.option:hover {
  background: var(--blue-light);
  border-color: var(--blue);
  transform: translateX(-4px);
}

.option.selected {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  transform: translateX(-4px);
}

.option .radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.option.selected .radio {
  border-color: white;
  background: white;
}

.option.selected .radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.quiz-nav button {
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
}

.quiz-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.result {
  background: white;
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-md);
  display: none;
  text-align: center;
}

.result.active { display: block; }

.result-icon {
  font-size: 80px;
  margin-bottom: 16px;
}

.result h2 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 8px;
}

.result-score {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0;
}

.result-score.low { background: var(--green-light); color: var(--green-dark); }
.result-score.mild { background: #FFF3E6; color: #C05621; }
.result-score.moderate { background: #FFE8E8; color: #C53030; }
.result-score.severe { background: #742A2A; color: white; }

.result-interpretation {
  background: var(--bg-off);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
  text-align: right;
  line-height: 1.9;
  color: var(--text-secondary);
  font-size: 15px;
}

.result-interpretation strong { color: var(--text-primary); }

.result-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.contact-form {
  background: var(--gradient-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 32px;
  text-align: right;
}

.contact-form h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}

.contact-form > p {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
}

/* ===== STRUCTURED RESULT CARD ===== */

.result-interpretation.structured {
  background: transparent;
  padding: 0;
  margin: 24px 0 0;
  text-align: right;
}

.score-bar-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 28px;
}

.score-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 600;
}

.score-bar-label strong {
  font-size: 20px;
  color: var(--text-primary);
}

.score-bar-track {
  height: 10px;
  background: var(--bg-off);
  border-radius: 100px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-bar-fill.low      { background: linear-gradient(90deg, #00A651, #00C963); }
.score-bar-fill.mild     { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.score-bar-fill.moderate { background: linear-gradient(90deg, #F97316, #FB923C); }
.score-bar-fill.severe   { background: linear-gradient(90deg, #DC2626, #EF4444); }

.result-headline {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding: 24px;
  background: var(--gradient-soft);
  border-radius: var(--radius-md);
  text-align: center;
}

.result-block {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 14px;
}

.result-block.reassurance {
  background: linear-gradient(135deg, #F0FFF7 0%, #E6F7ED 100%);
  border-color: #B8E6CB;
}

.result-block-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.result-block p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin: 0;
}

.result-urgency {
  background: #FFF5F5;
  border: 2px solid #FEB2B2;
  border-right: 5px solid #E53E3E;
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin: 16px 0;
  font-size: 15px;
  line-height: 1.8;
  color: #742A2A;
}

.result-urgency strong { color: #C53030; }

.result-next-step {
  margin-top: 28px;
  padding: 28px;
  background: linear-gradient(135deg, #1A1A2E 0%, #0A2540 60%, #0066CC 130%);
  border-radius: var(--radius-lg);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.result-next-step::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 40%; height: 200%;
  background: radial-gradient(ellipse, rgba(255,215,0,0.1) 0%, transparent 60%);
  border-radius: 50%;
}

.result-next-step-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.result-next-step-text {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.result-cta-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.result-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #1A1A2E;
  padding: 16px 30px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  font-family: 'Tajawal', sans-serif;
  box-shadow: 0 6px 20px rgba(255,215,0,0.25);
  transition: all 0.3s;
}

.result-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255,215,0,0.35);
}

.result-cta-primary.severe {
  background: linear-gradient(135deg, #FFFFFF, #F7FAFC);
  color: #C53030;
}

.result-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  color: white;
  padding: 16px 22px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  font-family: 'Tajawal', sans-serif;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s;
}

.result-cta-secondary:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
}

@media (max-width: 768px) {
  .test-intro, .quiz, .result { padding: 28px; }
  .test-intro h1 { font-size: 26px; }
  .question h2 { font-size: 18px; }
  .test-meta-bar { gap: 16px; }
  .result-headline { font-size: 18px; padding: 20px; }
  .result-next-step { padding: 22px 18px; }
  .result-next-step-text { font-size: 17px; }
  .result-cta-primary, .result-cta-secondary { width: 100%; justify-content: center; }
}
