/* =========================================
   КУРС PAGE
   ========================================= */

/* ---- HERO ---- */
/* Opens full screen, like the home page */
.course-hero {
  position: relative;
  height: calc(100vh - var(--header-h) - var(--adminbar));
  height: calc(100svh - var(--header-h) - var(--adminbar));
  min-height: 560px;
  margin-top: var(--header-h);
  overflow: hidden;
}

.course-hero__bg {
  position: absolute;
  inset: 0;
}

.course-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Figma (741px high): label top 110, title 337, subtitle 545 — kept as % of the
   full-screen height. Text starts 100px from the left edge like other titles. */
.course-hero__content {
  position: absolute;
  inset: 0;
  padding: 0 100px;
}

.course-hero__label {
  position: absolute;
  left: 100px;
  top: 14.8%;
  font-family: 'FC Display', Impact, 'Arial Narrow', Arial, sans-serif;
  font-size: 65px;
  font-weight: 400;
  letter-spacing: -1.3px;
  line-height: 1.044;
  text-transform: uppercase;
  color: #181818;
  margin: 0;
}

/* title + subtitle move together (subtitle 20px under the title) */
.course-hero__titles {
  position: absolute;
  left: 100px;
  top: min(45.5%, calc(100% - 384px));
}

.course-hero__title-big {
  font-family: 'FC Display', Impact, 'Arial Narrow', Arial, sans-serif;
  font-size: 90px;
  font-weight: 400;
  letter-spacing: -1.8px;
  line-height: 1.044;
  text-transform: uppercase;
  color: #181818;
  margin: 0;
  max-width: 713px;
}

.course-hero__subtitle {
  margin-top: 20px !important;
  font-family: 'FC Display', Impact, 'Arial Narrow', Arial, sans-serif;
  font-size: 65px;
  font-weight: 400;
  letter-spacing: -1.3px;
  line-height: 1.044;
  text-transform: uppercase;
  color: #181818;
  margin: 0;
}

/* ---- О КУРСЕ ---- */
.course-about {
  background: #fff;
  padding-bottom: 64px;
}

.course-about .section-title {
  padding-top: 70px;
  margin-bottom: 60px;
}

.course-about__body {
  display: flex;
  gap: 120px;
  align-items: flex-start;
  margin-bottom: 0;
}

.course-about__left {
  flex: 0 0 397px;
}

.course-about__left p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  line-height: 1.13055;
  color: #181818;
  margin: 0;
}

.course-about__left p:last-child {
  margin-bottom: 0;
}

.course-about__right {
  flex: 1;
  min-width: 0;
}

/* Info boxes: 2-col grid — same 20px gap between rows, columns and the teacher card */
.course-info-boxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.course-info-box {
  background: #434345;
  border-radius: 20px;
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 20px 0 30px;
  gap: 25px;
}

.course-info-box__icon {
  width: 64px;
  height: 54px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* icons are drawn on equal 128×108 canvases, so they all look the same size */
.course-info-box__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.course-info-box__text {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  color: #fff;
  line-height: 23px;
}

/* Teacher card */
.course-teacher {
  background: #434345;
  border-radius: 18px;
  display: flex;
  align-items: center;
  padding: 20px 25px 20px 68px;
  gap: 50px;
  margin-top: 20px;
  min-height: 190px;
}

.course-teacher__photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.course-teacher__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.course-teacher__info {
  display: flex;
  flex-direction: column;
}

.course-teacher__role {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 10px;
}

.course-teacher__name {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 37px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.course-teacher__desc {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #fff;
  line-height: 1.3;
}

/* Who is this course for */
.course-who {
  margin-top: 50px;
  margin-bottom: 60px;
}

.course-who__title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #181818;
  margin: 0 0 30px;
  line-height: 1.3;
}

.course-who__items {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 22px;
}

.course-who__item {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  line-height: 29px;
  color: #181818;
}

.course-who__item img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Skills */
.course-skills__title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #181818;
  margin: 0 0 30px;
  line-height: 1.3;
}

.course-skills__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.course-skills__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  color: #181818;
  line-height: 25px;
}

.course-skills__item img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin: 3px 0 -2px;
}

/* ---- ЭТАПЫ ОБУЧЕНИЯ ---- */
.course-stages {
  background: #434345;
  padding: 70px 0 30px;
}

.course-stages .section-title {
  margin-bottom: 70px;
}

.course-stages__layout {
  padding: 0 100px;
  box-sizing: border-box;
}

.course-stages__above,
.course-stages__below {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}

.course-stages__above .course-stage-box {
  padding-bottom: 19px;
  text-align: center;
}

.course-stages__below .course-stage-box {
  padding-top: 54px;
  text-align: center;
}

/* Timeline line with dots */
.course-stages__line {
  position: relative;
  height: 14px;
  display: flex;
  align-items: center;
}

/* same solid 2px white line as "Процесс работы" on the home page */
.course-stages__line::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: #fff;
  transform: translateY(-50%);
}

.course-stages__dots {
  position: relative;
  width: 100%;
  height: 14px;
}

.course-stage-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.course-stage-dot:nth-child(1) { left: calc(100% / 6); }
.course-stage-dot:nth-child(2) { left: 50%; }
.course-stage-dot:nth-child(3) { left: calc(100% * 5 / 6); }

.course-stage__title {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 28px;
  color: #fff;
  margin-bottom: 11px;
  text-transform: uppercase;
}

