/* ===================================
   TRUEHOPE BRAND COLORS
   =================================== */
:root {
  --primary: #0077B5;        /* Truehope Blue */
  --primary-light: #E6F3FA;  /* Light blue background */
  --accent: #F5A623;         /* Truehope Gold */
  --text: #333333;           /* Dark gray */
  --background: #FFFFFF;     /* White */
  --success: #4CAF50;        /* Green checkmarks */
  --border: #E0E0E0;         /* Light gray border */
  --shadow: rgba(0, 0, 0, 0.1);
}

/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ===================================
   QUIZ CONTAINER
   =================================== */
.quiz-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

/* ===================================
   HEADER
   =================================== */
.quiz-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 20px;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: var(--primary-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary);
  width: 8.33%; /* 1 of 12 */
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

/* ===================================
   BACK BUTTON
   =================================== */
.back-button {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 16px;
  cursor: pointer;
  padding: 10px 0;
  margin-bottom: 20px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.back-button:hover {
  opacity: 0.7;
}

/* ===================================
   STEP CONTAINER
   =================================== */
.step {
  display: none;
  animation: fadeIn 0.3s ease;
  min-height: 100vh;
  overflow-y: auto;
}

.step.active {
  display: block;
}

.step-content {
  padding: 20px 5px 100px 5px;
  overflow: visible;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
.headline {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
  text-align: center;
}

.subhead {
  font-size: 20px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 30px;
  text-align: center;
}

.question {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 30px;
  text-align: center;
  line-height: 1.4;
}

.privacy-notice {
  font-size: 0.85rem;
  color: #22A866;
  text-align: center;
  margin: 0 0 20px 0;
  font-weight: 500;
  line-height: 1.4;
}

/* ===================================
   STEP 1: IMAGE GRID
   =================================== */
.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
  padding: 0 2px;
  overflow: visible;
}

.image-card {
  background: var(--background);
  border: 3px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  min-height: 44px;
  max-width: 100%;
  width: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 119, 181, 0.1);
  user-select: none;
  -webkit-user-select: none;
}

.image-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--shadow);
}

.image-card.selected {
  border: 3px solid var(--primary) !important;
  border-radius: 12px !important;
  background-color: var(--primary-light) !important;
  box-shadow: 0 2px 8px rgba(0, 119, 181, 0.2) !important;
  transform: scale(1.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  margin-bottom: 10px;
}

.image-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

/* ===================================
   STEP 2, 5, 7, 9: OPTIONS LIST
   =================================== */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 0 2px;
  overflow: visible;
}

.option-card {
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 15px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  max-width: 100%;
  width: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 119, 181, 0.1);
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--shadow);
}

.option-card.selected {
  border: 3px solid var(--primary) !important;
  border-radius: 12px !important;
  background-color: var(--primary-light) !important;
  box-shadow: 0 2px 8px rgba(0, 119, 181, 0.2) !important;
  transform: scale(1.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Radio indicator for single-select cards */
.radio-indicator {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid #ccc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.radio-indicator::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s ease;
}

.option-card.selected .radio-indicator {
  border-color: var(--primary);
  background: white;
}

.option-card.selected .radio-indicator::after {
  background: var(--primary);
}

.option-content {
  flex: 1;
}

.option-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.option-subtext {
  font-size: 14px;
  color: #666;
  font-style: italic;
}

/* ===================================
   STEP 3 & 6: EDUCATIONAL
   =================================== */
.image-container {
  text-align: center;
  margin: 30px 0;
}

.education-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.education-text {
  font-size: 18px;
  color: var(--text);
  text-align: center;
  margin: 20px 0;
  line-height: 1.6;
}

.symptoms-list {
  list-style: none;
  margin: 20px 0;
  padding: 0;
}

.symptoms-list li {
  font-size: 16px;
  padding: 10px;
  margin: 8px 0;
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 4px;
}

/* ===================================
   STEP 4: CHECKBOXES
   =================================== */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.checkbox-option:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--shadow);
}

