/* Home page sections below the first viewport. */
/* Benefits */
.benefits__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .benefits__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.benefit-card {
  position: relative;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 20px;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  gap: 8px 12px;
  overflow: hidden;
}

@media (min-width: 600px) {
  .benefit-card {
    border-radius: 32px;
    padding: 24px 24px 24px 28px;
    min-height: 228px;
  }
}

.benefit-card__num {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue), #0d6ebd);
  box-shadow: 0 6px 14px rgba(25, 145, 231, 0.35);
}

.benefit-card__num span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 28px;
  color: var(--white);
  line-height: 1;
}

.benefit-card__text {
  grid-column: 1;
  grid-row: 2;
  max-width: 320px;
}

.benefit-card__title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.31;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.benefit-card__text p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--grey-900);
}

.benefit-card .media-frame {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  justify-self: end;
}

.benefit-card__img {
  object-fit: contain;
  max-height: 200px;
  width: auto;
  display: block;
}

/* Banner-card (трофей) — 5-я карточка в benefits */
.benefit-card--banner {
  background: linear-gradient(135deg, #fff7e8 0%, #fff0d2 100%);
  border: 1px solid rgba(248, 136, 0, 0.18);
  /* Override base .benefit-card grid: иконка слева, текст справа */
  grid-template-columns: auto 1fr !important;
  grid-template-rows: auto !important;
  align-items: center;
  gap: 18px;
}

.benefit-card--banner .benefit-card__banner-icon {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit-card--banner .benefit-card__banner-icon img {
  /* +15% от прежних 110px = 126px */
  width: clamp(95px, 28vw, 126px);
  height: auto;
  display: block;
}

.benefit-card--banner .benefit-card__text {
  grid-column: 2 !important;
  grid-row: 1 !important;
  max-width: none;
}

.benefit-card--banner .benefit-card__title {
  color: #6d3a00;
}

.benefit-card--banner .benefit-card__text strong {
  color: var(--orange);
}

@media (min-width: 900px) {
  .benefit-card--banner {
    grid-column: 1 / -1;
    padding: 24px 34px;
    gap: 28px;
  }

  .benefit-card--banner .benefit-card__banner-icon img {
    /* Увеличенный кубок: было 140px, теперь +15% = 161px */
    width: 161px;
  }
}

.benefit-card__img--tall {
  max-height: 160px;
}

/* Мобильная версия (≤767px): убираем все картинки из блока преимуществ
   (включая кубок в banner-карточке). Карточки делаем компактнее. */
@media (max-width: 767px) {
  .benefit-card .media-frame,
  .benefit-card--banner .benefit-card__banner-icon {
    display: none !important;
  }

  .benefit-card {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    min-height: 0;
    padding: 14px 16px;
    gap: 8px;
    border-radius: 20px;
  }

  /* Banner-карточка (5-я, с кубком) — без кубка, в одну строку, только текст */
  .benefit-card--banner {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    padding: 14px 16px;
    gap: 0;
  }

  .benefit-card--banner .benefit-card__text {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .benefit-card__num {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 38px;
    height: 38px;
    box-shadow: 0 4px 10px rgba(25, 145, 231, 0.3);
  }

  .benefit-card__num span {
    font-size: 20px;
  }

  .benefit-card__text {
    grid-column: 1 !important;
    grid-row: 2 !important;
    max-width: none;
  }

  .benefit-card--banner .benefit-card__text {
    max-width: none;
  }

  .benefit-card__title {
    margin-bottom: 6px;
    font-size: 15px;
    letter-spacing: 0.04em;
    line-height: 1.25;
  }

  .benefit-card__text p {
    font-size: 14px;
    line-height: 1.4;
  }
}

.benefits__banner {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 32px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 20px 28px 20px 20px;
}

.benefits__banner-icon {
  flex-shrink: 0;
  margin-top: -24px;
}

.benefits__banner-icon-img {
  width: min(140px, 28vw);
  height: auto;
  display: block;
}

.benefits__banner-copy {
  flex: 1;
  min-width: 240px;
}

.benefits__banner-title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.31;
  text-transform: uppercase;
}

.benefits__banner-text {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.benefits__banner-text strong {
  color: var(--blue);
  font-weight: 700;
}

/* ====================================================================
   DevSection — «С нами ребята развиваются с нескольких сторон»
   Заменяет старый .benefits-блок. Desktop: grid 2×2 + широкая карточка.
   Mobile: горизонтальная карусель с точками.
   ==================================================================== */

/* Заголовок секции */
.dev-section__title {
  font-size: clamp(26px, 3.8vw, 44px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-align: center;
  color: var(--grey-800);
  max-width: 720px;
  margin: 0 auto 36px;
}

@media (min-width: 600px) {
  .dev-section__title { margin-bottom: 40px; }
}

/* ── Desktop grid (≥768px) ── */
.dev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

/* Базовая карточка */
.dev-card {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: #e8f0fe;
  box-shadow:
    0 8px 32px -8px rgba(25, 66, 132, 0.20),
    0 2px 8px rgba(0, 0, 0, 0.06);
  aspect-ratio: 2 / 1;
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

@media (hover: hover) {
  .dev-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
      0 16px 36px rgba(10, 20, 60, 0.18),
      0 2px 8px rgba(0, 0, 0, 0.06);
  }
}

/* Широкая карточка (5-я) — desktop */
.dev-card--banner {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  min-height: 200px;
  background-image: image-set(
  url('/assets/five.webp') type("image/webp"),
  url('/assets/five.png') type("image/png")
);;
  background-size: cover;
  background-position: center right;
}

/* Полупрозрачный overlay слева — защищает текст, не трогает иллюстрацию справа */
.dev-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.86) 0%,
    rgba(255, 255, 255, 0.62) 42%,
    rgba(255, 255, 255, 0.00) 68%
  );
  pointer-events: none;
  z-index: 1;
}

.dev-card__overlay--banner {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.92) 42%,
    rgba(255, 255, 255, 0.58) 62%,
    rgba(255, 255, 255, 0.08) 82%,
    rgba(255, 255, 255, 0.00) 100%
  );
}

