/* Лендинг курса (Coursera-подобный) + степ-бар уроков (Stepik-подобный).
 * Собираются client-side скриптом steppe.js из контента и навигации. */

/* ── Лендинг модуля ──────────────────────────────────────────────────────── */
.folur-course-hero {
  margin: .2rem 0 1.2rem;
  padding: 1.6rem 1.8rem 1.5rem;
  border-radius: var(--r-md, .8rem);
  background:
    radial-gradient(120% 160% at 95% -20%, rgba(42,157,143,.16), transparent 55%),
    linear-gradient(115deg, rgba(27,94,58,.08), rgba(212,162,78,.07));
  border: 1px solid var(--folur-line, #E4E0D6);
}
.folur-course-hero__kicker {
  font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--md-default-fg-color--light);
  margin-bottom: .4rem;
}
.folur-course-hero__desc {
  max-width: 62ch;
  margin: .6rem 0 1rem;
  font-size: .82rem; line-height: 1.65;
  color: var(--md-default-fg-color);
}
.folur-course-hero__cta { display: flex; gap: .7rem; flex-wrap: wrap; }
.folur-course-hero__cta .md-button { margin: 0; }

/* инфо-полоса (серия · время · уровень · сертификат) */
.folur-course-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  margin: 1rem 0 1.6rem;
  border: 1px solid var(--folur-line, #E4E0D6);
  border-radius: var(--r-md, .8rem);
  box-shadow: var(--sh1, 0 1px 2px rgba(19,64,41,.06));
  overflow: hidden;
  background: var(--md-default-bg-color);
}
.folur-course-band__cell {
  padding: .9rem 1.1rem;
  border-left: 1px solid var(--folur-line, #E4E0D6);
}
.folur-course-band__cell:first-child { border-left: 0; }
.folur-course-band__num {
  font-weight: 800; font-size: 1.05rem; line-height: 1.2;
  color: var(--folur-green, #1B5E3A);
  word-break: keep-all; hyphens: none;
}
/* длинные текстовые значения («Академический») — компактнее цифр */
.folur-course-band__num:not([data-num]) { font-size: clamp(.82rem, 1.4vw, 1.05rem); }
.folur-course-band__label { font-size: .68rem; color: var(--md-default-fg-color--light); margin-top: .1rem; }
[data-md-color-scheme="slate"] .folur-course-band__num { color: #7DD3A3; }
[data-md-color-scheme="slate"] .folur-course-hero,
[data-md-color-scheme="slate"] .folur-course-band { border-color: #2C3A32; }


/* ── Мобильная адаптация заголовков блоков каталога ──────────────────────── */
@media screen and (max-width: 44em) {
  .folur-block-head { flex-wrap: wrap; row-gap: .3rem; }
  .folur-block-head h2 { min-width: 0; }
  .folur-block-tag { white-space: normal; line-height: 1.5; }
}

/* ── Карт-обложки карточек (генеративные SVG-изолинии) ───────────────────── */
.md-typeset .grid.cards > :is(ul,ol) > li { padding-top: 0 !important; }
.folur-cover {
  display: block;
  margin: 0 calc(-1 * var(--s5, 1.25rem)) var(--s4, 1rem);
  height: 96px;
  overflow: hidden;
  border-bottom: 1px solid var(--folur-line, #E4E0D6);
}
.folur-cover svg { width: 100%; height: 100%; display: block; transition: transform .35s var(--ease, ease); }
.md-typeset .grid.cards li:hover .folur-cover svg { transform: scale(1.045); }
@media (prefers-reduced-motion: reduce) {
  .md-typeset .grid.cards li:hover .folur-cover svg { transform: none; }
}

/* Stepik-прогресс на карточке */
.folur-card-progress { margin-top: .6rem; }
.folur-card-progress__bar {
  height: 5px; border-radius: 3px; overflow: hidden;
  background: var(--folur-line, #E4E0D6);
}
.folur-card-progress__bar span {
  display: block; height: 100%;
  background: var(--folur-green-light, #2E7D52);
}
.folur-card-progress__label {
  font-size: .64rem; color: var(--md-default-fg-color--light); margin-top: .25rem;
}
[data-md-color-scheme="slate"] .folur-card-progress__bar { background: #2C3A32; }

/* «Что вы освоите» (Coursera) */
.folur-learn {
  margin: 0 0 1.6rem;
  padding: 1.1rem 1.3rem 1.2rem;
  border: 1px solid var(--folur-line, #E4E0D6);
  border-radius: var(--r-md, .8rem);
  background: var(--md-default-bg-color);
  box-shadow: var(--sh1, 0 1px 2px rgba(19,64,41,.06));
}
.folur-learn__title { font-weight: 800; font-size: .95rem; margin-bottom: .7rem; }
.md-typeset .folur-learn__grid {
  display: grid; gap: .55rem .9rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  list-style: none !important; margin: 0 !important; padding: 0;
}
.md-typeset .folur-learn__grid li {
  margin: 0 !important; padding-left: 1.5rem; position: relative;
  font-size: .76rem; line-height: 1.55;
  list-style: none !important;
}
.md-typeset .folur-learn__grid li::marker { content: ""; }
.folur-learn__grid li::before {
  content: "✓";
  position: absolute; left: 0; top: -.05rem;
  color: var(--folur-green-light, #2E7D52); font-weight: 800;
}
.folur-course-hero__note {
  margin-top: .6rem; font-size: .7rem;
  color: var(--md-default-fg-color--light);
}
[data-md-color-scheme="slate"] .folur-learn { border-color: #2C3A32; }

/* ── Пошаговый рендер разделов урока ─────────────────────────────────────── */
.folur-step-hidden { display: none !important; }
@media print { .folur-step-hidden { display: block !important; } }
.folur-pager {
  display: flex; align-items: center; gap: 1rem;
  margin-top: 2rem; padding-top: 1.1rem;
  border-top: 1px solid var(--folur-line, #E4E0D6);
}
.folur-pager .md-button { margin: 0; white-space: nowrap; }
.folur-pager__title {
  flex: 1; text-align: center;
  font-size: .7rem; color: var(--md-default-fg-color--light);
  min-width: 0;
}
@media screen and (max-width: 44em) {
  .folur-pager { flex-wrap: wrap; }
  .folur-pager__title { order: -1; flex-basis: 100%; text-align: left; }
}
[data-md-color-scheme="slate"] .folur-pager { border-color: #2C3A32; }

/* ── Сайдбар модуля: уроки как отдельные карточки-шаги ───────────────────── */
.md-sidebar--primary .folur-nav-step { margin: .28rem 0; }
.md-sidebar--primary .folur-nav-step > a.md-nav__link {
  display: flex; align-items: flex-start; gap: .55rem;
  margin: 0; padding: .5rem .6rem;
  border: 1px solid var(--folur-line, #E4E0D6);
  border-radius: .5rem;
  background: var(--md-default-bg-color);
  transition: border-color .12s var(--ease, ease), background .12s;
}
.md-sidebar--primary .folur-nav-step > a.md-nav__link:hover {
  border-color: var(--folur-green-light, #2E7D52);
}
.md-sidebar--primary .folur-nav-step > a.md-nav__link.md-nav__link--active {
  background: rgba(46,125,82,.10);
  border-color: var(--folur-green-light, #2E7D52);
  font-weight: 700;
}
.folur-nav-num {
  flex: none;
  width: 1.25rem; height: 1.25rem;
  display: inline-grid; place-items: center;
  margin-top: .05rem;
  border-radius: .3rem;
  background: var(--folur-green, #1B5E3A);
  color: #fff !important;
  font-size: .6rem; font-weight: 800;
}
.md-nav__link--active .folur-nav-num { background: var(--folur-wheat, #D4A24E); }
.md-sidebar--primary .folur-nav-home > .md-nav__link { font-weight: 700; }
[data-md-color-scheme="slate"] .md-sidebar--primary .folur-nav-step > a.md-nav__link { border-color: #2C3A32; }
[data-md-color-scheme="slate"] .md-sidebar--primary .folur-nav-step > a.md-nav__link.md-nav__link--active {
  background: rgba(125,211,163,.12);
}

/* ── «Моё обучение» ──────────────────────────────────────────────────────── */
.folur-mylearn { margin-top: 1.4rem; display: grid; gap: .7rem; }
.folur-mylearn__row {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1.1rem;
  border: 1px solid var(--folur-line, #E4E0D6);
  border-radius: var(--r-md, .8rem);
  box-shadow: var(--sh1, 0 1px 2px rgba(19,64,41,.06));
  background: var(--md-default-bg-color);
}
.folur-mylearn__main { flex: 1; min-width: 0; }
.folur-mylearn__title {
  display: block; font-weight: 700; font-size: .82rem;
  margin-bottom: .4rem; color: var(--md-typeset-color) !important;
}
.folur-mylearn__title:hover { color: var(--folur-water-dark, #1F7A6E) !important; }
.folur-mylearn__row .md-button { margin: 0; white-space: nowrap; }
.folur-mylearn__res.ok { color: var(--folur-green-light, #2E7D52); font-weight: 700; }
.folur-mylearn__res.no { color: #b3541e; font-weight: 700; }
[data-md-color-scheme="slate"] .folur-mylearn__row { border-color: #2C3A32; }
@media screen and (max-width: 44em) {
  .folur-mylearn__row { flex-wrap: wrap; }
}

/* ── Степ-бар модуля (квадратики, как на Stepik) ─────────────────────────── */
.folur-steps {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin: 0 0 1rem;
  padding: .55rem .65rem;
  border: 1px solid var(--folur-line, #E4E0D6);
  border-radius: var(--r-sm, .45rem);
  background: var(--md-code-bg-color, rgba(0,0,0,.03));
}
.folur-steps__label {
  flex-basis: 100%;
  font-size: .64rem; font-weight: 600; letter-spacing: .04em;
  color: var(--md-default-fg-color--light);
  margin-bottom: .15rem;
}
.folur-step {
  width: 1.55rem; height: 1.55rem;
  display: inline-grid; place-items: center;
  border-radius: .3rem;
  border: 1.5px solid var(--folur-line, #cfcabc);
  background: var(--md-default-bg-color, #fff);
  color: var(--md-default-fg-color--light);
  font-size: .62rem; font-weight: 700;
  text-decoration: none !important;
  transition: transform .12s var(--ease, ease), border-color .12s, background .12s;
}
.folur-step:hover { transform: translateY(-2px); border-color: var(--folur-green-light, #2E7D52); }
.folur-step--done {
  background: var(--folur-green-light, #2E7D52);
  border-color: var(--folur-green-light, #2E7D52);
  color: #fff;
}
.folur-step--current {
  outline: 2.5px solid var(--folur-wheat, #D4A24E);
  outline-offset: 1.5px;
  font-weight: 800;
}
.folur-step--assessment { border-radius: 50%; }
[data-md-color-scheme="slate"] .folur-step {
  background: transparent; border-color: #2C3A32; color: #A7B3AC;
}
[data-md-color-scheme="slate"] .folur-step--done {
  background: #2E7D52; border-color: #2E7D52; color: #fff;
}

/* Empty editorial labels retain their anchors without occupying a lesson screen. */
.folur-empty-section-label { display: none !important; }
@media print { iframe.folur-python-editor { display: none !important; } }
