/* ─────────────────────────────────────────────────────────────
   Детальная страница курса ДПО — визуальное оформление (v2)
   ───────────────────────────────────────────────────────────── */
:root{
  --crs-accent:#c0442f;
  --crs-accent-dark:#9a3524;
  --crs-ink:#242424;
  --crs-muted:#6f6f6f;
  --crs-soft:#faf3ee;
  --crs-line:#ececec;
  --crs-radius:14px;
}

/* ── HERO ── */
.course-hero{ padding-bottom:56px !important; }
.course-hero .section__wrapper{ position:relative; }

/* Заголовок — принудительно уменьшаем (шаблон сайта делает его огромным) */
.course-hero h1.course-hero__title{
  font-size:clamp(22px, 1.15rem + 1.3vw, 34px) !important;
  line-height:1.2 !important;
  font-weight:700 !important;
  margin:0 0 14px !important;
  max-width:780px;
  letter-spacing:-0.01em;
}

.course-hero__grid{
  display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:38px; align-items:center; margin-top:6px;
}
.course-hero__type{
  display:inline-block; font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  padding:5px 13px; border-radius:30px; background:rgba(255,255,255,.16); color:#fff; margin-bottom:14px;
}
.course-hero__lead{ font-size:16px; line-height:1.6; opacity:.94; max-width:620px; margin:0 0 22px; }
.course-hero__media img{ width:100%; border-radius:18px; display:block; box-shadow:0 16px 40px rgba(0,0,0,.24); }

/* характеристики — компактные «плитки» */
.course-specs{ list-style:none; margin:0 0 26px; padding:0; display:flex; flex-wrap:wrap; gap:8px; }
.course-specs__item{
  display:flex; flex-direction:column; gap:2px; padding:9px 15px; border-radius:12px;
  background:rgba(255,255,255,.13); border:1px solid rgba(255,255,255,.14); min-width:88px;
}
.course-specs__k{ font-size:11px; text-transform:uppercase; letter-spacing:.05em; opacity:.72; }
.course-specs__v{ font-size:15px; font-weight:700; line-height:1.25; }

