/* [FIX][#nav-visibility] Принудительное скрытие кнопок навигации.
   Используем #nav-wrapper в селекторе, чтобы перебить
   #nav-wrapper > * { display: flex !important } с более высокой специфичностью. */
#nav-wrapper .nav-button.is-hidden,
.nav-button.is-hidden {
  display: none !important;
  flex: 0 0 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}
/* ======= ПЕРЕМЕННЫЕ ======= */
:root {
  --page-max: 1600px;
  --gutter: 24px;
  --sidebar-w: 350px;
  --header-h: 86px;
  --footer-h: 72px;
  /* Совпадает с внутренним краем .landing-layout-flex (центрирование + padding) */
  --layout-x: max(0px, calc((100vw - min(100vw, var(--page-max))) / 2 + var(--gutter)));
  --column-gap: 20px;
  --content-left: 0px;
  --content-width: 600px;
  /* Typography scale (desktop) */
  --fs-h1: 40px;
  --fs-h2: 32px;
  --fs-h3: 26px;
  --fs-h4: 22px;
  --fs-body: 18px;
  --fs-small: 16px;
  --fs-caption: 14px;
  --fs-button: 18px;
  --fs-lead: 22px;
  --lh-body: 1.55;
  --lh-heading: 1.3;
}

/* ======= ГЛОБАЛЬНЫЕ СТИЛИ ======= */
html, body {
  height: 100%;
  overflow: hidden !important;
}
body {
  background: #f5f7f9 !important;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  opacity: 1 !important;
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1);
}
body::after {
  content: "";
  position: fixed;
  left: 0; right: 0; bottom: 0; height: 20px;
  background: #f5f7f9;
  z-index: 5;
  pointer-events: none;
}

/* ======= ТИПОГРАФИКА ======= */
body,
.landing-sidebar,
.course-sidebar-wrapper,
.course-header,
.progress-label,
.menu-group-title,
.course-step,
.course-step a,
.landing-main,
#content-container,
#content-container *,
.nav-wrapper,
.nav-button {
  font-family: 'Gilroy', sans-serif !important;
}

/* Базовое распределение насыщенности Gilroy по смыслу текста */
body {
  font-weight: 400;
}
h1, h2, h3,
strong, b {
  font-weight: 700;
}
h4, h5, h6,
button, .btn, .btn-next, .btn-prev {
  font-weight: 600;
}
em, i {
  font-style: italic;
}

/* ======= ШАПКА ======= */
.header-full {
  width: 100%;
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: top 0.35s ease;
}
.header-full.scrolled-away {
  top: -140px;
}
.header-wrapper {
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--gutter) 16px;
  box-sizing: border-box;
}
.header-left, .header-right {
  display: flex;
  flex-direction: column;
}
.header-title {
  font-size: var(--fs-h4);
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #222;
}
.header-subtitle {
  font-size: var(--fs-small);
  color: #666;
  margin: 0;
  line-height: 1.35;
}
.header-subtitle--mobile {
  display: none;
}
.header-contacts {
  font-size: var(--fs-small);
  color: #666;
  font-weight: 400;
  line-height: 1.35;
  text-align: right;
}
.header-contact-name {
  font-size: var(--fs-body);
  font-weight: 600;
  color: #222;
  margin: 0 0 4px 0;
}
.header-contact-org {
  font-size: var(--fs-caption);
  font-weight: 400;
  color: #666;
  margin: 0;
}

/* ======= СЕТКА/ОБОЛОЧКА ======= */
.landing-layout-flex {
  max-width: var(--page-max) !important;
  margin: 0 auto !important;
  padding: 0 var(--gutter) !important;
  position: relative !important;
  height: 0 !important;
  background: transparent !important;
}

/* ======= МЕНЮ ======= */
.landing-sidebar {
  width: var(--sidebar-w) !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}
.landing-sidebar .course-sidebar-wrapper {
  position: fixed !important;
  top: calc(var(--header-h) + 10px) !important;
  bottom: 20px !important;
  left: var(--layout-x) !important;
  width: var(--sidebar-w) !important;
  overflow-y: auto !important;
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.09) !important;
  border: 1px solid #eaeaea !important;
  margin: 0 !important;
  padding: 20px 0 20px 0 !important;
  box-sizing: border-box !important;
  z-index: 20 !important;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge Legacy */
}
.landing-sidebar .course-sidebar-wrapper::-webkit-scrollbar { width: 0; height: 0; }

