/* ========== QUIZ PAGE ========== */

.quiz-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #000;
  overflow-x: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Header */
.quiz-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  position: relative;
  z-index: 10;
}

.quiz-header .article-logo img {
  height: 40px;
  width: auto;
}

.quiz-back {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background 0.2s ease;
  margin-left: 1rem;
}

.quiz-back:hover {
  background: rgba(0, 0, 0, 0.05);
}

.quiz-back svg {
  width: 18px;
  height: 18px;
}

.quiz-back.hidden {
  visibility: hidden;
  pointer-events: none;
}

/* Progress bar */
.quiz-progress {
  height: 4px;
  background: #f1f5f9;
  position: relative;
}

.quiz-progress-fill {
  height: 100%;
  background: #000;
  border-radius: 0 4px 4px 0;
  transition: width 0.5s ease-out;
}

/* Main quiz area */
.quiz-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
}

/* Step container — holds the animated content */
.quiz-step-container {
  width: 100%;
  max-width: 500px;
  position: relative;
}

.quiz-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ========== INTRO STEP ========== */

.quiz-intro-description {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #555;
  max-width: 520px;
  margin: 0 auto 32px;
}

button.quiz-intro-start {
  width: 100%;
  padding: 16px 24px;
  font-size: 1.05rem;
}

/* ========== ENTRANCE ANIMATION (first load) ========== */

.quiz-step.entrance {
  animation: quizFadeInBlur 1.2s ease-out forwards;
}

@keyframes quizFadeInBlur {
  from {
    opacity: 0;
    filter: blur(12px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

/* ========== SLIDE TRANSITIONS ========== */

.quiz-step.slide-exit-forward {
  animation: slideOutLeft 0.35s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.quiz-step.slide-exit-backward {
  animation: slideOutRight 0.35s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.quiz-step.slide-enter-forward {
  animation: slideInRight 0.65s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.quiz-step.slide-enter-backward {
  animation: slideInLeft 0.65s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; filter: blur(0); }
  to   { transform: translateX(-55%); opacity: 0; filter: blur(8px); }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; filter: blur(0); }
  to   { transform: translateX(55%); opacity: 0; filter: blur(8px); }
}

@keyframes slideInRight {
  from { transform: translateX(55%); opacity: 0; filter: blur(8px); }
  to   { transform: translateX(0); opacity: 1; filter: blur(0); }
}

@keyframes slideInLeft {
  from { transform: translateX(-55%); opacity: 0; filter: blur(8px); }
  to   { transform: translateX(0); opacity: 1; filter: blur(0); }
}

/* ========== QUESTION CONTENT ========== */

.quiz-question {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: #000;
  margin-bottom: 0.5rem;
}

.quiz-description {
  font-size: 1rem;
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.quiz-question + .quiz-options {
  margin-top: 2rem;
}

/* ========== OPTIONS ========== */

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.quiz-option {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.quiz-option:hover {
  background: rgba(0, 0, 0, 0.05);
}

.quiz-option.selected {
  background: #000;
  color: #fff;
}

/* ========== DROPDOWN SELECT ========== */

.quiz-select {
  width: 100%;
  padding: 16px 24px;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  margin-bottom: 1rem;
}

.quiz-select:focus {
  outline: none;
  border-color: #555;
}

/* ========== LEAD CAPTURE FORM ========== */

.quiz-lead-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  text-align: left;
}

.quiz-lead-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.quiz-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.quiz-field.full-width {
  grid-column: 1 / -1;
}

.quiz-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}

.quiz-field input {
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 1.05rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.quiz-field input:focus {
  border-color: #000;
}

.quiz-lead-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.quiz-lead-btn {
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  border: 2px solid #000;
}

.quiz-lead-btn.primary {
  background: #000;
  color: #fff;
}

.quiz-lead-btn.primary:hover {
  background: #222;
}

.quiz-lead-btn.secondary {
  background: #fff;
  color: #000;
}

.quiz-lead-btn.secondary:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* ========== RESULT SCREEN ========== */

.quiz-result {
  text-align: left;
  width: 100%;
  max-width: 700px;
}

.quiz-result-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: #000;
  color: #fff;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.quiz-result-stage {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.quiz-result-blocker {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.quiz-result-blocker strong {
  color: #000;
}

/* Stacked result sections */

.quiz-result-section {
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

.quiz-result-section h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.quiz-result-section .subtitle {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1rem;
}

/* Next steps numbered list */
.quiz-next-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-next-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.quiz-step-number {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.quiz-step-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
}

/* Recommendation cards */
.quiz-rec-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-rec-card {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.quiz-rec-card:hover {
  background: #f8fafc;
}

.quiz-rec-card h5 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.quiz-rec-card p {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
}

/* Restart / back buttons */
.quiz-result-actions {
  display: flex;
  gap: 0.75rem;
}

/* ========== FOOTER ========== */

.quiz-footer {
  padding: 1.5rem 2rem;
  text-align: center;
}

.quiz-footer p {
  font-size: 0.85rem;
  color: #999;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 720px) {
  .quiz-question {
    font-size: 1.5rem;
  }

  .quiz-option {
    padding: 14px 20px;
    font-size: 0.95rem;
  }


  .quiz-lead-row {
    grid-template-columns: 1fr;
  }

  .quiz-result-stage {
    font-size: 1.8rem;
  }

  .quiz-step-container {
    max-width: 100%;
  }
}

/* ========== SLIDER ========== */

.quiz-slider-container {
  width: 100%;
  text-align: center;
  padding: 1rem 0;
}

.quiz-slider-value {
  font-size: 2.8rem;
  font-weight: 800;
  color: #000;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.quiz-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  margin-bottom: 0.75rem;
}

.quiz-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.15s ease;
}

.quiz-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.quiz-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.quiz-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 2rem;
}

.quiz-continue-btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: #000;
  color: #fff;
  border: 2px solid #000;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.quiz-continue-btn:hover {
  background: #222;
}

.quiz-continue-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========== PLACES AUTOCOMPLETE ========== */

.quiz-places-wrapper {
  width: 100%;
  position: relative;
}

.quiz-places-input {
  width: 100%;
  padding: 16px 24px;
  border: 2px solid #000;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 500;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.quiz-places-input::placeholder {
  color: #aaa;
  font-weight: 400;
}

.quiz-places-input:focus {
  border-color: #555;
}

.quiz-places-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 100;
  overflow: hidden;
}

.quiz-places-item {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: #333;
  transition: background 0.1s ease;
}

.quiz-places-item:last-child {
  border-bottom: none;
}

.quiz-places-item:hover {
  background: #f8fafc;
}

.quiz-places-powered {
  padding: 6px 16px;
  text-align: right;
}

.quiz-places-powered img {
  height: 14px;
  display: inline-block;
}

/* ========== TEXTAREA ========== */

.quiz-textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  margin-bottom: 1rem;
}

.quiz-textarea::placeholder {
  color: #aaa;
}

.quiz-textarea:focus {
  border-color: #000;
}

/* ========== NAME FIELDS ========== */

.quiz-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1rem;
}

