/******************
QUIZ CONTAINER
******************/
#startQuiz,
.quiz,
.quizResults {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: none;
  flex-direction: column;
  align-items: center;
}

/******************
START SCREEN
******************/
#startQuiz {
  display: block;
  text-align: center;
  margin-top: .5em;
  width: auto;
}

#startQuiz button {
  background: var(--secondary);
  color: var(--primary);
  font-size: 20px;
  padding: 14px 28px;
  cursor: pointer;
}

#startQuiz button:hover {
  background: var(--primary);
  color: var(--secondary);
  }

/******************
QUIZ NAVIGATION
******************/
#quizNav {
  margin: 20px 0;
}

#quizNav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.quizNavNumber,
.quizNavCurrent {
  width: 34px;
  height: 34px;
  line-height: 34px;
  text-align: center;
  border-radius: 1rem;
  font-size: 14px;
}

.quizNavNumber {
  background: none;
  color: var(--secondary);
}

.quizNavCurrent {
  background: var(--secondary);
  color: var(--primary);
  font-weight: bold;
}

/******************
QUESTION TITLE
******************/
.quiz h2 {
  text-align: center;
  margin-bottom: 20px;
}

/******************
SECTION HEADERS
******************/
.quizHeader {
  width: 100%;
  margin: 30px 0 10px;
  font-weight: bold;
  text-align: center;
  font-size: 18px;
  opacity: .8;
}

/******************
ANSWER ROWS
******************/
.thumbRow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5em;
  width: 100%;
  margin: .5em auto;
  max-width: 1000px;
}


/******************
ANSWER CARDS
******************/
.quizChoice {
  background: var(--card);
  border: none;
  cursor: pointer;
  padding: 2em;
  width: 30%;
  transition: .2s;
  text-align: center;
}

.quizChoice.widequiz {
  width: 100%;           /* Take full width */
  max-width: 600px;      /* Prevent excessive width on large screens */
  margin: 0 auto;        /* Center the button inside the flex container */
  flex: 1 1 100%;        /* Flex-grow and shrink so it fills one row */
}

.quizChoice:hover {
  transform: scale(1.05);
  background: var(--muted);
  color: var(--text);
}

.quizChoice img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 200px;
  margin: 1em auto;
  border-radius: 1.5rem;
}

.quizChoice p {
  margin: 5px 0 0;
  font-size: 14px;
}

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

/******************
RESTART BUTTON
******************/

.finalHeading {margin: 0 auto; padding-top:1em; text-align: center;}

.startAgain {
  background-color: var(--secondary);
  color: var(--bg);
  margin-top: 25px;
  padding: 12px 24px;
  cursor: pointer;
}

.quizResults {
  border-radius: 3rem;
  background: var(--card);
  text-align: center;
  padding: 30px;
}

.resultsBox {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
  flex-direction: row-reverse; /* This makes the first item (image) appear on the right */
}

.resultsImage {
  flex: 1 1 35%;
  min-width: 240px;
}

.resultsImage img {
  height: auto;
    margin: 0 auto;
  border-radius: 2rem;
  }

.resultsBio {
  flex: 1 1 60%;
  min-width: 280px;
  padding: 10px 0;
  text-align: left;
}

#showResults {
 padding: 1em;
  }

.resultScores {
  padding: 8px 14px;
  margin: 6px;
  cursor: pointer;
  border: 1px solid var(--muted);
  background: var(--muted);
  color: var(--text);
}

.resultScores {
  pointer-events: none;
  cursor: default; /* changes cursor so it doesn't look clickable */
}

.resultScores.active{
  color:  var(--bg);
  font-weight:bold;
  }

/* Active result styling by result type */
#resultA .resultScores.active, #resultA .startAgain {
  background-color: var(--red);
}

#resultB .resultScores.active, #resultB .startAgain {
  background-color: var(--gre);
}

#resultC .resultScores.active, #resultC .startAgain {
  background-color: #BEABA8;
}

#resultD .resultScores.active, #resultD .startAgain {
  background-color: var(--pur);
}

#resultE .resultScores.active, #resultE .startAgain {
  background-color: var(--pin);
}

#resultF .resultScores.active, #resultF .startAgain {
  background-color: #8F7941;
}

#resultG .resultScores.active, #resultG .startAgain {
  background-color: var(--ora);
}

#resultH .resultScores.active, #resultH .startAgain {
  background-color: #B78067;
}

.startAgain:hover {
  background-color: var(--muted);
  color: var(--text);
  }

/******************
MOBILE
******************/
@media(max-width:800px) {
  .quizChoice {
    width: 45%;
    padding: 1.2em;
  }
  
  .thumbRow {gap: 1em;}
  .quizResults {
  text-align: center;
  padding: 1rem;
}
   .resultsBox {
    flex-direction: column; /* stack items vertically */
    align-items: center; /* center them nicely */
    gap: 16px; /* smaller gap for mobile */
  }

  .resultsImage,
  .resultsBio {
    flex: 1 1 100%; /* take full width */
    min-width: auto; /* remove the min-width so it fits mobile */
    text-align: center; /* optional: center text and images on small screens */
  }

  .resultsImage img {
    max-width: 80%; /* make image smaller on mobile */
    
  }
}

@media(max-width:480px) {
  .quizChoice {
    width: 100%;
    padding: 1em;
  }

  .quizNavNumber,
  .quizNavCurrent {
    width: 28px;
    height: 28px;
    line-height: 28px;
    font-size: 12px;
  }
}

.quizChoice:focus,
#startQuiz button:focus,
.startAgain:focus {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}