/* ======= МЕНЮ-КОНТЕНТ ======= */
.course-header {
  font-weight: 600;
  font-size: var(--fs-h4);
  margin: 0 0 16px 0;
  padding: 4px 20px 0 20px;
  color: #333;
}
.progress-wrapper { margin-bottom: 24px; padding-left: 20px; padding-right: 20px; box-sizing: border-box; }
.progress-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.progress-label span, .progress-percent { font-size: var(--fs-body); color: #bbb; }
.progress-bar { width: 100%; height: 10px; background-color: #B0D6BE; border-radius: 6px; overflow: hidden; }
.progress-bar > div { height: 100%; width: 0%; background-color: #54B268; transition: width 0.4s ease; }
.menu-group { margin-bottom: 16px; }
.menu-group-title { font-weight: 400; font-size: var(--fs-body); display: flex; align-items: center; cursor: pointer; padding: 8px 0 8px 20px; }
.menu-group-title img { width: 26px; height: 26px; margin-right: 12px; margin-left: 12px; flex-shrink: 0; }
.menu-group-content { display: none; margin-left: 22px; padding-left: 38px; }
.menu-group-content.open { display: block; }
.course-step { display: flex; align-items: center; padding: 7px 6px; border-radius: 14px; cursor: pointer; font-size: var(--fs-body); font-weight: 400; box-sizing: border-box; position: relative; transition: background 0.3s; }
.course-step a { text-decoration: none; color: #333; flex-grow: 1; font-size: var(--fs-body); margin-left: 12px; overflow: hidden; text-overflow: ellipsis; white-space: normal !important; word-break: break-word !important; overflow: visible !important; text-overflow: unset !important; }
.course-step img { width: 24px; height: 24px; flex-shrink: 0; }
.course-step:hover { background: #FBFEFC; }
.course-step.active { background-color: #E3F6EB; font-weight: 600; }
.course-step.disabled { opacity: 0.5; pointer-events: none; }
.course-step.disabled a { color: #aaa; }
.course-step.completed a { color: #333; }

/* ======= КОНТЕНТ ======= */
.landing-main {
  min-width: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  position: relative !important;
  height: 100% !important;
  overflow: hidden !important;
  padding: 0 !important;
  width: auto !important;
  max-width: 1600px !important;
  margin: 0 auto !important;
}

/* Десктоп: карточка на всю высоту до низа, скролл внутри; кнопки в потоке внизу урока */
@media (min-width: 993px) {
  :root {
    --fs-body: 20px;
  }

  #content-container {
    position: fixed !important;
    top: calc(var(--header-h) + 10px) !important;
    bottom: 20px !important;
    left: calc(var(--layout-x) + var(--sidebar-w) + var(--column-gap)) !important;
    right: var(--layout-x) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.09) !important;
    border: 1px solid #eaeaea !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
  }

  #content-container .content-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 30px !important;
    box-sizing: border-box !important;
    scrollbar-width: none;
  }

  #content-container .content-scroll::-webkit-scrollbar {
    display: none;
  }

  #nav-wrapper.nav-wrapper {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin-top: 2rem !important;
    margin-bottom: 8px !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    z-index: 3 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

#content-container > * {
  max-width: 100%;
  overflow-wrap: break-word;
}

/* ======= НАВИГАЦИЯ (база; десктоп переопределён выше) ======= */
#nav-wrapper {
  padding: 0 !important;
  gap: 20px !important;
  position: relative !important;
}
#nav-wrapper > * {
  flex: 1 1 0 !important;
  height: auto !important;
  min-height: var(--footer-h) !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.nav-button {
  flex: 1 1 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  /* если нужно, можно задать только вертикальные отступы */
  /* padding-top: 8px !important;
     padding-bottom: 8px !important; */
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.5s, color 0.5s, border-color 0.5s;

}

/* ========== 1. ОСНОВНЫЕ ПЕРЕМЕННЫЕ ========== */
:root {
  --primary-green: #5cb85c; /* Основной зелёный цвет */
  --light-green: #e0f7e0; /* Светлый зелёный (фон успеха) */
  --error-red: #e74c3c; /* Красный цвет для ошибок */
  --gray-bg: #f1f1f1; /* Серый фон страницы */
  --field-bg: #f6f8fa; /* Цвет фона инпутов */
  --text-gray: #666; /* Серый цвет текста по умолчанию */
  --shadow: 0 2px 8px rgba(0,0,0,0.05); /* Тень для блоков */
  --border-radius: 12px; /* Радиус скругления для блоков */
}

/* ========== 2. БАЗОВЫЕ СТИЛИ ========== */
body {
  
  margin: 0; /* Убираем внешние отступы */
  padding: 0; /* Убираем внутренние отступы */
  
  color: #333; /* Цвет текста */
  line-height: 1.5; /* Межстрочный интервал */
  
}

/* ========== 3. ШАПКА ========== */
.header-full {
  width: 100%;
  margin: 0 auto;
  background: #fff;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000; /* Поверх всего остального */
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.header-wrapper {
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: stretch ;
  padding: 22px var(--gutter) 16px;
  box-sizing: border-box;
}

.header-left {

  line-height: 0.8;
}

.header-right {
  text-align: right;
  word-wrap: break-word;

}

.header-title {
  font-size: var(--fs-h4);
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #222;
}

.header-subtitle {
  font-size: var(--fs-small);
  color: #666;
  margin: 0;
  line-height: 1.35;
}

.header-subtitle--mobile {
  display: none;
}

.header-contacts {
  font-size: var(--fs-small);
  color: #666;
  line-height: 1.35;
  font-weight: 400;
}

.header-contact-name {
  font-size: var(--fs-body);
  font-weight: 600;
  color: #222;
  margin: 0 0 4px 0;
}

.header-contact-org {
  font-size: var(--fs-caption);
  font-weight: 400;
  color: #666;
  margin: 0;
}

/* ========== 4. ЛЕВОЕ МЕНЮ, ПРОГРЕСС, МЕНЮ-ГРУППЫ ========== */

/* Боковая панель */
.course-sidebar-wrapper {
  width: 350px !important;
  color: #333;
  background: #fff;
  z-index: 2;
  position: sticky;
  top: 20px;
  padding: 0 20px 20px 20px;
  margin-top: 20px;
  flex-shrink: 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

/* Заголовок меню */
.course-header {
  font-weight: 600;
  font-size: var(--fs-h4);
  margin: 0 0 16px 0;
  padding: 4px 20px 0 20px;
  color: #333;
}

/* Прогресс */
.progress-wrapper {
  margin-bottom: 24px;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.progress-label span {
  font-weight: 400;
  font-size: var(--fs-body);
  color: #bbb;
}

.progress-percent {
  font-size: var(--fs-body);
  color: #bbb;
  white-space: nowrap;
  text-align: right;
  margin-left: auto;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background-color: #B0D6BE;
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar > div {
  height: 100%;
  width: 0%;
  background-color: #54B268;
  transition: width 0.4s ease;
}

/* Группы меню */
.menu-group {
  margin-bottom: 16px;
}

.menu-group-title {
  font-weight: 400;
  font-size: var(--fs-body);
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 0 8px 20px;      
}

.menu-group-title img {
  width: 26px;
  height: 26px;
  margin-right: 12px;
  margin-left: 12px;
  flex-shrink: 0;
}

.menu-group-content {
  display: none;
  margin-left: 22px;
  padding-left: 38px;
  
}

.menu-group-content.open {
  display: block;
  
}

/* Элементы меню */
.course-step {
  display: flex;
  align-items: center;
  padding: 7px 6px;
  border-radius: 14px;
  cursor: pointer;
  font-size: var(--fs-body);
  font-weight: 400;
  box-sizing: border-box;
  position: relative;
  transition: background 0.3s;
}

.course-step a {
  text-decoration: none;
  color: #333;
  flex-grow: 1;
  font-size: var(--fs-body);
  margin-left: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* ==== Особые стили для word-wrap ниже ==== */
  white-space: normal !important;
  word-break: break-word !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

.course-step img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.course-step:hover {
  background: #FBFEFC;
}

.course-step.active {
  background-color: #E3F6EB;
  font-weight: 600;
}

.course-step.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.course-step.disabled a {
  color: #aaa;
}

.course-step.completed a {
  color: #333;
}
/* ========== 5. ОСНОВНАЯ СТРУКТУРА, АНКЕТА, ИНПУТЫ, КНОПКИ, НАВИГАЦИЯ ========== */

/* Обёртка страницы */
.page-wrapper {
  display: flex;
  gap: 32px;
  max-width: 1200px;
  margin: 20px;
  padding: 40px 20px 20px 20px;
  align-items: flex-start;
}

/* Основной контейнер анкеты */
.anketa-container {
  flex-grow: 1;
  max-width: none !important;
  width: 100% !important;
  padding-left: 0px !important;
  margin-left: 0px !important;
}

/* Разделитель после бокового меню */
.course-sidebar-wrapper::after {
  content: "";
  display: block;
  width: 32px;
  flex-shrink: 0;
}

/* Входные поля */
.input-wrapper {
  background: #fff;
  border-radius: 12px !important;
  padding: 22px 28px;
  margin-bottom: 20px !important;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.task-header span:first-child {
  font-weight: 700;
  font-size: var(--fs-body);
  color: #444;
}

/* Метки статуса */
.status-label {
  color: var(--primary-green);
  font-size: var(--fs-small);
  display: none;
}

.completion-time-field {
  color: #aaa;
  font-size: var(--fs-caption);
  margin: 5px 0 12px 0;
  display: none;
}

.completion-time-field::before {
  content: " в ";
}

/* Стили input и textarea */
input, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e1e4e8;
  background: var(--field-bg);
  border-radius: 8px;
  font-size: var(--fs-small);
  color: var(--text-gray);
  transition: all 0.3s ease;
}

textarea {
  height: 100px;
  /* resize: vertical; */
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-gray);
}

/* Сообщение об успешном выполнении задания */
.task-success-message {
  background: var(--light-green);
  border-radius: 8px;
  padding: 16px !important;
  margin: 10px 0 24px 0 !important;
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--text-gray);
}

/* Обёртка навигационных кнопок */
.nav-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 30px 0 20px;
  position: relative;
  z-index: 50;
}

/* Кнопки навигации */
.nav-button {
  width: 100%;
  padding: 20px 0;
  text-align: center;
  border-radius: 8px;
  font-size: var(--fs-button);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  touch-action: manipulation;
  box-sizing: border-box;
}

.btn-back {
  background: #fff;
  color: rgba(92, 184, 92, 0.40) !important;
  border: none;
  border: none !important;
}

.btn-back:hover {
  color: #5CB85C !important;
}

.btn-next {
  background: var(--primary-green);
  color: #fff;
  border: none !important;
}

.btn-next:hover {
  background: #4cae4c;
  color: #e6ffe6 !important;
}

/* Убираем лишний фокус с кнопок */
.nav-button:focus, .nav-button:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Валидация input/textarea */
.js-error-border {
  border: 2px solid var(--error-red) !important;
  animation: shake 0.5s;
}

.js-success-border {
  border: 2px solid var(--primary-green) !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* ========== 6. МОДАЛЬНЫЕ ОКНА ========== */

#final-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#final-modal.visible {
  display: flex;
}

#final-modal .modal-content {
  background: #fff;
  padding: 40px;
  border-radius: 16px;
  width: 95%;
  text-align: center;
}

#final-modal .modal-button {
  margin-top: 24px;
  background: var(--primary-green);
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-size: var(--fs-small);
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  max-width: 600px;
  margin-bottom: 32px;
}

#final-modal h2 {
  color: #111;
}

/* ====== Спасибо/Финал модалка (универсально с конкурентов) ====== */
#thank-you-modal .modal-content,
#final-modal .modal-content {
  position: fixed;
  z-index: 10000;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 40px 42px 34px 42px;
  border-radius: 10px !important;
  text-align: center;
  min-width: 400px;
  max-width: 700px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(70,90,100,0.12);
  margin: 0 auto;
}

#thank-you-modal img,
#final-modal img {
  display: block;
  margin: 0 auto 20px auto;
  width: 105%;
  max-width: 800px;
  height: auto;
  border-radius: 8px;
}