/* Текстовый блок */
.dev-card__content {
  position: relative;
  z-index: 2;
  padding: 28px 28px 30px;
  width: 52%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dev-card__content--banner {
  width: 50%;
}

/* Desktop banner: текст правее — в промежутке между кубком и графиком */
.dev-grid .dev-card--banner .dev-card__content--banner {
  margin-left: 375px;
  width: auto;
  max-width: 420px;
}


/* Заголовок карточек 1–4: отступ сверху чтобы не наезжать на номер из фона */
.dev-card__title {
  font-size: clamp(15px, 1.65vw, 21px);
  font-weight: 900;
  line-height: 1.07;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0a0f2e;
  margin: 0 0 10px;
  white-space: pre-line;
}

/* Карточка 5 (кубок) — номерного бейджа нет */
.dev-card__title--banner {
  margin-top: 30px;
  font-size: clamp(16px, 1.85vw, 24px);
}

.dev-card__desc {
  font-size: clamp(12px, 1.05vw, 14px);
  line-height: 1.47;
  color: var(--grey-900);
  margin: 0;
}

/* Выделение слова «Программист» */
.dev-accent {
  color: var(--blue);
  font-weight: 700;
}

/* Номерной бейдж — карточки 1–4 (стиль как в lessons-card__num) */
.dev-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(180deg, #33a8f5 0%, #1991e7 100%);
  box-shadow: 0 8px 20px rgba(25, 145, 231, 0.28);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

/* ── Desktop: mobile-only элементы скрыты ── */
.dev-carousel       { display: none; }
.dev-carousel__dots { display: none; }

/* ── Mobile ≤767px ── */
@media (max-width: 767px) {
  /* Desktop grid — скрыт */
  .dev-grid { display: none; }

  /* Карусель */
  .dev-carousel {
    --card-width: min(90vw, 420px);
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left:  -16px;
    margin-right: -16px;
    padding-left:  calc((100vw - var(--card-width)) / 2);
    padding-right: calc((100vw - var(--card-width)) / 2);
    scroll-padding-left:  calc((100vw - var(--card-width)) / 2);
    scroll-padding-right: calc((100vw - var(--card-width)) / 2);
    padding-block: 4px 10px;
  }
  .dev-carousel::-webkit-scrollbar { display: none; }

  @media (min-width: 600px) {
    .dev-carousel {
      margin-left:  -24px;
      margin-right: -24px;
    }
  }

  /* Overlay плотнее на мобилке — защищает текст до 65% ширины */
  .dev-card--mob .dev-card__overlay {
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.94) 0%,
      rgba(255, 255, 255, 0.84) 48%,
      rgba(255, 255, 255, 0.20) 70%,
      rgba(255, 255, 255, 0.00) 88%
    );
  }

  /* Карточки — более прямоугольные (~1.4:1) */
  .dev-card--mob {
    flex: 0 0 var(--card-width);
    scroll-snap-align: center;
    aspect-ratio: auto;
    height: clamp(260px, 67vw, 300px);
    border-radius: 26px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center right;
  }

  /* Номерной бейдж — абсолютно, brand-голубой */
  .dev-card--mob .dev-card__num {
    position: absolute;
    top: 18px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 0;
    display: flex;
  }

  /* Текстовый блок — 57% ширины, иллюстрация получает 43% */
  .dev-card--mob .dev-card__content {
    position: relative;
    z-index: 2;
    width: 57%;
    max-width: 57%;
    padding: 20px 8px 16px 20px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  /* Заголовок: margin-top под бейдж */
  .dev-card--mob .dev-card__title {
    font-size: clamp(14px, 4vw, 18px);
    margin: 60px 0 6px;
    line-height: 1.02;
    letter-spacing: -0.02em;
    white-space: pre-line;
  }

  /* Описание — без обрезания */
  .dev-card--mob .dev-card__desc {
    font-size: clamp(12px, 3.3vw, 14px);
    line-height: 1.38;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    text-overflow: initial;
    -webkit-box-orient: initial;
    margin: 0;
  }

  /* 5-я карточка — cover фон five_mob.png */
  .dev-card--banner-mob {
    background-image: image-set(
  url('/assets/five_mob.webp') type("image/webp"),
  url('/assets/five_mob.png') type("image/png")
);;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 68% center;
    height: clamp(300px, 72vw, 340px);
  }

  /* Контент пятой карточки — текст слева */
  .dev-card--mob.dev-card--banner-mob .dev-card__content {
    position: relative;
    z-index: 2;
    width: 54%;
    max-width: 54%;
    height: 100%;
    padding: 28px 18px 24px 24px;
    box-sizing: border-box;
  }

  /* Заголовок пятой карточки */
  .dev-card--mob.dev-card--banner-mob .dev-card__title {
    margin-top: 0;
    font-size: clamp(15px, 4.2vw, 19px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #080a3d;
    word-break: normal;
    overflow-wrap: normal;
    white-space: pre-line;
  }

  /* Описание пятой карточки */
  .dev-card--mob.dev-card--banner-mob .dev-card__desc {
    display: block;
    overflow: visible;
    text-overflow: initial;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-height: none;
    margin-top: 12px;
    font-size: clamp(12px, 3.2vw, 13.5px);
    line-height: 1.35;
    color: #30323f;
  }

  /* Точки-индикаторы */
  .dev-carousel__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 18px;
  }

  .dev-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0d5e8;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: width 0.22s ease, background 0.22s ease, border-radius 0.22s ease;
  }

  .dev-carousel__dot--active {
    background: var(--blue);
    width: 22px;
    border-radius: 4px;
  }
}

/* ≤374px */
@media (max-width: 374px) {
  .dev-card--mob {
    height: clamp(265px, 70vw, 290px);
  }

  .dev-card--mob .dev-card__content {
    width: 59%;
    max-width: 59%;
    padding: 18px 6px 14px 18px;
  }

  .dev-card--mob .dev-card__title {
    font-size: 13px;
    margin: 56px 0 5px;
  }

  .dev-card--mob .dev-card__desc {
    font-size: 11.5px;
    line-height: 1.35;
  }

  .dev-card--mob.dev-card--banner-mob {
    height: 350px;
  }

  .dev-card--mob.dev-card--banner-mob .dev-card__content {
    width: 58%;
    max-width: 58%;
    padding: 24px 16px 22px 22px;
  }
}

/* «Как проходит обучение» — карусель иллюстраций */
.learning-carousel__root {
  position: relative;
  padding: 0 clamp(40px, 6vw, 52px);
  max-width: min(920px, 100%);
  margin-inline: auto;
}

.learning-carousel__stage {
  position: relative;
}

.learning-carousel__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: clamp(16px, 2.4vw, 22px);
  background: #f0f4fc;
  border: 1px solid rgba(25, 145, 231, 0.18);
  box-shadow: var(--shadow-card);
  aspect-ratio: 16 / 9;
}

.learning-carousel__track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.learning-carousel__slide {
  flex-shrink: 0;
  height: 100%;
}

.learning-carousel__frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.learning-carousel__frame--empty {
  background: linear-gradient(135deg, rgba(25, 145, 231, 0.12) 0%, rgba(157, 92, 192, 0.08) 100%);
  border: 1px dashed rgba(25, 145, 231, 0.25);
}

.learning-carousel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #0a1f33;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.learning-carousel__img--visible {
  opacity: 1;
}

.learning-carousel__skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.5) 0%, rgba(25, 145, 231, 0.12) 45%, rgba(255, 255, 255, 0.35) 100%);
  animation: learning-carousel-shimmer 1.4s ease-in-out infinite;
}

@keyframes learning-carousel-shimmer {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.learning-carousel__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: #0c2a44;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.learning-carousel__nav:hover {
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transform: scale(1.04);
}

.learning-carousel__nav:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.learning-carousel__nav--prev {
  left: 0;
}

.learning-carousel__nav--next {
  right: 0;
}

.learning-carousel__caption {
  margin-top: clamp(16px, 2.5vw, 22px);
  padding: 16px 18px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(25, 145, 231, 0.1);
}

@media (min-width: 600px) {
  .learning-carousel__caption {
    border-radius: 20px;
    padding: 18px 22px;
  }
}

.learning-carousel__badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--blue);
  margin-bottom: 8px;
}

.learning-carousel__badge--blue {
  background: var(--blue);
}

.learning-carousel__badge--orange {
  background: var(--orange);
}

.learning-carousel__badge--green {
  background: var(--lime-soft);
  color: #1a2e0d;
}

.learning-carousel__badge--purple {
  background: var(--purple);
}

.learning-carousel__caption-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--grey-900);
}

.learning-carousel__caption-text {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--grey-900);
  line-height: 1.5;
  opacity: 0.9;
}

.learning-carousel__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(14px, 2.2vw, 20px);
}

.learning-carousel__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(56, 55, 55, 0.22);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.learning-carousel__dot:hover {
  background: rgba(56, 55, 55, 0.38);
}

.learning-carousel__dot.is-active {
  background: var(--blue);
  transform: scale(1.15);
}

.learning-carousel__dot:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .learning-carousel__track {
    transition: none;
  }

  .learning-carousel__skeleton {
    animation: none;
  }

  .learning-carousel__img {
    transition: none;
  }

  .learning-carousel__nav:hover {
    transform: none;
  }
}
/* ============================================================
   ATMOSPHERE — реальные фотографии занятий и мероприятий
   ============================================================ */
.atmosphere {
  position: relative;
  overflow: hidden;
  padding: clamp(58px, 7vw, 88px) 0;
  background: var(--white);
}

@media (min-width: 1024px) {
  .atmosphere {
    padding-bottom: calc(clamp(58px, 7vw, 88px) - 30px);
  }
}

.atmosphere::before,
.atmosphere::after {
  display: none;
}

.atmosphere::before {
  top: -115px;
  left: -75px;
}

.atmosphere::after {
  right: -95px;
  bottom: -120px;
}

.atmosphere .container {
  position: relative;
  z-index: 1;
}

