/* ========================================
   QUIZ PAGE STYLES
   Modern split-panel design with lifestyle imagery
   ======================================== */

/* Import brand variables - ensure consistency */
:root {
  --quiz-primary: #E8836B;
  --quiz-primary-dark: #D96B52;
  --quiz-primary-light: #F4A896;
  --quiz-bg-gradient-start: #FFE8E0;
  --quiz-bg-gradient-mid: #FFF0EB;
  --quiz-bg-gradient-end: #FFF8F5;
  --quiz-text-dark: #5A3D35;
  --quiz-text-medium: #7A5D55;
}

/* Quiz Main Container - Split Panel Layout */
.quiz-main {
  min-height: calc(100vh - 80px);
  display: flex;
  position: relative;
  overflow: hidden;
}

/* ========================================
   LEFT PANEL: LIFESTYLE IMAGERY
   ======================================== */
.quiz-imagery {
  width: 40%;
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
  display: none; /* Hidden by default, shown on larger screens */
}

@media (min-width: 1024px) {
  .quiz-imagery {
    display: block;
  }
}

.quiz-imagery-inner {
  position: absolute;
  inset: 0;
}

/* Image with Ken Burns animation */
.quiz-context-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  animation: kenBurns 20s ease-in-out infinite alternate;
}

.quiz-context-image.active {
  opacity: 1;
}

@keyframes kenBurns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.08) translate(-1%, -1%);
  }
}

/* Dark gradient overlay for text readability */
.quiz-imagery::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
  pointer-events: none;
}

