/* Листинг курсов /courses/ — редизайн 2026-08. Классы crs2-* */

/* ---------- Карточка курса (строка) ---------- */
.brxe-block.crs2-card, .crs2-card {
  flex-direction: row;
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 24px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  width: 100%;
  color: #0c0c0c;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.crs2-card:hover { border-color: #0c0c0c; box-shadow: 0 4px 24px rgba(12,12,12,.06); }

.crs2-card__main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.crs2-card__aside .crs2-btn { width: 100%; display: flex; }
.crs2-card__aside {
  flex: 0 0 233px;
  border-left: 1px solid #e5e5ea;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.crs2-card__title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.crs2-card__title-row h3 { flex: 1 1 auto; } .crs2-card__title-row h3, .crs2-card__title-row .brxe-heading { font-family: Nunito, sans-serif; font-weight: 700; font-size: 24px; line-height: 32px; margin: 0; }
.crs2-card__title-row h3 a { color: inherit; text-decoration: none; }
.crs2-card__title-row h3 a:hover { color: #bd5697; }

/* Молнии сложности */
.crs2-dif { display: inline-flex; align-items: center; flex: 0 0 auto; }
.crs2-zap { font-size: 20px; line-height: 1; color: #e5e5ea; }
.crs2-zap--on { color: #0c0c0c; }

/* Бейджи */
.crs2-badges { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.crs2-badge {
  display: inline-flex; align-items: center;
  border-radius: 4px; padding: 4px 8px;
  font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 12px; line-height: 16px;
}
.crs2-badge--subject { color: #fff; background: #8e8e93; }
.crs2-badge--mathematics { background: #00b259; }
.crs2-badge--programming { background: #bd5697; }
.crs2-badge--olympiads { background: #fcaf17; color: #0c0c0c; }
.crs2-badge--goal { background: #e5e5ea; color: #0c0c0c; font-size: 14px; line-height: 20px; padding: 2px 8px; }

/* Мета-строка */
.crs2-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.crs2-meta__item {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 16px; line-height: 24px;
}
.crs2-meta__item i { font-size: 20px; line-height: 1; color: #0c0c0c; }
.crs2-meta__sep { width: 1px; height: 21px; background: #e5e5ea; flex: 0 0 auto; }

/* Описание и доп. строка */
.crs2-desc {
  font-family: 'Nunito Sans', sans-serif; font-size: 16px; line-height: 24px; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.crs2-info { display: inline-flex; align-items: center; gap: 10px; color: #8e8e93; font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 16px; line-height: 24px; }
.crs2-info i { font-size: 20px; }

/* Преподаватели */
.crs2-teachers { display: flex; flex-wrap: wrap; gap: 24px; }
.crs2-teacher { display: inline-flex; align-items: center; gap: 16px; }
.crs2-teacher__img, .crs2-teacher__img--empty {
  width: 64px; height: 64px; border-radius: 999px; object-fit: cover; background: #f5f5f6; display: inline-block;
}
.crs2-teacher__name { font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 16px; line-height: 24px; }

/* Цены и кнопка */
.crs2-price-old { font-family: Nunito, sans-serif; font-weight: 700; font-size: 24px; line-height: 32px; color: #e5e5ea; text-decoration: line-through; }
.crs2-price-row { display: flex; align-items: center; gap: 8px; }
.crs2-price { font-family: Nunito, sans-serif; font-weight: 700; font-size: 24px; line-height: 32px; color: #bd5697; }
.crs2-price-unit { font-family: 'Nunito Sans', sans-serif; font-size: 16px; line-height: 24px; }
.crs2-price-lesson { font-family: 'Nunito Sans', sans-serif; font-size: 14px; line-height: 20px; }

.crs2-btn {
  width: auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #0c0c0c; border-radius: 100px;
  padding: 14px 24px;
  font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 16px; line-height: 24px;
  color: #0c0c0c; background: transparent; text-decoration: none; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.crs2-btn:hover { background: #0c0c0c; color: #fff; }
.crs2-btn--primary { background: #00b259; border-color: #00b259; color: #fff; }
.crs2-btn--primary:hover { background: #009a4d; border-color: #009a4d; color: #fff; }

.crs2-sale {
  background: #e5e5ea; border-radius: 4px; padding: 4px 8px; text-align: center;
  font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 12px; line-height: 16px;
}

/* ---------- Сетка листинга и фильтры ---------- */
.crs2-list { display: flex; flex-direction: column; gap: 24px; width: 100%; }

.crs2-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  padding: 16px 24px; background: #fff; border: 1px solid #e5e5ea; border-radius: 16px; width: 100%;
}
.crs2-filters .crs2-filter-label { font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 16px; }
.crs2-filters select {
  border: 1px solid #e5e5ea; border-radius: 8px; padding: 8px 12px;
  font-family: 'Nunito Sans', sans-serif; font-size: 15px; background: #fff; min-width: 150px;
}
.crs2-filters .brxe-filter-submit button, .crs2-filters button[type="reset"], .crs2-reset button {
  background: none; border: none; color: #8e8e93; font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: underline;
}

/* ---------- Карточки направлений ---------- */
.crs2-dirs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; }
.crs2-dir {
  background: #fff; border: 1px solid #e5e5ea; border-radius: 24px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: #0c0c0c;
  transition: border-color .2s ease;
}
.crs2-dir:hover { border-color: #00b259; }
.crs2-dir--programming:hover { border-color: #bd5697; }
.crs2-dir--olympiads:hover { border-color: #fcaf17; }
.crs2-dir__klass { color: #8e8e93; font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 14px; line-height: 20px; display: flex; align-items: center; gap: 8px; }
.crs2-dir__dot { width: 24px; height: 24px; border-radius: 6px; display: inline-block; }
.crs2-dir--mathematics .crs2-dir__dot { background: #00b259; }
.crs2-dir--programming .crs2-dir__dot { background: #bd5697; }
.crs2-dir--olympiads .crs2-dir__dot { background: #fcaf17; }
.crs2-dir__title { font-family: Nunito, sans-serif; font-weight: 700; font-size: 20px; line-height: 28px; margin: 0; }
.crs2-dir__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.crs2-dir__list li { font-family: 'Nunito Sans', sans-serif; font-size: 15px; line-height: 22px; color: #0c0c0c; display: flex; gap: 8px; align-items: center; }
.crs2-dir__list li::before { content: "•"; color: #8e8e93; }

/* ---------- Общие секции ---------- */
.crs2-h2 { font-family: Nunito, sans-serif; font-weight: 700; font-size: 32px; line-height: 36px; margin: 0; }

/* Пагинация Bricks под макет */
.crs2-pagination, .crs2-pagination .bricks-pagination { width: 100%; }
.crs2-pagination ul { display: flex; gap: 8px; list-style: none; padding: 0; margin: 24px 0 0; justify-content: center; width: 100%; }
.crs2-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; border-radius: 999px; padding: 0 8px;
  font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 15px;
  color: #0c0c0c; background: #fff; border: 1px solid #e5e5ea; text-decoration: none;
}
.crs2-pagination .page-numbers.current { background: #0c0c0c; color: #fff; border-color: #0c0c0c; }
.crs2-pagination .page-numbers:hover { border-color: #0c0c0c; }

/* ---------- Hero ---------- */
.crs2-hero { background: #e5e5ea; position: relative; overflow: hidden; }
.crs2-hero__inner { position: relative; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; padding: 24px 0 48px; }
.crs2-hero__inner > *:not(.crs2-hero__decor) { position: relative; z-index: 1; }
.crs2-hero h1 { font-family: Nunito, sans-serif; font-weight: 800; font-size: 48px; line-height: 48px; margin: 0; max-width: 760px; }
.crs2-hero__sub { font-family: Nunito, sans-serif; font-weight: 700; font-size: 24px; line-height: 32px; margin: 0; max-width: 700px; }
.crs2-hero__btns { display: flex; flex-wrap: wrap; gap: 16px; }
.crs2-hero__decor { position: absolute; right: 0; top: 170px; width: 400px; max-width: 28vw; z-index: 0; pointer-events: none; margin: 0; }
.crs2-hero__decor img { width: 100%; height: auto; }
.crs2-breadcrumbs, .crs2-breadcrumbs a { color: #0c0c0c; font-family: 'Nunito Sans', sans-serif; font-size: 14px; }

/* ---------- Градиентные баннеры ---------- */
.crs2-banner { position: relative; overflow: hidden; border: none; }
.crs2-banner--ege { background: linear-gradient(90deg, #bd5697 0%, #39c2d7 100%); }
.crs2-banner--ege .crs2-banner__media { background: #fff; }
.crs2-banner--ege .crs2-banner__media img { object-fit: contain; }
.crs2-banner--diag { background: linear-gradient(90deg, #00b259 0%, #39c2d7 100%); overflow: visible; }
.brxe-container.crs2-banner__inner, .crs2-banner__inner { position: relative; z-index: 1; display: flex; flex-direction: row; gap: 24px; align-items: center; }
.crs2-banner__text { flex: 1 1 50%; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; padding: 48px 0 64px; }
.crs2-banner__text h2 { color: #fff; }
.crs2-banner__lead { color: #fff; font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 18px; line-height: 28px; margin: 0; }
.crs2-banner__desc { color: #fff; font-family: 'Nunito Sans', sans-serif; font-size: 16px; line-height: 24px; margin: 0; max-width: 481px; }
.crs2-banner__media { flex: 1 1 50%; position: relative; align-self: stretch; min-height: 280px; background: transparent; }
.crs2-banner__media figure, .crs2-banner__media .brxe-image, .crs2-hero__decor, .crs2-hero__decor figure { background: transparent !important; }
.crs2-banner__media figure { position: absolute; inset: 0; margin: 0; }
.crs2-banner__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.crs2-banner__media--diag { overflow: visible; }
.crs2-banner__media--diag figure, .crs2-banner__media--diag { position: relative; height: 100%; }
.crs2-banner__media--diag img { position: absolute; top: -15%; left: 0; width: 100%; height: 130%; object-fit: contain; object-position: center top; z-index: 1; }
.crs2-banner__btn-light { border-color: #fff; color: #fff; width: auto; }
.crs2-banner__btn-light:hover { background: #fff; color: #0c0c0c; }
.crs2-btn--purple { background: #bd5697; border-color: #bd5697; color: #fff; width: auto; }
.crs2-btn--purple:hover { background: #a64784; border-color: #a64784; color: #fff; }
.crs2-sale50 { position: absolute; left: 10%; top: 20%; width: 55%; max-width: 466px; height: auto; }

/* ---------- «Как проходят занятия» ---------- */
.crs2-how { display: flex; gap: 24px; align-items: stretch; width: 100%; }
.crs2-how__media { flex: 0 0 46%; border-radius: 24px; overflow: hidden; background: #f5f5f6; min-height: 371px; display: flex; align-items: center; justify-content: center; padding: 24px; }
.crs2-how__media img { width: 100%; height: auto; max-height: 320px; object-fit: contain; display: block; }
.crs2-how__body { flex: 1; display: flex; flex-direction: column; gap: 24px; justify-content: center; }
.crs2-bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.crs2-bullets li { display: flex; align-items: center; gap: 12px; font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 18px; line-height: 28px; }
.crs2-bullets li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #00b259; flex: 0 0 auto; }

/* ---------- «Почему нас выбирают?» ---------- */
.crs2-why { display: flex; gap: 24px; width: 100%; overflow: hidden; }
.crs2-why__body { flex: 1 1 55%; display: flex; flex-direction: column; gap: 24px; padding: 48px 0; }
.crs2-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.crs2-stat { min-width: 127px; display: flex; flex-direction: column; gap: 4px; }
.crs2-stat__num { font-family: Nunito, sans-serif; font-weight: 700; font-size: 32px; line-height: 36px; }
.crs2-stat__num--purple { color: #bd5697; } .crs2-stat__num--green { color: #00b259; }
.crs2-stat__num--cyan { color: #39c2d7; } .crs2-stat__num--orange { color: #f15a31; }
.crs2-stat__label { font-family: 'Nunito Sans', sans-serif; font-size: 16px; line-height: 24px; }
.crs2-why__collage { flex: 1 1 45%; position: relative; }
.crs2-collage { display: grid; grid-template-columns: repeat(4, 96px); gap: 24px; justify-content: center; align-content: center; height: 100%; padding: 24px 0; }
.crs2-collage__img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #f5f5f6; }
.crs2-collage img:nth-child(odd) { transform: translateY(24px); }

/* ---------- Отзывы ---------- */
.crs2-reviews { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; width: 100%; }
.crs2-review { background: #f5f5f6; border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.crs2-review__obj { align-self: flex-start; background: #fff; border-radius: 8px; padding: 4px 8px; font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 12px; line-height: 16px; color: #bd5697; }
.crs2-review__author { display: flex; align-items: center; gap: 16px; font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 16px; line-height: 24px; }
.crs2-review__author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #fff; }
.crs2-review__text { font-family: 'Nunito Sans', sans-serif; font-size: 15px; line-height: 24px; margin: 0; border-top: 1px solid #e5e5ea; padding-top: 16px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Другие форматы ---------- */
.crs2-formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; }
.crs2-format { background: #fff; border-radius: 24px; padding: 24px; min-height: 420px; display: flex; flex-direction: column; gap: 16px; color: #1c1c1e; text-decoration: none; transition: box-shadow .2s ease; }
.crs2-format:hover { box-shadow: 0 4px 24px rgba(12,12,12,.08); }
.crs2-format h3 { font-family: Nunito, sans-serif; font-weight: 700; font-size: 32px; line-height: 36px; margin: 0; }
.crs2-format p { font-family: 'Nunito Sans', sans-serif; font-size: 16px; line-height: 24px; margin: 0; }
.crs2-format__more { font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 16px; }
.crs2-format__more::after { content: " →"; }
.crs2-format__pic { margin-top: auto; width: 93px; height: 93px; object-fit: contain; align-self: flex-start; }

/* ---------- Тёмная секция «Подобрать группу» ---------- */
.crs2-dark { background: #1c1c1e; }
.brxe-container.crs2-dark__inner, .crs2-dark__inner { display: flex; flex-direction: row; gap: 48px; width: 100%; }
.crs2-dark__left { flex: 1 1 50%; display: flex; flex-direction: column; gap: 32px; }
.crs2-dark h2 { color: #ee2e62; }
.crs2-step h3 { color: #fff; font-family: Nunito, sans-serif; font-weight: 700; font-size: 24px; line-height: 32px; margin: 0 0 8px; }
.crs2-step p { color: #fff; font-family: 'Nunito Sans', sans-serif; font-size: 16px; line-height: 24px; margin: 0; }
.crs2-dark__photo { border-radius: 24px; width: 100%; max-width: 636px; height: auto; object-fit: cover; }
.crs2-dark__form { flex: 1 1 50%; background: transparent; border-radius: 24px; padding: 0; align-self: flex-start; width: 100%; }

/* ---------- FAQ обёртка ---------- */
.crs2-faq .faq_accordion, .crs2-faq { width: 100%; }

/* ---------- Адаптив ---------- */
@media (max-width: 991px) {
  .brxe-block.crs2-card, .crs2-card { flex-direction: column; }
  .crs2-card__main { padding: 24px; }
  .crs2-card__aside .crs2-btn { width: 100%; display: flex; }
.crs2-card__aside { flex-basis: auto; border-left: none; border-top: 1px solid #e5e5ea; }
  .crs2-dirs { grid-template-columns: 1fr; }
  .crs2-hero h1 { font-size: 34px; line-height: 38px; }
  .crs2-hero__sub { font-size: 18px; line-height: 26px; }
  .crs2-hero__decor { display: none; }
  .brxe-container.crs2-banner__inner, .crs2-banner__inner, .crs2-how, .crs2-why, .brxe-container.crs2-dark__inner, .crs2-dark__inner { flex-direction: column; }
  .crs2-banner__media { min-height: 220px; width: 100%; }
  .crs2-how__media { flex-basis: auto; min-height: 240px; }
  .crs2-reviews { grid-template-columns: repeat(2, 1fr); }
  .crs2-formats { grid-template-columns: 1fr; }
  .crs2-format { min-height: 0; }
  .crs2-dark__form { padding: 24px; }
  .crs2-h2 { font-size: 26px; line-height: 32px; }
}
@media (max-width: 640px) {
  .crs2-card__title-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .crs2-filters { padding: 16px; }
  .crs2-filters select { width: 100%; min-width: 0; flex: 1 1 100%; }
  .crs2-reviews { grid-template-columns: 1fr; }
  .crs2-collage { grid-template-columns: repeat(3, 80px); }
  .crs2-collage__img { width: 80px; height: 80px; }
  .crs2-stats { gap: 16px; }
  .crs2-meta__sep { display: none; }
}

/* Bricks figcaption у декоративных картинок не нужен */
.crs2-format__pic .bricks-image-caption, .crs2-banner__media .bricks-image-caption, .crs2-hero__decor + figcaption, figure.crs2-format__pic figcaption { display: none; }

/* ---------- Страница направления ---------- */
.crs2-accent { color: #bd5697; }
.crs2-dir--mathematics .crs2-accent, .crs2-h2 .crs2-accent { color: inherit; }

.crs2-tabs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.crs2-tab {
  border: none; cursor: pointer; border-radius: 48px; padding: 8px 16px;
  background: #e5e5ea; color: #000;
  font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 18px; line-height: 28px;
  transition: background .2s ease, color .2s ease;
}
.crs2-tab:hover { background: #d1d1d6; }
.crs2-tab--active, .crs2-tab[aria-selected="true"] { background: #000; color: #fff; }

.crs2-teacher-panels { position: relative; }
.crs2-teacher-card { display: none; gap: 0; align-items: stretch; background: #fff; border-radius: 24px; overflow: hidden; }
.crs2-teacher-card--active { display: flex; }
.crs2-teacher-card__media { flex: 0 0 300px; background: #f5f5f6; }
.crs2-teacher-card__img { width: 100%; height: 100%; min-height: 360px; display: block; object-fit: cover; }
.crs2-teacher-card__body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 48px 48px 64px; }
.crs2-teacher-card__name { font-family: Nunito, sans-serif; font-weight: 700; font-size: 24px; line-height: 32px; margin: 0; }
.crs2-teacher-card__pos { font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 16px; line-height: 24px; margin: 0; color: #bd5697; }
.crs2-teacher-card__vuz { font-family: 'Nunito Sans', sans-serif; font-size: 15px; line-height: 22px; margin: 0; color: #8e8e93; display: flex; align-items: center; gap: 8px; }
.crs2-teacher-card__resume { font-family: 'Nunito Sans', sans-serif; font-size: 16px; line-height: 24px; }
.crs2-teacher-card__resume p { margin: 0 0 8px; }
.crs2-teacher-card__link { font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 16px; color: #0c0c0c; text-decoration: underline; align-self: flex-start; }

.crs2-dirs--other { grid-template-columns: repeat(2, 1fr); }
.crs2-dirs--other .crs2-dir { position: relative; min-height: 442px; overflow: hidden; padding: 24px; gap: 24px; }
.crs2-dirs--other .crs2-dir__head { display: flex; align-items: center; gap: 16px; }
.crs2-dirs--other .crs2-dir__icon { width: 48px; height: 48px; border-radius: 32px; flex: 0 0 auto; }
.crs2-dir__dot--lg { width: 48px; height: 48px; border-radius: 32px; }
.crs2-dirs--other .crs2-dir__title { font-size: 24px; line-height: 32px; }
.crs2-dirs--other .crs2-dir__illu { position: absolute; left: 24px; bottom: -40px; width: 232px; height: auto; pointer-events: none; }
.crs2-dir__desc { font-family: 'Nunito Sans', sans-serif; font-size: 15px; line-height: 22px; margin: 0; }


@media (max-width: 991px) {
  .crs2-teacher-card { flex-direction: column; }
  .crs2-teacher-card__media { flex-basis: auto; width: 100%; max-width: 320px; }
  .crs2-dirs--other { grid-template-columns: 1fr; }
}