#thank-you-modal h2,
#final-modal h2 {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: #222;
  margin-bottom: 15px;
  margin-top: 0;
  letter-spacing: 0;
  line-height: 1.18;
}

#thank-you-modal .ty-modal-text,
#final-modal .ty-modal-text {
  font-size: var(--fs-small);
  color: #222;
  line-height: 1.33;
  margin-bottom: 100px;
  margin-top: 0;
  padding: 0;
}

#thank-you-modal .modal-btn,
#final-modal .modal-btn {
  margin-top: 30px;
  font-size: var(--fs-button);
  background: #54B268;
  color: #fff;
  border: none;
  padding: 13px 38px;
  border-radius: 8px;
  cursor: pointer;
  min-width: 110px;
  width: auto;
  display: inline-block;
  font-weight: 500;
  box-shadow: none;
  transition: background .2s;
  margin-bottom: 0;
}

#thank-you-modal .modal-btn:hover,
#final-modal .modal-btn:hover {
  background: #419b53;
}

@media (max-width: 600px) {
  #thank-you-modal .modal-content,
  #final-modal .modal-content {
    min-width: 0;
    max-width: 97vw;
    padding: 7vw 1vw 7vw 1vw;
  }
  #thank-you-modal img,
  #final-modal img {
    width: 98vw;
    max-width: 98vw;
  }
}