/* Image caption overlay */
.quiz-image-caption {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 2;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.quiz-image-caption.visible {
  opacity: 1;
  transform: translateY(0);
}

.quiz-image-caption h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.quiz-image-caption p {
  font-size: 1rem;
  opacity: 0.9;
}

/* ========================================
   RIGHT PANEL: QUIZ CONTENT
   ======================================== */
.quiz-content-panel {
  flex: 1;
  overflow-y: auto;
  background: linear-gradient(135deg, var(--quiz-bg-gradient-start) 0%, var(--quiz-bg-gradient-mid) 50%, var(--quiz-bg-gradient-end) 100%);
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Quiz Screens */
.quiz-screen {
  display: none;
  position: relative;
  z-index: 2;
}

.quiz-screen.active {
  display: block;
}

/* ========================================
   WELCOME SCREEN
   ======================================== */
.quiz-welcome-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.quiz-welcome-content h1 {
  font-size: 3rem;
  color: var(--quiz-text-dark);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.quiz-welcome-content .lead {
  font-size: 1.3rem;
  color: #555;
  margin-bottom: 3rem;
  line-height: 1.6;
}

.quiz-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.quiz-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.quiz-feature .feature-icon {
  font-size: 2.5rem;
  display: block;
}

.quiz-feature span:last-child {
  color: #666;
  font-size: 0.95rem;
  font-weight: 600;
}

.btn-large {
  font-size: 1.3rem;
  padding: 1.2rem 3rem;
  box-shadow: 0 4px 16px rgba(232, 131, 107, 0.3);
  transition: all 0.3s ease;
}

.btn-large:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(232, 131, 107, 0.4);
}

.quiz-welcome-content .trust {
  margin-top: 2rem;
  color: #888;
  font-size: 0.9rem;
  justify-content: center;
}

/* ========================================
   BREED TYPE SELECTOR (Welcome Screen)
   ======================================== */
.breed-type-selector {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.breed-type-label {
  font-size: 1rem;
  color: var(--quiz-text-medium);
  margin-bottom: 1rem;
  font-weight: 500;
}

.breed-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.breed-type-option {
  display: flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  background: white;
  border: 2px solid #ddd;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  color: var(--quiz-text-dark);
}

.breed-type-option:hover {
  border-color: var(--quiz-primary-light);
  background: #fff8f5;
}

.breed-type-option input[type="radio"] {
  margin-right: 0.5rem;
  accent-color: var(--quiz-primary);
}

.breed-type-option:has(input:checked) {
  border-color: var(--quiz-primary);
  background: #fff0eb;
  font-weight: 500;
}

/* ========================================
   PROGRESS BAR
   ======================================== */
.quiz-progress {
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.progress-text,
.progress-percentage {
  font-weight: 600;
  color: var(--quiz-text-medium);
  font-size: 0.95rem;
}

.progress-text #current-question {
  color: var(--quiz-text-dark);
  font-weight: 700;
}

.progress-percentage {
  color: var(--quiz-text-dark);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #FFE8E0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--quiz-primary) 0%, var(--quiz-primary-dark) 100%);
  border-radius: 20px;
  transition: width 0.4s ease;
  width: 10%;
}

/* ========================================
   QUESTION CONTAINER
   ======================================== */
.question-container {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

.question.active {
  display: block;
}

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

.question-title {
  font-size: 1.5rem;
  color: var(--quiz-text-dark);
  margin-bottom: 0.75rem;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.question-subtitle {
  font-size: 1rem;
  color: #666;
  text-align: center;
  margin-bottom: 2rem;
}

.question-subtitle.has-helper {
  margin-bottom: 0.5rem;
}

.question-helper {
  font-size: 0.95rem;
  color: #555;
  text-align: center;
  margin: 0 auto 2rem;
  max-width: 550px;
  line-height: 1.5;
}

/* ========================================
   ANSWER CARDS - Vertical Stacked Layout
   ======================================== */
.answers {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 2rem;
}

.answer-card {
  background: white;
  border: 2px solid #E0E0E0;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.answer-card:hover {
  border-color: var(--quiz-primary);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(232, 131, 107, 0.2);
}

.answer-card.selected {
  border-color: var(--quiz-primary);
  background: linear-gradient(135deg, var(--quiz-primary) 0%, var(--quiz-primary-light) 100%);
  box-shadow: 0 4px 16px rgba(232, 131, 107, 0.3);
}

.answer-card.selected .answer-letter {
  background: white;
  color: var(--quiz-primary-dark);
}

.answer-card.selected .answer-label {
  color: white;
}

.answer-card.selected .answer-desc {
  color: rgba(255, 255, 255, 0.9);
}

/* Letter badge */
.answer-letter {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: var(--quiz-text-dark);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.25s ease;
}

.answer-letter svg {
  width: 18px;
  height: 18px;
  display: block;
}

.answer-icon {
  font-size: 1.5rem;
  display: none; /* Hide emoji icons in new design */
}

.answer-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.answer-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
  font-family: 'Nunito', sans-serif;
  transition: color 0.25s ease;
}

.answer-desc {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
  transition: color 0.25s ease;
}

/* ========================================
   NAVIGATION BUTTONS
   ======================================== */
.quiz-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 600px;
  margin: 2rem auto 0;
  padding: 0 2rem;
}

.quiz-navigation .btn {
  flex: 1;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50px;
  transition: all 0.25s ease;
  border: 2px solid var(--quiz-primary-dark);
}

.quiz-navigation .btn.primary {
  background: linear-gradient(135deg, var(--quiz-primary) 0%, var(--quiz-primary-dark) 100%);
  color: white;
  border: none;
}

.quiz-navigation .btn.primary:hover {
  background: linear-gradient(135deg, var(--quiz-primary-dark) 0%, #C85A42 100%);
}

.quiz-navigation .btn.outline {
  background: white;
  color: var(--quiz-primary-dark);
}

.quiz-navigation .btn.outline:hover {
  background: #FFF0EB;
}

.quiz-navigation .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.quiz-navigation .btn:not(:disabled):hover {
  transform: translateY(-2px);
}

/* ========================================
   RESULTS SCREEN (Placeholder)
   ======================================== */
.results-content {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.results-content h1 {
  font-size: 2.5rem;
  color: var(--quiz-text-dark);
  margin-bottom: 2rem;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #FFE8E0;
  border-top: 5px solid var(--quiz-primary);
  border-radius: 50%;
  margin: 2rem auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.results-content p {
  color: #666;
  font-size: 1.1rem;
}

/* ========================================
   ACTIVE NAV LINK
   ======================================== */
.nav a.active {
  color: var(--quiz-primary);
  font-weight: 700;
  position: relative;
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--quiz-primary);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1023px) {
  .quiz-main {
    flex-direction: column;
  }
  
  .quiz-content-panel {
    padding: 1.5rem 0 2rem;
  }
}

@media (max-width: 768px) {
  .quiz-welcome-content {
    padding: 2rem 1.5rem;
    margin: 0 1rem;
    border-radius: 16px;
  }

  .quiz-welcome-content h1 {
    font-size: 2rem;
  }

  .quiz-welcome-content .lead {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }

  .quiz-features {
    flex-direction: column;
    gap: 1.5rem;
  }

  .quiz-progress {
    margin: 0 1rem 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
  }

  .question-container {
    margin: 0 1rem;
    padding: 1.5rem 1rem;
    border-radius: 16px;
  }

  .question-title {
    font-size: 1.25rem;
  }

  .question-subtitle {
    font-size: 0.95rem;
  }

  .answers {
    gap: 0.75rem;
  }

  .answer-card {
    padding: 0.875rem 1rem;
  }

  .answer-letter {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0.9rem;
  }

  .answer-letter svg {
    width: 16px;
    height: 16px;
  }

  .answer-label {
    font-size: 0.95rem;
  }

  .answer-desc {
    font-size: 0.8rem;
  }

  .quiz-navigation {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1rem;
    margin-top: 1.5rem;
  }

  .quiz-navigation .btn {
    width: 100%;
  }

  /* Hide desktop nav elements on mobile */
  .nav {
    display: none;
  }

  .cta-buttons {
    display: none;
  }

  /* Keep hamburger visible on quiz page */
  .nav-toggle {
    display: flex;
  }
}


/* Q12 Breed Preference Input */
.q-breed-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
}

.q-breed-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #E0E0E0;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  color: #333;
  background: white;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.q-breed-input:focus {
  border-color: var(--quiz-primary);
  box-shadow: 0 0 0 3px rgba(232, 131, 107, 0.15);
}

.q-breed-hint {
  font-size: 0.85rem;
  color: var(--quiz-text-medium);
  text-align: center;
  margin: 0;
}