.checkbox-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-label {
  color: var(--primary);
  font-weight: 600;
}

.checkbox-label {
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
}

/* ===================================
   STEP 6: USP GRID
   =================================== */
.usp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 30px 0;
}

.usp-card {
  background: var(--primary-light);
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.usp-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.usp-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.usp-description {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.footer-text {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin: 20px 0;
  font-style: italic;
}

/* ===================================
   STEP 8: BEFORE/AFTER SLIDER
   =================================== */
/* Before/After Slider - Simple Working Pattern */
.ba-slider {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 24px;
  overflow: hidden;
  border-radius: 12px;
}

/* Container for AFTER image (background layer) */
.ba-image {
  position: relative;
}

.ba-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* Container for BEFORE image (foreground, resizable) */
.ba-resize {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%; /* Initial position - JS will control this */
  overflow: hidden;
}

.ba-resize img {
  display: block;
  height: 100%;
  width: auto;
  min-width: 100%;
  max-width: none;
  object-fit: cover;
  object-position: left;
}

/* Slider handle */
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%; /* Synced with ba-resize width */
  width: 4px;
  margin-left: -2px;
  background: white;
  cursor: ew-resize;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
  z-index: 10;
}

.ba-handle::after {
  content: '◀▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: #0077B5;
  border: 3px solid white;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Labels */
.ba-label {
  position: absolute;
  bottom: 16px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: white;
  border-radius: 4px;
  letter-spacing: 1px;
  z-index: 5;
}

.ba-label-before {
  left: 16px;
  background: #0077B5;
}

.ba-label-after {
  right: 16px;
  background: #F5A623;
}

.testimonial,
.testimonial-card {
  margin-top: 30px;
  padding: 20px;
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
}

.testimonial-text {
  font-size: 16px;
  font-style: italic;
  color: var(--text);
  margin-bottom: 10px;
}

.testimonial-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-align: right;
}

.btn-continue {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 40px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 30px;
  transition: all 0.2s ease;
  min-height: 44px;
}

.btn-continue:hover {
  background-color: #005a8c;
  box-shadow: 0 4px 12px var(--shadow);
  transform: translateY(-2px);
}

.btn-continue:active {
  transform: translateY(0);
}

/* ===================================
   STEP 9: SMALL PRINT
   =================================== */
.small-print {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-top: 20px;
  font-style: italic;
}

/* ===================================
   STEP 10: LOADING SCREEN
   =================================== */
.loading-screen {
  text-align: center;
  padding: 40px 20px;
}

.loading-icon {
  margin: 40px 0;
}

.pulsing-brain {
  font-size: 80px;
  animation: pulse 1.5s ease-in-out infinite;
}

.loading-progress-bar {
  width: 100%;
  height: 12px;
  background-color: var(--primary-light);
  border-radius: 6px;
  overflow: hidden;
  margin: 30px 0;
}

.loading-fill {
  height: 100%;
  background-color: var(--primary);
  width: 0%;
  transition: width 0.1s linear;
}

.testimonial-rotator {
  margin-top: 40px;
  min-height: 60px;
  position: relative;
}

.rotating-testimonial {
  font-size: 18px;
  font-style: italic;
  color: var(--text);
  opacity: 0;
  position: absolute;
  width: 100%;
  transition: opacity 0.5s ease;
}

.rotating-testimonial.active {
  opacity: 1;
  position: relative;
}

/* ===================================
   STEP 11: SCRATCH-TO-REVEAL
   =================================== */
.scratch-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 380px;
  margin: 20px auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.scratch-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  text-align: center;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
}

.scratch-reveal img {
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
  margin: 12px 0;
}

.scratch-reveal h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0;
}

.scratch-reveal p {
  font-size: 14px;
  color: #666;
  margin: 4px 0;
}

