/* Этап 4а. Используются текущие Inter Display, PT Serif Caption и фиолетовый сайта. */
html.ast-js [data-ast-stage4a-source] { display: none !important; }
[data-ast-stage4a-hidden] { display: none !important; }
[data-ast-stage4a-live][hidden] { display: none !important; }
.ast-s4-group { display: block; width: 100%; align-self: stretch; flex: 0 0 auto; position: relative; z-index: 2; background: #fff; }
[data-ast-stage4a-source] {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Inter Display", "Inter", system-ui, sans-serif;
  color: #1f1338;
}
.ast-s4-section, .ast-s4-article-cta, .ast-s4-nav-intro, .ast-s4-nav-fallback {
  box-sizing: border-box;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 24px;
  /* непрозрачный белый фон: разделяет соседние фиолетовые секции Framer
     («С чего начать» и FAQ) — замечание владельца 01.12 */
  background: #fff;
  color: #1f1338;
  font-family: "Inter Display", "Inter", system-ui, sans-serif;
  align-self: stretch;
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  background: #fff;
}
.ast-s4-section *, .ast-s4-article-cta *, .ast-s4-nav-intro *, .ast-s4-nav-fallback * { box-sizing: border-box; }
.ast-s4-label {
  margin: 0 0 14px;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ast-s4-section h2, .ast-s4-article-cta h2 {
  margin: 0 0 20px;
  font-family: "PT Serif Caption", Georgia, serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.ast-s4-lead { max-width: 850px; margin: 0 0 26px; font-size: 18px; line-height: 1.55; }
.ast-s4-grid { display: grid; gap: 20px; }
.ast-s4-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ast-s4-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ast-s4-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ast-s4-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 26px;
  background: #f5f2fc;
  border: 1px solid #e8e1f5;
  border-radius: 16px;
}
.ast-s4-card h3 { margin: 0 0 12px; font-size: 23px; line-height: 1.25; font-weight: 500; }
.ast-s4-card p { margin: 0 0 14px; font-size: 16px; line-height: 1.55; }
.ast-s4-card p:last-child { margin-bottom: 0; }
.ast-s4-card-label { color: #7c3aed !important; font-size: 12px !important; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ast-s4-price { margin-top: auto !important; padding-top: 12px; font-size: 30px !important; font-weight: 600; color: #1f1338; }
.ast-s4-small { font-size: 13px !important; line-height: 1.5 !important; color: #5a5472; }
.ast-s4-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.ast-s4-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid #7c3aed;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none !important;
}
.ast-s4-button:hover { background: #6d28d9; }
.ast-s4-button-secondary { background: transparent; color: #7c3aed !important; }
.ast-s4-button-secondary:hover { background: #f5f2fc; }
.ast-s4-button:focus-visible, .ast-s4-text-link:focus-visible { outline: 3px solid #c4b5fd; outline-offset: 3px; }
.ast-s4-text-link { color: #7c3aed; font-size: 15px; line-height: 1.5; text-decoration: underline; text-underline-offset: 3px; }
.ast-s4-course-link { margin: 22px 0 0; }
.ast-s4-payment-note { margin: 22px 0 0; padding: 18px 20px; border-left: 3px solid #7c3aed; background: #f5f2fc; font-size: 14px; line-height: 1.55; }
.ast-s4-secretary { margin: 12px 0 0; font-size: 13px; color: #5a5472; }

/* Первый экран: длинный заголовок остаётся в текущей типографике. */
.ast-s4-hero-title { width: min(900px, calc(100vw - 80px)); max-width: calc(100vw - 80px); font-size: clamp(38px, 4.4vw, 64px) !important; line-height: 1.06 !important; }
.ast-s4-hero-label span[style*="opacity"] { opacity: 1 !important; transform: none !important; }
.ast-s4-hero-subtitle { max-width: 900px; }
.ast-s4-hero-extras { max-width: 900px; margin-top: 20px; font-family: "Inter Display", "Inter", system-ui, sans-serif; }
.ast-s4-hero-extras .ast-s4-actions { margin-top: 0; }
.ast-s4-hero-disclaimer { max-width: 760px; margin: 12px 0 0; color: #5a5472; font-size: 12px; line-height: 1.45; }

/* Отзывы и автор. */
.ast-s4-quote { display: flex; flex-direction: column; height: 100%; }
.ast-s4-quote-text { white-space: pre-line; }
.ast-s4-quote-author { margin-top: auto !important; padding-top: 18px; font-weight: 600; }
.ast-s4-quote-role, .ast-s4-quote-location, .ast-s4-quote-course { color: #5a5472; font-size: 13px !important; }
.ast-s4-author { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 36px; align-items: start; }
.ast-s4-author-photo { display: block; width: 280px; height: 326px; object-fit: cover; border-radius: 16px; }
.ast-s4-author h2 { margin-bottom: 12px; }
.ast-s4-author p { font-size: 16px; line-height: 1.6; }

/* Навигатор: текст находится над неизменным боевым iframe. */
.ast-s4-nav-intro { padding-top: 42px; padding-bottom: 32px; }
.ast-s4-nav-intro h1 { margin: 0 0 18px; font-family: "PT Serif Caption", Georgia, serif; font-size: clamp(34px, 4vw, 52px); font-weight: 400; line-height: 1.1; }
.ast-s4-nav-intro > p { max-width: 850px; font-size: 18px; line-height: 1.55; }
.ast-s4-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 26px 0; padding: 0; list-style: none; counter-reset: ast-step; }
.ast-s4-steps li { padding: 20px; background: #f5f2fc; border-radius: 14px; line-height: 1.5; counter-increment: ast-step; }
.ast-s4-steps li::before { content: counter(ast-step); display: block; margin-bottom: 8px; color: #7c3aed; font-size: 24px; font-weight: 600; }
.ast-s4-important { padding: 20px; border-left: 3px solid #7c3aed; background: #f5f2fc; }
.ast-s4-important h2 { margin: 0 0 8px; font-size: 20px; }
.ast-s4-important p { margin: 0; line-height: 1.55; }
.ast-s4-nav-fallback { margin-bottom: 36px; padding-top: 28px; padding-bottom: 28px; background: #f5f2fc; border-radius: 16px; }
.ast-s4-nav-fallback h2 { margin: 0 0 10px; font-size: 24px; }

/* CTA в конце статьи — перед ссылкой на следующую. */
.ast-s4-article-cta { margin-top: 44px; margin-bottom: 30px; padding-top: 36px; padding-bottom: 36px; background: #f5f2fc; border-radius: 16px; }
.ast-s4-article-cta h2 { font-size: 32px; }
.ast-s4-article-cta p { font-size: 17px; line-height: 1.55; }
.ast-s4-final { text-align: center; }
.ast-s4-final .ast-s4-actions { justify-content: center; }

@media (max-width: 1100px) {
  .ast-s4-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ast-s4-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 809.98px) {
  .ast-s4-section, .ast-s4-article-cta, .ast-s4-nav-intro, .ast-s4-nav-fallback { padding: 40px 20px; }
  .ast-s4-grid-2, .ast-s4-grid-3, .ast-s4-grid-4, .ast-s4-steps { grid-template-columns: 1fr; }
  .ast-s4-card { padding: 22px; }
  .ast-s4-author { grid-template-columns: 1fr; gap: 22px; }
  .ast-s4-author-photo { width: 180px; height: 209px; }
  .ast-s4-actions { align-items: stretch; flex-direction: column; }
  .ast-s4-actions .ast-s4-button { width: 100%; }
  .ast-s4-hero-title { width: calc(100vw - 60px); max-width: calc(100vw - 60px); font-size: 30px !important; line-height: 1.08 !important; }
  .ast-s4-hero-label { width: calc(100vw - 60px); max-width: calc(100vw - 60px); white-space: normal !important; font-size: 10px !important; line-height: 1.3 !important; }
  .ast-s4-hero-label span { white-space: normal !important; }
  .ast-s4-hero-subtitle { font-size: 14px !important; line-height: 1.35 !important; }
  .ast-s4-hero-extras { margin-top: 12px; transform: translateY(-140px); }
  .ast-s4-hero-extras .ast-s4-actions { gap: 8px; }
  .ast-s4-hero-extras .ast-s4-button { min-height: 44px; padding: 9px 14px; font-size: 13px; }
  .ast-s4-hero-disclaimer { margin-top: 8px; font-size: 11px; }
  .ast-s4-nav-intro h1 { font-size: 34px; }
}

/* ── Правки владельца 01.12 (раунд после GO этапа 4а) ─────────────────────── */

/* 1) Слова не рвутся посередине ни на какой ширине и ни при каком масштабе
   системного шрифта (правило владельца: «только полные слова»). Перебивает
   word-break/overflow-wrap из CSS Framer и старые правила ast-fixes. */
h1, h2, h3, h4, h5, h6, p, li, span, a, button, div.framer-text, section, article {
  word-break: normal !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
}

/* 2) FAQ: кнопка «Задать свой вопрос» — в самый конец, после вопросов 11–14
   (ast-faq-extra добавлена этапом 3 после кнопки; порядок чиним на уровне CSS,
   чтобы порядок переживал монтирование React). */
.framer-14j3im5 { display: flex !important; flex-direction: column !important; }
.framer-14j3im5 > .framer-1v7a9be { order: 1; }
.framer-14j3im5 > .framer-18esg6o { order: 2; }
.framer-14j3im5 > .ast-faq-extra { order: 3; }
.framer-14j3im5 > .framer-1ez14s9-container { order: 4; margin-top: 28px; }

/* 3) Кнопки не «залипают» друг на друге: у кнопочных контейнеров Framer
   высота по содержимому и настоящий зазор, подписи не режутся по высоте. */
[data-framer-name="Buttons"] a { height: auto !important; min-height: 40px !important; }
[data-framer-name="Buttons"] a > div { height: auto !important; min-height: 0 !important; }

/* заголовки переносятся по словам: Framer ставит white-space:pre, без этого
   H1 уходит одной строкой за край */
h1, h2 {
  white-space: normal !important;
}

/* 4) Letter-анимация Framer дробит hero-H1 на span-группы по «измеренным» строкам;
   при несовпадении метрик шрифта граница группы встаёт посреди слова
   («управленчес|кие» у владельца). Плоский инлайн возвращает обычный текстовый
   поток — браузер переносит строки сам и только целыми словами. */
.ast-s4-hero-title span { display: inline !important; }

/* 5) Мобильные кнопки курсов (замечание владельца 01.12): текст виден целиком,
   аккуратный зазор, кегль чуть меньше. Работает и при увеличенном системном
   шрифте: кнопка растёт по высоте, подпись переносится, ничего не обрезается. */
@media (max-width: 809.98px) {
  [data-framer-name="Buttons"] {
    width: 100% !important;
    max-width: 100% !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    height: auto !important;
    overflow: visible !important;
  }
  [data-framer-name="Buttons"] a {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 44px !important;
    padding: 10px 16px !important;
    overflow: visible !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }
  [data-framer-name="Buttons"] a > div,
  [data-framer-name="Buttons"] a [data-framer-name="Text"] {
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    width: auto !important;
  }
  [data-framer-name="Buttons"] a p {
    font-size: 14px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    overflow: visible !important;
    max-width: 100% !important;
  }
  /* ссылки-пилюли «Программа курса» / «Фрагмент лекции»: контейнер Links
     растягиваем на всю ширину, ссылки — в столбик, с равным зазором */
  [data-framer-name="Buttons"] [data-framer-name="Links"] {
    width: 100% !important;
    max-width: 100% !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
  }
  [data-framer-name="Buttons"] [data-framer-name="Links"] > a {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: flex-start !important;
    padding-left: 0 !important;
  }
}
