/* ==========================================================================
   AutismoHub — Interactive Tests Styling
   ========================================================================== */

.ah-test-container {
  max-width: 860px;
  margin: 32px auto 60px;
  padding: 0 16px;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #3B382B;
}

/* Header & Intro */
.ah-test-header {
  margin-bottom: 28px;
}
.ah-test-header h1 {
  font-family: 'Fraunces', Georgia, serif;
  color: #788875;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.25;
  margin-bottom: 16px;
}
.ah-test-desc {
  font-size: 16px;
  line-height: 1.6;
  color: #555246;
  margin-bottom: 16px;
}

/* Alert Boxes */
.ah-test-alert {
  background-color: #FAF6F0;
  border-left: 4px solid #E8D3C5;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin: 18px 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: #4A4637;
}
.ah-test-alert--warning {
  background-color: #FFF9F2;
  border-left-color: #D9822B;
}
.ah-test-alert strong {
  color: #3B382B;
}

/* Progress Bar */
.ah-test-progress-wrap {
  margin: 28px 0 20px;
}
.ah-test-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #728062;
  margin-bottom: 8px;
}
.ah-test-progress-bar {
  width: 100%;
  height: 8px;
  background-color: #EAE8E3;
  border-radius: 99px;
  overflow: hidden;
}
.ah-test-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #728062, #788875);
  width: 0%;
  border-radius: 99px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Interactive Card */
.ah-test-card {
  background: #FFFFFF;
  border: 1px solid #E5E3DC;
  border-radius: 20px;
  padding: clamp(16px, 2.5vw, 24px);
  box-shadow: 0 10px 32px rgba(120, 136, 117, 0.07);
  box-sizing: border-box;
}

/* Question Statement */
.ah-test-question-box {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}
.ah-test-question-text {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(18px, 2.5vw, 21px);
  color: #3B382B;
  line-height: 1.35;
  margin: 0;
}

/* Options */
.ah-test-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.ah-test-option {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border: 1.5px solid #E0DED7;
  border-radius: 12px;
  background-color: #FAFAFA;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.ah-test-option:hover {
  border-color: #AAB4A6;
  background-color: #F7F8F6;
  transform: translateY(-1px);
}
.ah-test-option.is-selected {
  border-color: #788875;
  background-color: #F1F4EE;
  box-shadow: 0 2px 8px rgba(120, 136, 117, 0.12);
}
.ah-test-option input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: 14px;
  accent-color: #788875;
  cursor: pointer;
}
.ah-test-option-label {
  font-size: 15px;
  font-weight: 500;
  color: #3B382B;
  flex: 1;
}

/* Bottom Actions */
.ah-test-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid #EFEFEA;
}
.ah-test-btn {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ah-test-btn--prev {
  background-color: #F2EFE9;
  color: #555246;
}
.ah-test-btn--prev:hover:not(:disabled) {
  background-color: #E6E2DA;
}
.ah-test-btn--prev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ah-test-btn--next {
  background-color: #788875;
  color: #FFFFFF;
}
.ah-test-btn--next:hover:not(:disabled) {
  background-color: #728062;
  box-shadow: 0 4px 12px rgba(120, 136, 117, 0.25);
}
.ah-test-btn--next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Results Screen */
.ah-test-results {
  display: none;
  animation: ahFadeIn 0.4s ease;
}
@keyframes ahFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.ah-results-hero {
  background: linear-gradient(135deg, #F1F4EE 0%, #FAFAF7 100%);
  border: 1.5px solid #D1D8CC;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 28px;
}
.ah-results-score-badge {
  display: inline-block;
  background-color: #788875;
  color: #F9F8F6;
  font-family: 'Fraunces', serif;
  font-size: 38px;
  padding: 8px 28px;
  border-radius: 40px;
  margin-bottom: 12px;
}
.ah-results-band-name {
  font-size: 22px;
  font-weight: 700;
  color: #788875;
  margin-bottom: 8px;
}
.ah-results-band-summary {
  font-size: 16px;
  color: #4A4637;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Subscales Box */
.ah-subscales-box {
  background-color: #FAF9F7;
  border: 1px solid #EAE8E3;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}
.ah-subscales-title {
  font-weight: 700;
  font-size: 16px;
  color: #788875;
  margin-bottom: 12px;
}
.ah-subscales-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.ah-subscale-item {
  background: #FFF;
  border: 1px solid #E0DED7;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ah-subscale-label {
  font-size: 14px;
  color: #555246;
}
.ah-subscale-score {
  font-weight: 700;
  color: #788875;
  font-size: 16px;
}

/* Interpretation Details */
.ah-results-detail {
  font-size: 15px;
  line-height: 1.65;
  color: #3B382B;
  margin-bottom: 24px;
}

/* Next Steps CTAs */
.ah-results-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}
.ah-results-cta-btn {
  flex: 1 1 240px;
  text-align: center;
  padding: 14px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}
.ah-results-cta-btn--primary {
  background-color: #788875;
  color: #FFFFFF !important;
}
.ah-results-cta-btn--primary:hover {
  background-color: #728062;
}
.ah-results-cta-btn--secondary {
  background-color: #E8D3C5;
  color: #3B382B !important;
}
.ah-results-cta-btn--secondary:hover {
  background-color: #DCC0AF;
}

/* Voluntary Email Box */
.ah-email-results-card {
  background-color: #F8F7F4;
  border: 1px solid #DCD8CF;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 30px;
}
.ah-email-results-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  color: #788875;
  margin: 0 0 8px;
}
.ah-email-results-card p {
  font-size: 14px;
  color: #555246;
  margin-bottom: 16px;
  line-height: 1.5;
}
.ah-email-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ah-email-input {
  flex: 1 1 260px;
  padding: 12px 16px;
  border: 1px solid #B8B4AA;
  border-radius: 8px;
  font-size: 15px;
  background-color: #FFFFFF;
}
.ah-email-submit-btn {
  background-color: #788875;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.ah-email-submit-btn:hover {
  background-color: #728062;
}
.ah-email-status-msg {
  font-size: 14px;
  margin-top: 10px;
}

/* Index / Hub Grid of Tests */
.ah-tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0 48px;
}
.ah-test-hub-card {
  background: #FFF;
  border: 1px solid #E5E3DC;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(120, 136, 117, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.ah-test-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(120, 136, 117, 0.12);
}
.ah-test-hub-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 12px;
  background: #F1F4EE;
  color: #788875;
  margin-bottom: 12px;
}
.ah-test-hub-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  color: #3B382B;
  margin: 0 0 10px;
}
.ah-test-hub-card p {
  font-size: 14px;
  line-height: 1.5;
  color: #555246;
  flex-grow: 1;
  margin-bottom: 20px;
}
.ah-test-hub-btn {
  background-color: #788875;
  color: #FFFFFF !important;
  text-align: center;
  padding: 10px 18px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none !important;
  transition: background 0.2s;
}
.ah-test-hub-btn:hover {
  background-color: #728062;
}

/* Bibliographical references */
.ah-test-reference-box {
  margin-top: 36px;
  padding: 18px 22px;
  background-color: #F8F7F4;
  border-radius: 12px;
  font-size: 13.5px;
  color: #6E6A5C;
  line-height: 1.5;
}
.ah-test-reference-box strong {
  color: #3B382B;
}
