/* =========================================================
   DERKOBRAND / SCHOOL
   Единые стили школьного блока на главной, каталога и курсов.
   Подключать после derkobrand.css на ВСЕХ этих страницах.
========================================================= */

/* =========================================================
   ШКОЛА / КАТАЛОГ КУРСОВ
   Отдельная страница db_school_page: .school-header отличает
   её от блока "Школа" на главной. Стили главной не меняем.
   Баннеры курсов: строго 16:9, без скруглений.
========================================================= */
.school-title {
  color: var(--black);
  font-size: clamp(2rem,3.6vw,4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}
.school-sub {
  color: var(--green);
  font-size: clamp(1rem,1.4vw,2rem);
  font-weight: 400;
  line-height: 1.1;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}
.school {
  background: var(--paper);
  border-top: 1px solid var(--border);
  padding-left: 3vw;
  padding-right: 3vw;
  padding-top: 8vw;
  padding-bottom: 6vw;
}
@media (max-width:768px)  {.school {
    padding-top: 12vw;
  }
}
.school-inner {
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}
.school-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 1rem;
}
.tg-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--white);
  font-size: 0.85rem;
}
.tg-ball {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tg-ball svg {
  width: 32px;
  height: 32px;
}
.school-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.school-card {
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.3s linear;
}
.school-card:hover {
  transition: 0.3s linear;
  filter: none;
  z-index: 99;
}
.sc-orange {
  background: #e84a1c;
  /*padding:32px;*/
  min-height: 600px;
  display: flex;
  flex-direction: column;
}
.sc-title,
h3.sc-title {
  color: var(--white);
  flex: 1;
  font-size: clamp(1.6rem,2.6vw,2.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1vw;
}
.sc-bottom {
  xdisplay: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.sc-meta {
  color: rgba(255,255,255,.55);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
}
@media (max-width: 500px)  {.sc-orange {
    min-height: 400px;
  }
.video-text {
    min-height: 400px !important;
    padding: 15px !important;
  }
}
@media (max-width: 1439px)  {.sc-title {
    flex: 1;
  }
.sc-meta {
    font-size: 0.62rem;
    color: rgba(255,255,255,.55);
    letter-spacing: .04em;
    text-transform: uppercase;
  }
}
.sc-logo-badge {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.sc-dark {
  background: #1a1a1a;
  display: flex;
  flex-direction: column;
}
.sc-photo-area {
  background: #c0200a;
  min-height: 260px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: rgba(255,255,255,.25);
  letter-spacing: .1em;
  text-transform: uppercase;
  position: relative;
}
.sc-photo-area img {
  width: 100%;
  height: auto;
}
.sc-photo-area video {
  width: 100%;
  height: auto;
  object-fit: cover;
}
.sc-photo-caption {
  position: absolute;
  bottom: 10px;
  left: 16px;
  font-size: 0.58rem;
  color: rgba(255,255,255,.4);
}
.sc-text {
  padding: 18px 28px 28px;
  border: 2px solid red;
}
.sc-author {
  font-size: 0.62rem;
  color: rgba(255,255,255,.35);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  letter-spacing: .03em;
  text-transform: uppercase;
}
@media (max-width:768px)  {.school-grid {
    grid-template-columns: 1fr;
  }
}
#school .school-inner {
  width: 100%;
  max-width: none;
  margin: 0;
}
#school .school-section-label {
  padding: 0;
  color: var(--gray);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}
#school .school-hd {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
#school .school-title {
  font-size: 48px;
}
#school .school-sub {
  color: var(--green);
  letter-spacing: 0;
}
#school .school-grid {
  display: grid;
}
#school .school-card {
  box-sizing: border-box;
}
#school .video-text {
  min-height: 0;
  padding: 28px;
}
#school .sc-title,
#school .sc-atitle {
  margin: 0;
  padding: 0;
  font-family: var(--bonanovar);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}
#school .sc-meta,
#school .sc-author {
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0;
}
#school .sc-logo-badge {
  flex-shrink: 0;
}
@media (max-width: 768px)  {#school .school-title {
    font-size: 34px;
  }
#school .video-text {
    padding: 24px;
  }
#school .sc-title,
#school .sc-atitle {
    font-size: 28px;
  }
}
@media (max-width: 768px)  {#school .school-section-label {
    margin: 0 0 24px;
    padding: 0;
    line-height: 1.2;
  }
