.course-section {
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 10px);
  padding-bottom: 10px;
  overflow: hidden;
}

.course-section .container {
  height: calc(100vh - var(--header-height) - 16px);

  display: grid;

  grid-template-rows:
    minmax(0, 1fr)
    105px;

  gap: 10px;
}

/* --------------------------------------------------
   HERO
-------------------------------------------------- */

.course-hero {
  min-height: 0;

  display: grid;

  grid-template-columns:
    minmax(520px, 0.9fr)
    minmax(0, 1.1fr);

  gap: 32px;

  align-items: center;
}

.course-hero__content {
  min-width: 0;
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.course-label {
  align-self: flex-start;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin: 0 0 14px;
  padding: 7px 7px;

  border: 3px solid rgba(255, 29, 187, 0.92);
  border-radius: 999px;

  background: rgba(8, 5, 16, 0.58);

  box-shadow:
    0 0 18px rgba(255, 29, 187, 0.22),
    inset 0 0 12px rgba(131, 56, 255, 0.10);

  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.course-title {
  max-width: 700px;

  margin: 0 0 5px;

  font-size: clamp(48px, 3.35vw, 64px);
  line-height: 0.92;
}

.course-title span {
  display: block;

  background: var(--gradient-primary);
  background-clip: text;

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.course-description {
  max-width: 590px;

  margin: 10px 0 14px;

  font-size: 15px;
  line-height: 1.35;

  color: var(--color-text-muted);
}

.course-hero .button {
  min-height: 46px;
  padding: 0 28px;
}

.course-cta {
  width: 100%;
  max-width: 590px;

  display: flex;
  justify-content: center;

  margin: 6px auto 8px;
}

.course-cta .button {
  min-width: 330px;
  min-height: 44px;
}


/* --------------------------------------------------
   HERO COLLAGE
-------------------------------------------------- */

.course-hero__visual {
  position: relative;

  width: 100%;
  height: 100%;

  min-width: 0;
  min-height: 0;

  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-collage {
  width: 100%;

  /*
   * The collage now scales proportionally as one composition.
   * This prevents 4K layouts from stretching the cards vertically
   * and cropping image content more aggressively.
   */
  aspect-ratio: 1.72 / 1;
  height: auto;

  display: grid;

  grid-template-columns: repeat(12, minmax(0, 1fr));

  grid-template-rows:
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(0, 0.78fr);

  gap: clamp(10px, 0.8vw, 14px);
}

.hero-card {
  position: relative;

  min-width: 0;
  min-height: 0;

  overflow: hidden;

  border:
    1px solid
    rgba(255, 29, 187, 0.55);

  border-radius: clamp(14px, 1vw, 20px);

  background:
    linear-gradient(
      145deg,
      rgba(16, 8, 25, 0.94),
      rgba(6, 4, 13, 0.96)
    );

  box-shadow:
    0 0 24px rgba(255, 29, 187, 0.12),
    inset 0 0 24px rgba(131, 56, 255, 0.05);
}

.hero-card::after {
  content: "";

  position: absolute;
  inset: 0;

  pointer-events: none;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.03),
      transparent 30%
    );
}

.hero-card img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

.hero-card--main {
  /* Card 1 — main portrait */
  grid-column: 1 / 8;
  grid-row: 1 / 3;
}

.hero-card--top {
  /* Card 3 — upper-right */
  grid-column: 8 / 13;
  grid-row: 1;
}

.hero-card--middle {
  /* Card 4 — middle-right */
  grid-column: 8 / 13;
  grid-row: 2;
}

.hero-card--bottom-left {
  /*
   * Card 2 — narrower than the main portrait and shifted
   * slightly to the right, as in the original design.
   */
  grid-column: 2 / 7;
  grid-row: 3;
}

.hero-card--text {
  /* Card 5 — bottom-right */
  grid-column: 7 / 13;
  grid-row: 3;

  padding: 0;
  display: block;

  background:
    linear-gradient(
      145deg,
      rgba(16, 8, 25, 0.94),
      rgba(6, 4, 13, 0.96)
    );
}







/* --------------------------------------------------
   MOBILE CAROUSEL
-------------------------------------------------- */

.course-carousel {
  display: none;
}

/* --------------------------------------------------
   STATIC COURSE FEATURE CARDS
-------------------------------------------------- */

.course-features-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));

  gap: 10px;

  margin-top: 0;

  flex-shrink: 0;
}

