/* Высота шапки сайта (.header в css/main.css). Шапка position: fixed,
   поэтому содержимое страниц смещаем на эту высоту вниз. */
:root {
    --site-header-h: 120px;
}

@media screen and (max-width: 1080px) {
    :root {
        --site-header-h: 60px;
    }
}

/* Картинка логотипа (main.css: 284×139 с отрицательными отступами) больше видимого
   знака и свисает ниже шапки — на 20px на компьютере, на 26px на телефоне — и
   перехватывала нажатия по левым кнопкам тулбара доски («на главную»).
   Нажатия ловит сама ссылка .header__logo — её рамка совпадает с видимым логотипом. */
.header__logo img {
    pointer-events: none;
}

/* ——— Заголовок главной ——— */
/* Заголовок в несколько строк. text-wrap: balance выравнивает строки по длине,
   чтобы последняя не оставалась короткой с пустым местом справа. На широком
   экране под текст отведена половина .case (≤ 685 px), ниже 1030px — вся
   ширина; шрифт тянется за шириной окна. */
.intro__title {
    font-size: clamp(24px, 2.2vw, 32px);
    line-height: 1.25;
    text-wrap: balance;
    color: #1B2A4E; /* глубокий тёмно-синий вместо чёрного: мягче, в тон синему сайта */
}

/* Имя преподавателя — акцент заголовка: градиент от синего сайта (#4d82ff)
   к фиолетовому. color — запасной цвет, если градиент по тексту не поддержан. */
.intro__name {
    color: #4d82ff;
    background: linear-gradient(90deg, #3B6CF6 0%, #7C4DFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

@media screen and (max-width: 1030px) {
    .intro__title {
        font-size: clamp(20px, 4.6vw, 30px);
        line-height: 1.25;
    }
}

/* ——— Текст под заголовком главной (.intro-info) ——— */
/* Смысловые блоки: вводный абзац, цены карточками, списки с маркерами,
   призыв к действию. Цвета — в тон заголовку (#1B2A4E) и синему сайта. */
.intro-info {
    font-size: 18px;
    line-height: 1.5;
    color: #334155;
    text-align: left;
}

.intro-info p {
    margin: 0;
}

.intro-info__lead {
    font-size: 20px;
    color: #1B2A4E;
    padding-left: 16px;
    border-left: 4px solid #4d82ff;
}

.intro-info__title {
    margin: 26px 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: #1B2A4E;
}

/* Цены: строка «формат — цена», цена справа синей плашкой */
.intro-info__prices {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.intro-info__prices li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #F3F6FF;
    border-radius: 10px;
}

.intro-info__prices b {
    white-space: nowrap;
    color: #fff;
    background: linear-gradient(90deg, #3B6CF6 0%, #7C4DFF 100%);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 16px;
}

/* Списки с маркером-кружком синего цвета сайта */
.intro-info__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.intro-info__list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 8px;
}

.intro-info__list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.5em;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4d82ff;
    box-shadow: 0 0 0 3px #DCE6FF;
}

/* Призыв к действию */
.intro-info__cta {
    margin-top: 28px;
    padding: 18px 20px;
    border-radius: 14px;
    background: #FFF4EA;
    border: 1px solid #FFD8B5;
}

.intro-info__cta b {
    color: #E0661B;
}

.intro-info__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.intro-info__btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    border-bottom: none;
}

.intro-info__btn:hover {
    color: #fff;
    filter: brightness(1.08);
}

.intro-info__btn--wa {
    background: #25D366;
}

.intro-info__btn--call {
    background: #4d82ff;
}

@media screen and (max-width: 1030px) {
    .intro-info {
        font-size: 16px;
        max-width: 640px;
        margin: 0 auto;
    }

    .intro-info__lead {
        font-size: 18px;
    }

    .intro-info__buttons {
        justify-content: center;
    }
}

/* ——— Первый экран главной (.hero) ——— */
/* Всё, что выше стрелки «вниз». Мягкий фон с цветными пятнами, бейджи,
   цифры, цены карточками, фото со скруглением и плашкой. */