/* ========== 7. BITRIX24 СТИЛИ ========== */
.landing-block:not(.landing-ui-panel):not(.landing-ui-component-sidebar):not(.landing-semantic-background),
.landing-component:not(.landing-ui-sidebar),
.landing-ui-card:not(.landing-ui-panel),
.landing-card:not(.landing-ui-component)  {
  border-radius: 10px !important;
  padding: 0 60px 0 60px; /* ОТСТУПЫ внутренние ДЛЯ БЛОКА КОНТЕНТА */
}

.landing-block-node-text {
  border-radius: 12px; /* закругляем блоки с цветными рамками! */
  overflow: hidden; /* На всякий случай */
}


/* Скрытие футера Bitrix24 */
.bitrix-footer {
  display: none !important;
}

/* Отступ от шапки */
.landing-main {
  padding-top: 20px !important;
}

/* Закругляем все видео-блоки */
.landing-block-node-embed,
.landing-block-node-embed video,
.landing-block-node-embed iframe {
  border-radius: 16px; /* можешь менять радиус */
  overflow: hidden;
}




.landing-layout-flex { 
  margin-top: calc(var(--header-h) + 16px); 
  max-width: 2000px !important;
  width: 80% !important;
  gap: 20px !important;  
} 

.landing-sidebar.g-max-width-100x {
  width: 350px !important;
}






/* Главный контейнер - ОБНОВЛЕНО */
main.landing-public-mode {
  flex: 1;
  margin-top: calc(var(--header-h) + 16px); 
  padding: 20px 0 0 0; /* Верхний отступ 20px, нижний 0 */
}

/* Контейнер меню+контента - ОБНОВЛЕНО */
.landing-layout-flex {
  display: flex;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  gap: 20px;
  min-height: calc(100vh - 100px); /* 100vh - шапка 80px + отступ 20px */
}

/* Боковое меню - ОБНОВЛЕНО */
.landing-sidebar {
  width: 350px;
  flex-shrink: 0;
  position: sticky;
  top: 100px; /* Шапка 80px + отступ 20px */
  height: calc(100vh - 120px); /* 100vh - (шапка 80px + отступы 40px) */
  background: white;
  border-radius: 12px;
  overflow-y: auto; /* Возвращаем скролл */
  box-shadow: none; /* Убираем тень */
  margin-top: 0; /* Убираем лишний отступ */
}

/* Основной контент - ОБНОВЛЕНО */
.landing-main {
  flex: 1;
  min-height: calc(100vh - 120px);
  position: relative;
  overflow-y: auto;
  padding-bottom: 20px; /* Фиксируем отступ снизу */
  margin-top: 0; /* Убираем лишний отступ */
}

/* Кнопки навигации - ОБНОВЛЕНО */
.nav-wrapper {
  margin: 40px 0 0 0 !important; /* Универсальный отступ сверху, между контентом и навигацией */
  padding: 0;
}

/* Адаптив - БЕЗ ИЗМЕНЕНИЙ */
@media (max-width: 992px) {
  .landing-layout-flex {
    flex-direction: column;
    padding: 0 20px;
  }
  
  .landing-sidebar {
    width: 100%;
    position: static;
    height: auto;
    max-height: 400px;
    margin-bottom: 20px;
  }
  
  .landing-main {
    min-height: auto;
  }
}

/* 1. Убираем полосу прокрутки в меню (но сохраняем функциональность) */
.landing-sidebar::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

.landing-sidebar {
  -ms-overflow-style: none; /* IE и Edge */
  scrollbar-width: none; /* Firefox */
  overflow-y: scroll; /* Сохраняем возможность скролла */
}

/* 2. Убираем полоску в меню (границу и тень) */
#b5884.block-wrapper.block-html,
.landing-sidebar .landing-block {
  box-shadow: none !important;
  border: none !important;
  background-image: none !important;
}

/* 3. Фиксируем отступ контента от шапки */
main.landing-public-mode {
  padding-top: 20px !important; /* Жестко фиксируем 20px */
  margin-top: calc(var(--header-h) + 16px); /* под фиксированной шапкой */
}

.landing-layout-flex {
  margin-top: 0 ; /* Убираем дублирующий отступ */
}

/* 4. Дополнительная защита для родительских элементов */
.landing-sidebar.g-max-width-100x {
  border: none !important;
  box-shadow: none !important;
  background-clip: padding-box;
}

/* 5. Гарантия отсутствия лишних отступов */
.landing-main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Если нужно убрать тень конкретно у реального меню — уточнить класс */
.course-sidebar-wrapper {
  box-shadow: none !important;
}






/* Уменьшить жирность текста в кнопке Внести оплаты */
button, .btn, .ui-btn {
  font-weight: 400 !important;
}

/* Убрать сообщения между кнопками навигации */
/* #error-message { display: none !important; } */

/* Картинка модалки благодарности не выпирает справо */
#thank-you-modal .modal-content,
#final-modal .modal-content {
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ========== 8. АДАПТИВ ========== */
@media (max-width: 992px) {
  .page-wrapper {
    display: flex;
    gap: 32px !important;
    padding: 40px 20px 0 20px;
  }
  .course-sidebar-wrapper {
    width: 100%;
    position: static;
    margin-bottom: 20px;
  }
  .header-wrapper {
    flex-direction: column;
    padding: 20px;
  }
}

/* Планшет: шапка выше контента с зазором */
@media (min-width: 577px) and (max-width: 992px) {
  main.landing-public-mode {
    margin-top: 88px !important;
  }
}

