/* Поправки к стилям старого сайта для статической версии (docs/newweb-plan.md, 3.4). */

/* Кнопки, которые раньше раскрывали форму, теперь ссылки на «Контакты». */
.forma a.button-form {
  text-decoration: none;
}

/* Отступ, который давал класс .open-form: класс убран, чтобы скрипт не раскрывал форму. */
.option-full .forma a.button-form {
  margin-top: 14px;
}

/* Блок «Подписаться на новости» в шапке убран (2026-10-07), он занимал 70px.
   На странице преподавателя логотип и меню стоят под ним абсолютно —
   поднимаем их на столько же. */
.option-teacher-item #logo {
  top: 65px;
}
.option-teacher-item #mmenu {
  top: 233px;
}
/* Реквизиты продавца в подвале — требование Robokassa (docs/robokassa.md). */
/* Подвал на 20px выше старого: при ширине 1000px ссылки идут в две строки,
   и реквизиты должны поместиться в 131px высоты #bm. */
#bm-inside { top: 56px; }
#bm-inside a { display: inline-block; white-space: nowrap; }
#bm-inside .seller { padding-top: 8px; font-size: 11px; color: #989898; }

/* Юридические документы (src/pages/l/): вложенный список без отступа снизу. */
.legal ul ul { margin-bottom: 0; padding-bottom: 0; }
/* Мобильная версия (2026-10-07). Старый сайт — только десктоп: min-width
   1000px, шапка на абсолютных координатах. Уже 1000px — одна колонка, шапка
   полосой, меню по бургеру (Header.astro, site.js). Выше 999px ничего не
   меняется. Перебиваем старые правила через #main: id сильнее их классов. */
.burger { display: none; }

