/* === На десктопе (>1000px) — как сейчас === */
@media (max-width: 1115px) {
    .container-main{
        padding: 0 5px !important;
    }

    .row-7{
        padding: 0 5px !important;
    }

    .main-video-list{
        display: flex;
        flex-wrap: wrap;    
        justify-content:space-around;  
        align-items: center;  
        gap: 20px;                
        width: 100%;
        box-sizing: border-box;
    }

}

@media (min-width: 1001px) {
    .row-5 {
        display: flex;
        width: 100%;
        flex-direction: row;
        margin-top: 100px;
    }

    .row-6.collapsed {
        width: 0;
        min-width: 0;
        padding: 0 0 0 30px;
        opacity: 0;
        pointer-events: none;
    }

    .row-6.collapsed .close-btn {
        right: -40px;
    }

}

/* === На мобильных (≤1000px) — поверх всего === */
@media (max-width: 1000px) {
    .row-5 {
        display: block; /* отменяем flex на мобильных */
        position: relative;
    }

    .row-6 {
        /* Делаем панель фиксированной */
        position: fixed !important;
        top: 20px;
        left: 20px;
        bottom: 20px;
        width: 280px;
        height: auto;
        z-index: 1000;
        border-radius: 20px;
        transform: translateX(-100%); /* изначально скрыта слева */
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: 0 6px 35px 5px rgba(0,0,0, 0.2);
        padding: 20px !important; /* Одинаковые отступы со всех сторон */
    }

    /* Открытое состояние */
    .row-6:not(.collapsed) {
        transform: translateX(0);
    }

    /* Скрытое состояние */
    .row-6.collapsed {
        transform: translateX(-100%);
        /* НЕ трогаем width/opacity — используем только transform */
    }

    /* Гамбургер всегда виден на мобильных */
    .hamburger {
        display: flex !important;
        position: fixed;
        top: 40px;
        left: 20px;
        z-index: 1;
        margin: 0;
    }

    /* Основной контент — не должен сдвигаться */
    .row-7 {
        margin-top: 20px !important; 
    }

    .row-4{
        top: 10px !important;
        left: 10px !important;
    }   

}


@media (max-width: 700px) {
    .row-9{
        flex-direction: column;
        align-items: center;
    }

    .row-10{
        width: 90% !important;
        align-items: center !important;
    }

    .row-7{
        min-width: 300px !important;
    }
}

@media (max-width: 541px) {
    .video-lesson-wrapper {
        width: 320px !important;
        height: 240px !important;
    }

}

@media (max-width: 444px) {
    .row-2{
        flex-direction: column;
        height: 180px;
    }

    .row-2{
        width: 340px !important;
    }

    .row-3{
        width: 340px !important;
    }

}

/* Подключаем вариативный шрифт */
@font-face {
  font-family: 'Nunito Sans';
  src: url('./fonts/NunitoSans.woff2') format('woff2-variations');
  font-weight: 200 900; /* Nunito Sans поддерживает от ExtraLight (200) до Black (900) */
  font-style: normal;
  font-display: swap; /* Улучшает производительность загрузки */
}

/* Применяем шрифт ко всем элементам */
*,
*::before,
*::after {
  font-family: 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    margin: 0 !important;
}


h1{
    font-size: 32px;
    font-weight: 800;
}

h4{
    font-size: 18px;
    font-weight: 500;
}

.color-1{
    color:#D97706;
}

.blue-span{
    color: #2563EB !important;
}

#count {
    margin-top: -26px;
    margin-left: 120px;
    font-size: 16px;
    color: #2563EB;
}

#form{
    display: flex;
    align-items: start;
    flex-direction: column;
}

#form-start{
    display: flex;
    align-items: center;
    flex-direction: column;
}

.user-line-background{
    width: 100%;
    height: 7px;
    background-color: #D9D9D9;
    border-radius: 4px;
    overflow: hidden;
}