@media (max-width: 576px) {
  .landing-block:not(.landing-ui-panel):not(.landing-ui-component-sidebar):not(.landing-semantic-background),
  .landing-component:not(.landing-ui-sidebar),
  .landing-ui-card:not(.landing-ui-panel),
  .landing-card:not(.landing-ui-component) {
    padding: 0; /* ОТСТУПЫ внутренние ДЛЯ БЛОКА КОНТЕНТА */
  }
  
  .header-wrapper {
    padding: 20px 14px 16px !important;
  }

  main.landing-public-mode {
    margin-top: 74px !important;
  }
  .landing-layout-flex {
    margin-top: 0 !important;
  }
  .landing-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }



  .nav-wrapper {
    flex-direction: column;
    gap: 10px;
    
  }
  
  .nav-button {
    display: block;
    width: 100%;
    pointer-events: auto;
    margin: 0;
  }
  
  
  .input-wrapper {
    padding: 15px 18px;
    
  }
  
  .header-right {
    display: none !important;
  }
  
  .header-title {
    font-size: var(--fs-small) !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
  }

  .header-subtitle--mobile {
    font-size: var(--fs-caption) !important;
  }
  
  .header-left {
    padding-left: 16px !important;
    width: 100% !important;
  }
  
  .landing-layout-flex,
  .page-wrapper,
  .anketa-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    box-sizing: border-box !important;
  }
  

}



/* VERSION 1.2 | 2025-07-10
   FIX: #arrow-align | Центровка стрелок кнопок.
   Только CSS. Рабочий код не трогался.
*/
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.nav-arrow svg {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
}






/* VERSION 1.3.1 | 2025-08-28 | mobile-adaptive.css
   История:
   - v1.3.1: [FIX][#mobile-scroll][#nav-size] Восстановили скролл и размеры кнопок с "старого" кода.
*/

/* ========== АДАПТИВ ДЛЯ ПЛАНШЕТОВ ========== */
@media (max-width: 992px) {
  /* Разрешаем скролл */
  html, body {
    height: auto !important;
    overflow: auto !important;
  }

  /* Сетка в колонку */
  .landing-layout-flex {
    flex-direction: column !important;
    padding: 0 20px !important;
  }

  /* Левое меню вниз */
  .course-sidebar-wrapper,
  .landing-sidebar {
    width: 100% !important;
    position: static !important;
    height: auto !important;
    margin-bottom: 20px !important;
  }

  /* Шапка */
  .header-wrapper {
    flex-direction: column !important;
    padding: 20px !important;
  }

  /* Контент */
  #content-container {
    position: relative !important;
    top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
    width: 100% !important; height: auto !important;
    margin: 0 !important; padding: 20px !important;
    border-radius: 12px !important;
    box-shadow: none !important;
  }
  .landing-main {
    min-height: auto !important;
    margin-top: 0 !important; padding: 0 !important;
  }

  /* Навигация */
  #nav-wrapper.nav-wrapper {
    position: relative !important;
    left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100% !important;
    margin: 20px 0 !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .nav-button {
    width: 100% !important;
    padding: 20px 0 !important;    /* ← как в старом коде */
    font-size: var(--fs-button) !important;
    border-radius: 8px !important;
    min-height: 44px !important;
  }
}

/* ========== АДАПТИВ ДЛЯ МОБИЛОК ========== */
@media (max-width: 576px) {
  /* Убираем внутренние отступы у блоков */
  .landing-block:not(.landing-ui-panel):not(.landing-ui-component-sidebar):not(.landing-semantic-background),
  .landing-component:not(.landing-ui-sidebar),
  .landing-ui-card:not(.landing-ui-panel),
  .landing-card:not(.landing-ui-component) {
    padding: 0 !important;
  }

  /* Шапка компактнее */
  .header-wrapper { padding: 20px 14px 16px !important; }
  .header-title {
    font-size: var(--fs-small) !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
  }
  .header-subtitle--mobile {
    font-size: var(--fs-caption) !important;
  }
  .header-right { display: none !important; }
  .header-left { padding-left: 16px !important; width: 100% !important; }

  /* Контент */
  .landing-layout-flex,
  .page-wrapper,
  .anketa-container {
    max-width: 100% !important; width: 100% !important;
    margin: 0 !important;
    padding-left: 8px !important; padding-right: 8px !important;
    box-sizing: border-box !important;
  }

  /* Навигация компактнее */
  .nav-button {
    padding: 18px 0 !important;
    font-size: var(--fs-button) !important;
  }
}



/* ========== СКРЫТИЕ МЕНЮ НА МОБИЛКЕ ========== */
@media (max-width: 768px) {
  /* Скрываем только оригинальный сайдбар в лэйауте, не трогаем клон в мобильном меню */
  .landing-sidebar,
  .landing-sidebar .course-sidebar-wrapper {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* [FINAL][#mobile] Чистый адаптив для мобилок */
@media (max-width: 992px) {
  html, body {
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Контент идёт в поток */
  #content-container {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 auto !important;
    padding: 15px 10px 30px 10px !important; /* боковые и нижний отступ */
    box-sizing: border-box !important;
  }

  #content-container article {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #content-container figure,
  #content-container figure img {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .landing-main,
  .page-wrapper,
  .landing-layout-flex {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 auto !important;
  }

  /* Навигация идёт после контента */
  #nav-wrapper.nav-wrapper {
    position: relative !important;
    width: 100% !important;
    margin: 20px 0 40px 0 !important; /* снизу отступ */
    padding: 0 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    box-sizing: border-box !important;
  }

  .nav-button {
    width: 100% !important;
    min-height: 48px !important;
    font-size: var(--fs-button) !important;
    border-radius: 8px !important;
  }

  #content-container .accent-callout {
    padding: 1rem 1rem 1rem 0.85rem !important;
    gap: 0.75rem !important;
  }

  #content-container .accent-callout__icon {
    width: 40px !important;
    height: 40px !important;
  }

  #content-container .accent-callout__icon svg {
    width: 19px !important;
    height: 19px !important;
  }
}

#nav-wrapper {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
}

#nav-wrapper.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Резерв: если где-то останется класс fixed на старых сборках */
#nav-wrapper.fixed {
  position: fixed;
  left: calc(var(--layout-x) + var(--sidebar-w) + var(--column-gap));
  right: var(--layout-x);
  bottom: 20px;
}





/* ======= УВЕЛИЧЕННЫЕ ШРИФТЫ ДЛЯ КУРСА ======= */
#content-container {
  font-size: var(--fs-body) !important;
  line-height: var(--lh-body) !important;
  color: #333 !important;
}