@media (max-width: 999px) {
  /* Каркас */
  #main, #bm { min-width: 0; }
  #main-inside, #bm-inside { min-width: 0; width: auto; margin: 0 16px; }
  #content-shadow, .totop-but, .site-helper { display: none !important; }
  #main .central-column-container .left-column-content,
  #main .central-column-container .right-column-content { float: none; width: auto; margin: 0; }
  #main .right-column-content { padding-top: 24px; }
  #main .back-arrow { position: static; margin-bottom: 12px; }
  #main img { max-width: 100%; height: auto; }
  #main iframe { max-width: 100%; height: auto; aspect-ratio: 16 / 9; }
  #main h1, #main h1 * { font-size: 26px !important; line-height: 1.15; }
  #main h1 { padding-bottom: 20px !important; }
  #main .content-table { display: block; overflow-x: auto; }
  #main .content-table td, #main .content-table th { padding: 6px 8px; }
  .legal { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }

  /* Шапка: логотип и бургер в строку, меню и почта — по нажатию */
  #main #head { width: auto; height: auto; padding: 12px 0; }
  #main #logo { position: static; height: auto; min-height: 56px; margin: 0 56px 0 0; padding-left: 64px; background-size: 53px 56px; }
  #logo .name { padding-top: 4px; font-size: 15px; }
  #logo .name span { padding: 2px 0 4px; font-size: 22px; }
  #logo p { font-size: 11px; }
  .burger {
    display: block; position: absolute; right: 0; top: 18px; width: 44px; height: 44px;
    padding: 12px 10px; border: 0; border-radius: 4px; background: #fcf7f1; cursor: pointer;
  }
  .burger span { display: block; height: 2px; margin-bottom: 7px; background: #60763b; }
  .burger span:last-child { margin-bottom: 0; }
  .menu-open .burger { background: #ffead1; }

  #main #mmenu { display: none; position: static; width: auto; margin-top: 12px; padding: 4px 0; }
  #main .sidebar { display: none; position: static; width: auto; padding: 14px 12px 0; }
  .menu-open #main #mmenu, .menu-open #main .sidebar { display: block; }
  #mmenu .column { float: none; width: auto; margin: 0 12px; }
  #mmenu .sep-menu, #mmenu .add-menu .sep-menu { width: auto; }
  #mmenu .item-menu, #mmenu .add-menu .item-menu { width: auto; padding: 12px 8px; font-size: 16px; }
  #mmenu .item-menu i, #mmenu .add-menu .pointer { display: none; }
  /* «Обучение» раскрыто всегда. !important — сильнее display и height,
     которые ставит jQuery при наведении. */
  #main #mmenu .add-menu {
    display: block !important; height: auto !important; position: static;
    padding: 0 0 0 20px; border: 0; background: none; text-align: left;
  }
  #mmenu .add-menu .item-menu { font-size: 15px; }
  .sidebar .e-mail, .sidebar .e-mail * { font-size: 14px; }

  /* Главная: слайдер с цитатами абсолютный, на 388px и с анимацией — скрыт */
  #slider, .bg-slider { display: none !important; }
  .banner { padding-bottom: 20px; }

  /* Расписания, события, магазин */
  #timetable .date, #timetable .inf, #timetable .trainer { float: none; width: auto; }
  #timetable .date { padding: 12px 8px 0; font-size: 18px; }
  #timetable .inf { padding: 4px 8px 4px; }
  #timetable .inf .city { position: static; width: auto; text-align: left; }
  #timetable .inf .city span { padding: 0; }
  #timetable .trainer { padding: 4px 8px 12px; }
  /* Таблицы «подпись — значение» у событий и преподавателей: подпись над значением */
  #timetable .about-item-act, #timetable .about-item-act tbody,
  #timetable .about-item-act tr, #timetable .about-item-act td,
  .item-teacher-info table, .item-teacher-info tbody,
  .item-teacher-info tr, .item-teacher-info td { display: block; width: auto; }
  #timetable .about-item-act .first, .item-teacher-info table .first { width: auto; padding: 0 0 4px; background: none; }
  #timetable .about-item-act td, .item-teacher-info table td { padding: 0 0 18px; }
  .sortable .tags span, .sortable .tags a { display: inline-block; margin-bottom: 8px; }
  .store .item-store { float: none; width: auto; height: auto; margin-right: 0; }
  .store .item-store span { padding: 16px 0 8px; }
  .popular-stuff .item-popular { float: none; width: auto; padding-bottom: 20px; }
  .popular-stuff .item-popular span { width: auto; }

  /* Текстовые страницы */
  .forma { width: auto; padding: 20px 16px 12px; }
  .full-block { padding: 20px 16px 8px; }
  .full-block.white { padding: 0; }
  .citation { padding-left: 0; font-size: 18px; }
  .content-left-image, .content-right-image { float: none; display: block; margin: 5px 0 12px; }

  /* Блог */
  #main #news .item-news { float: none; width: auto; max-width: none; margin: 0 0 24px; padding-bottom: 0; }
  #news .sep-news { display: none; }
  #news .item-news p { width: auto; }
  #news .caption-news h1 { padding-right: 20px; }
  #news .caption-news { padding-bottom: 12px; }
  #news .caption-news .archive { top: 0; }

  /* Преподаватели и отзывы */
  #main .teachers .item-teacher { float: none; width: auto; padding-bottom: 16px; }
  #main .teachers .item-teacher .inf { float: none; width: auto; overflow: hidden; }
  #main .teachers .sep-teacher { display: none; }
  .option-teacher-item #main-inside { padding-top: 0; }
  /* Здесь шапка стоит в правой колонке — переносим колонку наверх */
  .option-teacher-item .central-column-container { display: flex; flex-direction: column; }
  .option-teacher-item #main .right-column-content { order: -1; padding-top: 0; }
  .item-teacher-info { margin-bottom: 30px; }
  .item-teacher-info .head { padding-bottom: 16px; }
  #main .item-teacher-info img { float: none; display: block; margin: 0 0 12px; }
  .item-teacher-info .about-teacher { float: none; width: auto; }
  .item-teacher-info .about-teacher .name { font-size: 26px; }
  .comments, #disqus_thread { width: auto; }

  /* Материалы и отзывы: теги над списком */
  .tags-stuff .item-tag { display: inline-block; margin: 0 4px 6px 0; padding: 6px 12px; font-size: 14px; }
  .tags-stuff .all { margin-bottom: 6px; }
  .tags-additional a { height: auto; margin: 0 4px 4px 0; font-size: 12px; line-height: 1.5; }
  /* Карточка списка: в шаблоне (templates.js) текст идёт до картинки.
     Материалы — картинка над текстом, отзывы — маленькое фото слева. */
  #main .stuff .item-stuff, #main .opinions .item-stuff { display: flex; float: none; width: auto; height: auto; margin-right: 0; }
  #main .stuff .item-stuff { flex-direction: column; }
  #main .item-stuff > a { order: -1; }
  #main .item-stuff > a:empty { display: none; }
  #main .opinions .item-stuff > a { flex: 0 0 110px; }
  #main .item-stuff img { float: none; display: block; max-width: calc(100% - 10px); margin: 10px 0 10px 10px; }
  #main .stuff .item-stuff img { max-width: calc(100% - 20px); margin-bottom: 0; }
  #main .item-stuff .about { flex: 1; min-width: 0; float: none; width: auto; margin: 0 10px; }

  /* 404 */
  #main .error { width: auto; margin-left: 0; left: 0; padding-top: 40px; }

  /* Подвал: документы столбиком */
  #main:after { display: none; }
  #bm { height: auto; margin-top: 0; }
  #bm-inside { top: 0; padding: 20px 0 28px; border-top: 1px solid #e5e5e5; }
  #bm-inside a { display: block; margin: 0 0 12px; font-size: 14px; }
  #bm-inside .seller { font-size: 12px; }
}