.atmosphere__heading {
  display: block;
  text-align: center;
  margin-bottom: clamp(26px, 3.4vw, 40px);
}

.atmosphere__title {
  margin: 0;
  text-align: center;
}

.atmosphere__subtitle {
  max-width: 590px;
  margin: 12px auto 0;
  font-size: clamp(15px, 1.65vw, 19px);
  font-weight: 500;
  line-height: 1.48;
  text-align: center;
  color: #57718a;
}

.atmosphere__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.3vw, 28px);
}

.atmosphere-card {
  min-width: 0;
  padding: 12px 12px 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(25, 145, 231, 0.1);
  border-radius: 28px;
  transition:
    transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.26s ease;
}

.atmosphere-card__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 19px;
  background: #eaf2fb;
}

.atmosphere-card__image {
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.atmosphere-card__caption {
  min-height: 2.8em;
  margin: 15px 5px 0;
  font-size: clamp(14px, 1.35vw, 16px);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: #183b59;
}

.atmosphere-card:hover {
  transform: translateY(-6px);
  border-color: rgba(25, 145, 231, 0.28);
}

.atmosphere-card:hover .atmosphere-card__image {
  transform: scale(1.035);
}

.atmosphere__dots {
  display: none;
}

.learning-attention-break {
  display: none;
}

@media (min-width: 768px) {
  .learning-attention-break {
    display: block;
  }
}

@media (max-width: 767px) {
  .atmosphere {
    padding: 52px 0 48px;
  }

  .atmosphere__heading {
    display: block;
    margin-bottom: 24px;
  }

  .atmosphere__title {
    margin-bottom: 10px;
  }

  .atmosphere__subtitle {
    max-width: 34rem;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
  }

  .atmosphere__grid {
    display: flex;
    width: calc(100% + 32px);
    margin-inline: -16px;
    padding-inline: max(16px, calc((100vw - min(84vw, 352px)) / 2));
    padding-bottom: 8px;
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: max(16px, calc((100vw - min(84vw, 352px)) / 2));
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .atmosphere__grid::-webkit-scrollbar {
    display: none;
  }

  .atmosphere-card {
    flex: 0 0 min(84vw, 352px);
    padding: 10px 10px 17px;
    border-radius: 25px;
    scroll-snap-align: center;
  }

  .atmosphere-card__image-wrap {
    border-radius: 17px;
  }

  .atmosphere-card__caption {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25em;
    margin: 13px 7px 0;
    font-size: 14px;
    line-height: 1.42;
  }

  .atmosphere-card:hover {
    transform: none;
  }

  .atmosphere-card:hover .atmosphere-card__image {
    transform: none;
  }

  .atmosphere__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
  }

  .atmosphere__dot {
    position: relative;
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #cfd9e5;
    cursor: pointer;
    transition: width 0.22s ease, background 0.22s ease;
  }

  .atmosphere__dot::before {
    content: "";
    position: absolute;
    inset: -8px;
  }

  .atmosphere__dot--active {
    width: 25px;
    background: var(--blue);
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere-card,
  .atmosphere-card__image,
  .atmosphere__dot {
    transition: none;
  }

}

/* Галерея занятий — карусель фото */
/* ============================================================
   REVIEWS (бывший ClassesGallery) — секция отзывов
   ============================================================ */
.classes-gallery {
  padding: clamp(48px, 6vw, 72px) 0;
  background-image:
    linear-gradient(
      180deg,
      rgba(5, 39, 70, 0.74) 0%,
      rgba(5, 39, 70, 0.66) 42%,
      rgba(5, 39, 70, 0.82) 100%
    ),
    image-set(
      url('/images/reviews/reviews.webp') type("image/webp"),
      url('/images/reviews/reviews.png') type("image/png")
    );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
}

.classes-gallery .container {
  max-width: var(--container);
}

.classes-gallery__title {
  margin: 0 0 clamp(24px, 3.5vw, 40px);
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  text-align: center;
  text-transform: none;
  color: #f3f9ff;
}

.classes-gallery__carousel {
  position: relative;
  padding: 0 clamp(44px, 6vw, 60px);
}

/* ── Viewport: прозрачная обёртка вокруг карточки ── */
.classes-gallery__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
}
/* Удаляем старые photo-стили через модификатор */
.reviews-viewport {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  aspect-ratio: auto;
  max-width: 860px;
  margin-inline: auto;
}

.classes-gallery__track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.classes-gallery__slide {
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   ПОДЗАГОЛОВОК СЕКЦИИ ОТЗЫВОВ
───────────────────────────────────────────── */
.classes-gallery__sub {
  display: block;
  max-width: 600px;
  margin: -10px auto clamp(28px, 4vw, 40px);
  font-size: clamp(0.88rem, 1.7vw, 1.05rem);
  font-weight: 400;
  line-height: 1.6;
  text-align: center;
  color: rgba(200, 225, 255, 0.7);
}

/* ─────────────────────────────────────────────
   DESKTOP GRID (≥ 768 px) — 3 колонки
───────────────────────────────────────────── */
.reviews-desktop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.2vw, 24px);
  align-items: stretch;
}

/* MOBILE CAROUSEL — скрыт на десктопе */
.reviews-mobile-carousel {
  display: none;
}

/* ─────────────────────────────────────────────
   КАРТОЧКА ОТЗЫВА — новый дизайн
───────────────────────────────────────────── */
.review-card {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f1f8ff 100%);
  border-radius: 32px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(25, 145, 231, 0.08);
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}

/* Декоративный точечный узор в правом нижнем углу */
.review-card::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: -8px;
  width: 108px;
  height: 108px;
  background-image: radial-gradient(circle, rgba(25, 145, 231, 0.14) 1.5px, transparent 1.5px);
  background-size: 13px 13px;
  pointer-events: none;
}

/* Контентный слой */
.review-card__inner {
  position: relative;
  inset: unset;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 28px 24px;
  height: 100%;
  box-sizing: border-box;
  z-index: 1;
}

/* Бейдж «Отзыв ученика» */
.review-card__badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(25, 145, 231, 0.1);
  border: 1px solid rgba(25, 145, 231, 0.2);
  border-radius: 20px;
  padding: 3px 10px;
}

/* Кавычки — CSS pseudo */
.review-card__quote-mark {
  display: block;
  font-size: 56px;
  line-height: 0.6;
  color: var(--blue);
  opacity: 0.18;
  font-family: Georgia, 'Times New Roman', serif;
  margin-bottom: -8px;
  user-select: none;
}
.review-card__quote-mark::before {
  content: '\201C'; /* " открывающая кавычка */
}

/* Основной текст отзыва */
.review-card__text {
  font-size: clamp(13px, 1.35vw, 15px);
  font-weight: 500;
  color: #0b1f3a;
  line-height: 1.65;
  margin: 0;
  flex: 1;
}

/* Блок автора */
.review-card__author {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(25, 145, 231, 0.12);
}

.review-card__name {
  font-size: 15px;
  font-weight: 700;
  color: #0b1f3a;
  line-height: 1.3;
}

.review-card__course {
  font-size: 12px;
  font-weight: 400;
  color: #52708f;
  line-height: 1.4;
}

.classes-gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: #0c2a44;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.classes-gallery__nav:hover {
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
  transform: scale(1.04);
}

.classes-gallery__nav:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.classes-gallery__nav--prev {
  left: 0;
}

.classes-gallery__nav--next {
  right: 0;
}