#content-container h1 {
  font-size: var(--fs-h1) !important;
  font-weight: 700 !important;
  color: #1f2328 !important;
  margin-bottom: 30px !important;
  line-height: var(--lh-heading) !important;
}

#content-container h2 {
  font-size: var(--fs-h2) !important;
  font-weight: 600 !important;
  color: #1f2328 !important;
  margin: 40px 0 0 0 !important; /* убираем отступ снизу под заголовком */
  line-height: var(--lh-heading) !important;
}

#content-container h3 {
  font-size: var(--fs-h3) !important;
  font-weight: 600 !important;
  color: #2a2f36 !important;
  margin: 30px 0 0 0 !important; /* убираем отступ снизу под заголовком */
  line-height: var(--lh-heading) !important;
}

#content-container p {
  font-size: var(--fs-body) !important;
  line-height: var(--lh-body) !important;
  color: #333 !important;
  margin-bottom: 20px !important;
}

#content-container p.lead {
  font-size: var(--fs-lead) !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #2a2f36 !important;
  margin-top: 30px !important;
  margin-bottom: 18px !important;
}

#content-container strong {
  font-weight: 600 !important;
  color: #2c3e50;
}

/* Видео контейнер */
.video-section {
  margin: 40px 0;
}

.video-container {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
}

/* Контент блоки */
.content-block {
  max-width: 736px;
  margin: 0;
}

/* Списки в тексте */
#content-container p:has(> strong) {
  margin-top: 25px !important;
}

/* Отступы после заголовков */
#content-container h2 + p {
  margin-top: 0 !important; /* убираем воздух сразу под h2 */
}

/* Убираем воздух сразу под h3 */
#content-container h3 + p {
  margin-top: 0 !important;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  :root {
    --fs-h1: 32px;
    --fs-h2: 26px;
    --fs-h3: 22px;
    --fs-h4: 20px;
    --fs-body: 20px;
    --fs-button: 20px;
    --fs-caption: 14px;
    --fs-lead: 20px;
  }

  #content-container {
    font-size: var(--fs-body) !important;
  }
  
  #content-container h1 {
    font-size: var(--fs-h1) !important;
  }
  
  #content-container h2 {
    font-size: var(--fs-h2) !important;
  }
  
  #content-container h3 {
    font-size: var(--fs-h3) !important;
  }

  #content-container .accent-callout__body {
    font-size: var(--fs-body);
  }

  #content-container .accent-callout {
    margin-block: 3.2em;
  }
  
  #content-container p {
    font-size: var(--fs-body) !important;
  }
}

/* ===== Семантический контент уроков (редактируйте страницы как обычный текст) ===== */
#content-container article {
  max-width: 736px;
  margin: 0 auto;
}

#content-container article > *:first-child:not(.accent-callout) {
  margin-top: 0;
}

#content-container figure {
  margin: 1.5rem 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

#content-container figure a {
  display: block;
}

#content-container figure img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-sizing: border-box;
}

#content-container figure[data-frame="border"] img {
  border: 1px solid #e0e0e0;
}

#content-container figcaption {
  font-size: var(--fs-caption);
  color: #666;
  margin-top: 10px;
}

#content-container aside {
  border-left: 4px solid #54b268;
  background: #f8fdf9;
  padding: 16px 20px;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

#content-container aside[data-tone="note"] {
  background: #fff8f0;
  border-left-color: #fd8c26;
}

#content-container aside h3 {
  margin-top: 0 !important;
}

/* Акцентный блок: рамка, слева галочка в круге (типовой CTA / важная мысль) */
#content-container .accent-callout {
  display: flex;
  align-items: center;
  gap: 1rem;
  /* ~2 строки обычного текста (line-height × 2) сверху и снизу */
  margin-block: 3.2em;
  margin-inline: 0;
  padding: 1.15rem 1.35rem 1.15rem 1.15rem;
  border: 2px solid #54b268;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
}

#content-container .accent-callout__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  align-self: center;
  border-radius: 50%;
  border: 2px solid #54b268;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #54b268;
  box-sizing: border-box;
}

#content-container .accent-callout__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

#content-container .accent-callout__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 400;
  font-size: var(--fs-body);
  color: #333;
  line-height: var(--lh-body);
}

#content-container .accent-callout__body > * {
  margin: 0 !important;
}

#content-container .accent-callout__body h2,
#content-container .accent-callout__body h3,
#content-container .accent-callout__body h4 {
  font-weight: 600;
  color: #333;
  line-height: 1.45;
  margin: 0 !important;
}

#content-container .accent-callout__body h2 {
  font-size: var(--fs-h4) !important;
}

#content-container .accent-callout__body h3 {
  font-size: var(--fs-h4) !important;
}

#content-container .accent-callout__body h4 {
  font-size: var(--fs-h4) !important;
}

#content-container .accent-callout__body p {
  font-weight: 400;
  margin: 0 !important;
  margin-bottom: 0 !important;
  font-size: var(--fs-body) !important;
  line-height: var(--lh-body) !important;
  color: #333 !important;
}

#content-container .accent-callout__body .muted {
  font-weight: 400;
}

#content-container .accent-callout--center .accent-callout__body {
  text-align: center;
}

#content-container mark {
  color: inherit;
  background: #d8e9e5;
  /* Подсветка выходит за текст, но сам текст не расширяет строку. */
  padding: 0.04em 0.14em 0.1em;
  margin: 0 -0.08em;
  border-radius: 0.42em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

#content-container .brand {
  color: #54b268;
  font-weight: 600;
}

#content-container .muted {
  color: #999;
}

#content-container .text-warm {
  color: #fcb047;
  font-weight: 600;
}

#content-container [data-align="center"] {
  text-align: center;
}

/* Финальный призыв «переходим дальше» — больше воздуха сверху и снизу перед кнопками */
#content-container article > [data-align="center"]:last-child,
#content-container article > .accent-callout.accent-callout--center:last-child {
  margin-top: clamp(2.75rem, 6vw, 4.5rem) !important;
  margin-bottom: clamp(2.75rem, 5vw, 4rem) !important;
}

