/* =========================================================
   Портал педагога — единый слой для старых страниц
   Перекрывает legacy styles.css/form.css: фиксированные ширины,
   градиентные кнопки, старые карточки и списки.
   Подключается в karkas/header.php после site-2026.css.
   ========================================================= */

/* ---------- 0. Базовый цвет текста ----------
   styles.css содержит * { color:#959595 } — на светлом фоне текст бледный. */
.s2026-main:not(.s2026-main--home) p,
.s2026-main:not(.s2026-main--home) li,
.s2026-main:not(.s2026-main--home) td,
.s2026-main:not(.s2026-main--home) th,
.s2026-main:not(.s2026-main--home) dd,
.s2026-main:not(.s2026-main--home) dt,
.s2026-main:not(.s2026-main--home) blockquote,
.s2026-main:not(.s2026-main--home) .panel-content1,
.s2026-main:not(.s2026-main--home) .content1,
.s2026-main:not(.s2026-main--home) .content2,
.s2026-main:not(.s2026-main--home) .block_right_index,
.s2026-main:not(.s2026-main--home) .b_right,
.s2026-main:not(.s2026-main--home) .publikacii_new {
  color: var(--text);
}
.s2026-main:not(.s2026-main--home) b,
.s2026-main:not(.s2026-main--home) strong { color: var(--heading); }

/* длинные адреса/e-mail не должны расширять страницу */
.s2026-main:not(.s2026-main--home) p,
.s2026-main:not(.s2026-main--home) li,
.s2026-main:not(.s2026-main--home) td {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* единый цвет заголовков вместо inline-цветов старых страниц */
.s2026-main:not(.s2026-main--home) .panel-content1 > h1,
.s2026-main:not(.s2026-main--home) .content1 > h1,
.s2026-main:not(.s2026-main--home) .publikacii_new > h1,
.s2026-main:not(.s2026-main--home) .publikacii_new h1 {
  color: var(--heading) !important;
}

/* ---------- 1. Фиксированные ширины не должны обрезаться ---------- */
.s2026-main:not(.s2026-main--home) .blok_zayavka,
.s2026-main:not(.s2026-main--home) .blok_adminka_right,
.s2026-main:not(.s2026-main--home) .temnyi_oplata,
.s2026-main:not(.s2026-main--home) .block_polosa,
.s2026-main:not(.s2026-main--home) .block_polosa2,
.s2026-main:not(.s2026-main--home) .block_polosa3,
.s2026-main:not(.s2026-main--home) .block_polosa3a,
.s2026-main:not(.s2026-main--home) .block_polosa14,
.s2026-main:not(.s2026-main--home) .block_polosa_konkurs,
.s2026-main:not(.s2026-main--home) .bl_pol,
.s2026-main:not(.s2026-main--home) .bl_pol2,
.s2026-main:not(.s2026-main--home) .conteiner_publik,
.s2026-main:not(.s2026-main--home) .b_left,
.s2026-main:not(.s2026-main--home) .b_right,
.s2026-main:not(.s2026-main--home) .div_right_zagol,
.s2026-main:not(.s2026-main--home) .div_right_zagol2,
.s2026-main:not(.s2026-main--home) .block_pol_right,
.s2026-main:not(.s2026-main--home) .content1,
.s2026-main:not(.s2026-main--home) .content2,
.s2026-main:not(.s2026-main--home) .generic-content,
.s2026-main:not(.s2026-main--home) .generic-content_sv,
.s2026-main:not(.s2026-main--home) .generic-content_dip,
.s2026-main:not(.s2026-main--home) .publikacii_new,
.s2026-main:not(.s2026-main--home) .header-panels1,
.s2026-main:not(.s2026-main--home) .header-panels2,
.s2026-main:not(.s2026-main--home) .header-panels3,
.s2026-main:not(.s2026-main--home) .header-panels4,
.s2026-main:not(.s2026-main--home) .header-panels44,
.s2026-main:not(.s2026-main--home) .header-panels12,
.s2026-main:not(.s2026-main--home) .header-panels222 {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ---------- 2. Карточка формы / заявки ---------- */
.s2026-main:not(.s2026-main--home) .blok_zayavka,
.s2026-main:not(.s2026-main--home) .blok_adminka_right {
  margin: 0 auto 22px !important;
  padding: clamp(16px, 3vw, 28px) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-sm);
}
.s2026-main:not(.s2026-main--home) .temnyi_oplata {
  padding: 14px 16px !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r) !important;
  background: var(--tint-5) !important;
}
.s2026-main:not(.s2026-main--home) .blok_zayavka p b { color: var(--heading) !important; }