.quiz-name-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 1.05rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.quiz-name-input::placeholder {
  color: #aaa;
}

.quiz-name-input:focus {
  border-color: #000;
}

/* ========== CONTACT + OTP ========== */

.quiz-contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.quiz-contact-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 1.05rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.quiz-contact-input::placeholder {
  color: #aaa;
}

.quiz-contact-input:focus {
  border-color: #000;
}

.quiz-phone-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.quiz-phone-row input {
  flex: 1;
}

.quiz-send-code-btn {
  padding: 14px 20px;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.quiz-send-code-btn:hover {
  background: rgba(0,0,0,0.05);
}

.quiz-send-code-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.quiz-otp-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-otp-label {
  font-size: 0.85rem;
  color: #666;
}

.quiz-otp-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.quiz-otp-input {
  width: 160px;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  letter-spacing: 0.2em;
  outline: none;
  transition: border-color 0.2s ease;
}

.quiz-otp-input:focus {
  border-color: #000;
}

.quiz-otp-status {
  font-size: 0.85rem;
  font-weight: 500;
}

.quiz-otp-status.success {
  color: #16a34a;
}

.quiz-otp-status.error {
  color: #dc2626;
}

.quiz-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: #f0fdf4;
  color: #16a34a;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ========== RESPONSIVE — NEW TYPES ========== */

@media (max-width: 720px) {
  .quiz-slider-value {
    font-size: 2rem;
  }

  .quiz-name-row {
    grid-template-columns: 1fr;
  }

  .quiz-phone-row {
    flex-direction: column;
    align-items: stretch;
  }

  .quiz-otp-row {
    flex-direction: column;
    align-items: stretch;
  }

  .quiz-otp-input {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.05rem;
  }
}
