/* ========================================
   BADKAMER STIJL QUIZ — Stylesheet
   Plugs into site CSS variables:
   --gold, --gold-light, --dark, --dark-2,
   --warm-white, --light, --mid, --text
   ======================================== */

/* ---- Section wrapper ---- */
.quiz-section {
  padding: 120px 0;
  background: var(--warm-white, #faf8f5);
  overflow: hidden;
}

.quiz-section .container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px;
}

.quiz-section-header {
  text-align: center;
  margin-bottom: 60px;
}

.quiz-section-header .section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold, #c4a97d);
  display: block;
  margin-bottom: 16px;
}

.quiz-section-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 300;
  color: var(--dark, #181614);
  line-height: 1.15;
  margin-bottom: 14px;
}

.quiz-section-header h2 em {
  font-style: italic;
  color: var(--gold, #c4a97d);
}

.quiz-section-header p {
  font-size: 16px;
  font-weight: 300;
  color: var(--mid, #8a857e);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---- Quiz card ---- */
.quiz-card-wrap {
  background: #fff;
  border: 1px solid rgba(196, 169, 125, 0.18);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.06);
  padding: 48px 48px 40px;
  position: relative;
}

/* ---- Progress bar ---- */
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.quiz-progress-segments {
  display: flex;
  gap: 6px;
  flex: 1;
}

.quiz-segment {
  flex: 1;
  height: 3px;
  background: var(--light, #f0ece4);
  position: relative;
  overflow: hidden;
}

.quiz-segment::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold, #c4a97d);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.quiz-segment.filled::after {
  transform: scaleX(1);
}

.quiz-progress-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid, #8a857e);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Step ---- */
.quiz-step {
  display: none;
  flex-direction: column;
}

.quiz-step.active {
  display: flex;
  animation: quizFadeUp 0.3s ease forwards;
}

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

.quiz-question {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 300;
  color: var(--dark, #181614);
  margin-bottom: 36px;
  text-align: center;
  line-height: 1.2;
}

/* ---- Answer cards ---- */
.quiz-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.quiz-answer-card {
  position: relative;
  height: 220px;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;

  /* Entrance stagger applied via JS */
  opacity: 0;
  transform: translateY(16px);
}

.quiz-answer-card.card-visible {
  animation: quizCardIn 0.35s ease forwards;
}

@keyframes quizCardIn {
  to { opacity: 1; transform: translateY(0); }
}

.quiz-answer-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
}

.quiz-answer-card.selected {
  border-color: var(--gold, #c4a97d);
  box-shadow: 0 0 0 1px var(--gold, #c4a97d), 0 12px 36px rgba(196, 169, 125, 0.25);
}

/* Photo background */
.quiz-card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.quiz-answer-card:hover .quiz-card-img {
  transform: scale(1.06);
}

/* Budget cards (no photo) */
.quiz-card-gradient {
  position: absolute;
  inset: 0;
}

.quiz-card-gradient--low {
  background: linear-gradient(135deg, #e8e0d5 0%, #d4c9bb 100%);
}

.quiz-card-gradient--mid {
  background: linear-gradient(135deg, #c4a97d 0%, #a8895d 100%);
}

.quiz-card-gradient--high {
  background: linear-gradient(135deg, #2e2b28 0%, #181614 100%);
}

/* Dark overlay on photo cards */
.quiz-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 18, 16, 0.72) 0%, rgba(20, 18, 16, 0.2) 60%);
  transition: background 0.3s ease;
}

.quiz-answer-card:hover .quiz-card-overlay {
  background: linear-gradient(to top, rgba(20, 18, 16, 0.55) 0%, rgba(20, 18, 16, 0.12) 60%);
}

.quiz-answer-card.selected .quiz-card-overlay {
  background: linear-gradient(to top, rgba(20, 18, 16, 0.5) 0%, rgba(196, 169, 125, 0.08) 60%);
}

/* Card label */
.quiz-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 14px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 400;
  color: #fff;
  text-align: center;
  line-height: 1.25;
  z-index: 1;
}

/* Budget label override */
.quiz-budget-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  gap: 4px;
}

.quiz-budget-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 400;
  color: #fff;
  line-height: 1;
}

.quiz-budget-sub {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

/* Selected checkmark */
.quiz-card-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold, #c4a97d);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s, transform 0.2s;
}

.quiz-answer-card.selected .quiz-card-check {
  opacity: 1;
  transform: scale(1);
}

.quiz-card-check svg {
  width: 14px;
  height: 14px;
  color: #fff;
}

/* ---- Navigation row ---- */
.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  min-height: 44px;
}