/* ---------- 3. Кнопки ---------- */
.s2026-main:not(.s2026-main--home) a.boton1,
.s2026-main:not(.s2026-main--home) a.boton22,
.s2026-main:not(.s2026-main--home) a.boton23,
.s2026-main:not(.s2026-main--home) a.boton_vebinar,
.s2026-main:not(.s2026-main--home) a.button13,
.s2026-main:not(.s2026-main--home) a.button14,
.s2026-main:not(.s2026-main--home) a.button15,
.s2026-main:not(.s2026-main--home) input.bbotre,
.s2026-main:not(.s2026-main--home) input.bbotre2 {
  display: inline-block !important;
  float: none !important;
  width: auto !important;
  min-width: 190px;
  max-width: 100%;
  margin: 8px auto !important;
  padding: 10px 20px !important;
  border: 1px solid var(--brand) !important;
  border-radius: 10px !important;
  background: var(--brand) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  text-align: center !important;
  text-decoration: none !important;
  text-shadow: none !important;
  box-shadow: var(--shadow-sm) !important;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.s2026-main:not(.s2026-main--home) a.boton1:hover,
.s2026-main:not(.s2026-main--home) a.boton22:hover,
.s2026-main:not(.s2026-main--home) a.boton23:hover,
.s2026-main:not(.s2026-main--home) a.boton_vebinar:hover,
.s2026-main:not(.s2026-main--home) a.button13:hover,
.s2026-main:not(.s2026-main--home) a.button14:hover,
.s2026-main:not(.s2026-main--home) a.button15:hover,
.s2026-main:not(.s2026-main--home) input.bbotre:hover,
.s2026-main:not(.s2026-main--home) input.bbotre2:hover {
  background: var(--brand-d) !important;
  border-color: var(--brand-d) !important;
}
.s2026-main:not(.s2026-main--home) a.button13:first-line,
.s2026-main:not(.s2026-main--home) a.button14:first-line,
.s2026-main:not(.s2026-main--home) a.button15:first-line { color: #fff !important; }

/* ---------- 4. Списки-ссылки и меню ---------- */
.s2026-main:not(.s2026-main--home) .block_pol_right,
.s2026-main:not(.s2026-main--home) .div_left_knopka,
.s2026-main:not(.s2026-main--home) .div_left_knopka2 {
  display: block;
  width: auto !important;
  max-width: 100%;
  margin: 6px 0 !important;
  padding: 10px 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none !important;
  box-shadow: var(--shadow-sm);
  transition: background-color .15s, border-color .15s, color .15s;
}
.s2026-main:not(.s2026-main--home) .block_pol_right:hover,
.s2026-main:not(.s2026-main--home) .div_left_knopka:hover,
.s2026-main:not(.s2026-main--home) .div_left_knopka2:hover {
  border-color: var(--brand) !important;
  background: var(--tint) !important;
  color: var(--brand-d) !important;
}
.s2026-main:not(.s2026-main--home) .div_left_knopka2 {
  border-color: var(--brand) !important;
  background: var(--brand) !important;
  color: #fff !important;
}
.s2026-main:not(.s2026-main--home) .div_left_zagol,
.s2026-main:not(.s2026-main--home) .div_right_zagol,
.s2026-main:not(.s2026-main--home) .div_right_zagol2 {
  padding: 9px 14px !important;
  border-radius: 10px;
  background: var(--tint-3) !important;
  color: var(--heading) !important;
  font-weight: 700;
}

/* список «Конкурсы сразу» — карточки-строки вместо подчёркнутых ссылок */
.s2026-main:not(.s2026-main--home) .block_polosa_konkurs {
  display: block;
  max-width: 100%;
  margin: 8px 0 !important;
  padding: 11px 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.s2026-main:not(.s2026-main--home) .block_polosa_konkurs a {
  color: var(--brand-d) !important;
  font-weight: 600;
  text-decoration: none !important;
}
.s2026-main:not(.s2026-main--home) .block_polosa_konkurs:hover {
  border-color: var(--brand) !important;
  background: var(--tint) !important;
}

/* ---------- 5. Карточки вебинаров / курсов ---------- */
.s2026-main:not(.s2026-main--home) .bl_vebinar {
  padding: 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-sm);
}
.s2026-main:not(.s2026-main--home) .bl_vebinar a {
  color: var(--brand-d) !important;
  text-decoration: none !important;
}
.s2026-main:not(.s2026-main--home) .bl_vebinar_vn {
  color: var(--heading) !important;
  font-size: 14.5px !important;
  font-weight: 600;
  line-height: 1.45;
}
.s2026-main:not(.s2026-main--home) .bl_vebinar img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 8px;
}

/* ---------- 6. Изображения и всплывающие окна ---------- */
.s2026-main:not(.s2026-main--home) .img2 {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line) !important;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.s2026-main:not(.s2026-main--home) .popup,
.s2026-main:not(.s2026-main--home) .popup_click {
  border: 1px solid var(--line) !important;
  border-radius: var(--r) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-lg) !important;
}
.s2026-main:not(.s2026-main--home) .popup_click p,
.s2026-main:not(.s2026-main--home) .popup_click center { color: var(--text); }