/* ── Мобильная адаптация ── */
@media (max-width: 767px) {
  /* На мобилке — только слайдер, сетка скрыта */
  .reviews-desktop-grid {
    display: none;
  }
  .reviews-mobile-carousel {
    display: block;
  }

  /* На мобилке стрелки скрыты — навигация через свайп */
  .classes-gallery__nav {
    display: none;
  }
  .classes-gallery__carousel {
    padding: 0;
  }

  /* Viewport = та же ширина что у карточки «Как проходит обучение»:
     min(82vw, 340px). JS-слайдер измеряет clientWidth этого элемента
     и автоматически задаёт ту же ширину каждому слайду. */
  .reviews-viewport {
    max-width: min(82vw, 340px);
    /* margin-inline: auto уже задан в base-стилях */
  }

  /* Карточка на мобилке — авто высота, скругление как у benefit-card */
  .review-card {
    height: auto;
    min-height: 0;
    border-radius: 24px;
  }
  .review-card__inner {
    padding: 24px 22px 20px;
    height: auto;
    gap: 8px;
  }
  .review-card__quote-mark {
    font-size: 44px;
  }
  .review-card__text {
    font-size: 13px;
    line-height: 1.58;
    flex: none;
    white-space: normal;
    word-break: break-word;
  }
  .review-card__name  { font-size: 14px; }
  .review-card__course { font-size: 11px; }
}

.classes-gallery__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(14px, 2.2vw, 20px);
}

.classes-gallery__dot {
  position: relative;
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

/* Расширенная hit-area 24×24 для тапа */
.classes-gallery__dot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
}

.classes-gallery__dot:hover {
  background: rgba(255, 255, 255, 0.45);
}

.classes-gallery__dot.is-active {
  background: var(--orange);
  transform: scale(1.15);
}

.classes-gallery__dot:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.classes-gallery__cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(22px, 3.5vw, 32px);
}

.classes-gallery__cta {
  padding: 14px 26px;
  font-size: clamp(16px, 2vw, 19px);
  text-transform: none;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 24px rgba(255, 136, 0, 0.45);
}

.classes-gallery__cta:hover {
  box-shadow: 0 12px 28px rgba(255, 136, 0, 0.55);
}