#school .school-hd {
    margin-top: 0;
    padding-top: 0;
  }
#school .school-title {
    margin-top: 0;
    padding-top: 0;
  }
}
#school.school {
  padding: 64px;
}
#school .school-section-label {
  margin: 0 0 32px;
}
#school .school-hd {
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}
#school .school-title {
  flex: 1 1 600px;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: clamp(40px, 4.5vw, 72px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.045em;
}
#school .tg-link {
  flex-shrink: 0;
}
#school .school-sub {
  margin: 0 0 40px;
  padding: 0;
  font-size: 20px;
  line-height: 1.35;
}
#school .school-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
#school .school-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 440px;
  height: auto;
  aspect-ratio: 8 / 5;
  overflow: hidden;
}
#school .school-card > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
#school .video-text {
  position: absolute;
  inset: 0;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0 !important;
  padding: 32px !important;
}
#school .video-text .sc-bottom {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  flex: 1;
  min-height: 0;
  margin: 0;
  gap: 24px;
}
#school .video-text .sc-title {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  font-family: var(--bonanovar);
  font-size: clamp(28px, 2.7vw, 42px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.02em;
}
#school .video-text .sc-meta {
  margin: auto 0 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
}
@media (max-width: 768px)  {#school.school {
    padding: 24px;
  }
#school .school-section-label {
    margin-bottom: 24px;
  }
#school .school-hd {
    gap: 20px;
  }
#school .school-title {
    flex-basis: 100%;
    font-size: clamp(34px, 9vw, 56px);
  }
#school .school-sub {
    margin-bottom: 28px;
    font-size: 18px;
  }
#school .school-grid {
    grid-template-columns: 1fr;
  }
#school .school-card {
    min-height: 380px;
    aspect-ratio: auto;
  }
#school .video-text {
    padding: 24px !important;
  }
#school .video-text .sc-title {
    font-size: 28px;
  }
}
#school .school-inner,
#school .school-grid {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
#school .school-grid > .school-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  grid-column: auto;
}
#school.school {
  box-sizing: border-box;
  padding-left: 64px;
  padding-right: 64px;
}
#school.school {
  padding-top: 64px;
  padding-bottom: 64px;
}
#school .school-inner {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
}
#school .school-section-label {
  display: block;
  width: auto;
  margin: 0 0 32px;
  padding: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
}
#school .school-section-label {
  color: var(--gray);
}
#school .school-title {
  margin-top: 0;
  padding-top: 0;
}
#school .school-hd {
  margin: 0 0 24px;
  padding: 0;
}
#school .school-sub {
  margin-bottom: 32px;
}
#school.school {
  border-top: 0;
}
@media (max-width: 768px)  {#school.school {
    padding-left: 24px;
    padding-right: 24px;
  }
#school.school {
    padding-top: 24px;
    padding-bottom: 24px;
  }
#school .school-section-label {
    margin-bottom: 24px;
  }
#school .school-sub {
    margin-bottom: 24px;
  }
}
#school .school-title {
  font-family: var(--font);
  font-size: var(--db-type-heading);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.04em;
}
#school .video-text .sc-title,
#school .sc-atitle {
  font-family: var(--bonanovar);
  font-size: var(--db-type-title);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}
#school .sc-title a {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}
#school .school-sub {
  font-family: var(--font);
  font-size: var(--db-type-body);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -.01em;
}
#school .school-section-label {
  font-family: var(--font);
  font-size: var(--db-type-label);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}