.quiz-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid, #8a857e);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.25s;
  font-family: 'Inter', sans-serif;
}

.quiz-back-btn:hover { color: var(--dark, #181614); }

.quiz-back-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s;
}

.quiz-back-btn:hover svg { transform: translateX(-3px); }

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

.quiz-hint {
  font-size: 12px;
  color: var(--mid, #8a857e);
  letter-spacing: 0.06em;
}

/* ---- Result screen ---- */
.quiz-result {
  animation: quizFadeUp 0.4s ease forwards;
}

.quiz-result[hidden] { display: none !important; }

.quiz-result-header {
  text-align: center;
  margin-bottom: 40px;
}

.quiz-result-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold, #c4a97d);
  display: block;
  margin-bottom: 12px;
}

.quiz-result-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 300;
  color: var(--dark, #181614);
  line-height: 1.1;
  margin-bottom: 20px;
}

.quiz-result-title em {
  font-style: italic;
  color: var(--gold, #c4a97d);
}

.quiz-result-desc {
  font-size: 16px;
  font-weight: 300;
  color: var(--mid, #8a857e);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
}

/* Result photo row */
.quiz-result-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.quiz-result-photo {
  height: 200px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  position: relative;
  overflow: hidden;

  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.quiz-result-photo.photo-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Placeholder backgrounds per style */
.quiz-result-photo[data-style="warm"] {
  background: linear-gradient(135deg, #c8b49a 0%, #a89070 100%);
}

.quiz-result-photo[data-style="modern"] {
  background: linear-gradient(135deg, #d8d2ca 0%, #b8b0a6 100%);
}

.quiz-result-photo[data-style="industrieel"] {
  background: linear-gradient(135deg, #3a3632 0%, #1e1c1a 100%);
}

.quiz-result-photo-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 0 8px;
  position: relative;
  z-index: 1;
}

.quiz-result-budget {
  text-align: center;
  font-size: 13px;
  font-weight: 300;
  color: var(--mid, #8a857e);
  margin-bottom: 36px;
  letter-spacing: 0.04em;
}

.quiz-result-budget strong {
  color: var(--text, #2e2b28);
  font-weight: 500;
}

.quiz-result-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.quiz-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 40px;
  background: var(--gold, #c4a97d);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.quiz-cta-btn:hover {
  background: #b8996c;
  transform: translateY(-1px);
}

.quiz-cta-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}

.quiz-cta-btn:hover svg { transform: translateX(4px); }

.quiz-restart-btn {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid, #8a857e);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.25s;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quiz-restart-btn:hover { color: var(--dark, #181614); }

/* ---- Divider ---- */
.quiz-result-divider {
  border: none;
  border-top: 1px solid var(--light, #f0ece4);
  margin: 36px 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .quiz-section { padding: 80px 0; }
  .quiz-section .container { padding: 0 20px; }
  .quiz-card-wrap { padding: 32px 24px 28px; }

  .quiz-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .quiz-answer-card { height: 140px; }

  .quiz-answer-card:hover { transform: none; }

  .quiz-result-photos {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .quiz-result-photo { height: 140px; }
}

@media (max-width: 480px) {
  .quiz-section-header h2 { font-size: 30px; }
  .quiz-question { font-size: 22px; }
  .quiz-result-title { font-size: 34px; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .quiz-cards { grid-template-columns: repeat(3, 1fr); }
  .quiz-answer-card { height: 160px; }
  .quiz-result-photos { grid-template-columns: repeat(3, 1fr); }
}