.match-badge {
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.4);
  animation: scaleIn 0.5s ease;
  margin-bottom: 12px;
}

.scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  z-index: 10;
  border-radius: 16px;
  user-select: none;
  -webkit-user-select: none;
}

/* ===================================
   STEP 12: OFFER PAGE
   =================================== */
.offer-page {
  text-align: center;
}

.match-badge-top {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.3);
}

.product-display {
  margin: 30px 0;
}

.product-image {
  max-width: 250px;
  height: auto;
  filter: drop-shadow(0 4px 12px var(--shadow));
}

.product-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.product-tagline {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
}

.offer-box {
  background: var(--primary-light);
  border: 2px solid var(--primary);
  border-radius: 16px;
  padding: 30px 20px;
  margin: 30px 0;
  text-align: center;
}

.price-comparison {
  margin-bottom: 10px;
}

.old-price {
  font-size: 16px;
  color: #999;
  text-decoration: line-through;
}

.current-price {
  font-size: 20px;
  margin: 15px 0;
}

.price-label {
  color: var(--text);
  font-weight: 600;
}

.price-amount {
  font-size: 42px;
  font-weight: 700;
  color: var(--primary);
  margin-left: 10px;
}

.savings-badge-container {
  text-align: center;
  margin: 15px 0;
}

.savings-badge {
  background: var(--success);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 700;
  display: inline-block;
}

.benefits-container {
  margin-top: 20px;
}

.benefits-list {
  list-style: none;
  margin: 20px auto;
  padding: 0;
  text-align: left;
  display: inline-block;
}

.benefits-list li {
  font-size: 16px;
  padding: 8px 0;
  color: var(--text);
}

/* ===================================
   BUTTONS
   =================================== */
.continue-button {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 40px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 30px;
  transition: all 0.2s ease;
  min-height: 44px;
}

.continue-button:hover {
  background-color: #005a8c;
  box-shadow: 0 4px 12px var(--shadow);
  transform: translateY(-2px);
}

.continue-button:active {
  transform: translateY(0);
}

.cta-button {
  display: block;
  background-color: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  padding: 18px 40px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  width: 100%;
  margin-top: 30px;
  transition: all 0.2s ease;
  min-height: 44px;
  box-shadow: 0 6px 20px rgba(0, 119, 181, 0.3);
}

.cta-button:hover {
  background-color: #005a8c;
  box-shadow: 0 8px 24px rgba(0, 119, 181, 0.4);
  transform: translateY(-2px);
}

.cta-button:active {
  transform: translateY(0);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 480px) {
  .quiz-container {
    padding: 15px;
  }

  .step-content {
    padding-top: 10px;
  }

  .quiz-header {
    padding: 10px 15px;
    margin-bottom: 20px;
  }

  .headline {
    font-size: 24px;
  }

  .subhead {
    font-size: 18px;
  }

  .question {
    font-size: 20px;
    margin-bottom: 20px;
  }

  h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }

  .image-grid {
    gap: 10px;
  }

  .image-card {
    min-height: auto;
  }

  .image-card img {
    max-height: 140px;
    object-fit: cover;
  }

  .usp-grid {
    grid-template-columns: 1fr;
  }

  .price-amount {
    font-size: 36px;
  }
}

@media (max-width: 375px) {
  .quiz-container {
    padding: 15px;
  }

  .headline {
    font-size: 24px;
  }

  .subhead {
    font-size: 18px;
  }

  .question {
    font-size: 20px;
  }

  .image-grid {
    gap: 10px;
  }

  .usp-grid {
    grid-template-columns: 1fr;
  }

  .price-amount {
    font-size: 36px;
  }
}

@media (min-width: 1200px) {
  .quiz-container {
    padding: 40px;
  }

  .headline {
    font-size: 32px;
  }

  .question {
    font-size: 28px;
  }
}

/* ===================================
   ANIMATIONS (Imported from animations.css)
   =================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}