#school .btn {
  font-family: var(--font);
  font-size: var(--db-type-label);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
}
#school .video-text .sc-meta,
#school .sc-author {
  font-family: var(--font);
  font-size: var(--db-type-caption);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
}
#school .sc-meta {
  text-transform: none;
}
#school.school-editorial {
  background: #1a1c23;
  color: #f3f2ef;
}
#school.school-editorial .school-inner {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}
#school.school-editorial .school-section-label {
  color: #b5b6bc;
  font-family: var(--font);
  font-size: var(--db-type-label);
  font-weight: 400;
  line-height: 1.3;
}
#school.school-editorial .school-hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin: 0 0 40px;
}
#school.school-editorial .school-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: inherit;
  font-family: var(--font);
  font-size: var(--db-type-heading);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.04em;
}
#school.school-editorial .school-note {
  flex: 0 0 auto;
  margin: 0;
  color: #b5b6bc;
  font-family: var(--font);
  font-size: var(--db-type-label);
  font-weight: 400;
  line-height: 1.5;
}
#school.school-editorial .school-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}
#school.school-editorial .school-course {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  color: inherit;
  background: transparent;
  text-decoration: none;
}
#school.school-editorial .school-course-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1.45;
  flex-shrink: 0;
  overflow: hidden;
  isolation: isolate;
  background: #252730;
}
#school.school-editorial .school-course-media img,
#school.school-editorial .school-course-media video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform .65s cubic-bezier(.22, 1, .36, 1);
}
#school.school-editorial .school-course-media img {
  z-index: 0;
}
#school.school-editorial .school-course-media video {
  z-index: 1;
}
#school.school-editorial .school-course-arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f3f2ef;
  color: #1a1c23;
  font-size: var(--db-type-title);
  line-height: 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
#school.school-editorial .school-course-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 24px;
  padding: 20px 0 0;
}
#school.school-editorial .school-course-title {
  margin: 0;
  padding: 0;
  color: inherit;
  font-family: var(--font);
  font-size: var(--db-type-title);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.02em;
  overflow-wrap: break-word;
}
#school.school-editorial .school-course-title:not(:has(a)):hover,
#school.school-editorial .school-course-title a:hover,
#school.school-editorial .school-course-title a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
#school.school-editorial .school-course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: auto 0 0;
  padding: 0;
  color: #b5b6bc;
  font-family: var(--font);
  font-size: var(--db-type-caption);
  font-weight: 400;
  line-height: 1.4;
}
@media (hover: hover)  {#school.school-editorial .school-course:hover img,
#school.school-editorial .school-course:hover video {
    transform: scale(1.035);
  }
#school.school-editorial .school-course:hover .school-course-arrow {
    opacity: 1;
    transform: translateY(0);
  }
}
#school.school-editorial .school-course:focus-visible {
  outline: 2px solid #32cd33;
  outline-offset: 6px;
}
#school.school-editorial .school-course:focus-visible .school-course-arrow {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 768px)  {#school.school-editorial .school-hd {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 28px;
  }
#school.school-editorial .school-title {
    flex: 0 1 auto;
  }
#school.school-editorial .school-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
#school.school-editorial .school-course-media {
    aspect-ratio: 1.55;
  }
#school.school-editorial .school-course-body {
    gap: 16px;
    padding-top: 16px;
  }
}
@media (hover: none)  {#school.school-editorial .school-course-arrow {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce)  {#school.school-editorial .school-course-media img,
#school.school-editorial .school-course-media video,
#school.school-editorial .school-course-arrow {
    transition: none;
    transform: none;
  }
}
#school .school-card:hover { filter: none; }
#school.school:has(> .school-inner > .school-header) {
  padding: clamp(100px, 9vw, 160px) 3vw clamp(72px, 7vw, 130px);
  border-top: 0;
  background: var(--paper);
}
#school.school:has(.school-header) .school-inner {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
}
#school.school:has(.school-header) .school-header {
  max-width: 1100px;
  margin: 0 0 clamp(48px, 5vw, 88px);
}
#school.school:has(.school-header) .school-label {
  margin: 0 0 18px;
  color: var(--gray);
  font: 500 12px/1.4 var(--font);
  letter-spacing: .12em;
  text-transform: uppercase;
}
#school.school:has(.school-header) .school-title {
  margin: 0;
  padding: 0;
  max-width: 1100px;
  color: var(--black);
  font-family: var(--font);
  font-size: clamp(48px, 5.4vw, 96px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.055em;
}
#school.school:has(.school-header) .school-intro {
  max-width: 730px;
  margin: 22px 0 0;
  color: #686868;
  font-size: clamp(17px, 1.45vw, 24px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -.02em;
}
#school.school:has(.school-header) .school-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(18px, 2vw, 36px);
  row-gap: clamp(45px, 4.5vw, 82px);
}
#school.school:has(.school-header) .school-card {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  filter: none;
}
#school.school:has(.school-header) .school-card-link {
  display: block;
  color: var(--modern);
  text-decoration: none;
}
#school.school:has(.school-header) .school-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: #e5e4e0;
}
#school.school:has(.school-header) .school-card-image img,
#school.school:has(.school-header) .school-card-image video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
#school.school:has(.school-header) .school-card-link:hover .school-card-image img,
#school.school:has(.school-header) .school-card-link:hover .school-card-image video {
  transform: scale(1.045);
}
#school.school:has(.school-header) .school-card-arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--black);
  background: var(--paper);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