#content-container blockquote {
  margin: 1rem 0;
  padding-left: 0;
  border-left: none;
}

#content-container blockquote.muted-rule {
  color: #999;
  font-size: var(--fs-small);
}

#content-container article ul {
  margin: 12px 0 20px 1.25rem;
  padding-left: 0.5rem;
}

#content-container article li.li-emoji-lead {
  list-style: none;
  margin-left: 0;
  padding-left: 0.15em;
  text-indent: 0;
}

#content-container p.cta {
  text-align: center;
  margin: 1.5rem 0;
}

/* Единый нижний CTA-блок над навигацией */
#content-container p.cta.cta-text {
  display: block;
  margin: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(2rem, 4vw, 3.2rem) !important;
  padding: clamp(0.95rem, 2.2vw, 1.25rem) clamp(1rem, 3vw, 1.6rem) !important;
  border: 2px solid rgba(84, 178, 104, 0.45);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(84, 178, 104, 0.12) 0%, rgba(84, 178, 104, 0.06) 100%);
  color: #1f3f2a !important;
  font-size: var(--fs-h4) !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  box-shadow: 0 10px 24px rgba(84, 178, 104, 0.1);
}

#content-container p.cta.cta-text strong {
  font-weight: 700 !important;
  color: inherit !important;
}

@media (max-width: 768px) {
  #content-container p.cta.cta-text {
    font-size: var(--fs-h3) !important;
    border-radius: 12px;
    padding: 0.9rem 0.95rem !important;
  }
}

#content-container a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 28px;
  border-radius: 8px;
  text-decoration: none;
  color: #fff !important;
  font-weight: 600;
  box-sizing: border-box;
}

#content-container a.btn--green {
  background: #54b268;
  min-width: 280px;
  margin-top: clamp(1rem, 2.2vw, 1.6rem);
  box-shadow: 0 0 0 1px rgba(84, 178, 104, 0.2), 0 8px 20px rgba(84, 178, 104, 0.2);
  transition: box-shadow 0.25s ease, transform 0.2s ease, filter 0.2s ease;
}

#content-container a.btn--blue {
  background: #295cc9;
  min-width: 240px;
}

#content-container a.btn:hover {
  filter: brightness(0.95);
}

#content-container a.btn--green:hover {
  box-shadow: 0 0 0 1px rgba(84, 178, 104, 0.28), 0 12px 28px rgba(84, 178, 104, 0.26);
}

/* ===== Lightbox (картинки открываются в оверлее, без перехода по ссылке) ===== */
.img-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 16px;
  box-sizing: border-box;
}
.img-lightbox.open {
  display: flex;
}
.img-lightbox img {
  max-width: 94vw;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
}
.img-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  color: #fff;
  font-size: var(--fs-h2);
  line-height: 1;
  cursor: pointer;
  user-select: none;
  opacity: 0.8;
}
.img-lightbox-close:hover {
  opacity: 1;
}

/* ===== Мобильные улучшения v2 ===== */
@media (max-width: 992px) {

  /* Пустое место под кнопкой "Продолжить" */
  #nav-wrapper.nav-wrapper {
    margin-bottom: 28px !important;
    padding-bottom: 8px !important;
  }

  /* Шрифт кнопок навигации крупнее */
  .nav-button {
    font-size: var(--fs-button) !important;
    padding: 12px 0 !important;
    min-height: 38px !important;
  }

  /* Межстрочный интервал в абзацах чуть теснее */
  #content-container p {
    line-height: 1.45 !important;
  }


  /* Кнопка "Продолжить" на первой странице — крупнее, меньше отступ снизу */
  #nav-wrapper.nav-first-page .btn-next {
    padding: 16px 0 !important;
    font-size: var(--fs-button) !important;
  }
  #nav-wrapper.nav-first-page {
    margin-bottom: 40px !important;
  }
}

@media (max-width: 768px) {
  /* Кнопка "Вступить в группу" в финале курса крупнее и заметнее */
  #content-container a.btn--green {
    width: 100%;
    min-width: 0;
    min-height: 60px;
    padding: 0 18px;
    font-size: var(--fs-button) !important;
    margin-top: 1.2rem;
    box-shadow: 0 0 0 1px rgba(84, 178, 104, 0.26), 0 12px 26px rgba(84, 178, 104, 0.24);
  }
}

/* Клон сайдбара внутри мобильной панели всегда виден */
.mobile-nav-panel .course-sidebar-wrapper {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: auto !important;
  height: auto !important;
  position: static !important;
  padding: 18px 20px 20px !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
}

/* ===== Мобильное меню (боковая панель) ===== */
.mobile-nav-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-family: 'Gilroy', sans-serif;
  font-size: var(--fs-caption);
  font-weight: 500;
  color: #54b268;
  transition: background 0.2s;
  flex-shrink: 0;
}
.mobile-nav-btn:hover {
  background: #f0faf3;
}
.mobile-nav-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1100;
}
.mobile-nav-overlay.open {
  display: block;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 92vw);
  background: #fff;
  z-index: 1200;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 0 0 32px 0;
  scrollbar-width: none;
}
.mobile-nav-panel::-webkit-scrollbar { display: none; }
.mobile-nav-panel.open {
  transform: translateX(0);
}
.mobile-nav-panel-close {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.mobile-nav-panel-close button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--fs-h3);
  color: #999;
  line-height: 1;
  padding: 4px 8px;
}
.mobile-nav-panel-close button:hover { color: #333; }

@media (max-width: 992px) {
  :root {
    --header-h: 70px;
  }

  .mobile-nav-btn {
    display: inline-flex;
  }
  .header-wrapper {
    justify-content: space-between !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    padding-top: 15px !important;
    padding-bottom: 12px !important;
  }
  .header-right {
    display: none !important;
  }
  .header-subtitle--desktop {
    display: none !important;
  }
  .header-subtitle--mobile {
    display: block;
  }
  .header-title {
    font-size: var(--fs-small) !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    margin-bottom: 3px !important;
  }
  .header-subtitle--mobile {
    font-size: var(--fs-caption) !important;
    font-weight: 400 !important;
    color: #666 !important;
    line-height: 1.25 !important;
  }
}

/* ===== Медиа-блок страницы 3 ===== */
#content-container .telegram-reviews-showcase {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 10px 0 34px;
  padding: 54px 32px 42px;
  min-height: 560px;
  isolation: isolate;
}