/* кнопки */
.course-btn{
  display:inline-block; padding:12px 30px; border-radius:10px; font-size:15px; font-weight:700;
  text-decoration:none; transition:transform .12s ease, box-shadow .2s ease, opacity .2s; cursor:pointer;
}
.course-btn--hero{ background:#fff; color:var(--crs-accent-dark); box-shadow:0 8px 20px rgba(0,0,0,.16); }
.course-btn--hero:hover{ color:var(--crs-accent-dark); text-decoration:none; transform:translateY(-2px); box-shadow:0 12px 26px rgba(0,0,0,.22); }

/* ── BODY ── */
.course-body{ background:#fff; }
.course-body .content{ max-width:880px; }
.course-block{ padding:34px 0; border-top:1px solid var(--crs-line); }
.course-block:first-child{ border-top:0; padding-top:14px; }

.course-block__title{
  position:relative; font-size:22px; line-height:1.2; margin:0 0 20px; padding-left:16px; color:var(--crs-ink); font-weight:700;
}
.course-block__title::before{
  content:""; position:absolute; left:0; top:2px; bottom:2px; width:5px; border-radius:4px;
  background:linear-gradient(180deg,var(--crs-accent),var(--crs-accent-dark));
}

.course-richtext{ font-size:15.5px; line-height:1.75; color:#383838; }
.course-richtext p{ margin:0 0 13px; }
.course-richtext ul,.course-richtext ol{ margin:0 0 14px; padding-left:22px; }
.course-richtext li{ margin-bottom:7px; }
.course-richtext strong{ color:var(--crs-ink); }
.course-richtext img{ max-width:100%; height:auto; border-radius:10px; }

/* Для кого — карточки-пилюли */
.course-audience{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:10px; }
.course-audience li{
  position:relative; padding:13px 16px 13px 42px; background:var(--crs-soft); border-radius:12px;
  font-size:14.5px; line-height:1.5; color:#3a3a3a;
}
.course-audience li::before{
  content:""; position:absolute; left:16px; top:50%; transform:translateY(-50%); width:12px; height:12px; border-radius:50%;
  background:var(--crs-accent); box-shadow:0 0 0 4px rgba(192,68,47,.14);
}

/* Результаты */
.course-results{ display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:11px; }
.course-results__item{
  display:flex; gap:11px; align-items:flex-start; padding:14px 16px; border:1px solid var(--crs-line);
  border-radius:12px; background:#fff; font-size:14.5px; line-height:1.55; color:#383838;
}
.course-results__ic{ flex:0 0 auto; color:var(--crs-accent); margin-top:1px; }

/* Файлы */
.course-files{ display:flex; flex-direction:column; gap:10px; }
.course-file{
  display:flex; align-items:center; gap:14px; padding:15px 18px; border:1px solid var(--crs-line);
  border-radius:12px; text-decoration:none; color:var(--crs-ink); transition:border-color .2s, box-shadow .2s, transform .1s;
}
.course-file:hover{ border-color:var(--crs-accent); box-shadow:0 8px 20px rgba(0,0,0,.06); text-decoration:none; color:var(--crs-ink); transform:translateY(-1px); }
.course-file__ic{ color:var(--crs-accent); flex:0 0 auto; }
.course-file__name{ font-weight:600; font-size:15px; display:flex; flex-direction:column; }
.course-file__meta{ font-weight:400; font-size:12.5px; color:var(--crs-muted); margin-top:2px; }
.course-file__dl{ margin-left:auto; font-size:13px; font-weight:700; color:var(--crs-accent); white-space:nowrap; }

/* Преподаватели */
.course-teachers{ display:grid; grid-template-columns:repeat(auto-fill,minmax(310px,1fr)); gap:16px; }
.course-teacher{
  display:flex; gap:15px; padding:18px; border:1px solid var(--crs-line); border-radius:var(--crs-radius);
  background:#fff; transition:box-shadow .2s, transform .1s;
}
.course-teacher:hover{ box-shadow:0 10px 26px rgba(0,0,0,.07); transform:translateY(-2px); }
.course-teacher__photo{ flex:0 0 76px; width:76px; height:76px; border-radius:50%; overflow:hidden; background:var(--crs-soft); display:flex; align-items:center; justify-content:center; color:#d0b6a8; }
.course-teacher__photo img{ width:100%; height:100%; object-fit:cover; }
.course-teacher__name{ font-size:15.5px; font-weight:700; color:var(--crs-ink); line-height:1.3; }
.course-teacher__pos{ font-size:13px; color:var(--crs-accent); font-weight:600; margin:4px 0 0; line-height:1.4; }
.course-teacher__bio{ font-size:13.5px; line-height:1.5; color:#575757; margin-top:8px; }

/* Документ */
.course-doc{ display:grid; grid-template-columns:280px 1fr; gap:28px; align-items:start; }
.course-doc__img{ display:block; border:1px solid var(--crs-line); border-radius:12px; overflow:hidden; transition:box-shadow .2s; }
.course-doc__img:hover{ box-shadow:0 10px 26px rgba(0,0,0,.1); }
.course-doc__img img{ width:100%; display:block; }
.course-doc__label{ font-size:16px; font-weight:700; color:var(--crs-ink); margin-bottom:8px; }

.course-contact p{ font-size:14.5px; line-height:1.75; color:#444; }
.course-back{
  display:inline-flex; align-items:center; gap:7px; margin-top:30px; font-size:14px; font-weight:600;
  color:var(--crs-accent); text-decoration:none;
}
.course-back:hover{ text-decoration:underline; color:var(--crs-accent); }

/* ── STICKY CTA (моб.) ── */
.course-sticky{ display:none; }

@media (max-width:960px){
  .course-hero__grid{ grid-template-columns:1fr; gap:24px; }
  .course-hero__media{ order:-1; max-width:520px; }
  .course-doc{ grid-template-columns:1fr; }
  .course-doc__img{ max-width:300px; }
}
@media (max-width:768px){
  .course-hero{ padding-bottom:40px !important; }
  .course-hero h1.course-hero__title{ font-size:clamp(20px, 4.4vw, 26px) !important; }
  .course-btn--hero{ width:100%; text-align:center; }
  .course-block{ padding:26px 0; }
  .course-block__title{ font-size:19px; }
  .course-sticky{
    display:flex; position:fixed; left:0; right:0; bottom:0; z-index:900; align-items:center; gap:12px;
    padding:9px 14px calc(9px + env(safe-area-inset-bottom)); background:#fff;
    box-shadow:0 -6px 20px rgba(0,0,0,.12); border-top:1px solid var(--crs-line);
  }
  .course-sticky__name{ font-size:12.5px; font-weight:600; line-height:1.25; color:var(--crs-ink); display:flex; flex-direction:column; min-width:0; overflow:hidden; }
  .course-sticky__name > :first-child{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .course-sticky__price{ color:var(--crs-accent); font-weight:700; white-space:nowrap; }
  .course-btn--sticky{ margin-left:auto; flex:0 0 auto; background:var(--crs-accent); color:#fff; padding:11px 20px; }
  .course-btn--sticky:hover{ color:#fff; text-decoration:none; }
  .course-body{ padding-bottom:80px; }
}

/* ── Хлебные крошки (в шапке) ── */
.course-crumbs{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:13px; margin-bottom:18px; }
.course-crumbs a{ color:#fff; opacity:.82; text-decoration:none; }
.course-crumbs a:hover{ opacity:1; text-decoration:underline; color:#fff; }
.course-crumbs__sep{ opacity:.55; }
.course-crumbs__cur{ opacity:.7; max-width:520px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── Блок «Записаться» + QR ── */
.course-enroll{
  display:flex; flex-wrap:wrap; gap:26px; align-items:center; padding:22px 24px;
  background:linear-gradient(135deg,#fff 0%,var(--crs-soft) 100%);
  border:1px solid var(--crs-line); border-radius:16px;
}
.course-enroll__qr{ display:flex; flex-direction:column; align-items:center; gap:8px; }
.course-enroll__qrbox{ width:150px; height:150px; background:#fff; padding:8px; border-radius:12px; box-shadow:0 6px 16px rgba(0,0,0,.08); }
.course-enroll__qrbox img,.course-enroll__qrbox canvas{ display:block; border-radius:4px; }
.course-enroll__qrhint{ font-size:11.5px; color:var(--crs-muted); text-align:center; line-height:1.35; }
.course-enroll__cta{ flex:1 1 240px; display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
.course-enroll__dates{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.course-enroll__dates-k{ font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--crs-muted); }
.course-enroll__date{ font-size:14px; font-weight:700; color:var(--crs-ink); background:#fff; border:1px solid var(--crs-line); border-radius:20px; padding:5px 14px; }
.course-btn--enroll{ background:var(--crs-accent); color:#fff; }
.course-btn--enroll:hover{ background:var(--crs-accent-dark); color:#fff; text-decoration:none; transform:translateY(-2px); box-shadow:0 10px 24px rgba(192,68,47,.28); }
.course-enroll__note{ font-size:12px; color:var(--crs-muted); }

/* ── Контакты ── */
.course-contact__card{ background:var(--crs-soft); border-radius:14px; padding:18px 22px; max-width:560px; }
.course-contact__head{ font-weight:700; color:var(--crs-ink); font-size:15px; margin:0 0 10px; }
.course-contact__line{ font-size:14.5px; color:#444; margin:0 0 7px; line-height:1.5; }
.course-contact__card a{ color:var(--crs-accent); font-weight:600; text-decoration:none; white-space:nowrap; }
.course-contact__card a:hover{ text-decoration:underline; }

/* преподаватель без фото — компактнее */
.course-teacher__photo[data-empty]{ border-radius:12px; }

@media (max-width:768px){
  .course-crumbs{ font-size:12px; }
  .course-crumbs__cur{ max-width:180px; }
  .course-enroll{ padding:18px; gap:18px; justify-content:center; }
  .course-enroll__cta{ align-items:stretch; }
  .course-btn--enroll{ text-align:center; }
}

/* ── v4: ссылка «Все программы» наверху + чуть крупнее текст (заголовки не трогаем) ── */
.course-back--top{ margin:0 0 4px; }
.course-richtext{ font-size:16.5px; line-height:1.78; }
.course-audience li{ font-size:15.5px; }
.course-results__item{ font-size:15.5px; }
.course-teacher__pos{ font-size:13.5px; }
.course-teacher__bio{ font-size:14.5px; }
.course-contact__line{ font-size:15px; }
.course-contact__head{ font-size:15.5px; }
.course-file__name{ font-size:15.5px; }
.course-hero__lead{ font-size:16.5px; }
@media (max-width:768px){
  .course-richtext{ font-size:16px; }
}

/* ── Кнопка «Редактировать» (только редакторам) ── */
.course-edit-fab{
  position:fixed; right:20px; bottom:20px; z-index:950;
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 18px; border-radius:30px; background:#242424; color:#fff;
  font-size:14px; font-weight:600; text-decoration:none;
  box-shadow:0 8px 24px rgba(0,0,0,.28); transition:transform .12s, box-shadow .2s, background .2s;
}
.course-edit-fab:hover{ color:#fff; text-decoration:none; transform:translateY(-2px); box-shadow:0 12px 30px rgba(0,0,0,.34); background:#000; }
.course-edit-fab svg{ flex:0 0 auto; }
@media (max-width:768px){
  .course-edit-fab{ right:14px; bottom:78px; padding:12px; border-radius:50%; }
  .course-edit-fab span{ display:none; }
}