#school.school:has(.school-header) .school-card-link:hover .school-card-arrow,
#school.school:has(.school-header) .school-card-link:focus-visible .school-card-arrow {
  opacity: 1;
  transform: translateY(0);
}
#school.school:has(.school-header) .school-card-info {
  padding-top: 18px;
}
#school.school:has(.school-header) .school-card-title {
  margin: 0;
  padding: 0;
  color: var(--modern);
  font-size: clamp(26px, 2.2vw, 40px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.035em;
  transition: color .2s ease;
}
#school.school:has(.school-header) .school-card-link:hover .school-card-title {
  color: var(--black);
}
#school.school:has(.school-header) .school-card-description {
  max-width: 720px;
  margin: 10px 0 0;
  color: #777;
  font-size: clamp(14px, 1.05vw, 18px);
  font-weight: 400;
  line-height: 1.4;
}
@media (max-width: 768px)  {#school.school:has(> .school-inner > .school-header) {
    padding: 95px 16px 70px;
  }
#school.school:has(.school-header) .school-header {
    margin-bottom: 24px;
  }
#school.school:has(.school-header) .school-title {
    font-size: clamp(42px, 10vw, 64px);
  }
#school.school:has(.school-header) .school-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 18px;
  }
#school.school:has(.school-header) .school-card-arrow {
    width: 36px;
    height: 36px;
    right: 12px;
    bottom: 12px;
    font-size: 23px;
  }
}
@media (hover: none)  {#school.school:has(.school-header) .school-card-arrow {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce)  {#school.school:has(.school-header) .school-card-image img,
#school.school:has(.school-header) .school-card-image video,
#school.school:has(.school-header) .school-card-arrow {
    transition: none;
  }
}

/* =========================================================
   COURSE PAGE / ВНУТРЕННЯЯ СТРАНИЦА КУРСА
   Обложка и заголовок, навигация, программа и материалы.
   Общий шаблон для всех курсов. Без каскадных заплаток.
========================================================= */
.course-page {
  width: 100%;
  background: var(--paper);
  color: var(--modern);
}

.course-page [id] { scroll-margin-top: 90px; }

/* Титульное изображение с текстом, как в кейсах */
.course-page .course-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: min(780px, 85svh);
  margin: 52px 0 0;
  overflow: hidden;
  isolation: isolate;
  background: #1a1c23;
}
.course-page .course-hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.course-page .course-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}
.course-page .course-hero-image img:not([src]),
.course-page .course-hero-image img[src=""] { display: none; }
.course-page .course-hero-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(110px, 12vw, 180px) 6vw 6vw;
  background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,.38) 58%, transparent);
}
.course-page .course-hero-text { max-width: 1100px; }
.course-page .course-label {
  margin: 0 0 18px;
  color: var(--green);
  font: 500 13px/1.3 var(--font);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.course-page h1.course-title {
  max-width: 1100px;
  margin: 0 0 24px;
  padding: 0;
  color: #fff;
  font: 600 clamp(42px, 6vw, 100px)/.98 var(--font);
  letter-spacing: -.05em;
  overflow-wrap: break-word;
}
.course-page .course-lead {
  max-width: 800px;
  margin: 0;
  color: rgba(255,255,255,.88);
  font: 400 clamp(18px, 1.7vw, 26px)/1.3 var(--font);
}
/* Служебная подпись, если есть в разметке курса */
.course-page .course-hero-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 3vw;
  border-bottom: 1px solid var(--border-light);
  font: 500 12px/1.4 var(--font);
  letter-spacing: .07em;
}
.course-page .course-hero-caption a { color: inherit; text-decoration: none; letter-spacing: 0; }
.course-page .course-hero-caption a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Двухколоночная компоновка: боковое меню + содержание */
.course-page .course-layout {
  display: grid;
  grid-template-columns: minmax(190px, 25%) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 100px);
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(45px, 5vw, 90px) 3vw 110px;
}
.course-page .course-sidebar { min-width: 0; align-self: stretch; }
.course-page .course-sidebar .course-nav,
.course-page .course-sidebar .course-sidebar-inner {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
}
.course-page .course-sidebar .course-nav-label,
.course-page .course-sidebar .course-sidebar-title {
  margin: 0 0 15px;
  padding: 0;
  color: var(--gray);
  font: 500 11px/1.3 var(--font);
  letter-spacing: .12em;
}
.course-page .course-sidebar a {
  display: block;
  color: #777;
  font: 450 clamp(14px, 1.1vw, 17px)/1.25 var(--font);
  text-decoration: none;
  transition: color .2s ease;
}
.course-page .course-sidebar a:hover,
.course-page .course-sidebar a[aria-current] { color: var(--black); }
.course-page .course-sidebar a[aria-current]::before { content: '— '; color: var(--green); }
.course-page .course-nav-bottom {
  width: 100%;
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}
.course-page .course-nav-bottom .course-nav-back { color: var(--black); }

