/*
 * EGE-School course page (design B-course): dark hero with the school row and the price
 * card, «Коротко о курсе», teacher and «О школе», the course text, related course grids
 * and the review prompt. Loaded after page.css (dark hero), schools.css (logo plate) and
 * subject.css (course cards). Values from docs/design/b/B-course-*.dc.html; colours only
 * from base.css tokens.
 */

.es-course {
  padding-bottom: clamp(56px, 7vw, 88px);
}

.es-course [id] {
  scroll-margin-top: 24px;
}

/* ---------- hero ---------- */
.es-course-hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-6);
  padding-top: var(--es-s-6);
  padding-bottom: clamp(32px, 5vw, 56px);
}

.es-course-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
  gap: 40px;
}

.es-course-hero__grid--solo {
  grid-template-columns: minmax(0, 1fr);
}

.es-course-hero__main {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.es-course-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--es-s-2);
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.es-course-hero__tags .es-chip,
.es-course-hero__tags .es-tag--glass {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
}

.es-course-hero__tags .es-chip {
  font-weight: 800;
}

.es-course-hero__title {
  font-size: clamp(24px, 3.4vw, 44px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

/* school row: a pill with the logo, the name link and the rating line */
.es-course-school {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 14px;
  max-width: 100%;
  padding: 10px 20px 10px 10px;
  border-radius: var(--es-r-pill);
  background: color-mix(in srgb, var(--es-white) 8%, transparent);
}

.es-course-school span.es-logo {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--es-r-sm);
  background: var(--es-white);
  font-size: 13px;
}

.es-course-school .es-logo--text {
  background: var(--es-subj-profilnaya-matematika);
}

.es-course-school__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.es-course-school__name {
  color: var(--es-white);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.es-course-school__name:hover {
  color: var(--es-acc);
}

.es-course-school__line {
  color: var(--es-on-dark);
  font-size: 13px;
  line-height: 1.45;
}

.es-course-school__line a {
  color: var(--es-on-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.es-course-school__line a:hover {
  color: var(--es-acc);
}

/* price card */
.es-course-price {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 28px;
  border-radius: var(--es-r-xl);
  background: var(--es-white);
  color: var(--es-ink);
}

.es-course-price__label {
  color: var(--es-muted);
  font-weight: 700;
}

.es-course-price__value {
  font-family: var(--es-font-display);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1;
  overflow-wrap: anywhere;
}

.es-course-price__line {
  font-weight: 700;
  line-height: 1.4;
}

.es-course-price__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.es-course-price__actions .es-btn {
  width: 100%;
  text-align: center;
}

.es-course-price__ad {
  margin: 0;
  color: var(--es-muted);
  font-size: 11px;
  line-height: 1.4;
}

/* ---------- sections ---------- */
.es-course-section {
  padding-top: clamp(40px, 5vw, 64px);
}

.es-course-section__title {
  margin: 0 0 var(--es-s-6);
  color: var(--es-ink);
  font-family: var(--es-font-display);
  font-size: clamp(22px, 1.2rem + 1.2vw, 32px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.es-course-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--es-s-3) 20px;
  margin-bottom: var(--es-s-6);
}

.es-course-section__head .es-course-section__title {
  margin: 0;
}

.es-course-section__more {
  font-weight: 800;
}

/* «Коротко о курсе» */
.es-course-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--es-s-3);
  margin: 0;
}

.es-course-fact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 22px;
  border-radius: var(--es-r-md);
  background: var(--es-white);
}

.es-course-fact dt {
  color: var(--es-muted);
  font-size: 13px;
  font-weight: 700;
}

.es-course-fact dd {
  margin: 0;
  font-family: var(--es-font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.es-course-fact--acc {
  background: var(--es-acc);
}

.es-course-fact--acc dt {
  color: var(--es-ink);
}

/* teacher and «О школе» */
.es-course-duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.es-course-teacher {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-4);
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--es-r-xl);
}

.es-teachers {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.es-teachers__item {
  display: flex;
  align-items: center;
  gap: var(--es-s-4);
}

.es-course-teacher__photo {
  flex: none;
  width: 140px;
  height: 140px;
  overflow: hidden;
  border-radius: 40px;
  background: var(--es-subj-profilnaya-matematika);
}

.es-course-teacher__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.es-course-teacher__text {
  display: flex;
  flex: 1 1 200px;
  flex-direction: column;
  gap: var(--es-s-2);
  min-width: 0;
}

.es-course-teacher__label {
  margin: 0;
  color: var(--es-muted);
  font-family: var(--es-font-text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}

.es-course-teacher__name {
  margin: 0;
  display: block;
  font-family: var(--es-font-display);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.es-course-about {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-3);
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--es-r-xl);
}

.es-course-about__title {
  margin: 0;
  font-family: var(--es-font-display);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.es-course-about__text {
  margin: 0;
  color: var(--es-muted-2);
  font-size: 15px;
  line-height: 1.6;
}

.es-course-about__adv {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.es-course-about__adv .es-mini {
  height: auto;
  min-height: 28px;
  padding-block: 6px;
  line-height: 1.25;
}

.es-course-about__link {
  align-self: flex-start;
  font-weight: 800;
}

.es-course-content {
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--es-r-xl);
}

.es-course-content .es-prose {
  max-width: 760px;
}

/* review prompt */
.es-course-review {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--es-s-8);
  padding: clamp(22px, 4vw, 40px);
  border-radius: 40px;
  background: var(--es-ink);
  color: var(--es-white);
}

.es-course-review__text {
  display: flex;
  flex: 1 1 380px;
  flex-direction: column;
  gap: var(--es-s-3);
  min-width: 0;
}

.es-course-review__title {
  margin: 0;
  color: var(--es-white);
  font-family: var(--es-font-display);
  font-size: clamp(20px, 1.1rem + 1.2vw, 32px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.es-course-review__lead {
  margin: 0;
  color: var(--es-on-dark);
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.55;
}

@media (min-width: 901px) {
  .es-course-duo--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .es-course-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--es-s-6);
  }

  /* B-course-mobile: the price card is yellow */
  .es-course-price {
    padding: 22px;
    border-radius: var(--es-r-lg);
    background: var(--es-acc);
  }

  .es-course-price__label {
    color: var(--es-ink);
  }

  .es-course-price__ad {
    color: var(--es-muted-2);
  }

  .es-course-price .es-course-price__buy {
    background: var(--es-white);
  }

  .es-course-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .es-course-hero__main {
    gap: 14px;
  }

  .es-course-school {
    gap: 12px;
    padding: 8px 16px 8px 8px;
    border-radius: var(--es-r-md);
  }

  .es-course-school span.es-logo {
    width: 40px;
    height: 40px;
    font-size: 12px;
  }

  .es-course-fact {
    gap: 4px;
    padding: 16px;
  }

  .es-course-fact dt {
    font-size: 12px;
  }

  .es-course-fact dd {
    font-size: 16px;
  }

  .es-course-teacher {
    gap: var(--es-s-3);
  }

  .es-tariff__value {
    font-size: 24px;
  }

  .es-course-teacher__photo {
    width: 84px;
    height: 84px;
    border-radius: 26px;
  }

  .es-course-teacher__label {
    font-size: 12px;
  }

  .es-course-review {
    flex-direction: column;
    align-items: stretch;
    gap: var(--es-s-3);
    border-radius: var(--es-r-lg);
  }

  .es-course-review__text {
    flex-basis: auto;
  }
}

.es-course-teacher__info {
  color: var(--es-muted);
  font-size: 14px;
  line-height: 1.4;
}

.es-course-teacher__link {
  font-size: 14px;
  font-weight: 800;
}

/* «Тарифы» */
.es-tariffs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--es-s-3);
}

.es-tariff {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-3);
  min-width: 0;
  padding: clamp(20px, 2.4vw, 28px);
  border-radius: var(--es-r-xl);
}

.es-tariff__name {
  margin: 0;
  font-family: var(--es-font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.es-tariff__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0;
}

.es-tariff__value {
  font-family: var(--es-font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.es-tariff__period,
.es-tariff__installment {
  margin: 0;
  color: var(--es-muted);
  font-size: 14px;
  font-weight: 700;
}

.es-tariff__old {
  color: var(--es-muted);
  font-size: 14px;
}

.es-tariff__features {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.4;
  list-style: none;
}

.es-tariff__features li {
  position: relative;
  padding-left: 22px;
}

.es-tariff__features li::before {
  position: absolute;
  top: 0.55em;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--es-acc);
  box-shadow: 0 0 0 1px var(--es-ink);
  content: "";
}

.es-tariff__buy {
  align-self: flex-start;
  margin-top: auto;
}
