/* Quiz block - стили из темы arteam */

/* Базовые переменные для квиза (чтобы не конфликтовать с темой) */
.section.quiz {
  --quiz-accent: #B5003A;
  --quiz-accent-hover: #db2b32;
}

/* Контейнер и типографика для квиза */
.section.quiz .container {
  max-width: 1320px;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

.section.quiz {
  padding-top: 40px;
  padding-bottom: 40px;
}

.section.quiz .h2 {
  font-weight: 600;
  font-size: 40px;
  line-height: 48px;
  margin-bottom: 20px;
}

.section.quiz .h2 span {
  color: var(--quiz-accent);
}

/* Quiz features — блоки в ряд, слева цифра #B5003A из ACF num_quiz, справа текст desc_quiz */
.quiz__features {
  margin: 60px 0;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 120px;
}

.quiz__feature {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 25px;
}

.quiz__feature-num {
  flex-shrink: 0;
  color: #B5003A;
  font-size: 80px;
  line-height: 1;
  font-weight: 700;
}

.quiz__feature-text {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

/* Quiz wrapper */
.quiz__wrapper {
  display: flex;
  align-items: stretch;
  min-height: 500px;
  gap: 50px;
  padding: 30px;
  border-radius: 20px;
  background-color: #f0f6fb;
  background-image: url(/wp-content/uploads/2025/06/form-bg.png);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.quiz__author {
  width: 280px;
  align-self: center;
}

.quiz__author--img img {
  max-width: 100%;
  border-radius: 20px;
}

.quiz__author--title {
  text-align: center;
  margin: 12px 0;
  font-size: 22px;
  font-weight: 600;
  color: #07133B;
}

.quiz__author--job {
  font-weight: 600;
  text-align: center;
  color: #07133B;
}

.quiz__author--phone {
  width: fit-content;
  margin: 12px auto;
  font-size: 22px;
  font-weight: 600;
  color: #07133B;
  display: block;
}

.quiz__author--link {
  width: fit-content;
  display: block;
  margin: 0 auto;
}

.quiz__list {
  flex: 1;
}

.quiz__item {
  display: none;
  height: 100%;
  flex-direction: column;
}

.quiz__item:first-child {
  display: flex;
}

.quiz__item--top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.quiz__item--title {
  font-size: 24px;
  font-weight: 600;
  color: #07133B;
  flex: 1;
}

.quiz__item--title span {
  color: var(--quiz-accent);
}

.quiz__item--step {
  font-size: 14px;
  opacity: 0.7;
}

.quiz__item--info {
  opacity: 0.7;
  margin: 15px 0 25px 0;
}

.quiz__item--nothing {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin: 20px 0;
}

.quiz__item--nothing:before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 2px solid rgba(7, 19, 59, 0.5);
}

.quiz__item--nothing:hover:before {
  border-color: var(--quiz-accent-hover);
}

.quiz__item--nothing + .--radio {
  display: none;
}

.quiz__item--nothing.--active:before {
  background: var(--quiz-accent);
  border-color: var(--quiz-accent);
  background-image: url('data:image/svg+xml,<svg fill="%23ffffff" viewBox="-3.5 0 19 19" xmlns="http://www.w3.org/2000/svg" class="cf-icon-svg" stroke="%23ffffff"><path d="M4.63 15.638a1.028 1.028 0 0 1-.79-.37L.36 11.09a1.03 1.03 0 1 1 1.58-1.316l2.535 3.043L9.958 3.32a1.029 1.029 0 0 1 1.783 1.03L5.52 15.122a1.03 1.03 0 0 1-.803.511.89.89 0 0 1-.088.004z"></path></svg>');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
}

.quiz__item--nothing.--active + .--radio {
  display: block;
}

.quiz__item--values .--title {
  opacity: 0.75;
  color: #07133B;
  margin-bottom: 12px;
}

.quiz__item--values label {
  cursor: pointer;
}

.quiz__item--values label span {
  font-size: 14px;
}

.quiz__item--values.--radio label {
  display: block;
  margin-bottom: 8px;
}

.quiz__item--values.--radio label:last-child {
  margin-bottom: 0;
}

.quiz__item--values.--radio label input {
  display: none;
}

.quiz__item--values.--radio label input:checked + span:before {
  border: 6px solid var(--quiz-accent);
  width: 7px;
  height: 7px;
}

.quiz__item--values.--radio label span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quiz__item--values.--radio label span:before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 100%;
  border: 2px solid rgba(7, 19, 59, 0.5);
}

.quiz__item--values.--radio label span:hover:before {
  border-color: var(--quiz-accent-hover);
}

.quiz__item--values.--input label {
  display: block;
  width: 100%;
}

.quiz__item--values.--input label input {
  width: 100%;
  padding: 16.5px 18px;
  background: #ffffff;
  border: 1px solid #bdc4de;
  border-radius: 10px;
  padding: 18px;
  outline-color: var(--quiz-accent);
}

.quiz__item--values.--checkbox {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.quiz__item--values.--checkbox label {
  width: calc(25% - 15px);
}

.quiz__item--values.--checkbox label input {
  display: none;
}

.quiz__item--values.--checkbox label input:checked + .--img:before {
  display: block;
  background-image: url('data:image/svg+xml,<svg fill="%23ffffff" viewBox="-3.5 0 19 19" xmlns="http://www.w3.org/2000/svg" class="cf-icon-svg" stroke="%23ffffff"><path d="M4.63 15.638a1.028 1.028 0 0 1-.79-.37L.36 11.09a1.03 1.03 0 1 1 1.58-1.316l2.535 3.043L9.958 3.32a1.029 1.029 0 0 1 1.783 1.03L5.52 15.122a1.03 1.03 0 0 1-.803.511.89.89 0 0 1-.088.004z"></path></svg>');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 40px 40px;
  opacity: 0.75;
}

.quiz__item--values.--checkbox label .--img {
  margin-bottom: 8px;
  position: relative;
  height: 0;
  width: 100%;
  padding-top: 65%;
}

.quiz__item--values.--checkbox label .--img:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 10px;
  width: 100%;
  height: 100%;
  background: var(--quiz-accent);
  opacity: 0.4;
  transition: all 0.2s;
  z-index: 2;
  display: none;
}

.quiz__item--values.--checkbox label .--img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: 100%;
  border-radius: 10px;
}