.course-stage__desc {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  color: #fff;
  line-height: 23px;
  margin: 0;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- ПРОГРАММА КУРСА ---- */
.course-program {
  background: #fff;
  padding-bottom: 30px;
}

.course-program .section-title {
  padding-top: 70px;
  margin-bottom: 61px;
}

.course-program__list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.course-program__section {
  display: flex;
  flex-direction: column;
}

.course-program__heading {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: #181818;
  margin: 0 0 4px;
  line-height: 25px;
}

.course-program__items p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: #181818;
  margin: 0 0 4px;
  line-height: 25px;
  padding-left: 30px;
}

@media (min-width: 1101px) {
  /* Figma 397 | 120 | 642 of 1230 — grows proportionally on wide screens */
  .course-about__body {
    gap: calc(120 / 1230 * 100%);
  }

  .course-about__left {
    flex: 0 1 calc(397 / 1230 * 100%);
  }

  .course-about__right {
    flex: 0 1 calc(642 / 1230 * 100%);
    max-width: 900px;
  }

  .course-about__left {
    padding-top: 10px;
  }

  .course-who {
    margin-top: -16px;
  }

  .course-stages__above,
  .course-stages__below {
    grid-template-columns: minmax(0, 484fr) minmax(0, 260fr) minmax(0, 486fr);
  }

  .course-stage__desc {
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .course-stages__above .course-stage-box:first-child .course-stage__desc { width: 378px; }
  .course-stages__above .course-stage-box:last-child .course-stage__desc { width: 489px; }
  .course-stages__below .course-stage__desc { width: 439px; }

  .course-stage-dot:nth-child(1) { left: calc(242 / 1230 * 100%); }
  .course-stage-dot:nth-child(2) { left: calc(614 / 1230 * 100%); }
  .course-stage-dot:nth-child(3) { left: calc(986 / 1230 * 100%); }
}

@media (max-width: 1100px) {
  .course-about__body {
    gap: 40px;
  }

  .course-about__left {
    flex: 0 0 35%;
  }

  .course-info-box {
    padding: 0 15px;
    gap: 15px;
  }

  .course-teacher {
    padding-left: 25px;
    gap: 25px;
  }
}

/* =========================================
   MOBILE ≤768px
   ========================================= */
@media (max-width: 768px) {
  /* full screen like the home page; the picture is cropped on the right so the
     white part with the titles stays visible */
  .course-hero {
    min-height: 520px;
  }

  .course-hero__bg img {
    object-position: 38% center;
  }

  .course-hero__label {
    left: 20px;
    top: 9%;
    font-size: clamp(32px, 10vw, 48px);
  }

  .course-hero__titles {
    left: 20px;
    right: 20px;
    top: min(34%, calc(100% - 330px));
  }

  /* "ГЕНЕРАЛЬНЫЙ" / "ПЛАН" on separate lines, big and bold like on desktop */
  .course-hero__title-big {
    width: min-content;
    max-width: none;
    font-size: clamp(44px, 14.5vw, 76px);
  }

  .course-hero__subtitle {
    font-size: clamp(32px, 10vw, 52px);
  }

  .course-about .section-title {
    padding-top: 40px;
    margin-bottom: 30px;
  }

  .course-about__body {
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
  }

  .course-about__left {
    flex: none;
    width: 100%;
  }

  .course-about__left p {
    font-size: 18px;
  }

  .course-info-boxes {
    gap: 10px;
  }

  .course-info-box {
    height: auto;
    min-height: 70px;
    padding: 12px 15px;
  }

  .course-info-box__icon {
    width: 44px;
    height: 40px;
  }

  .course-info-box__text {
    font-size: 16px;
  }

  .course-teacher {
    padding: 15px;
    gap: 15px;
  }

  .course-teacher__photo {
    width: 100px;
    height: 100px;
  }

  .course-teacher__name {
    font-size: 26px;
  }

  .course-teacher__role,
  .course-teacher__desc {
    font-size: 16px;
  }

  .course-who {
    margin-top: 0;
    margin-bottom: 40px;
  }

  .course-who__title,
  .course-skills__title {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .course-skills__item {
    line-height: 22px;
  }

  .course-skills__item img {
    margin: 0;
  }

  .course-program__heading,
  .course-program__items p {
    line-height: 22px;
  }

  .course-who__item,
  .course-skills__item {
    font-size: 16px;
  }

  .course-stages {
    padding: 50px 0 60px;
  }

  /* stages in order 01 → 02 → 03, with the same left line as "Процесс работы" */
  .course-stages__layout {
    display: flex;
    flex-direction: column;
    padding: 0 20px;
  }

  .course-stages__above,
  .course-stages__below {
    display: contents;
  }

  .course-stages__above .course-stage-spacer,
  .course-stages__below .course-stage-spacer,
  .course-stages__line {
    display: none;
  }

  .course-stages__above .course-stage-box,
  .course-stages__below .course-stage-box {
    padding: 18px 0 18px 20px;
    margin-bottom: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.35);
    text-align: left;
  }

  .course-stages__above .course-stage-box:first-child { order: 1; }
  .course-stages__below .course-stage-box             { order: 2; }
  .course-stages__above .course-stage-box:last-child  { order: 3; }

  .course-stage__title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .course-stage__desc {
    font-size: 16px;
    width: auto !important;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    transform: none;
    text-align: left;
  }

  .course-program .section-title {
    padding-top: 40px;
    margin-bottom: 30px;
  }

  .course-program__heading {
    font-size: 18px;
  }

  .course-program__items p {
    font-size: 16px;
    padding-left: 15px;
  }
}

@media (max-width: 480px) {
  .course-info-boxes {
    grid-template-columns: 1fr;
  }
}