/* Основной контент из поля «Содержимое» MODX */
.course-page .course-content,
.course-page .course-layout > .course-content {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.course-page .course-content-inner { width: 100%; min-width: 0; margin: 0; }
.course-page .course-content-inner > :first-child { margin-top: 0; padding-top: 0; }
.course-page .course-content h2 {
  margin: 52px 0 22px;
  padding: 0;
  color: var(--black);
  font-size: clamp(30px, 3.4vw, 56px);
  line-height: 1.08;
}
.course-page .course-content h3 {
  margin: 38px 0 16px;
  padding: 0;
  font-size: clamp(23px, 2.2vw, 35px);
  line-height: 1.15;
}
.course-page .course-content h4 { margin: 28px 0 12px; padding: 0; }
.course-page .course-content p,
.course-page .course-content li { max-width: 1000px; font-size: clamp(17px, 1.35vw, 21px); line-height: 1.55; }
.course-page .course-content p { margin: 0 0 20px; }
.course-page .course-content ul,
.course-page .course-content ol { margin: 12px 0 30px; padding-left: 25px; }
.course-page .course-content li { margin-bottom: 10px; }
.course-page .course-content img,
.course-page .course-content video { display: block; max-width: 100%; height: auto; border-radius: 0; }
.course-page .course-content a { color: inherit; text-underline-offset: 3px; }
.course-page .course-content a:hover { color: var(--black); }

/* Редакционные компоненты коммерческих программ */
.course-page .course-copy { min-width: 0; }
.course-page .course-copy .course-section {
  padding: 0 0 clamp(55px, 7vw, 100px);
  margin: 0 0 clamp(48px, 6vw, 88px);
  border-bottom: 1px solid var(--border-light);
}
.course-page .course-copy .course-section:last-child { margin-bottom: 0; padding-bottom: 0; border: 0; }
.course-page .course-copy .course-eyebrow { color: var(--gray); font: 500 12px/1.35 var(--font); letter-spacing: .1em; margin: 0 0 20px; }
.course-page .course-copy h2 { margin: 0 0 30px; font-size: clamp(35px, 4.1vw, 70px); font-weight: 650; line-height: 1; letter-spacing: -.05em; }
.course-page .course-copy h3 { margin: 0 0 14px; font-size: clamp(20px, 1.7vw, 28px); line-height: 1.13; }
.course-page .course-copy p { margin: 0 0 22px; max-width: 790px; font-size: clamp(17px, 1.25vw, 20px); line-height: 1.55; }
.course-page .course-copy .course-intro { margin-bottom: 33px; color: var(--black); font-size: clamp(24px, 2.1vw, 34px); line-height: 1.28; letter-spacing: -.028em; }
.course-page .course-copy .course-muted,
.course-page .course-copy .course-program-note { color: #777; font-size: clamp(14px, 1.1vw, 17px); }
.course-page .course-tiles { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 2px; }
.course-page .course-tile { min-height: 180px; padding: clamp(22px,2.3vw,35px); background: #fff; }
.course-page .course-tile p { margin-bottom: 0; font-size: clamp(15px,1.12vw,18px); }
.course-page .course-outcomes { padding-left: 1.4em; margin: 0; }
.course-page .course-outcomes li { margin-bottom: 17px; font-size: clamp(17px,1.25vw,20px); line-height: 1.5; }
.course-page .course-program-list { border-top: 1px solid #bdbbb7; }
.course-page .course-program-list > div { display: grid; grid-template-columns: 55px 1fr; gap: 25px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid #d2d0cb; }
.course-page .course-program-list span { color: #888; font: 500 13px/1.3 var(--font); }
.course-page .course-program-list p { margin: 0; color: var(--black); font-size: clamp(19px,1.55vw,26px); line-height: 1.22; letter-spacing: -.025em; }
.course-page .course-program-list strong { display: block; font-weight: 600; }
.course-page .course-program-list small { display: block; margin-top: 9px; color: #777; font: 400 14px/1.4 var(--font); letter-spacing: 0; }
.course-page .course-program-list em { display: block; margin-top: 10px; color: #444; font: italic 400 clamp(16px,1.2vw,19px)/1.4 var(--bonanovar); letter-spacing: 0; }
.course-page .course-text-link { color: var(--black); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.course-page .course-bottom-navigation { display: flex; justify-content: space-between; gap: 20px; padding: 30px 3vw; border-top: 1px solid var(--border-light); }
.course-page .course-bottom-navigation a { color: var(--black); font-size: 15px; text-decoration: none; }
.course-page .course-bottom-navigation a:hover { text-decoration: underline; text-underline-offset: 4px; }
.course-page .course-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; margin: 36px 0 42px; background: var(--border-light); }
.course-page .course-facts > div { display: flex; flex-direction: column; gap: 10px; padding: clamp(18px,2vw,30px); background: #fff; }
.course-page .course-facts strong { font: 600 clamp(34px,4.5vw,68px)/1 var(--font); letter-spacing: -.055em; }
.course-page .course-facts span { color: #666; font: 400 13px/1.35 var(--font); }
.course-page .course-statement { margin: 35px 0; padding: 4px 0 4px clamp(20px,2.2vw,32px); border-left: 3px solid var(--green); color: var(--black); font: 400 clamp(29px,3.1vw,53px)/1.16 var(--bonanovar); }
.course-page .course-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 34px 0; }
.course-page .course-comparison > div { padding: clamp(24px,2.6vw,40px); background: #fff; }
.course-page .course-comparison > div:last-child { background: #e7e8df; }
.course-page .course-comparison span { display: block; margin-bottom: 20px; color: #777; font: 500 11px/1.4 var(--font); letter-spacing: .08em; }
.course-page .course-comparison h3 { margin-bottom: 16px; font-size: clamp(20px,2vw,30px); }
.course-page .course-comparison p { margin: 0; font-size: clamp(15px,1.1vw,18px); }

@media (max-width: 860px) {
  .course-page .course-layout { grid-template-columns: minmax(0,1fr); gap: 30px; padding: 30px 16px 70px; }
  .course-page .course-sidebar { position: sticky; top: 52px; z-index: 20; margin: 0 -16px; padding: 14px 16px; border-bottom: 1px solid var(--border-light); background: var(--paper); }
  .course-page .course-sidebar .course-nav,
  .course-page .course-sidebar .course-sidebar-inner { position: static; display: flex; flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 22px; overflow-x: auto; white-space: nowrap; padding-bottom: 3px; scrollbar-width: none; }
  .course-page .course-sidebar .course-nav::-webkit-scrollbar,
  .course-page .course-sidebar .course-sidebar-inner::-webkit-scrollbar { display: none; }
  .course-page .course-nav-label,
  .course-page .course-sidebar-title { display: none; }
  .course-page .course-sidebar a { flex: 0 0 auto; white-space: nowrap; font-size: 14px; }
  .course-page .course-nav-bottom { flex: 0 0 auto; width: auto; margin: 0; padding: 0 0 0 20px; border-top: 0; border-left: 1px solid var(--border-light); }
  .course-page .course-tiles,
  .course-page .course-comparison { grid-template-columns: 1fr; }
  .course-page .course-copy .course-section { margin-bottom: 52px; padding-bottom: 50px; }
  .course-page .course-copy h2 { font-size: clamp(34px,7vw,52px); }
  .course-page .course-hero-caption { padding: 15px 16px; }
  .course-page .course-program-list > div { grid-template-columns: 34px 1fr; gap: 12px; }
}
@media (max-width: 768px) {
  .course-page .course-hero { min-height: 75svh; }
  .course-page .course-hero-overlay { padding: 100px 6vw 9vw; }
  .course-page h1.course-title { font-size: clamp(36px, 9vw, 64px); }
  .course-page .course-facts { grid-template-columns: 1fr 1fr; }
  .course-page .course-facts > div:last-child { grid-column: span 2; }
}
@media (prefers-reduced-motion: reduce) {
  .course-page .course-sidebar a { transition: none; }
}


/* ═══ Отступы секций: реальная разметка db_course_page содержит
   .course-content-inner, а не .course-copy. Разделы не слипаются. ═══ */
.course-page .course-content-inner > .course-section {
  display: flow-root;
  margin: 0 0 clamp(48px, 6vw, 88px);
  padding: 0 0 clamp(55px, 7vw, 100px);
  border-bottom: 1px solid var(--border-light);
}
.course-page .course-content-inner > .course-section:first-child { margin-top: 0; }
.course-page .course-content-inner > .course-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.course-page .course-content-inner > .course-section > .course-eyebrow {
  display: block;
  margin: 0 0 20px;
  padding: 0;
  color: var(--gray);
  font: 500 12px/1.35 var(--font);
  letter-spacing: .1em;
}
.course-page .course-content-inner > .course-section > h2 {
  margin-top: 0;
}
@media (max-width: 860px) {
  .course-page .course-content-inner > .course-section {
    margin-bottom: 52px;
    padding-bottom: 50px;
  }
}

/* COURSE STATEMENT — единый размер для БМ и курса символов */
.course-page .course-content p.course-statement,
.course-page .course-content blockquote.course-statement,
.course-page .course-content-inner p.course-statement,
.course-page .course-content-inner blockquote.course-statement {
  display: block;
  margin: 35px 0;
  padding: 4px 0 4px clamp(20px, 2.2vw, 32px);
  border-left: 3px solid var(--green, #32cd33);
  color: var(--black, #1a1c23);
  font-family: var(--bonanovar), Georgia, serif;
  font-size: clamp(29px, 3.1vw, 53px);
  font-style: normal;
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: normal;
  max-width: none;
}


/* === SCHOOL: UNDERLINE + HORIZONTAL COURSE STRIP === */
/* На карточке ссылкой является вся поверхность, поэтому подчеркиваем h3 внутри неё. */
#school.school-editorial a.school-course:hover .school-course-title,
#school.school-editorial a.school-course:focus-visible .school-course-title,
#school.school:has(.school-header) .school-card-link:hover .school-card-title,
#school.school:has(.school-header) .school-card-link:focus-visible .school-card-title {
  text-decoration-line: underline;
  text-decoration-color: currentColor;
  text-decoration-style: solid;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-skip-ink: auto;
}
#school.school-editorial .school-slider { position: relative; }
#school.school-editorial .school-slider-viewport {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}
#school.school-editorial .school-slider-viewport::-webkit-scrollbar { display: none; }
#school.school-editorial .school-slider .school-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 3);
  grid-template-columns: none;
  gap: 24px;
  align-items: stretch;
}
#school.school-editorial .school-slider .school-course { scroll-snap-align: start; }
#school.school-editorial .school-slider-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 22px 0 0;
}
#school.school-editorial .school-slider-controls[hidden] { display: none; }
#school.school-editorial .school-slider-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 50%;
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}
#school.school-editorial .school-slider-btn:disabled { opacity: .25; cursor: default; }
#school.school-editorial .school-more-wrap { margin-top: 34px; }
#school.school-editorial .school-more {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font: 500 16px/1.35 var(--font);
}
#school.school-editorial .school-more:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
@media(max-width: 860px) {
  #school.school-editorial .school-slider .school-grid { grid-auto-columns: calc((100% - 20px) / 2); gap:20px; }
}
@media(max-width: 600px) {
  #school.school-editorial .school-slider .school-grid { grid-auto-columns: 85%; gap:16px; }
}
@media(prefers-reduced-motion: reduce) {
  #school.school-editorial .school-slider-viewport { scroll-behavior:auto; }
}
