.quiz {
  max-width: 780px;
  height: 385px;
  margin: 0 auto;
  background: #f2f3f5;
  border-radius: 24px;
  padding: 20px;
  position: relative;
  padding-bottom: 80px; /* отступ под кнопки */
  overflow: hidden;     /* чтобы шаги не вылазили при анимации */
  display: flex;              /* делаем сам .quiz флекс-контейнером */
  align-items: center;        /* центр по вертикали */
  justify-content: center;
}

/* шаги квиза */
.quiz-step {
  position: absolute;
  top: 10%;
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;       /* центр по горизонтали */
  justify-content: center;
  
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none; /* скрытые шаги не кликаются */
}

.quiz-step h3 {
  font-size: 26px;
  color: #000000;
  font-weight: 500;
  font-family: 'Onest', Arial, sans-serif;
  text-align: center;
  margin-bottom: 50px;
}

.quiz-step.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 2;
}

.quiz-step.fade-out {
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  z-index: 1;
}

/* варианты ответа */
.quiz-options {
  display: flex;
  justify-content: center; /* карточки по центру */
  align-items: center; /* по вертикали */
  gap: 20px; /* расстояние между карточками */
  flex-wrap: wrap; /* если экран узкий → переносятся */
}

/* карточка */
.quiz-card {
  width: 200px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s ease, 
              box-shadow 0.3s ease, 
              transform 0.3s ease;
}

.quiz-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

.quiz-card span {
  font-size: 18px;
  color: #000;
  font-family: 'Onest', Arial, sans-serif;
}

/* скрываем input */
.quiz-option input {
  display: none;
}

/* подсветка всей карточки при выборе */
.quiz-option input:checked + .quiz-card {
  border-color: #2f92e5;
  box-shadow: 0 0 8px rgba(47, 146, 229, 0.5);
  transform: scale(1.02);
}

/* эффект при наведении */
.quiz-option:hover .quiz-card {
  border-color: #999;
  transform: scale(1.02);
}

/* навигация */
.quiz-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  opacity: 1;
  transition: opacity .35s ease;
}

.quiz-nav.fading { 
  opacity: .35;
  pointer-events: none;
}

.quiz-nav button {
  background: #2f92e5;
  color: #fff;
  border: none;
  padding: 18px 35px;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.3s ease;
  font-size: 16px;
  font-weight: 600;
}

.quiz-nav .prev { background: #ccc; }

/* прогресс */
.quiz-progress {
  position: absolute;
  top: 5%;
  right: 5%;
  font-size: 14px;
  color: #555;
  transition: opacity 0.3s ease;
  font-family: 'Onest', Arial, sans-serif;
}

/* ошибка шага */
.quiz-step.error {
  border: 1px solid red;
  border-radius: 12px;
  padding: 15px;
  box-sizing: border-box;
}

.quiz-error-msg {
  color: red;
  font-size: 14px;
  margin-top: 20px;
  text-align: right;
  font-family: 'Onest', Arial, sans-serif;
}

/* контейнер */
.quiz-radios {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 400px;
  margin: 0 auto;
}

/* пункт */
.quiz-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: #000;
  cursor: pointer;
  position: relative;
  font-family: 'Onest', Arial, sans-serif;
}

.quiz-radio span {
  font-size: 18px;     /* размер шрифта */
  font-weight: 400;    /* толщина */
  color: #000;         /* цвет текста */
}

/* скрыть нативный radio */
.quiz-radio input[type="radio"] {
  display: none;
}

/* кастомный кружок */
.quiz-radio span::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #2f92e5;
  border-radius: 50%;
  box-sizing: border-box;
  transition: all 0.40s ease;   /* плавная анимация */
  margin-right: 6px;
  vertical-align: middle;
}

/* точка внутри при выборе */
.quiz-radio input[type="radio"]:checked + span::before {
  background-color: #2f92e5;
  box-shadow: inset 0 0 0 4px #fff;  /* белая точка */
}

.quiz-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;   /* всё влево */
  margin: 0 auto;
  padding-left: 50px;
  padding-right: 50px;
}

.quiz-subtitle {
  font-size: 14px;
  font-weight: 300;
  color: #333;
  margin-bottom: 30px;
  text-align: left;
  font-family: 'Onest', Arial, sans-serif;
}

.quiz-phone-label {
  display: flex;
  flex-direction: column;
  width: 100%;
  font-size: 14px;
  color: #333;
  font-family: 'Onest', Arial, sans-serif;
}

.quiz-phone-label input {
  margin-top: 6px;
  padding: 10px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}

/* адаптив для мобилок */
@media (max-width: 640px) {
  .quiz {
	height: 425px;
  }
  .quiz-card {
	width: 120px;
  }
  .quiz-nav button {
	padding: 10px 35px;
	font-size: 13px;
  }
}