.course-feature-card {
  min-height: 118px;

  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;

  padding: 14px 16px;

  text-align: left;

  border: 2px solid var(--border-neon);
  border-radius: var(--radius-md);

  background:
    linear-gradient(
      145deg,
      rgba(10, 7, 19, 0.98),
      rgba(5, 4, 12, 0.98)
    );

  box-shadow:
    0 0 18px rgba(255, 29, 187, 0.14),
    inset 0 0 20px rgba(131, 56, 255, 0.04);
}

.course-feature-card h3 {
  margin: 0 0 8px;

  font-size: 13px;
  line-height: 1.15;
  font-weight: 800;
  text-align: center;

  color: #ffffff;
}

.course-feature-card strong {
  display: block;

  margin: 0 0 5px;

  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
  text-align: left;

  color: #ffffff;
}

.course-feature-card p {
  max-width: 100%;

  margin: 0;

  font-size: 10px;
  line-height: 1.25;
  text-align: left;

  color: #ffffff;
}

.course-feature-card--advantages p + p {
  margin-top: 4px;
}



/* --------------------------------------------------
   TABLET
-------------------------------------------------- */

@media (max-width: 1199px) {
  .course-hero {
    grid-template-columns:
      minmax(420px, 0.92fr)
      minmax(0, 1.08fr);

    gap: 22px;
  }

  .hero-collage {
    height: min(54vh, 560px);
  }

  .course-title {
    font-size: clamp(44px, 5vw, 58px);
  }

  .course-features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* --------------------------------------------------
   MOBILE
-------------------------------------------------- */

@media (max-width: 767px) {
  .course-section {
    min-height: auto;
    overflow: visible;
  }

  .course-section .container {
    height: auto;
    display: block;
  }

  .course-hero {
    display: block;
  }

  .course-hero__content {
    width: 100%;
  }

  .course-hero__visual {
    display: none;
  }

  .course-carousel {
    display: block;
  }

  .course-title {
    font-size: clamp(40px, 12vw, 58px);
  }

  .course-description {
    max-width: none;
  }

  .course-cta,
  .course-advantages {
    max-width: none;
  }

  .course-advantages__title {
    text-align: center;
  }

  .course-benefits {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .course-benefit:not(:last-child)::after {
    display: none;
  }

  .course-features-grid {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .course-feature-card {
    min-height: 130px;
  }
}


/* --------------------------------------------------
   HERO MICRO UI — LARGE DESKTOP
-------------------------------------------------- */

@media (min-width: 1600px) {
  .course-label {
    padding: 8px 22px;
    font-size: 15px;
  }

  .course-advantages {
    max-width: 620px;
  }

  .course-benefits {
    font-size: 13px;
  }

  .course-benefit svg {
    width: 28px;
    height: 28px;
  }
}

@media (min-width: 2200px) {
  .course-label {
    margin-bottom: 18px;
    padding: 9px 26px;
    font-size: 17px;
  }

  .course-advantages {
    max-width: 700px;
    margin-top: 18px;
  }

  .course-advantages__title {
    margin-bottom: 9px;
    font-size: 15px;
  }

  .course-benefits {
    font-size: 15px;
  }

  .course-benefit {
    min-height: 48px;
    gap: 12px;
  }

  .course-benefit svg {
    width: 32px;
    height: 32px;
  }

  .course-feature-card {
    padding: 18px 20px;
  }

  .course-feature-card h3 {
    font-size: 17px;
  }

  .course-feature-card strong {
    font-size: 16px;
  }

  .course-feature-card p {
    font-size: 14px;
  }
}