.user-line{
    height: 100%;
    background: linear-gradient(90deg, #2563EB 0%, #D97706 100%);
    transition: width 0.5s ease;
    min-width: 0;
}

.user-icon {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 30px;
}

.user-icon > img{
    width: 20px;
    height: 20px;
    background-color: #2563EB;
    border-radius: 6px;
    padding: 6px;
    transition: 500ms;
    cursor: pointer;
}

.user-icon > img:hover{
    background-color: #000;
    transition: 500ms;
}

.user-progress-bar{
    width: 100%;
    margin-bottom: 5px;
}

.user-progress-bar > span{
    display: block;
    margin-top: 5px;
    font-size: 10px;
    color: #D97706;
    font-weight: 500;
}

.module-menu{
    margin-top: 50px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-shrink: 1; /* позволяет меню сжиматься при переполнении */
    overflow-y: auto; /* прокрутка модулей если их много */
    min-height: 0; /* нужно для корректной работы overflow в flex */
}

.module a{
    text-decoration: none !important;
}

.module h3{
    color: #000;
    padding: 0 !important;
    margin: 0 !important;
}

.main-title{
    width: 100%;
    display: flex;
}

.scroll-controls{
    margin-top: 40px;
    width: 100%;
    height: 34px;
    display: flex;
    justify-content:end;
    gap: 10px;
}

.scroll-controls button{
    display: flex;
    align-items: center;
    cursor: pointer;
}

.video-lesson{
    width: 100%;
    height: 100%;
    background-color: #D9D9D9;
}


.container-main{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 90vh; 
    padding: 0 20px;
}

.row-1{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.row-2{
    display: flex;
    padding: 60px 0;
    width: 440px;
    align-items: center;
    justify-content:space-around;

}

.row-3{
    display: flex;
    padding: 60px 0;
    width: 440px;
    align-items: center;
    justify-content:space-around;
    flex-direction: column;
}

.row-4{
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    gap: 5px;
}

.row-3 > form{
    display: flex;
    align-items: center;
    flex-direction: column;
}

.row-4 > h1{
    font-size: 16px;
}

.row-4 > img{
    width: 20px;
}

.row-5{
    display: flex;
    width: 100%;
    flex-direction: row;
    margin-top: 100px;
}

.row-6{
    min-width: 260px;
    max-height: 86vh;
    background-color: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    flex-direction: column;
    box-shadow: 0 6px 35px 5px rgba(0,0,0, 0.1);
    padding: 30px;
    position: relative; /* чтобы крестик был внутри */
    overflow-y: auto; /* прокрутка при переполнении */

    /* Анимация */
    transition: width 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
    overflow: hidden; /* важно! чтобы контент не вылезал при сжатии */
}

.row-7{
    min-width: 600px;
    padding: 0 40px;
}

.row-9{
    display: flex;
}

.row-10{
    width: 50%;
    display: flex;
    align-items:start;
    flex-direction: column;
}

.hamburger {
    /* Сброс стандартных стилей кнопки */
    padding: 0;
    margin: 30px 0 0 0;
    border: none;
    background: none;
    font: inherit;
    cursor: pointer;
    outline: none;

    /* Квадратная форма */
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #007bff;
    color: white;
    font-size: 18px;

    /* Центрирование символа */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Не сжиматься в flex/grid */
    flex-shrink: 0;

    /* Скрыта по умолчанию */
    display: none; /* ← скрыта */
}

/* Кнопка закрытия */
.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
}

/* Когда панель скрыта — прячем её */
.row-6.hidden {
  display: none;
}

/* Когда панель скрыта — показываем гамбургер */
.row-6.hidden + .hamburger,
.hamburger.show {
  display: flex !important;
}

/* Состояние "закрыто" */
.row-6.collapsed {
    width: 0;
    min-width: 0;
    padding: 0 0 0 30px; /* оставляем левый padding, чтобы крестик был виден при открытии */
    opacity: 0;
    pointer-events: none;
    }

/* Когда панель свёрнута — крестик "уезжает" за пределы */
.row-6.collapsed .close-btn {
  right: -40px; /* прячем крестик */
}

.chat{
    display: flex;
    align-items: start;
    gap: 10px;
}

.user-chat-message{
    width: 86%;
    display: flex;
}

.message-date{
    color: #D97706;
    font-weight: 800;
}

.user-photo{
    width: 120px;
    min-width: 120px;
    height: 120px;
    min-height: 120px;
    background-color: #D9D9D9;
    border-radius: 90px;
    flex-shrink: 0; /* предотвращает сжатие аватарки */
}

.user-chat-photo{
    margin-top: 18px;
    width: 50px;
    height: 50px;
    background-color: #D9D9D9;
    border-radius: 90px;
}

.main-video{
    overflow-x: auto;
    display: flex;
    gap: 20px;
}

.main-video-list{
    display: flex;
    flex-wrap: wrap;         
    gap: 20px;                
    width: 100%;
    box-sizing: border-box;
}

.main-video-list .video-lesson-wrapper {
    width: 320px !important;
    height: 240px !important;
}


.input-1{
    width: 300px !important;
    border-bottom: 1px #2563EB solid !important;
    margin-bottom: 20px !important;
    padding: 0 0 10px 10px !important;
}

.padd-1{
    margin: 40px 0 20px;
}


.button{
    padding: 20px 50px;
    border-radius: 60px;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 6px 35px 5px rgba(0,0,0, 0.1);
    cursor: pointer;
}

.video-lesson-wrapper {
    position: relative;
    width: 520px;
    height: 360px;
}

.button-ai{
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px 5px 20px;
    border-radius: 60px;
    font-size: 16px;
    text-decoration: none;
    background-color: #D97706;
    color: #fff;
    transition: 500ms;
    box-shadow: 0 6px 35px 5px rgba(0,0,0, 0.1);
    width: auto; /* не фиксированная ширина */
}

.button-ai:hover{
    background-color: #000;
    transition: 500ms;
}


.button-ai > img{
    width: 20px;
}

.blue{
    background-color: #2563EB;
    border: 1px #2563EB solid;
    color: #fff;
    transition: 500ms;
}

.white{
    background-color: #fff;
    border: 1px #fff solid;
    color: #000;
    transition: 500ms;
}

.blue:hover{
    background-color: #fff;
    border: 1px #fff solid;
    color: #000;
    transition: 500ms;
}

.white:hover{
    background-color: #2563EB;
    border: 1px #fff 2563EB;
    color: #fff;
    transition: 500ms;
}

.reset-all {
  /* 1. Сбрасываем базовые стили */
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-decoration: none;
  text-align: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;

  /* 2. Отключаем браузерные стили для форм */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* 3. Отключаем фокус-стили (если хочешь свой) */
  outline: none;
  box-shadow: none;

  /* 4. Отключаем тени и градиенты */
  text-shadow: none;
  box-sizing: border-box; /* лучше оставить — предсказуемость */

  /* 5. Отключаем интерактивные эффекты */
  cursor: default; /* или 'pointer' если хочешь */
  pointer-events: auto; /* можно поставить 'none', если совсем не нужна интерактивность */
  user-select: text; /* или 'none', если не нужно выделять */
  resize: none; /* для textarea */

  /* 6. Сбрасываем псевдоэлементы (если были добавлены браузером) */
  ::-webkit-inner-spin-button,
  ::-webkit-outer-spin-button,
  ::-webkit-search-decoration,
  ::-webkit-search-cancel-button,
  ::-webkit-search-results-button,
  ::-webkit-search-results-decoration {
    -webkit-appearance: none;
    margin: 0;
  }

  /* 7. Для textarea — убираем возможность ресайза */
  resize: none;

  /* 8. Убираем подчёркивания и другие инлайн-эффекты */
  text-decoration: none;
  text-transform: none;
  white-space: normal;

  /* 9. Принудительно убираем любые возможные стили от фреймворков */
  all: unset; /* ⚡️ КЛЮЧЕВОЕ СВОЙСТВО — сбрасывает ВСЁ! */
}