/* ---------- 6a. Встроенные видео, документы и широкие блоки ---------- */
.s2026-main:not(.s2026-main--home) iframe,
.s2026-main:not(.s2026-main--home) object,
.s2026-main:not(.s2026-main--home) embed {
  max-width: 100% !important;
}
.s2026-main:not(.s2026-main--home) noindex {
  display: block;
  max-width: 100% !important;
  overflow-x: auto;
}
.s2026-main:not(.s2026-main--home) .block_left_zhurnal,
.s2026-main:not(.s2026-main--home) .block_right_zhurnal {
  float: none !important;
  max-width: 100% !important;
}
.s2026-main:not(.s2026-main--home) .block_left_zhurnal img {
  max-width: 100%;
  height: auto;
}
.s2026-main:not(.s2026-main--home) .div_form {
  max-width: 100% !important;
}
.s2026-main:not(.s2026-main--home) form {
  max-width: 100% !important;
}
.s2026-main:not(.s2026-main--home) input.w100 {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.s2026-main:not(.s2026-main--home) .div_form table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed;
}
.s2026-main:not(.s2026-main--home) .div_form td {
  white-space: normal !important;
}

/* ---------- 6b. Предупреждение в демо-тестах (тёмная тема) ---------- */
html[data-theme="dark"] .s2026-main:not(.s2026-main--home) .demo-notice {
  background: #3a3320 !important;
  border-left-color: #ffc107 !important;
}
html[data-theme="dark"] .s2026-main:not(.s2026-main--home) .demo-notice p {
  color: #ffe9a8 !important;
}

/* ---------- 7. Текстовые страницы ---------- */
.s2026-main:not(.s2026-main--home) .publikacii_new {
  margin: 0 auto;
  text-align: left;
}
.s2026-main:not(.s2026-main--home) .publikacii_new h1,
.s2026-main:not(.s2026-main--home) .publikacii_new h3 { text-align: center; }

/* ---------- 8. Мобильные правила ---------- */
@media (max-width: 820px) {
  /* широкие legacy-таблицы — горизонтальная прокрутка вместо обрезки */
  .s2026-main:not(.s2026-main--home) table:not(.mero-table) {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .s2026-main:not(.s2026-main--home) #reg,
  .s2026-main:not(.s2026-main--home) #reg2,
  .s2026-main:not(.s2026-main--home) #reg33,
  .s2026-main:not(.s2026-main--home) .reg2,
  .s2026-main:not(.s2026-main--home) input.bbotre,
  .s2026-main:not(.s2026-main--home) input.bbotre2 {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* текст важнее картинок: на мобильном сначала заголовок и контент */
  .s2026-main:not(.s2026-main--home) .panel-content1:has(.block_left_index) {
    display: flex;
    flex-direction: column;
  }
  .s2026-main:not(.s2026-main--home) .panel-content1:has(.block_left_index) .block_right_index { order: 1; }
  .s2026-main:not(.s2026-main--home) .panel-content1:has(.block_left_index) .block_left_index { order: 2; }

  .s2026-main:not(.s2026-main--home) .block_left_index img {
    max-height: 320px;
    width: auto;
  }
}

@media (max-width: 520px) {
  /* превью диплома 440px не влезает в экран — пропорционально уменьшаем */
  .s2026-main:not(.s2026-main--home) .diplom_shablon { zoom: .75; }

  .s2026-main:not(.s2026-main--home) a.boton1,
  .s2026-main:not(.s2026-main--home) a.boton22,
  .s2026-main:not(.s2026-main--home) a.boton23,
  .s2026-main:not(.s2026-main--home) a.boton_vebinar,
  .s2026-main:not(.s2026-main--home) a.button13,
  .s2026-main:not(.s2026-main--home) a.button14,
  .s2026-main:not(.s2026-main--home) a.button15 {
    display: block !important;
    width: 100% !important;
  }
}