@media (max-width: 767px) {
  .classes-gallery {
    background-image:
      linear-gradient(
        180deg,
        rgba(5, 39, 70, 0.84) 0%,
        rgba(5, 39, 70, 0.76) 42%,
        rgba(5, 39, 70, 0.92) 100%
      ),
      image-set(
        url('/images/reviews/reviews_mob.webp') type("image/webp"),
        url('/images/reviews/reviews_mob.png') type("image/png")
      );
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
}

@media (min-width: 768px) {
  .classes-gallery {
    display: block;
    padding: clamp(48px, 6vw, 72px) 0;
  }

  .classes-gallery__dots {
    margin-top: clamp(16px, 2vw, 24px);
  }

  .classes-gallery__cta-wrap {
    margin-top: clamp(18px, 2.8vw, 30px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .classes-gallery__track {
    transition: none;
  }

  .classes-gallery__skeleton {
    animation: none;
  }

  .classes-gallery__img {
    transition: none;
  }

  .classes-gallery__nav:hover {
    transform: none;
  }
}

/* Галерея «Посмотрите…» — компактнее на 15% */
.classes-gallery.classes-gallery--compact {
  padding: clamp(30.6px, 4.25vw, 54.4px) 0;
}

.classes-gallery.classes-gallery--compact .classes-gallery__title {
  margin: 0 0 clamp(15.3px, 2.55vw, 23.8px);
  font-size: clamp(1.0625rem, 2.55vw, 1.7rem);
}

.classes-gallery.classes-gallery--compact .classes-gallery__carousel {
  padding: 0 clamp(34px, 5.1vw, 44.2px);
}

.classes-gallery.classes-gallery--compact .classes-gallery__viewport {
  max-width: min(952px, 85%);
  margin-inline: auto;
  border-radius: clamp(13.6px, 2.04vw, 18.7px);
}

.classes-gallery.classes-gallery--compact .classes-gallery__nav {
  width: 37px;
  height: 37px;
  margin-top: -18.5px;
}

.classes-gallery.classes-gallery--compact .classes-gallery__dots {
  margin-top: clamp(11.9px, 1.87vw, 17px);
}

.classes-gallery.classes-gallery--compact .classes-gallery__dot {
  width: 8px;
  height: 8px;
}

.classes-gallery.classes-gallery--compact .classes-gallery__cta-wrap {
  margin-top: clamp(18.7px, 2.975vw, 27.2px);
}

.classes-gallery.classes-gallery--compact .classes-gallery__cta {
  padding: 11.9px 22.1px;
  font-size: clamp(13.6px, 1.7vw, 16.15px);
}

/* Programs */
.programs__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .programs__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.program-card {
  position: relative;
  border-radius: 20px;
  min-height: 0;
  padding: 24px 20px 24px;
  color: var(--white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  .program-card {
    border-radius: var(--radius-sm);
    min-height: 341px;
    padding: 38px 38px 32px;
  }
}

.program-card--blue {
  background-image:
    linear-gradient(
      90deg,
      rgba(25, 145, 231, 0.96) 0%,
      rgba(25, 145, 231, 0.88) 45%,
      rgba(25, 145, 231, 0.45) 100%
    ),
    image-set(
      url('/images/courses/youngcreator.webp') type("image/webp"),
      url('/images/courses/youngcreator.png') type("image/png")
    );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (min-width: 768px) {
  .program-card--blue {
    background-image: none;
    background-color: var(--blue);
  }
}

.program-card--green {
  background-image:
    linear-gradient(
      90deg,
      rgba(91, 166, 47, 0.96) 0%,
      rgba(91, 166, 47, 0.90) 46%,
      rgba(91, 166, 47, 0.55) 100%
    ),
    image-set(
      url('/images/courses/programmingcard.webp') type("image/webp"),
      url('/images/courses/programmingcard.png') type("image/png")
    );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (min-width: 768px) {
  .program-card--green {
    background-image: none;
    background-color: var(--green-card);
  }
}

.program-card--purple {
  background: var(--purple);
}

@media (max-width: 767px) {
  .program-card--purple {
    background-image:
      linear-gradient(
        180deg,
        rgba(154, 104, 200, 0.73) 0%,
        rgba(154, 104, 200, 0.68) 48%,
        rgba(154, 104, 200, 0.44) 100%
      ),
      image-set(
        url('/images/courses/azbukacarta.webp') type("image/webp"),
        url('/images/courses/azbukacarta.png') type("image/png")
      );
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
  }
}

.program-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.program-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid var(--white);
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
}

@media (min-width: 600px) {
  .program-card__tag {
    padding: 8px 14px;
    font-size: 16px;
    gap: 8px;
  }
}

.program-card__tag--wide {
  border-radius: 11px;
  padding-right: 16px;
}

.program-card__cal {
  flex-shrink: 0;
  color: inherit;
}

.program-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 280px;
  z-index: 1;
}

.program-card__name {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.program-card__sub {
  margin: 4px 0 12px;
  font-size: 14px;
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.01em;
  opacity: 0.95;
}

.program-card__desc {
  margin: 0 0 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.59;
  letter-spacing: -0.01em;
}

.program-card__body > .btn {
  margin-top: auto;
}

.program-card__desc-break-mobile {
  display: none;
}

.program-card .media-frame {
  position: absolute;
  right: 24px;
  top: 54px;
  width: min(42%, 189px);
  pointer-events: none;
}

.program-card__owl {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

/* Олимпиадная карточка — та же композиция, что у остальных программ */
.program-card--olympiad {
  background: #dc730a;
}

.program-card--olympiad .program-card__body {
  max-width: 280px;
}

.program-card--olympiad .program-card__sub {
  color: rgba(255, 255, 255, 0.95);
  font-style: italic;
  font-weight: 300;
}

.program-card__owl--cover {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

@media (max-width: 767px) {
  .program-card__desc-break-mobile {
    display: block;
  }

  .program-card--olympiad {
    background-image: url('/assets/home-little-olympian-mobile.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
}

/* Английский — отдельная узкая карточка на всю ширину сетки */
.program-card--english {
  grid-column: 1 / -1;
  min-height: 154px;
  padding: 26px 32px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background-image:
    linear-gradient(102deg, rgba(27, 127, 121, 0.98) 0%, rgba(33, 145, 137, 0.96) 34%, rgba(28, 132, 126, 0.72) 52%, rgba(22, 112, 112, 0.2) 76%, rgba(16, 94, 103, 0.06) 100%),
    url('/images/courses/english/hero-desktop.webp');
  background-size: auto, auto 306%;
  background-position: center, right center;
  background-repeat: no-repeat;
  border: 1px solid rgba(94, 210, 198, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 34px rgba(23, 109, 106, 0.13);
}

.program-card--english::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 46% 18%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(90deg, transparent 52%, rgba(255, 255, 255, 0.09));
}

.program-card__english-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding-right: 12px;
}

.program-card--english .program-card__name {
  font-size: clamp(25px, 3vw, 34px);
}

.program-card__english-title-break {
  display: none;
}

.program-card--english .program-card__sub {
  margin: 5px 0 0;
  font-size: clamp(14px, 1.5vw, 18px);
}

.program-card--english > .btn {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(28px, 4vw, 54px);
  margin: 0;
  transform: translateY(-50%);
}

@media (max-width: 767px) {
  .program-card--english {
    min-height: 190px;
    padding: 18px 18px 72px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    background-image:
      linear-gradient(100deg, rgba(25, 127, 121, 0.98) 0%, rgba(31, 143, 136, 0.94) 54%, rgba(19, 112, 112, 0.34) 84%, rgba(15, 94, 102, 0.12) 100%),
      url('/images/courses/english/hero-desktop.webp');
    background-size: auto, cover;
    background-position: center, 65% center;
  }

  .program-card__english-copy {
    max-width: 220px;
    padding-right: 0;
  }

  .program-card--english .program-card__name {
    font-size: 19px;
  }

  .program-card__english-title-break {
    display: block;
  }

  .program-card__english-title-space {
    display: none;
  }

  .program-card--english .program-card__sub {
    max-width: 190px;
    font-size: 12px;
    line-height: 1.25;
  }

  .program-card--english > .btn {
    position: absolute;
    top: auto;
    right: auto;
    bottom: 16px;
    left: 18px;
    transform: none;
    margin: 0;
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
  }
}

/* Оплата обучения — композиция по референсу: интро + две светлые карточки */
.finance-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: clamp(16px, 2vw, 22px);
  margin-top: clamp(24px, 4vw, 40px);
  padding: clamp(18px, 2.5vw, 30px);
  color: #082342;
  border: 1px solid rgba(122, 150, 196, 0.22);
  border-radius: clamp(26px, 3vw, 38px);
  background:
    radial-gradient(circle at 8% 12%, rgba(25, 145, 231, 0.1), transparent 36%),
    radial-gradient(circle at 94% 88%, rgba(130, 84, 211, 0.11), transparent 38%),
    linear-gradient(135deg, #f4f9ff 0%, #f8f7ff 54%, #ffffff 100%);
  box-shadow: 0 24px 60px -38px rgba(25, 66, 132, 0.32);
}

@media (min-width: 900px) {
  .finance-panel {
    grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1.9fr);
    align-items: stretch;
  }
}

.finance-panel__intro {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: clamp(330px, 31vw, 420px);
  padding: clamp(14px, 2vw, 28px);
}

.finance-panel__title {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 330px;
  color: #082342;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.finance-panel__title-break-mobile {
  display: none;
}

.finance-panel__cta {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: #7956cf;
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 750;
  text-decoration: none;
  text-underline-offset: 4px;
}

.finance-panel__cta:hover,
.finance-panel__cta:focus-visible {
  color: #5333aa;
  text-decoration: underline;
}

.finance-panel__hero-art {
  position: absolute;
  z-index: 1;
  right: clamp(-24px, -2vw, -8px);
  bottom: -4px;
  width: min(72%, 275px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 18px 18px rgba(111, 74, 23, 0.16));
}

.finance-panel__options {
  display: grid;
  gap: clamp(14px, 1.8vw, 20px);
}

@media (min-width: 700px) {
  .finance-panel__options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.finance-panel__option {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: clamp(350px, 31vw, 420px);
  padding: clamp(22px, 2.6vw, 32px);
  background:
    radial-gradient(circle at 100% 100%, rgba(130, 84, 211, 0.13), transparent 44%),
    linear-gradient(135deg, #eef5ff 0%, #f7f4ff 100%);
  border: 0;
  border-radius: 30px;
  box-shadow:
    0 8px 32px -8px rgba(25, 66, 132, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

@media (hover: hover) {
  .finance-panel__option:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
      0 16px 36px rgba(10, 20, 60, 0.18),
      0 2px 8px rgba(0, 0, 0, 0.06);
  }
}

.finance-panel__option-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
}

.finance-panel__option h4 {
  margin: 0;
  max-width: 100%;
  color: #082342;
  font-size: clamp(19px, 1.65vw, 25px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.finance-panel__option-art {
  position: absolute;
  z-index: 1;
  right: clamp(14px, 1.8vw, 24px);
  bottom: clamp(18px, 2vw, 26px);
  width: min(38%, 165px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 14px 16px rgba(91, 65, 22, 0.12));
}

.finance-panel__option-art--house {
  bottom: clamp(14px, 1.8vw, 22px);
  width: min(41%, 180px);
}

.finance-panel__option p {
  position: relative;
  z-index: 2;
  max-width: 78%;
  margin: clamp(28px, 4vw, 48px) 0 18px;
  color: #102844;
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 500;
  line-height: 1.55;
}

.finance-panel__option a {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  color: #7956cf;
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(121, 86, 207, 0.38);
  text-underline-offset: 4px;
}

.finance-panel__option a:hover,
.finance-panel__option a:focus-visible {
  color: #5333aa;
  text-decoration-color: currentColor;
}

@media (min-width: 700px) {
  .finance-panel {
    overflow: visible;
    display: block;
    margin-top: 66px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .finance-panel__intro {
    display: block;
    min-height: 0;
    padding: 0;
    margin-bottom: 32px;
  }

  .finance-panel__title {
    max-width: 680px;
    margin: 0 auto;
    color: var(--grey-900);
    font-size: clamp(30px, 3.5vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.025em;
    text-align: center;
  }

  .finance-panel__title-break-mobile {
    display: block;
  }

  .finance-panel__cta,
  .finance-panel__hero-art {
    display: none;
  }

  .finance-panel__options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 2.2vw, 26px);
  }

  .finance-panel__option {
    min-height: 270px;
    padding: clamp(26px, 3vw, 34px);
    border-radius: 30px;
    background:
      radial-gradient(circle at 102% 100%, rgba(130, 84, 211, 0.17), transparent 46%),
      linear-gradient(135deg, #e8f0fe 0%, #f6f3ff 100%);
    box-shadow:
      0 8px 32px -8px rgba(25, 66, 132, 0.2),
      0 2px 8px rgba(0, 0, 0, 0.06);
  }

  .finance-panel__option h4 {
    max-width: 68%;
    font-size: clamp(22px, 2.1vw, 27px);
  }

  .finance-panel__option p {
    max-width: 68%;
    margin: clamp(14px, 2vw, 20px) 0 10px;
    font-size: clamp(14px, 1.45vw, 17px);
    line-height: 1.45;
  }

  .finance-panel__option a {
    font-size: clamp(14px, 1.25vw, 16px);
  }

  .finance-panel__option-art {
    right: clamp(12px, 2vw, 24px);
    bottom: 22px;
    width: min(31%, 165px);
  }

  .finance-panel__option-art--house {
    bottom: 20px;
    width: min(34%, 180px);
  }
}

@media (max-width: 699px) {
  .finance-panel {
    overflow: visible;
    display: block;
    margin-top: 66px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .finance-panel__intro {
    display: block;
    min-height: 0;
    padding: 0;
    margin-bottom: 24px;
  }

  .finance-panel__title {
    max-width: 330px;
    margin: 0 auto;
    color: var(--grey-900);
    font-size: clamp(22px, 6.5vw, 30px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-align: center;
  }

  .finance-panel__title-break-mobile {
    display: block;
  }

  .finance-panel__cta,
  .finance-panel__hero-art {
    display: none;
  }

  .finance-panel__options {
    gap: 0;
    margin-top: -30px;
  }

  .finance-panel__option {
    overflow: visible;
    min-height: 208px;
    padding: 66px 18px 0;
    background: none;
    border-radius: 26px;
    box-shadow: none;
  }

  .finance-panel__option::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 45px;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at 102% 100%, rgba(130, 84, 211, 0.17), transparent 46%),
      linear-gradient(135deg, #e8f0fe 0%, #f6f3ff 100%);
    border-radius: 26px;
    box-shadow:
      0 8px 32px -8px rgba(25, 66, 132, 0.2),
      0 2px 8px rgba(0, 0, 0, 0.06);
  }

  .finance-panel__option:hover {
    box-shadow: none;
  }

  .finance-panel__option:nth-child(2) {
    top: -20px;
  }

  .finance-panel__option h4 {
    max-width: 70%;
    font-size: clamp(18px, 4.8vw, 20px);
    line-height: 1.08;
  }

  .finance-panel__option-art {
    right: 6px;
    bottom: 22px;
    width: min(35%, 124px);
  }

  .finance-panel__option-art--house {
    bottom: 20px;
    width: min(38%, 134px);
  }

  .finance-panel__option p {
    max-width: 70%;
    margin: 6px 0 4px;
    font-size: 13px;
    line-height: 1.3;
  }

  .finance-panel__option a {
    font-size: 13px;
  }
}

/* Педагоги — горизонтальная карусель */
.teachers__intro {
  text-align: center;
  max-width: 620px;
  margin: -20px auto 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--grey-900);
  opacity: 0.92;
  line-height: 1.45;
}


/* ============================================================
   TEACHER CARDS — карусель со стрелками и точками
   ============================================================ */

/* ---- Teacher carousel ---- */
.teachers__carousel-shell {
  position: relative;
  margin-top: 36px;
}

.teachers__grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 24px;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}
.teachers__grid::-webkit-scrollbar { display: none; }

.teachers__nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 1px solid rgba(25, 145, 231, 0.24);
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff 0%, #f4faff 100%);
  color: var(--blue);
  box-shadow:
    0 16px 38px -18px rgba(25, 66, 132, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.teachers__nav:hover:not(:disabled) {
  border-color: rgba(25, 145, 231, 0.48);
  background: linear-gradient(145deg, #ffffff 0%, #e9f6ff 100%);
  color: #087cca;
  box-shadow:
    0 18px 42px -17px rgba(25, 145, 231, 0.56),
    0 0 0 5px rgba(25, 145, 231, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.teachers__nav:focus-visible {
  outline: 3px solid rgba(25, 145, 231, 0.3);
  outline-offset: 4px;
}

.teachers__nav-icon {
  display: block;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.teachers__nav:disabled {
  opacity: 0.28;
  cursor: default;
}

.teachers__nav--prev { left: -31px; }
.teachers__nav--next { right: -31px; }

@media (max-width: 767px) {
  .teachers__grid {
    gap: 16px;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: max(16px, calc((100vw - min(85vw, 300px)) / 2));
    padding-right: max(16px, calc((100vw - min(85vw, 300px)) / 2));
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .teachers__grid::-webkit-scrollbar { display: none; }

  .teachers__carousel-shell {
    margin-top: 28px;
  }

  .teachers__nav {
    display: none;
  }
}

/* Carousel dots */
.teachers__carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
}

.teachers__carousel-dot {
  display: block;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(25, 66, 132, 0.18);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.teachers__carousel-dot.is-active {
  background: var(--blue);
  width: 24px;
  border-radius: 999px;
}

/* ---- Teacher card ---- */
.teacher-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  border: 1px solid rgba(25, 145, 231, 0.10);
}


.teacher-card__photo-wrap {
  position: relative;
  width: 100%;
  padding-top: 80%;
  overflow: hidden;
  background: #e8f0fb;
}

.teacher-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Индивидуальное кадрирование исходных портретов без изменения лиц. */
[data-teacher-photo="Надежда"] .teacher-card__photo {
  object-position: center 28%;
  transform: scale(1.16);
  transform-origin: center 32%;
}

[data-teacher-photo="Кирилл"],
[data-teacher-photo="Сергей"] {
  background: #fff;
}

[data-teacher-photo="Кирилл"] .teacher-card__photo {
  object-fit: contain;
  object-position: center;
  transform: none;
}

[data-teacher-photo="Сергей"] .teacher-card__photo {
  object-fit: contain;
  object-position: center;
  transform: none;
}

.teacher-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 18px 20px 20px;
}

.teacher-card__name {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 800;
  color: var(--grey-900);
  letter-spacing: -0.02em;
}

.teacher-card__role {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

.teacher-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.teacher-card__tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--grey-900);
  background: rgba(25, 145, 231, 0.08);
  border: 1px solid rgba(25, 145, 231, 0.18);
  border-radius: 20px;
  padding: 3px 10px;
}

.teacher-card__desc {
  margin: 0 0 16px;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  flex: 1 1 auto;
}

.teacher-card__btn {
  position: relative;
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--blue);
  border-radius: 50px;
  background: transparent;
  color: var(--blue);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
}

/* Mobile Safari can paint a composited child through a flipped parent.
   Hide the front-side CTA explicitly once the card is reversed. */
.teacher-card-wrap.is-flipped .teacher-card__btn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.teacher-card__btn:hover {
  background: var(--blue);
  color: #fff;
}

/* ── arrow micro-animation ── */
.teacher-card__btn-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.teacher-card__btn:hover .teacher-card__btn-arrow {
  transform: translateX(4px);
}

/* ── flip card wrapper ── */
.teacher-card-wrap {
  perspective: 1200px;
  display: flex; /* allows flipper to stretch to grid row height */
  flex: 0 0 calc((100% - 48px) / 3);
  scroll-snap-align: start;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .teacher-card-wrap {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 767px) {
  .teacher-card-wrap {
    flex: 0 0 min(85vw, 300px);
    scroll-snap-align: center;
  }
}

/* ── flipper ── */
.teacher-card-flipper {
  flex: 1;
  min-width: 0;
  position: relative;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  transition: transform 0.56s cubic-bezier(0.45, 0.05, 0.15, 0.95);
  will-change: transform;
}

.teacher-card-wrap.is-flipped .teacher-card-flipper {
  transform: rotateY(180deg);
}

/* ── shared face ── */
.teacher-card--front,
.teacher-card--back {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.teacher-card--front {
  height: 100%;
  cursor: pointer;
}

.teacher-card-wrap.is-flipped .teacher-card--front {
  pointer-events: none;
}

/* ── back face ── */
.teacher-card--back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  background: linear-gradient(155deg, #eaf3ff 0%, #f5f9ff 100%);
  border-radius: var(--r-md);
  border: 1px solid rgba(25, 145, 231, 0.12);
  box-shadow: var(--shadow-1);
  padding: 18px 18px 52px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  pointer-events: none;
}

.teacher-card-wrap.is-flipped .teacher-card--back {
  pointer-events: auto;
}

/* back: header */
.tc-back__header {
  margin-bottom: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(25, 145, 231, 0.1);
}

.tc-back__role {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.7;
  margin-bottom: 3px;
}

.tc-back__name {
  font-size: 22px;
  font-weight: 800;
  color: var(--grey-900);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 8px;
}

.tc-back__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tc-back__tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  background: rgba(25, 145, 231, 0.07);
  border: 1px solid rgba(25, 145, 231, 0.16);
  border-radius: 20px;
  padding: 2px 9px;
}

/* back: info rows (education + experience) */
.tc-back__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 7px;
}

.tc-back__meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(25, 145, 231, 0.09);
  border-radius: 9px;
  padding: 7px 11px;
}

.tc-back__meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue);
  white-space: nowrap;
  padding-top: 1px;
  flex-shrink: 0;
  opacity: 0.8;
}

.tc-back__meta-val {
  font-size: 12px;
  font-weight: 500;
  color: var(--grey-900);
  text-align: right;
  line-height: 1.4;
}

/* back: skills block */
.tc-back__skills-wrap {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(25, 145, 231, 0.09);
  border-radius: 9px;
  padding: 8px 11px;
}

.tc-back__skills-wrap .tc-back__meta-label {
  display: block;
  margin-bottom: 6px;
}

.tc-back__skills-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tc-back__skills-list li {
  font-size: 12px;
  color: #3a4a5c;
  padding-left: 13px;
  position: relative;
  line-height: 1.4;
}

.tc-back__skills-list li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0.38;
}

/* back: positioning phrase */
.tc-back__phrase {
  margin-top: auto;
  padding-top: 11px;
  font-size: 11.5px;
  font-style: italic;
  color: rgba(0, 0, 0, 0.38);
  line-height: 1.55;
  margin-bottom: 0;
}

/* back: flip-back button */
.tc-back__flip-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(25, 145, 231, 0.22);
  color: var(--blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s, transform 0.28s;
  font-family: inherit;
}

.tc-back__flip-btn:hover {
  background: #fff;
  border-color: rgba(25, 145, 231, 0.42);
  transform: rotate(-30deg);
}

/* focus rings */
.teacher-card__btn:focus-visible,
.tc-back__flip-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
/* ============================================================
   MOBILE IMPROVEMENTS
   ============================================================ */

/* Hero — мобильная версия */
@media (max-width: 767px) {
  .hero__title {
    font-size: clamp(22px, 6vw, 32px);
  }

  .hero__features {
    gap: 10px;
  }

  .hero__feature {
    font-size: 14px;
  }

  .hero__visual-slot {
    display: none;
  }

  /* На мобилке SVG-фон слишком низкий — перекрываем цветом */
  .hero__wrap {
    background: linear-gradient(135deg, #1991e7 0%, #1268b3 100%);
    border-radius: 20px;
    padding: 20px 16px 24px;
    margin: 0 8px;
    min-height: auto;
  }

  .hero__bg {
    display: none;
  }
}
/* Programs — мобильная версия */
@media (max-width: 767px) {
  .programs__grid {
    grid-template-columns: 1fr;
  }

  .program-card {
    min-height: auto;
    padding: 22px 22px 24px;
  }

  .program-card.program-card--english {
    min-height: 190px;
    padding: 18px 18px 72px;
  }

  /* Скрываем сов чтобы не накладывались на текст */
  .program-card .media-frame--program {
    display: none;
  }

  .program-card__body {
    width: 100%;
    max-width: none;
  }
}
/* Classes Gallery — мобильная версия */
@media (max-width: 599px) {
  .classes-gallery__title {
    font-size: clamp(18px, 5vw, 24px);
  }
}

/* Learning section — мобильная версия */
@media (max-width: 767px) {
  .learning-row {
    flex-direction: column;
    gap: 12px;
  }

  .learning-row__label {
    font-size: clamp(32px, 9vw, 48px);
  }
}
@media (max-width: 360px) {
  .teacher-card__photo-wrap {
    padding-top: 90%;
  }
}

/* ============================================================
   LEARNING STEPS — 5 цветных строк как проходит обучение
   ============================================================ */

.learning-steps {
  padding: clamp(32px, 5vw, 64px) 0 clamp(16px, 3vw, 32px);
}

.learning-steps__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: clamp(20px, 3vw, 32px);
}

.learning-row {
  display: grid;
  grid-template-columns: minmax(180px, 36%) 1px 1fr;
  align-items: stretch;
  padding: clamp(18px, 2.8vw, 32px) clamp(18px, 3vw, 36px);
  border-radius: 28px;
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  min-height: 168px;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

@media (hover: hover) {
  .learning-row:hover {
    transform: translateY(-3px) scale(1.005);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
  }
}

@media (max-width: 640px) {
  /* Горизонтальный скролл — карточки в ряд */
  .learning-steps__list {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* Та же формула центрирования что у .benefits__grid */
    scroll-padding-inline: calc((100vw - min(82vw, 340px)) / 2);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 14px;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: calc((100vw - min(82vw, 340px)) / 2);
    padding-right: calc((100vw - min(82vw, 340px)) / 2);
    padding-top: 4px;
    padding-bottom: 12px;
    cursor: grab;
  }

  .learning-steps__list::-webkit-scrollbar {
    display: none;
  }

  .learning-row {
    flex: 0 0 min(82vw, 340px);
    max-width: 340px;
    scroll-snap-align: center;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "title"
      "divider"
      "body";
    gap: 0;
    padding: 22px 20px;
    min-height: 0;
    border-radius: 24px;
  }

  .learning-row__title {
    grid-area: title;
    text-align: center;
    font-size: 18px;
    line-height: 1.2;
    padding-right: 0;
    padding-bottom: 12px;
    justify-content: center;
    align-items: center;
  }

  .learning-row__title--small {
    font-size: 12px;
    font-weight: 600;
    margin-top: 3px;
    opacity: 0.85;
  }

  /* Пунктирный divider скрыт на мобилке */
  .learning-row__divider {
    display: none;
  }

  .learning-row__body {
    grid-area: body;
    padding-left: 0;
    text-align: center;
    font-size: 13.5px;
    line-height: 1.55;
  }
}

.learning-row--green {
  background: linear-gradient(90deg, #7ba83a 0%, #5a8a2a 100%);
}
.learning-row--purple {
  background: linear-gradient(90deg, #7b3f9e 0%, #5e2e80 100%);
}
.learning-row--blue {
  background: linear-gradient(90deg, #3e609d 0%, #2b467a 100%);
}
.learning-row--teal {
  background: linear-gradient(90deg, #4fa394 0%, #3a8578 100%);
}
.learning-row--red {
  background: linear-gradient(90deg, #a6434a 0%, #833036 100%);
}

.learning-row__title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  font-weight: 900;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.18;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-right: clamp(10px, 2vw, 20px);
}

.learning-row__title--small {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.3px;
  opacity: 0.92;
}

.learning-row__divider {
  align-self: stretch;
  width: 0;
  border-left: 2px dashed rgba(255, 255, 255, 0.55);
  margin: 4px 0;
}

.learning-row__body {
  display: block;
  padding-left: clamp(16px, 2.4vw, 28px);
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.2px;
  align-self: center;
}

.learning-row__body strong {
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

/* ── Корректирующие мобильные overrides (должны быть ПОСЛЕ базовых стилей) ── */
@media (max-width: 640px) {
  .learning-row__title {
    display: block;
    width: 100%;
    padding-right: 0;
    padding-left: 0;
    text-align: center;
  }

  .learning-row__body {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
    font-size: 13.5px;
    line-height: 1.55;
  }
}
/* ============================================================
   LESSONS BENTO — «Как проходит обучение» на главной
   ============================================================ */

.lessons-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-top: clamp(20px, 3vw, 32px);
}

.lessons-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 6px 24px rgba(10, 20, 60, 0.10);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

@media (hover: hover) {
  .lessons-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 36px rgba(10, 20, 60, 0.18);
  }
}

.lessons-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.lessons-card__content {
  position: absolute;
  top: 28px;
  left: 28px;
  z-index: 2;
  max-width: 280px;
}

.lessons-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 20px; /* gap between badge and title */
}

/* Управляемые переносы в описаниях карточек */
.lessons-br { display: none; }
@media (min-width: 641px) {
  .lessons-br { display: block; }
}

.lessons-card__title {
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-top: 0;    /* kill browser h3 default margin-top */
  margin-bottom: 12px;
}

.lessons-card__pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  letter-spacing: 0.3px;
}

.lessons-card__desc {
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 400;
  line-height: 1.55;
  margin-top: 0;    /* kill browser p default margin-top */
  margin-bottom: 0;
}

/* strong inside desc is NOT bold — emphasis stays through colour only */
.lessons-card__desc strong {
  font-weight: 400;
}

/* ── Card variants ── */

/* c1: blue, white text, span 5 */
.lessons-card--c1 {
  grid-column: span 5;
  min-height: 340px;
  background-image: image-set(
  url('/images/courses/main1.webp') type("image/webp"),
  url('/images/courses/main1.png') type("image/png")
);;
  background-color: #1e3cb4;
}
.lessons-card--c1::before {
  background: linear-gradient(to right,
    rgba(18, 42, 185, 0.95) 0%,
    rgba(18, 42, 185, 0.78) 46%,
    rgba(18, 42, 185, 0.04) 82%);
}
.lessons-card--c1 .lessons-card__num   { background: rgba(255,255,255,0.20); color: #fff; }
.lessons-card--c1 .lessons-card__title { color: #fff; }
.lessons-card--c1 .lessons-card__desc  { color: rgba(255,255,255,0.88); }
.lessons-card--c1 .lessons-card__desc strong { color: #fff; }

/* c2: mint, dark text, span 4 */
.lessons-card--c2 {
  grid-column: span 4;
  min-height: 340px;
  background-image: image-set(
  url('/images/courses/main2.webp') type("image/webp"),
  url('/images/courses/main2.png') type("image/png")
);;
  background-color: #dff5e8;
}
.lessons-card--c2::before {
  background: linear-gradient(to right,
    rgba(223, 245, 232, 0.97) 0%,
    rgba(223, 245, 232, 0.82) 46%,
    rgba(223, 245, 232, 0.04) 82%);
}
.lessons-card--c2 .lessons-card__num   { background: rgba(39,174,96,0.16); color: #1b6e3a; }
.lessons-card--c2 .lessons-card__title { color: #071a3d; }
.lessons-card--c2 .lessons-card__desc  { color: #1f4430; }
.lessons-card--c2 .lessons-card__desc strong { color: #071a3d; }

/* c3: orange, white text, span 3 */
.lessons-card--c3 {
  grid-column: span 3;
  min-height: 340px;
  background-image: image-set(
  url('/images/courses/main3.webp') type("image/webp"),
  url('/images/courses/main3.png') type("image/png")
);;
  background-color: #e05500;
  background-position: 82% center; /* правее — текстовая зона слева свободна */
}
.lessons-card--c3::before {
  background: linear-gradient(to right,
    rgba(200, 65, 0, 0.95) 0%,
    rgba(200, 65, 0, 0.78) 46%,
    rgba(200, 65, 0, 0.04) 82%);
}
.lessons-card--c3 .lessons-card__num   { background: rgba(255,255,255,0.22); color: #fff; }
.lessons-card--c3 .lessons-card__title { color: #fff; }
.lessons-card--c3 .lessons-card__desc  { color: rgba(255,255,255,0.88); }
.lessons-card--c3 .lessons-card__desc strong { color: #fff; }
@media (min-width: 641px) {
  .lessons-card--c3 .lessons-card__desc { display: none; }
}

/* c4: lavender, dark text, span 6 */
.lessons-card--c4 {
  grid-column: span 6;
  min-height: 290px;
  background-image: image-set(
  url('/images/courses/main4.webp') type("image/webp"),
  url('/images/courses/main4.png') type("image/png")
);;
  background-color: #ede8ff;
}
.lessons-card--c4::before {
  background: linear-gradient(to right,
    rgba(237, 232, 255, 0.97) 0%,
    rgba(237, 232, 255, 0.82) 46%,
    rgba(237, 232, 255, 0.04) 82%);
}
.lessons-card--c4 .lessons-card__num   { background: rgba(120,80,220,0.14); color: #5b20b3; }
.lessons-card--c4 .lessons-card__title { color: #1a0a3d; }
.lessons-card--c4 .lessons-card__desc  { color: #3a2060; }
.lessons-card--c4 .lessons-card__desc strong { color: #1a0a3d; }

/* c5: yellow, dark text, span 6 */
.lessons-card--c5 {
  grid-column: span 6;
  min-height: 290px;
  background-image: image-set(
  url('/images/courses/main5.webp') type("image/webp"),
  url('/images/courses/main5.png') type("image/png")
);;
  background-color: #fff6cc;
}
.lessons-card--c5::before {
  background: linear-gradient(to right,
    rgba(255, 246, 204, 0.97) 0%,
    rgba(255, 246, 204, 0.82) 46%,
    rgba(255, 246, 204, 0.04) 82%);
}
.lessons-card--c5 .lessons-card__num   { background: rgba(200,140,0,0.16); color: #7a5200; }
.lessons-card--c5 .lessons-card__title { color: #1a1200; }
.lessons-card--c5 .lessons-card__desc  { color: #4a3800; }
.lessons-card--c5 .lessons-card__desc strong { color: #1a1200; }

/* ── Responsive ── */
@media (max-width: 1023px) {
  .lessons-bento {
    grid-template-columns: 1fr 1fr;
  }
  .lessons-card--c1,
  .lessons-card--c2,
  .lessons-card--c3 { grid-column: span 1; min-height: 300px; }
  .lessons-card--c4,
  .lessons-card--c5 { grid-column: span 1; min-height: 260px; }
  .lessons-card__content { max-width: 240px; }
  /* c3: на планшете карточка шире — правее, чтобы текст не конфликтовал */
  .lessons-card--c3 { background-position: 78% center; }
}

@media (max-width: 640px) {
  .lessons-bento {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .lessons-card--c1,
  .lessons-card--c2,
  .lessons-card--c3 { grid-column: span 1; min-height: 295px; }
  .lessons-card--c4,
  .lessons-card--c5 { grid-column: span 1; min-height: 265px; }
  .lessons-card__content { top: 26px; left: 22px; max-width: 210px; }
  .lessons-card__num { margin-bottom: 14px; }
  .lessons-card__title { font-size: 18px; }
  /* c3: на мобиле — правее и чуть выше, чтобы часы и бейдж не обрезались снизу */
  .lessons-card--c3 {
    background-position: 78% 58%;
    background-size: 115%;
  }
  /* c5: на мобиле */
  .lessons-card--c5 {
    background-position: 78% center;
  }
}

.lessons-carousel {
  margin-top: 0;
}

.lessons-carousel__dots {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.lessons-carousel__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(56, 55, 55, 0.22);
  cursor: pointer;
  transition: width 0.18s ease, background 0.18s ease;
}

.lessons-carousel__dot--active {
  width: 24px;
  background: var(--blue);
}

.lessons-carousel__dot:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

@media (hover: hover) {
  .lessons-carousel__dot:hover {
    background: rgba(25, 145, 231, 0.55);
  }
}

@media (max-width: 767px) {
  .lessons-bento--carousel {
    --lessons-carousel-card-width: min(84vw, 370px);
    display: flex;
    grid-template-columns: none;
    gap: clamp(16px, 2.2vw, 24px);
    padding: 8px calc((100vw - var(--lessons-carousel-card-width)) / 2) 18px;
    margin-inline: calc(50% - 50vw);
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: calc((100vw - var(--lessons-carousel-card-width)) / 2);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .lessons-bento--carousel::-webkit-scrollbar {
    display: none;
  }

  .lessons-bento--carousel {
    margin-top: clamp(20px, 3vw, 32px);
  }

  .lessons-bento--carousel .lessons-card {
    grid-column: auto;
    flex: 0 0 var(--lessons-carousel-card-width);
    min-height: 315px;
    border-radius: 24px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .lessons-bento--carousel .lessons-card__content {
    max-width: 220px;
  }

  .lessons-bento--carousel .lessons-card--c3 .lessons-card__desc {
    display: block;
  }

  .lessons-carousel__dots {
    display: flex;
  }
}

@media (max-width: 420px) {
  .lessons-bento--carousel {
    --lessons-carousel-card-width: calc(100vw - 40px);
  }
}

/* --- Hero on mobile --- */
@media (max-width: 767px) {
  /* Hide the SVG shape; show gradient background instead */
  .hero__bg {
    display: none;
  }

  .hero__wrap {
    background: linear-gradient(150deg, #1991e7 0%, #1268b3 100%);
    border-radius: 24px;
    padding: 28px 20px 32px;
    margin: 0 8px;
    min-height: auto;
  }

  .hero__grid {
    padding: 0;
    gap: 20px;
  }

  .hero__title {
    font-size: clamp(24px, 7vw, 34px);
  }

  .hero__features--grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }

  .hero__feature {
    font-size: 14px;
    gap: 8px;
  }

  .hero__star {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
  }

  /* Hide the visual owl on mobile to keep it clean */
  .hero__visual-slot {
    display: none;
  }
}