.quiz__item--values.--checkbox label span {
  text-align: center;
  display: block;
}

.quiz__item--values.--checkbox label:hover .--img:before {
  display: block;
}

.quiz__bottom {
  padding-top: 20px;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.quiz__bottom button {
  border-radius: 10px;
  padding: 18px 30px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid var(--quiz-accent);
}

.quiz__bottom button:hover {
  border-color: var(--quiz-accent-hover);
  background: var(--quiz-accent-hover);
}

.quiz__bottom .prev-button:hover {
  color: #ffffff;
}

.quiz__bottom .next-button {
  margin-left: auto;
  color: #ffffff;
  background: var(--quiz-accent);
  cursor: no-drop;
}

.quiz__bottom .next-button:hover {
  background: var(--quiz-accent-hover);
}

.quiz__bottom .next-button.--active {
  cursor: pointer;
}

.quiz__item:last-child .quiz__item--title {
  text-align: center;
  max-width: 80%;
  margin: 0 auto;
  line-height: normal;
}

/* Загрузчик формы */
.quiz .form-container {
  position: relative;
}

.quiz .form-loader {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 9;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  left: 0;
  top: 0;
  align-items: center;
  justify-content: center;
}

.quiz .form-loader.active {
  display: flex;
}

.quiz .form-loader::before {
  content: "";
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: quiz-spin 0.8s linear infinite;
}

@keyframes quiz-spin {
  to { transform: rotate(360deg); }
}

.quiz .form-banner__thx {
  position: relative;
  padding: 40px 20px;
}

.quiz .form-banner__thx .thx-title {
  font-weight: 600;
  font-size: 24px;
  color: #07133B;
  margin-bottom: 10px;
}

.quiz .form-banner__thx .thx-text {
  font-size: 16px;
  color: #07133B;
  opacity: 0.9;
}

.quiz .form-banner__thx .thx-close {
  position: absolute;
  right: 10px;
  top: 10px;
  cursor: pointer;
}

.quiz .form-banner__thx .thx-close svg {
  width: 24px;
  height: 24px;
}

/* Форма в квизе */
.quiz .form-banner {
  padding: 0;
  background: transparent;
  margin-top: 40px;
}

.quiz .form-banner__inner {
  display: block;
  max-width: 400px;
  margin: 0 auto;
}

.quiz .form-banner__col {
  width: 100%;
}

.quiz .form-banner__col:last-child {
  margin-top: 26px;
}

.quiz .form-banner .input-subtext {
  max-width: 100%;
  text-align: center;
}

.quiz .form-banner .input-text {
  padding: 16.5px 18px;
  width: 100%;
  border: 1px solid #bdc4de;
  border-radius: 10px;
  font-size: 16px;
}

.quiz .form-banner .button {
  width: 100%;
  padding: 18px 30px;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  border: 2px solid var(--quiz-accent);
  background: var(--quiz-accent);
  color: #fff;
  transition: all 0.3s;
}

.quiz .form-banner .button:hover {
  background: var(--quiz-accent-hover);
  border-color: var(--quiz-accent-hover);
}

.quiz .form-banner .input-name {
  margin-bottom: 8px;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
  .quiz__features {
    margin: 50px 0;
    gap: 16px;
  }
  .quiz__feature-num {
    font-size: 40px;
  }
  .quiz__feature-text {
    font-size: 16px;
  }
  .quiz__wrapper {
    gap: 30px;
  }
  .quiz__author {
    width: 200px;
  }
  .quiz__author--title {
    font-size: 20px;
  }
  .quiz__author--phone {
    font-size: 18px;
  }
  .quiz__item--title {
    font-size: 20px;
  }
  .quiz__item--values.--checkbox {
    gap: 15px;
  }
  .quiz__item--values.--checkbox label {
    width: calc(33.333% - 10px);
  }
  .quiz__item:last-child .quiz__item--title {
    max-width: 100%;
  }
  .quiz .form-banner {
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  .quiz__features {
    margin: 40px 0;
    gap: 15px;
    flex-wrap: wrap;
  }
  .quiz__feature {
    flex: 1 1 calc(50% - 7.5px);
    min-width: 200px;
  }
  .quiz__wrapper {
    display: block;
    padding: 20px;
  }
  .quiz__author {
    max-width: 250px;
    margin: 20px auto 0 auto;
  }
}

@media (max-width: 480px) {
  .section.quiz .h2 {
    font-size: 28px;
    line-height: 1.3;
  }
  .quiz__features {
    margin: 30px 0;
    flex-direction: column;
  }
  .quiz__feature {
    flex: 1 1 100%;
  }
  .quiz__feature-num {
    font-size: 36px;
  }
  .quiz__feature-text {
    font-size: 14px;
  }
  .quiz__author--title {
    font-size: 18px;
    margin: 8px 0;
  }
  .quiz__author--phone {
    margin: 8px 0;
  }
  .quiz__item--top {
    gap: 15px;
  }
  .quiz__item--title {
    font-size: 18px;
  }
  .quiz__item--info {
    margin: 10px 0 15px 0;
  }
  .quiz__item--values.--checkbox label {
    width: calc(50% - 7.5px);
  }
  .quiz .form-banner {
    margin-top: 20px;
  }
}