.hero {
    position: relative;
    margin-top: calc(var(--site-header-h) - 200px); /* .section даёт 200px, шапка 120 — убираем пустоту */
    padding: 56px 0 36px;
    background:
        radial-gradient(circle at 88% 18%, rgba(124, 77, 255, 0.13), transparent 38%),
        radial-gradient(circle at 6% 85%, rgba(59, 108, 246, 0.11), transparent 42%),
        linear-gradient(180deg, #F6F8FF 0%, #FFFFFF 100%);
    overflow: hidden;
    /* Режем только по бокам: окно чата под фото должно выходить за низ первого экрана.
       Где clip не поддерживается, остаётся hidden. */
    overflow-x: clip;
    overflow-y: visible;
}

.hero__wrap {
    align-items: center;
    gap: 48px;
    flex-wrap: nowrap;
}

.hero .intro__content,
.hero .intro__img-wrap {
    width: auto;
    flex: 1 1 50%;
    min-width: 0;
}

/* Бейджи над заголовком */
.hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.hero__badge {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #3B4FD8;
    background: #E9EEFF;
}

.hero__badge--online {
    color: #15803D;
    background: #DCFCE7;
}

.hero .intro__title {
    margin-bottom: 20px;
}

/* Заголовок во всю ширину над обеими колонками, по центру. */
.hero__heading {
    max-width: 980px;
    margin: 0 auto 44px;
    color: #1B2A4E;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: clamp(26px, 3.4vw, 46px);
    line-height: 1.2;
    text-align: center;
    text-wrap: balance;
}

@media screen and (max-width: 1030px) {
    .hero__heading {
        margin-bottom: 28px;
    }
}

.hero .intro-info__lead {
    padding-left: 0;
    border-left: none;
    color: #475569;
    font-size: 19px;
}

/* Цифры */
.hero__stats {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    row-gap: 12px;
    margin: 24px 0 4px;
    padding: 0;
}

.hero__stats li {
    display: flex;
    flex-direction: column;
    padding: 0 22px;
    border-left: 1px solid #DCE3F5;
}

.hero__stats li:first-child {
    padding-left: 0;
    border-left: none;
}

.hero__stats b {
    font-size: 28px;
    line-height: 1.1;
    background: linear-gradient(90deg, #3B6CF6 0%, #7C4DFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #4d82ff;
}

.hero__stats span {
    font-size: 14px;
    color: #64748B;
}

/* Цены карточками */
.hero__prices {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.hero__prices li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #E3E9F7;
    box-shadow: 0 6px 20px rgba(27, 42, 78, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero__prices li:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(27, 42, 78, 0.12);
}

.hero__price-name {
    font-size: 15px;
    font-weight: 700;
    color: #1B2A4E;
}

.hero__price-value {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    color: #1B2A4E;
}

.hero__price-value small {
    font-size: 14px;
    font-weight: 400;
    color: #64748B;
}

.hero__price-note {
    font-size: 13px;
    color: #64748B;
}

.hero__prices li.hero__price--accent {
    border: none;
    background: linear-gradient(135deg, #3B6CF6 0%, #7C4DFF 100%);
    box-shadow: 0 10px 26px rgba(91, 76, 255, 0.35);
}

.hero__price--accent .hero__price-name,
.hero__price--accent .hero__price-value,
.hero__price--accent .hero__price-value small,
.hero__price--accent .hero__price-note {
    color: #fff;
}

/* Расписание */
.hero__schedule {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.hero__schedule li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero__schedule-icon {
    flex: 0 0 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #E9EEFF;
    color: #3B6CF6;
}

/* Фото: скругление, тень, цветная подложка со сдвигом и плашка «20+ лет» */
.hero__photo {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}

.hero__photo::before {
    content: "";
    position: absolute;
    inset: 22px -18px -18px 22px;
    border-radius: 28px;
    background: linear-gradient(135deg, #3B6CF6 0%, #7C4DFF 100%);
    opacity: 0.9;
}

.hero__photo img {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(27, 42, 78, 0.18);
}

.hero__photo-card {
    position: absolute;
    left: -24px;
    bottom: 28px;
    display: flex;
    flex-direction: column;
    padding: 12px 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(27, 42, 78, 0.18);
    text-align: left;
}

.hero__photo-card b {
    font-size: 17px;
    color: #1B2A4E;
}

.hero__photo-card span {
    font-size: 13px;
    color: #64748B;
}

.hero .intro__arrow {
    margin-top: 40px;
}

/* Запись на пробное занятие — над стрелкой, по центру */
.hero__cta {
    margin-top: 44px;
    text-align: center;
}

.hero__cta-text {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 700;
    color: #1B2A4E;
}

.hero__cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.hero__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 170px;
    justify-content: center;
    padding: 13px 28px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    border-bottom: none;
    box-shadow: 0 8px 20px rgba(59, 108, 246, 0.22);
    transition: transform 0.15s, filter 0.15s;
}

.hero__cta-btn:hover {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.hero__cta-btn--max {
    background: linear-gradient(90deg, #3B6CF6 0%, #7C4DFF 100%);
}

.hero__cta-btn--tg {
    background: #229ED9;
}

.hero__cta-btn--wa {
    background: #25D366;
}

@media screen and (max-width: 600px) {
    .hero__cta-text {
        font-size: 20px;
    }
}

@media screen and (max-width: 1080px) {
    .hero {
        margin-top: 0;
        padding-top: 32px;
    }
}

@media screen and (max-width: 1030px) {
    .hero__wrap {
        flex-direction: column;
        gap: 36px;
    }

    .hero .intro__content,
    .hero .intro__img-wrap {
        width: 100%;
    }

    .hero__badges,
    .hero__stats {
        justify-content: center;
    }

    .hero .intro-info__lead {
        text-align: center;
    }

    .hero__photo {
        max-width: 420px;
    }

    .hero__photo-card {
        left: -8px;
    }
}

@media screen and (max-width: 600px) {
    .hero__prices {
        grid-template-columns: 1fr;
    }

    .hero__prices li {
        flex-direction: row;
        align-items: baseline;
        flex-wrap: wrap;
        column-gap: 10px;
    }

    .hero__price-value {
        margin-left: auto;
        font-size: 24px;
    }

    .hero__price-note {
        width: 100%;
    }

    .hero__stats li {
        padding: 0 12px;
    }

    .hero__stats b {
        font-size: 22px;
    }

    .hero__photo::before {
        inset: 14px -10px -10px 14px;
    }
}

/* ——— Отзывы на главной (.reviews, из comment.html) ——— */
/* Карточки в стиле первого экрана: скругление 20px, тонкая рамка #E3E9F7,
   мягкая тень, синий→фиолетовый градиент акцентов. Поверх правил main.css. */
.reviews {
    padding: 90px 0 40px; /* снизу мало: у .edu свой margin-top 150px */
    background: linear-gradient(180deg, #FFFFFF 0%, #F6F8FF 45%, #FFFFFF 100%);
}

/* main.css вешает на #v шрифт заголовка (Arial Black 30px) — на сайте якорь
   стоял на «Наших курсах». Теперь он на отзывах: без сброса весь текст жирный. */
.reviews#v {
    font-size: 16px;
    font-family: Geneva, Arial, Helvetica, sans-serif;
}

.reviews__title {
    font-family: "Arial Black";
}

.reviews__eyebrow {
    width: max-content;
    margin: 0 auto 14px;
    padding: 6px 16px;
    border-radius: 999px;
    background: #E9EEFF;
    color: #3B4FD8;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.reviews__title {
    color: #1B2A4E;
    font-size: 36px;
    margin-bottom: 56px;
}

.reviews__list {
    align-items: stretch;
}

.reviews__item {
    position: relative;
    width: calc(100% / 3 - 30px);
    padding: 44px 32px 28px;
    background: #FFFFFF;
    border: 1px solid #E3E9F7;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(27, 42, 78, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}

.reviews__item:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(27, 42, 78, 0.12);
}

/* Крупная кавычка в правом верхнем углу — тихая декорация. */
.reviews__item::before {
    content: '“';
    position: absolute;
    top: 6px;
    right: 24px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 110px;
    line-height: 1;
    color: #E9EEFF;
    pointer-events: none;
}

/* Фото в градиентном кольце. */
.review__img {
    position: relative;
    width: 108px;
    height: 108px;
    padding: 4px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #3B6CF6 0%, #7C4DFF 100%);
    box-shadow: 0 10px 22px rgba(91, 76, 255, 0.25);
}

.review__img img {
    display: block;
    border-radius: 50%;
    border: 3px solid #FFFFFF;
    background: #FFFFFF;
}

.review__name {
    color: #1B2A4E;
    font-size: 19px;
    margin-bottom: 8px;
}

.review__role {
    max-width: 260px;
    margin-bottom: 22px;
    padding: 5px 12px;
    border-radius: 10px;
    background: #F3F6FF;
    color: #3B6CF6;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.review__text {
    min-height: 0;
    max-width: none;
    margin: 0 0 24px;
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

/* «подробнее» мельче текста отзыва (15px): служебная ссылка, не спорит с ним. */
.review__more {
    max-width: none;
    padding-top: 18px;
    border-top: 1px solid #E3E9F7;
    font-size: 14px;
}

.review__more a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    color: #3B6CF6;
    font-weight: 700;
}

.review__more a span {
    transition: transform 0.2s;
}

.review__more a:hover {
    color: #7C4DFF;
}

.review__more a:hover span {
    transform: translateX(4px);
}

/* Окно «подробнее» (строит site.js из копии .rpopup). */
.popup .rpopup {
    max-width: 640px;
    padding: 44px 44px 40px;
    border-radius: 20px;
    border-top: 5px solid #5B5CF8;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
}

.popup .r-popup__name {
    color: #1B2A4E;
    font-size: 22px;
    margin-bottom: 18px;
    padding-right: 30px;
}

.popup .r-popup__text {
    color: #334155;
    font-size: 16px;
    line-height: 1.7;
}

.popup .popup-close:before,
.popup .popup-close:after {
    background: #64748B;
}

/* Второй блок — «Отзывы по подготовке к ЕГЭ». Стоит сразу под первым,
   поэтому сверху отступ меньше. Фото нет — карточка начинается с имени. */
.reviews--ege {
    padding-top: 50px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F4F1FF 50%, #FFFFFF 100%);
}

/* «подробнее» нет — текст последний в карточке. */
.reviews--ege .review__text {
    margin-bottom: 0;
}

@media screen and (max-width: 1080px) {
    .reviews {
        padding: 60px 0 20px;
    }

    .reviews--ege {
        padding-top: 30px;
    }

    .reviews__title {
        font-size: 30px;
        margin-bottom: 40px;
    }

    .reviews__item {
        width: calc(100% / 2 - 30px);
    }
}

@media screen and (max-width: 600px) {
    .reviews__item {
        width: 100%;
        padding: 36px 22px 24px;
    }

    .popup .rpopup {
        padding: 36px 22px 28px;
    }
}

/* ——— Направления (между отзывами по ЕГЭ и «Как проходит обучение») ——— */
/* Карточки 2×2 в стиле «О себе»; на телефоне — в колонку. */
.dirs {
    padding: 60px 0 0;
}

.dirs__title {
    margin-bottom: 40px;
    color: #1B2A4E;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 36px;
    text-align: center;
}

.dirs__list {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.dirs__item {
    padding: 24px 28px;
    background: #FFFFFF;
    border: 1px solid #E3E9F7;
    border-top: 4px solid #5B5CF8;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(27, 42, 78, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}

.dirs__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(27, 42, 78, 0.1);
}

.dirs__tag {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #3B6CF6 0%, #7C4DFF 100%);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
}

.dirs__name {
    margin: 0 0 10px;
    color: #1B2A4E;
    font-size: 21px;
    line-height: 1.3;
}

.dirs__text {
    margin: 0;
    color: #334155;
    font-size: 17px;
    line-height: 1.55;
}

@media screen and (max-width: 1080px) {
    .dirs__title {
        font-size: 30px;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 700px) {
    .dirs__list {
        grid-template-columns: 1fr;
    }

    .dirs__item {
        padding: 18px;
    }
}

/* ——— Частые вопросы (перед «О себе») ——— */
/* Родной <details>: вопрос — строка с «+», по клику раскрывается ответ. */
.faq {
    padding: 60px 0 0;
}

.faq__title {
    margin-bottom: 40px;
    color: #1B2A4E;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 36px;
    text-align: center;
}

.faq__list {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq__item {
    background: #FFFFFF;
    border: 1px solid #E3E9F7;
    border-left: 4px solid #5B5CF8;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(27, 42, 78, 0.06);
}

.faq__q {
    position: relative;
    padding: 20px 60px 20px 26px;
    color: #1B2A4E;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.faq__q::-webkit-details-marker {
    display: none;
}

.faq__q::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 22px;
    transform: translateY(-50%);
    color: #5B5CF8;
    font-size: 26px;
    font-weight: 400;
    transition: transform 0.2s;
}

.faq__item[open] .faq__q::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq__a {
    margin: 0;
    padding: 0 26px 22px;
    color: #334155;
    font-size: 17px;
    line-height: 1.55;
}

@media screen and (max-width: 1080px) {
    .faq__title {
        font-size: 30px;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 600px) {
    .faq__q {
        padding: 16px 48px 16px 18px;
        font-size: 17px;
    }

    .faq__q::after {
        right: 16px;
    }

    .faq__a {
        padding: 0 18px 18px;
    }
}

/* Строка про города в подвале — мельче и тусклее контактов. */
.footer__geo {
    color: #9AA4B8;
    font-size: 14px;
}

/* ——— О себе (перед «Как проходит обучение») ——— */
/* Пункты — карточки в стиле отзывов; маркер — градиентный кружок со значком. */
.about {
    padding: 60px 0 0;
}

.about__title {
    margin-bottom: 40px;
    color: #1B2A4E;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 36px;
    text-align: center;
}

.about__list {
    max-width: 860px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.about__item {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 22px 28px;
    background: #FFFFFF;
    border: 1px solid #E3E9F7;
    border-left: 4px solid #5B5CF8;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(27, 42, 78, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}

.about__item:hover {
    transform: translateX(6px);
    box-shadow: 0 14px 32px rgba(27, 42, 78, 0.1);
}

.about__marker {
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B6CF6 0%, #7C4DFF 100%);
    box-shadow: 0 8px 18px rgba(91, 76, 255, 0.28);
    color: #FFFFFF;
}

.about__text {
    margin: 0;
    color: #334155;
    font-size: 18px;
    line-height: 1.55;
}

.about__text b {
    color: #3B4FD8;
}

@media screen and (max-width: 1080px) {
    .about__title {
        font-size: 30px;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 600px) {
    .about__item {
        gap: 16px;
        padding: 18px;
    }

    .about__marker {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
    }

    .about__marker svg {
        width: 22px;
        height: 22px;
    }

    .about__text {
        font-size: 16px;
    }
}

/* ——— «Подробнее» под заголовком «Как проходит обучение» ——— */
.edu__more {
    margin-top: 18px;
    text-align: center;
}

.edu__more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, #3B6CF6 0%, #7C4DFF 100%);
    box-shadow: 0 8px 20px rgba(91, 76, 255, 0.28);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
}

.edu__more-btn:hover {
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(91, 76, 255, 0.36);
}

.edu__more-btn span {
    transition: transform 0.2s;
}

.edu__more-btn:hover span {
    transform: translateX(4px);
}

/* Та же кнопка в карточках «Выпускники о занятиях»: перебиваем
   .review__more a (цвет и hover-цвет ссылки). */
.review__more .edu__more-btn,
.review__more .edu__more-btn:hover {
    color: #FFFFFF;
    font-size: 16px;
}

/* Окно с текстом занятия: длинное, поэтому шире и с прокруткой внутри
   (у .popup__inner центрирование flex — высокий блок обрезался бы сверху). */
.popup .rpopup--lesson {
    max-width: 760px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.rpopup--lesson p {
    margin: 0 0 14px;
}

.rpopup--lesson .lesson__sub {
    margin: 22px 0 10px;
    padding-left: 12px;
    border-left: 4px solid #5B5CF8;
    color: #3B4FD8;
    font-size: 17px;
}

.rpopup--lesson .lesson__note {
    margin: 22px 0 0;
    padding: 14px 18px;
    border-radius: 12px;
    background: #F3F6FF;
    color: #1B2A4E;
    font-weight: 700;
}

/* ——— Страница «Панель» ——— */
/* Панель занимает всё окно под шапкой и не прокручивается сама. */
.paint-page {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100vh - var(--site-header-h));
    margin-top: var(--site-header-h);
    background: #f0f0f0;
    overflow: hidden;
}

.paint-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 6px 10px;
    background: #2c2c2c;
    flex-shrink: 0;
}

/* ——— Онлайн-доска: текст под доской (SEO) ——— */
/* Доска занимает весь экран, текст — ниже, до него прокручивают. */
.doska-info {
    padding: 56px 0 80px;
    background: #FFFFFF;
    color: #334155;
}

.doska-info .case {
    max-width: 960px;
}

.doska-info__title {
    margin-bottom: 18px;
    color: #1B2A4E;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.2;
    text-align: center;
}

.doska-info__lead {
    max-width: 760px;
    margin: 0 auto 40px;
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
}

.doska-info__sub {
    margin: 40px 0 20px;
    color: #1B2A4E;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 26px;
}

.doska-info__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.doska-info__grid li {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 22px;
    border: 1px solid #E3E9F7;
    border-top: 4px solid #5B5CF8;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(27, 42, 78, 0.06);
}

.doska-info__grid b {
    color: #1B2A4E;
    font-size: 18px;
}

.doska-info__grid span {
    font-size: 16px;
    line-height: 1.5;
}

.doska-info__steps {
    margin: 0;
    padding-left: 24px;
    font-size: 17px;
    line-height: 1.6;
}

.doska-info__steps li {
    margin-bottom: 8px;
}

.doska-info__text {
    margin: 0 0 14px;
    font-size: 17px;
    line-height: 1.6;
}

.doska-info__link {
    color: #3B4FD8;
    font-weight: 700;
}

.doska-info__link:hover {
    border-bottom-color: #3B4FD8;
}

@media screen and (max-width: 900px) {
    .doska-info__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .doska-info__grid {
        grid-template-columns: 1fr;
    }

    .doska-info__sub {
        font-size: 22px;
    }
}

/* Рабочая часть: холст слева, поле PDF справа до края страницы */
.paint-work {
    flex: 1;
    min-height: 0;
    display: flex;
}

.paint-canvas-area {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 10px;
}

/* Поле для чтения PDF */
.pdf-pane {
    flex: 1 1 320px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #c8c8c8;
    background: #e4e4e4;
}

.pdf-pane__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #3a3a3a;
    flex-shrink: 0;
}

.pdf-pane__name {
    font-size: 12px;
    color: #ccc;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pdf-pane__view {
    position: relative;
    flex: 1;
    min-height: 0;
}

/* Подсказка лежит под iframe: пустой iframe прозрачный, открытый PDF её закрывает */
.pdf-pane__hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #777;
}

.pdf-pane__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.paint-status {
    padding: 4px 10px;
    background: #1e1e1e;
    font-size: 11px;
    color: #888;
    flex-shrink: 0;
}

.paint-label {
    font-size: 12px;
    color: #ccc;
}

.paint-sep {
    width: 1px;
    height: 24px;
    background: #555;
    margin: 0 4px;
}

.paint-select {
    height: 26px;
    font-size: 13px;
    border-radius: 3px;
    border: 1px solid #555;
    background: #3a3a3a;
    color: #eee;
    padding: 0 4px;
}

/* Кнопки-инструменты (нажатая подсвечивается классом paint-tool-active) */
.paint-tool-btn {
    background: #3a3a3a;
    color: #eee;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s;
}

.paint-tool-btn:hover {
    background: #505050;
}

.paint-tool-active {
    background: #1a73e8 !important;
    border-color: #1a73e8 !important;
    color: white !important;
}

/* Кнопки-команды справа на тулбаре */
.paint-cmd {
    font-size: 12px;
    padding: 3px 10px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    line-height: 1.5;
}

.paint-cmd-gray { background: #555; }
.paint-cmd-green { background: #27ae60; }
.paint-cmd-teal { background: #16a085; }
.paint-cmd-red { background: #c0392b; }
.paint-cmd-blue { background: #2980b9; }
.paint-cmd-violet { background: #8e44ad; }

/* ——— Чат «Задать вопрос» ——— */
/* Плавающая кнопка в правом нижнем углу главной (видна, пока преподаватель в сети) */
/* Кнопка и окно всплывают поверх страницы. Якорь под фото — нулевой высоты и
   НЕ позиционирован: у окна не задан top, поэтому по высоте оно встаёт там, где
   стоял бы якорь (сразу под фото), а right отсчитывается от .hero — блока на всю
   ширину страницы. Раскладка страницы не меняется. */
.chatw-anchor {
    height: 0;
}

.chatw-btn {
    position: absolute;
    z-index: 1000;  /* поверх всего на странице, включая шапку (у неё 3) */
    margin-top: 40px;
    right: 64px;  /* от правого края страницы */
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(90deg, #3B6CF6 0%, #7C4DFF 100%);
    color: #fff;
    font: 700 17px Geneva, Arial, Helvetica, sans-serif;
    box-shadow: 0 10px 24px rgba(59, 108, 246, 0.35);
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s;
}

.chatw-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.chatw-btn__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #E53935;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* Окно чата */
.chatw {
    position: absolute;
    z-index: 1000;
    margin-top: 40px;
    right: 64px;  /* от правого края страницы */
    display: flex;
    flex-direction: column;
    width: 300px;
    max-width: calc(100vw - 32px);
    height: 320px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(27, 42, 78, 0.28);
    text-align: left;
    overflow: hidden;
    font-family: Geneva, Arial, Helvetica, sans-serif;
}

.chatw__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(90deg, #3B6CF6 0%, #7C4DFF 100%);
    color: #fff;
    flex-shrink: 0;
}

.chatw__title {
    font-size: 18px;
    font-weight: 700;
}

.chatw__close {
    border: none;
    background: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.chatw__start {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    flex: 1;
    min-height: 0;
}

.chatw__intro {
    color: #1B2A4E;
    font-size: 15px;
    line-height: 1.4;
}

.chatw__input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D5DCEF;
    border-radius: 10px;
    font: 15px Geneva, Arial, Helvetica, sans-serif;
    color: #1B2A4E;
    outline: none;
}

.chatw__input:focus {
    border-color: #3B6CF6;
}

.chatw__textarea {
    flex: 1;
    resize: none;
}

.chatw__send-btn {
    padding: 12px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(90deg, #3B6CF6 0%, #7C4DFF 100%);
    color: #fff;
    font: 700 16px Geneva, Arial, Helvetica, sans-serif;
    cursor: pointer;
}

.chatw__send-btn:disabled,
.chatw__send:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Лента сообщений (общая для окна посетителя и страницы преподавателя) */
.chatw__messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    background: #F3F6FF;
}

.chatw__msg {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.chatw__msg--me {
    align-self: flex-end;
    align-items: flex-end;
}

.chatw__msg--teacher {
    align-self: flex-start;
    align-items: flex-start;
}

.chatw__bubble {
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.35;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chatw__msg--me .chatw__bubble {
    background: linear-gradient(90deg, #3B6CF6 0%, #7C4DFF 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chatw__msg--teacher .chatw__bubble {
    background: #fff;
    color: #1B2A4E;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(27, 42, 78, 0.12);
}

.chatw__time {
    margin-top: 2px;
    font-size: 11px;
    color: #8A94AD;
}

.chatw__note {
    align-self: center;
    padding: 8px 12px;
    border-radius: 10px;
    background: #FFF3E0;
    color: #8A5A00;
    font-size: 13px;
    text-align: center;
}

.chatw__compose {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #E3E8F5;
    flex-shrink: 0;
    background: #fff;
}

.chatw__send {
    flex-shrink: 0;
    width: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(90deg, #3B6CF6 0%, #7C4DFF 100%);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

@media screen and (max-width: 600px) {
    .chatw-btn {
        margin-top: 32px;
        right: 16px;
        padding: 12px 18px;
        font-size: 15px;
    }

    .chatw {
        margin-top: 32px;
        right: 16px;
        height: 300px;
    }
}

/* Страница преподавателя /chat-admin: список разговоров слева, переписка справа */
.chata {
    display: flex;
    height: calc(100vh - var(--site-header-h));
    margin-top: var(--site-header-h);
    background: #fff;
    font-family: Geneva, Arial, Helvetica, sans-serif;
    color: #1B2A4E;
}

.chata__login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 320px;
    margin: 80px auto 0;
}

.chata__login-title {
    font-size: 24px;
    text-align: center;
}

.chata__error {
    color: #C62828;
    text-align: center;
}

.chata__list {
    width: 300px;
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 1px solid #E3E8F5;
}

.chata__status {
    padding: 12px 14px;
    background: #E8F5E9;
    color: #2E7D32;
    font-size: 13px;
}

.chata__logout {
    display: block;
    margin-top: 6px;
    padding: 0;
    border: none;
    background: none;
    color: #5A6480;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.chata__empty {
    padding: 20px;
    color: #8A94AD;
    text-align: center;
}

.chata__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-bottom: 1px solid #EEF1F8;
    background: #fff;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.chata__item:hover {
    background: #F7F9FF;
}

.chata__item--active {
    background: #EAF0FF;
}

.chata__item-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.chata__item-last {
    font-size: 13px;
    color: #8A94AD;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.chata__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C5CBDA;
    flex-shrink: 0;
}

.chata__dot--on {
    background: #2E7D32;
}

.chata__chat {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chata__empty--grow {
    flex: 1;
}

.chata__compose {
    padding: 12px 16px;
}

.chata__compose .chatw__input {
    flex: 1;
    min-width: 0;
}

.chata__send {
    width: auto;
    flex-shrink: 0;
    padding-left: 22px;
    padding-right: 22px;
}

.chata__chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #E3E8F5;
    flex-shrink: 0;
}

.chata__presence {
    margin-left: 8px;
    font-size: 13px;
    color: #8A94AD;
}

.chata__remove {
    padding: 6px 14px;
    border: 1px solid #E3A0A0;
    border-radius: 8px;
    background: #fff;
    color: #C62828;
    cursor: pointer;
}

/* ——— Онлайн-доска на телефоне ——— */
/* Стоит в конце файла намеренно: перекрывает .paint-* правила выше. */
/* Палец на холсте рисует, а не прокручивает и не масштабирует страницу
   (касания обрабатывает paint-panel.js через Pointer Events). */
#paint-canvas {
    touch-action: none;
}

/* Узкий экран: доска перестаёт быть «окном на весь экран» — холст сжимается
   по ширине, страница прокручивается обычным образом (за пределами холста).
   Поле PDF прячем: мобильные браузеры не показывают PDF внутри страницы. */
@media screen and (max-width: 700px) {
    .paint-page {
        height: auto;
        overflow: visible;
    }

    .paint-work {
        flex-direction: column;
    }

    .paint-canvas-area {
        overflow: visible;
        padding: 6px;
    }

    #paint-canvas {
        width: 100%;
        height: auto;
    }

    .pdf-pane,
    .paint-status {
        display: none;
    }

    /* Кнопки — под палец */
    .paint-toolbar {
        gap: 5px;
        padding: 6px;
    }

    .paint-tool-btn {
        min-width: 38px;
        min-height: 38px;
        font-size: 17px;
    }

    .paint-cmd {
        padding: 8px 10px;
        font-size: 13px;
    }
}