#content-container .telegram-reviews-showcase::before,
#content-container .telegram-reviews-showcase::after {
  content: "";
  position: absolute;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.7;
}

#content-container .telegram-reviews-showcase::before {
  top: 34px;
  left: 88px;
  background:
    radial-gradient(circle at center, rgba(84, 178, 104, 0.18) 0, rgba(84, 178, 104, 0.06) 45%, transparent 68%);
  filter: blur(2px);
}

#content-container .telegram-reviews-showcase::after {
  right: 84px;
  bottom: 46px;
  background:
    radial-gradient(circle at center, rgba(116, 201, 156, 0.16) 0, rgba(116, 201, 156, 0.05) 48%, transparent 72%);
  filter: blur(3px);
}

#content-container .telegram-reviews-showcase__halo {
  position: absolute;
  inset: 46px 11% 78px;
  border-radius: 44px;
  background:
    radial-gradient(circle at 30% 30%, rgba(84, 178, 104, 0.18), transparent 38%),
    radial-gradient(circle at 70% 55%, rgba(116, 201, 156, 0.16), transparent 42%);
  filter: blur(34px);
  pointer-events: none;
}

#content-container .telegram-reviews-showcase__backdrop {
  position: absolute;
  width: min(34%, 250px);
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(228, 243, 233, 0.54)),
    radial-gradient(circle at top, rgba(84, 178, 104, 0.18), transparent 58%);
  border: 1px solid rgba(84, 178, 104, 0.10);
  box-shadow: 0 16px 34px rgba(66, 103, 77, 0.08);
  pointer-events: none;
}

#content-container .telegram-reviews-showcase__backdrop--left {
  left: 58px;
  top: 112px;
  transform: rotate(-11deg);
}

#content-container .telegram-reviews-showcase__backdrop--right {
  right: 58px;
  top: 120px;
  transform: rotate(11deg);
}

#content-container .telegram-review-card {
  position: relative;
  z-index: 2;
  width: min(40%, 300px);
  margin: 0;
  padding: 14px 14px 16px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(84, 178, 104, 0.14);
  box-shadow: 0 22px 44px rgba(45, 77, 58, 0.13);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#content-container .telegram-review-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  border: 1px solid rgba(84, 178, 104, 0.08);
  pointer-events: none;
}

#content-container .telegram-review-card--left {
  transform: translateX(-18px) translateY(-16px) rotate(-8deg);
  z-index: 3;
}

#content-container .telegram-review-card--right {
  transform: translateX(48px) translateY(34px) rotate(8deg);
  z-index: 2;
}

#content-container .telegram-review-card:hover {
  box-shadow: 0 28px 52px rgba(45, 77, 58, 0.16);
}

#content-container .telegram-review-card--left:hover {
  transform: translateX(-18px) translateY(-24px) rotate(-7deg);
}

#content-container .telegram-review-card--right:hover {
  transform: translateX(48px) translateY(26px) rotate(7deg);
}

#content-container .telegram-review-card__tag {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #2d8f48;
  font-size: var(--fs-caption);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(84, 178, 104, 0.12);
}

#content-container .telegram-review-card__media {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
}

#content-container .telegram-review-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 62%, rgba(255, 255, 255, 0.42) 86%, rgba(255, 255, 255, 0.9) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  pointer-events: none;
}

#content-container .telegram-review-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid #e5efe8;
}

#content-container .telegram-review-card figcaption {
  margin-top: 12px;
  text-align: center;
}

@media (max-width: 992px) {
  #content-container .telegram-reviews-showcase {
    min-height: auto;
    display: block;
    padding: 12px 0 0;
  }

  #content-container .telegram-reviews-showcase__halo {
    inset: 30px 0 30px;
  }

  #content-container .telegram-reviews-showcase__backdrop {
    display: none;
  }

  #content-container .telegram-reviews-showcase::before,
  #content-container .telegram-reviews-showcase::after {
    display: none;
  }

  #content-container .telegram-review-card {
    position: relative;
    width: 100%;
    max-width: 100%;
  }

  #content-container .telegram-review-card--left,
  #content-container .telegram-review-card--right {
    left: auto;
    right: auto;
    top: auto;
    transform: none;
  }

  #content-container .telegram-review-card--right {
    margin-top: 18px;
  }
}

/* ===== Финальные правки по отступам и компоновке (desktop) ===== */
@media (min-width: 993px) {
  /* 1) Единый визуальный отступ 20px под шапкой и между меню/контентом */
  :root {
    --column-gap: 20px;
  }

  .landing-sidebar .course-sidebar-wrapper {
    top: calc(var(--header-h) + 20px) !important;
  }

  #content-container {
    top: calc(var(--header-h) + 20px) !important;
    left: calc(var(--layout-x) + var(--sidebar-w) + 20px) !important;
  }

  /* 2) Кнопки не шире контентной колонки */
  #nav-wrapper.nav-wrapper {
    width: 100% !important;
    max-width: 736px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* 3) Подписи к изображениям по центру */
#content-container figcaption {
  text-align: center;
}

/* 4) Меньше пустого места вокруг визуализации отзывов */
#content-container .telegram-reviews-showcase {
  margin: 0 0 20px;
  padding: 30px 20px 24px;
  min-height: 460px;
}

#content-container .telegram-reviews-showcase__halo {
  inset: 30px 10% 50px;
}

#content-container .telegram-reviews-showcase__backdrop--left {
  top: 98px;
}

#content-container .telegram-reviews-showcase__backdrop--right {
  top: 104px;
}

@media (max-width: 992px) {
  #content-container .telegram-reviews-showcase {
    margin: 0 0 14px;
    padding: 8px 0 0;
  }
}