/**
 * «Начало пути» — airo-course-beginning-path.html
 * Одна вертикальная просадка: .right_col (и в Chrome F12, и на iPhone, и на десктопе).
 * .airo-course-lesson-inner — block (не flex), чтобы scrollHeight был предсказуем во всех движках.
 */

@import url("airo-course-znacomstvo-block.css?v=1");

/*
 * Единая прокрутка: только .right_col (все ширины).
 * Shell задаёт .right_col { display:flex } для уроков — на «начало пути» это даёт вложенный scrollport
 * в Chrome/F12 и на части Android (Motorola): сначала крутится flex-внутренность, потом колонка.
 */
body.airo-course-beginning-path-page.airo-course-panel-page .main_container > .right_col {
  display: block !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y pinch-zoom;
  position: relative;
  z-index: 0;
  isolation: isolate;
}

/* Внутренняя «шторка» контента: block вместо flex — одинаковый scrollHeight (F12, Safari, grid) */
body.airo-course-beginning-path-page.airo-course-panel-page .right_col .airo-course-lesson-inner {
  display: block !important;
  width: 100% !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  flex: none !important;
}

/*
 * Первый блок: как разминка / упражнения — слот по контенту, заголовок у верха, зазор до видео.
 * .right_col остаётся display:block — вложенного scrollport у колонки первого блока нет.
 */
body.airo-course-beginning-path-page.airo-course-panel-page .airo-course-boom-video-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0;
  flex: none !important;
  max-height: none !important;
  overflow: visible !important;
  width: 100%;
  box-sizing: border-box;
}

/* Как разминка / упражнения: заголовок по контенту, у верха, без растягивания на высоту экрана */
body.airo-course-beginning-path-page.airo-course-panel-page .airo-course-welcome-slot {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  min-height: 0 !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ≤991: .main_container — flex-column; колонка = единый scrollport (F12, iPhone) */
@media (max-width: 991px) {
  /*
   * У body.airo-course-lesson-page .right_col { display:flex } контент-обёртка + «гибкий» первый экран
   * дают в Chrome вложенные края скролла: нижний section визуально «стоит на месте».
   * Отключаем flex у самой .right_col — один блок, overflow-y только здесь, scrollHeight = видео + znacomstvo + nav.
   */
  body.airo-course-beginning-path-page.airo-course-boom-lesson-page.airo-course-panel-page
    .main_container
    > .right_col {
    flex: 1 1 0% !important;
    align-self: stretch !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overflow-anchor: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pinch-zoom;
    overscroll-behavior-y: contain;
    isolation: auto;
  }

  /* Высота .lesson-inner = сумма детей, не «1 экран» */
  body.airo-course-beginning-path-page.airo-course-panel-page .right_col .airo-course-lesson-inner {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: min-content !important;
    max-height: none !important;
    overflow: visible !important;
    flex: none !important;
  }

  /* Как shell @media (max-width: 991px) для boom-урока (разминка): заголовок у верха, зазор до видео */
  body.airo-course-beginning-path-page.airo-course-boom-lesson-page.airo-course-panel-page .airo-course-boom-video-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex: none !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    gap: clamp(22px, 4vw, 34px);
    padding-top: clamp(4px, 1.5vw, 12px);
    padding-bottom: clamp(18px, 5vw, 36px);
  }

  body.airo-course-beginning-path-page.airo-course-boom-lesson-page.airo-course-panel-page .airo-course-welcome-slot {
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
  }
}

/* ≥992: сетка Gentelella — grid-item, не flex: flex: 1 1 0% не сработает; min-height:0 + height даёт тот же scrollport */
@media (min-width: 992px) {
  body.airo-course-beginning-path-page.airo-course-panel-page .main_container > .right_col {
    align-self: stretch;
    width: 100% !important;
    height: 100%;
    max-height: 100%;
    display: block !important;
  }

  body.airo-course-beginning-path-page.airo-course-panel-page .airo-course-boom-video-wrap {
    min-height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    gap: clamp(40px, 5.2vh, 72px);
  }
}

/* Beginning Path: EN mobile quote must stay inside left/right borders */
@media (max-width: 991px) {
  html:lang(en) body.airo-course-beginning-path-page.airo-course-panel-page
    .airo-bp-znaco-quote-mob
    .airo-bp-znaco-quote__mob1,
  html:lang(en) body.airo-course-beginning-path-page.airo-course-panel-page
    .airo-bp-znaco-quote-mob
    .airo-bp-znaco-quote__mob2,
  html:lang(en) body.airo-course-beginning-path-page.airo-course-panel-page
    .airo-bp-znaco-quote-mob
    .airo-bp-znaco-quote__mob3,
  html:lang(en) body.airo-course-beginning-path-page.airo-course-panel-page
    .airo-bp-znaco-quote-mob
    .airo-bp-znaco-quote__mob4,
  html:lang(en) body.airo-course-beginning-path-page.airo-course-panel-page
    .airo-bp-znaco-quote-mob
    .airo-bp-znaco-quote__mob5,
  html:lang(en) body.airo-course-beginning-path-page.airo-course-panel-page
    .airo-bp-znaco-quote-mob
    .airo-bp-znaco-quote__mob6 {
    width: auto !important;
    max-width: min(92vw, 540px) !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(6px, 2.2vw, 12px);
    padding-right: clamp(6px, 2.2vw, 12px);
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    text-wrap: pretty;
    text-align: center;
    box-sizing: border-box;
  }
}
