/* ==========================================================================
   Variables & Glassmorphism Theme
   ========================================================================== */
:root {
  --primary: #0123e4;
  --primary-glow: rgba(1, 35, 228, 0.35);
  --primary-hover: #001bc2;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
  --glass-card-hover: rgba(255, 255, 255, 0.9);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   CSS Reset & Base Setup
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font-family);
  color: var(--text-main);
  background: radial-gradient(circle at 15% 15%, rgba(1, 35, 228, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.1) 0%, transparent 45%),
              #f8fafc;
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center; /* центрирует сразу по обеим осям */
  min-height: 100vh;
}
.getcourse {
  max-width: 640px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box; /* гарантирует, что padding не раздует ширину больше 640px */
}

.page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center; /* центрирует сразу по обеим осям */
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* ==========================================================================
   Typography
   ========================================================================== */
.caption {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.test_overhead {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.test_subcaption {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */
.getcourse_progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  width: 0%;
  background: linear-gradient(90deg, #0123e4, #6366f1);
  box-shadow: 0 0 12px var(--primary-glow);
  z-index: 1000;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Glass Card Containers (Sections & Pages)
   ========================================================================== */
.gc-page,
.getcourse_test {
  position: relative;
  margin: 40px auto;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 40px 32px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hidden {
  display: none !important;
}

.text.gc-page_text + .text.gc-page_text {
  margin-top: 8px;
}
/* ==========================================================================
   Buttons
   ========================================================================== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.25s ease;
  margin-top: 24px;
}

.button:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px var(--primary-glow);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button_white {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-main);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.button_white:hover {
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.button.button_galf {
  width: calc(50% - 10px);
}

/* ==========================================================================
   Interactive Option Cards (Radio & Checkbox)
   ========================================================================== */
.test_answers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.test_answers_columns_two {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ==========================================================================
   Rangebox (Clean Native Sliders)
   ========================================================================== */
.rangebox {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.rangebox_text {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-main);
}

.rangebox_slider_wrap_inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.rangebox_native_input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: rgba(1, 35, 228, 0.15);
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rangebox_native_input:hover {
  background: rgba(1, 35, 228, 0.25);
}

.rangebox_native_input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.rangebox_native_input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.rangebox_val_display {
  min-width: 32px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  text-align: right;
}

/* ==========================================================================
   Footer & Action Controls
   ========================================================================== */
.test_footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.test_footer-inner {
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.test_footer-inner_show {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Form Fields (Lead Generation Screen)
   ========================================================================== */
.textfield {
  position: relative;
  margin-bottom: 16px;
}

.textfield_input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
}

.textfield_input:focus,
.textfield_state_focused .textfield_input {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.textfield_type_error .textfield_input {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.textfield_notification {
  display: none;
  font-size: 0.85rem;
  color: #ef4444;
  margin-top: 6px;
  padding-left: 4px;
}

/* ==========================================================================
   Result Page Elements
   ========================================================================== */
.resultpageinfo {
  display: none;
  text-align: center;
  font-size: 1.15rem;
  margin: 24px 0;
  line-height: 1.6;
}

.resultpageinfo p {
  margin-bottom: 8px;
}

/* ==========================================================================
   Mobile Optimization
   ========================================================================== */
@media (max-width: 640px) {
  .gc-page,
  .getcourse_test {
    margin: 16px 12px;
    padding: 24px 16px;
    border-radius: var(--radius-md);
  }

  .caption {
    font-size: 1.5rem;
  }

  .test_answers_columns_two {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .test_footer {
    justify-content: stretch;
  }

  .test_footer-inner {
    width: 100%;
  }

  .button.button_galf {
    width: 100%;
    margin: 6px 0;
  }
}
/* ==========================================================================
   Двухколоночная сетка для вариантов ответов
   ========================================================================== */
.test_answers_columns_two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* На мобильных экранах перестраиваем в одну колонку */
@media (max-width: 640px) {
  .test_answers_columns_two {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ==========================================================================
   Rangebox (более акцентная стеклянная карточка)
   ========================================================================== */
.rangebox.test_answer {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(1, 35, 228, 0.14);
  border-radius: var(--radius-md, 12px);
  padding: 18px 20px;
  margin-bottom: 0; /* отступы теперь контролируются через gap сетки */
  box-shadow: 0 4px 16px rgba(1, 35, 228, 0.05),
              0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Деликатный акцент при наведении */
.rangebox.test_answer:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(1, 35, 228, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(1, 35, 228, 0.09),
              0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Внутреннее содержимое карточки */
.rangebox_inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.rangebox_text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main, #1e293b);
  line-height: 1.45;
  margin-bottom: 16px;
}

/* Слайдер и индикатор значения */
/* ==========================================================================
   Range Input: трек и круглый ползунок без бордера
   ========================================================================== */
.rangebox_slider_wrap_inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.rangebox_slider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.rangebox_native_input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: rgba(1, 35, 228, 0.16);
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rangebox_native_input:hover {
  background: rgba(1, 35, 228, 0.26);
}

/* Ползунок для Chrome, Safari, Edge */
.rangebox_native_input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--primary, #0123e4);
  box-shadow: 0 4px 12px var(--primary-glow, rgba(1, 35, 228, 0.4));
  cursor: grab;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.rangebox_native_input::-webkit-slider-thumb:hover {
  background: var(--primary-hover, #001bc2);
  transform: scale(1.15);
  box-shadow: 0 6px 16px var(--primary-glow, rgba(1, 35, 228, 0.5));
}

.rangebox_native_input::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(0.95);
}

/* Ползунок для Firefox */
.rangebox_native_input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--primary, #0123e4);
  box-shadow: 0 4px 12px var(--primary-glow, rgba(1, 35, 228, 0.4));
  cursor: grab;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.rangebox_native_input::-moz-range-thumb:hover {
  background: var(--primary-hover, #001bc2);
  transform: scale(1.15);
  box-shadow: 0 6px 16px var(--primary-glow, rgba(1, 35, 228, 0.5));
}

.rangebox_native_input::-moz-range-thumb:active {
  cursor: grabbing;
  transform: scale(0.95);
}

/* Счетчик значения справа */
.rangebox_val_display {
  min-width: 24px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary, #0123e4);
  text-align: right;
  flex-shrink: 0;
}

/* Контейнер: сетка в 2 колонки (на мобильных экранах переходит в 1) */
.test_answers_columns_two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .test_answers_columns_two {
    grid-template-columns: 1fr;
  }
}

/* Карточка ответа */
.test_answer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background-color: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.test_answer:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
}





/* ==========================================================================
   Единые стили для карточек Checkbox и Radiobox
   ========================================================================== */

/* Общий контейнер ответа (label) */
.checkbox.test_answer,
.radiobox.test_answer {
  position: relative;
  display: block;
  cursor: pointer;
  user-select: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border:none;
}

/* Полностью скрываем нативные input, оставляя доступными для событий */
.checkbox_input,
.radiobox_input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

/* Одинаковая плашка карточки */
.checkbox_label,
.radiobox_label {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(1, 35, 228, 0.14);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(1, 35, 228, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  position: relative;
}

/* Отключаем любые кружки, галочки и псевдоэлементы */
.checkbox_label::before,
.checkbox_label::after,
.radiobox_label::before,
.radiobox_label::after {
  content: none !important;
  display: none !important;
}

/* Текст ответа */
.checkbox_text,
.radiobox_text {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.45;
  margin: 0;
  transition: color 0.2s ease;
}

/* Ховер карточки */
.checkbox:hover .checkbox_label,
.radiobox:hover .radiobox_label {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(1, 35, 228, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(1, 35, 228, 0.08);
}

/* ==========================================================================
   Выбранное состояние (по :checked и по JS-классам)
   ========================================================================== */

.checkbox_input:checked + .checkbox_label,
.radiobox_input:checked + .radiobox_label,
.checkbox_active .checkbox_label,
.radiobox_active .radiobox_label {
  background: rgba(1, 35, 228, 0.08) !important;
  border-color: #0123e4 !important;
  box-shadow: 0 4px 18px rgba(1, 35, 228, 0.22) !important;
  transform: translateY(-1px);
}

.checkbox_input:checked + .checkbox_label .checkbox_text,
.radiobox_input:checked + .radiobox_label .radiobox_text,
.checkbox_active .checkbox_label .checkbox_text,
.radiobox_active .radiobox_label .radiobox_text {
  color: #0123e4 !important;
  font-weight: 600;
}



.getcourse_test[data-type="radio"] .test_footer {
  display: none;
}



/* ==========================================================================
   Микро-плашка промежуточного прогресса (Milestone Badge)
   ========================================================================== */
.quiz-milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(1, 35, 228, 0.08);
  border: 1px solid rgba(1, 35, 228, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0123e4;
  line-height: 1.4;
  margin-bottom: 16px;
  animation: milestoneFadeIn 0.4s ease-out forwards;
}

.quiz-milestone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #0123e4;
  color: #ffffff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

@keyframes milestoneFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .quiz-milestone-badge {
    font-size: 0.82rem;
    padding: 8px 12px;
  }
}




/* ==========================================================================
   Компактный мобильный режим (умещает вопрос и варианты в 1 экран без скролла)
   ========================================================================== */
@media (max-width: 640px) {
  /* 1. Общие отступы внешнего контейнера квиза */
  .getcourse_test,
  .test_inner {
    padding: 12px 14px !important;
    margin: 0 auto !important;
  }

  /* 2. Шапка вопроса (прогресс, счетчик и заголовок) */
  .test_overhead {
    font-size: 0.75rem !important;
    margin-bottom: 4px !important;
  }

  .test_title,
  .test_title p {
    font-size: 1.05rem !important;
    line-height: 1.3 !important;
    margin-bottom: 12px !important;
  }

  /* 3. Сетка вариантов ответов */
  .test_answers {
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .test_answers_columns_two {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  /* 4. Карточки Checkbox и Radiobox */
  .checkbox_label,
  .radiobox_label {
    padding: 10px 14px !important;
    min-height: auto !important;
    border-radius: 10px !important;
    gap: 10px !important;
  }

  .checkbox_text,
  .radiobox_text {
    font-size: 0.85rem !important;
    line-height: 1.35 !important;
  }

  /* 5. Карточки с ползунками (Rangebox) */
  .rangebox.test_answer {
    padding: 10px 12px !important;
    border-radius: 10px !important;
    margin-bottom: 6px !important;
  }

  .rangebox_text {
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
    margin-bottom: 6px !important;
  }

  .rangebox_slider_wrap_inner {
    padding-top: 0 !important;
    gap: 8px !important;
  }

  .rangebox_slider {
    gap: 8px !important;
  }

  .rangebox_native_input {
    height: 4px !important;
  }

  .rangebox_native_input::-webkit-slider-thumb {
    width: 18px !important;
    height: 18px !important;
  }

  .rangebox_native_input::-moz-range-thumb {
    width: 18px !important;
    height: 18px !important;
  }

  .rangebox_val_display {
    min-width: 18px !important;
    font-size: 0.85rem !important;
  }

  /* 6. Футер и кнопка действия */
  .test_footer {
    margin-top: 8px !important;
  }

  .button,
  .test_button {
    margin-top: 8px !important;
    padding: 11px 18px !important;
    font-size: 0.9rem !important;
    width: 100% !important;
  }

  /* 7. Микро-плашка промежуточной валидации (шаг 5) */
  .quiz-milestone-badge {
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
    margin-bottom: 8px !important;
    gap: 6px !important;
  }

  .quiz-milestone-icon {
    width: 16px !important;
    height: 16px !important;
    font-size: 10px !important;
  }
  
  .container {
      padding: 0;
  }
  
  .rangebox_inner {
    width: 100%;

  }
}

.textfield_label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}