/* === CSS-переменные === */
:root {
  --btn-bg: #5F1718;
  --btn-hover: #5F1718;
  --btn-shadow: rgba(231, 76, 60, 0.3);
  --btn-shadow-hover: rgba(231, 76, 60, 0.4);
  --btn-text: white;
  --border-radius: 50px;
  --transition: all 0.3s ease;
}

/* Обнуление и базовые стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Фон с затемнением */
body {
  font-family: Arial, sans-serif;
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url('../img/image.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Шапка */
.header {
  position: relative;
  width: 100%;
  padding: 35px 0;
  background-color: transparent;
  color: white;
  z-index: 15;
}

.header__contacts {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  color: white;
}

.header__contacts span {
  opacity: 0.9;
}

/* Прогресс-бар */
.progress-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  margin-top: 10px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background-color: #5F1718;
  transition: width 0.4s ease;
}

/* Вступительный экран */
.welcome-screen {
  text-align: left;
  padding: 60px 20px;
  max-width: 850px;
  margin: 0 auto;
  animation: fadeIn 1s ease;
}

.welcome-box {
  background-color: rgba(139, 139, 139, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 16px;
}

.main-title {
  font-size: 35px;
  color: white;
  margin-bottom: 20px;
  line-height: 1.4;
}

.features {
  margin: 25px 0;
  font-size: 25px;
  color: white;
}

.feature {
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-icon {
  width: 50px;
  height: 50px;
}

.cta-button {
  margin-top: 30px;
  padding: 15px 30px;
  background-color: #DCDCDC;
  color: black;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(176, 0, 0, 1);
  transition: all 0.3s ease;
  width: auto;
}

.cta-button:hover {
  background-color: #5F1718;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(176, 0, 0, 1);
}

/* Кнопка "Заказать звонок" */
.callback-btn {
  position: fixed;
  top: 29px;
  right: 20px;
  padding: 12px 18px;
  background-color: #5F1718;
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(231, 76, 60, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .callback-btn {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    top: auto !important;
    right: auto !important;
    width: auto;
    min-width: 160px;
    padding: 12px 18px;
    font-size: 15px;
  }
}

.small-left-btn {
  width: auto;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: bold;
  background-color: #5F1718;
  color: white;
  border: none;
  border-radius: 50px;
  box-shadow: 0 3px 8px rgba(231, 76, 60, 0.3);
  transition: all 0.3s ease;
  margin: 20px 0 0 0;
}

/* Карточки выбора */
.options-row {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.option-img {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 16px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  width: 140px;
  border: 2px solid #eee;
}

.img-container {
  width: 120px;
  height: 120px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 12px;
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.option-img span {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.option-img input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.option-img.selected,
.option-img input[type="radio"]:checked ~ * {
  border-color: #5F1718;
  background-color: #fdf2f0;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(231, 76, 60, 0.2);
}

/* Списки радио-кнопок — УБИРАЕМ МАРКЕРЫ */
.options-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.options-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  user-select: none;
}

/* Кастомные радио-кнопки */
.custom-radio-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 16px;
  padding: 8px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.custom-radio-checkbox:hover {
  background-color: #f9f9f9;
}

.custom-mark {
  width: 20px;
  height: 20px;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 4px;
  position: relative;
  transition: all 0.3s ease;
}

.custom-radio-checkbox:hover .custom-mark {
  border-color: #5F1718;
}

.custom-radio-checkbox input:checked ~ .custom-mark {
  background-color: #5F1718;
  border-color: #5F1718;
}

.custom-mark::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: 2px solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-radio-checkbox input:checked ~ .custom-mark::after {
  display: block;
}

/* Шаги квиза */
.step {
  display: none;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeIn 0.4s ease forwards;
}

.step.active {
  display: block;
}

.step h2 {
  margin-bottom: 20px;
  color: white;
}

/* Модальные окна */
.popup,
.policy-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.popup_content,
.policy-content {
  background: white;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.popup_content,
#feedback-form,
#feedback-form *,
.popup_content * {
  color: #333 !important;
}

.popup_close,
.policy-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  color: #aaa;
  cursor: pointer;
}

.popup_close:hover,
.policy-close:hover {
  color: #000;
}

.popup_content input,
#feedback-form input {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

.popup_content button,
#submit-btn {
  margin-top: 20px;
  width: 100%;
  padding: 14px;
  background-color: #5F1718;
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.popup_content button:hover,
#submit-btn:hover:not(:disabled) {
  background-color: #5F1718;
}

/* === ФОРМА ОБРАТНОЙ СВЯЗИ — исправленная версия === */
#feedback-form {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 40px auto;
}

#feedback-form h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 25px;
  text-align: center;
  font-weight: bold;
  line-height: 1.4;
}

/* Поля формы */
#feedback-form .form-label {
  display: block;
  margin-bottom: 20px;
  font-size: 16px;
  color: #333;
}

#feedback-form .form-label input {
  width: 100%;
  padding: 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: #fafafa;
  color: #333;
  font-size: 16px;
  outline: none;
}

#feedback-form .form-label input:focus {
  border-color: #5F1718;
  background-color: #fff;
  box-shadow: 0 0 5px rgba(231, 76, 60, 0.2);
}

/* Чекбокс согласия */
#feedback-form .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 25px 0 20px;
  font-size: 15px;
  color: #555;
}

#feedback-form .checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  position: relative;
  flex-shrink: 0;
}

#feedback-form .checkbox-label input[type="checkbox"]:checked {
  background-color: #5F1718;
  border-color: #5F1718;
}

#feedback-form .checkbox-label input[type="checkbox"]::after {
  content: "";
  position: absolute;
  display: block;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid black;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

#feedback-form .checkbox-label a {
  color: #5F1718;
  text-decoration: none;
  font-weight: bold;
}

#feedback-form .checkbox-label a:hover {
  text-decoration: underline;
}

/* Кнопка отправки */
#submit-btn {
  width: 100%;
  padding: 16px;
  background-color: #95a5a6;
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(95, 23, 24, 0.4);
  transition: all 0.3s ease;
  margin-top: 10px;
}

#submit-btn:hover:not(:disabled) {
  background-color: #5F1718;
  color: #ffffff
  transform: translateY(-2px);
}

#submit-btn:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
  transform: none;
}

/* Подвал */
.footer {
  margin-top: auto;
  padding: 20px 0;
  background-color: transparent;
  color: white;
  text-align: left;
  font-size: 14px;
}

.footer a {
  color: #5F1718;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Анимации */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.quiz-btn {
  margin-top: 20px;
  padding: 12px 24px;
  background-color: #5F1718;
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.4s ease forwards;
}

.quiz-btn:nth-child(2) { animation-delay: 0.1s; }
.quiz-btn:nth-child(3) { animation-delay: 0.2s; }
