/* ============================================================
   MEDTRAIN — прототип. Дизайн-система и компоненты.
   Чистый медицинский стиль. Self-contained (без внешних CDN).
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --c-primary:        #2EAABE;  /* фирменный цвет */
  --c-primary-dark:   #136A78;
  --c-primary-600:    #2496A8;
  --c-primary-light:  #E2F4F7;
  --c-primary-tint:   #F2FBFC;
  --c-cyan:           #5AD2E2;  /* светлый акцент для градиентов */
  --c-accent:         #2EAABE;
  --c-accent-dark:    #1E8B9C;
  --c-ink:            #0F2730;
  --c-body:          #33474F;
  --c-muted:          #6B8088;
  --c-bg:             #FFFFFF;
  --c-bg-soft:        #F4F8F9;
  --c-border:         #E1ECEE;
  --c-success:        #1A9E6B;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shadow-sm: 0 1px 2px rgba(15,39,48,.06), 0 1px 3px rgba(15,39,48,.05);
  --shadow:    0 6px 18px rgba(13,78,85,.08), 0 2px 6px rgba(13,78,85,.05);
  --shadow-lg: 0 24px 50px rgba(13,78,85,.16);
  --shadow-brand: 0 16px 34px rgba(14,124,134,.28);

  --maxw: 1280px;
  --gap: clamp(16px, 3vw, 28px);

  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--c-body);
  background: var(--c-bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.18; font-weight: 800; letter-spacing: -.02em; }
ul { list-style: none; padding: 0; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: none; margin-inline: auto; padding-inline: clamp(20px, 3.5vw, 56px); }
.section { padding-block: clamp(48px, 7vw, 92px); }
.section--soft { background: var(--c-bg-soft); }
.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-primary); background: var(--c-primary-light);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.section-title { font-size: clamp(26px, 3.6vw, 40px); }
.section-sub { margin-top: 14px; color: var(--c-muted); font-size: clamp(16px, 1.7vw, 19px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 16px; line-height: 1;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap; position: relative; overflow: hidden; isolation: isolate;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(180deg, var(--c-cyan), var(--c-primary)); color: #fff; box-shadow: 0 10px 24px rgba(46,170,190,.40); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(46,170,190,.52); }
.btn--brand { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-brand); }
.btn--brand:hover { background: var(--c-primary-600); transform: translateY(-2px); }

/* Залитые кнопки — равномерная заливка без бегущего блика (создавал «ушки» по краям) */
.btn--ghost { background: transparent; color: var(--c-primary); border-color: var(--c-border); }
.btn--ghost:hover { border-color: var(--c-primary); background: var(--c-primary-tint); }
.btn--light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); backdrop-filter: blur(4px); }
.btn--light:hover { background: rgba(255,255,255,.24); }
.btn--white { background: #fff; color: var(--c-primary-dark); box-shadow: 0 10px 24px rgba(8,40,46,.18); }
.btn--white:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(8,40,46,.26); }
.btn--block { width: 100%; }
.btn--sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; color: var(--c-ink); font-size: 21px; letter-spacing: -.02em; }
.brand .logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-cyan));
  display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-brand);
}
.brand small { display:block; font-size: 11px; font-weight: 600; color: var(--c-muted); letter-spacing: .14em; }
.brand-logo { height: 50px; width: auto; display: block; transition: transform .2s ease; }
.brand:hover .brand-logo { transform: scale(1.03); }
.site-footer .brand-logo { height: 58px; }
@media (max-width: 560px) { .brand-logo { height: 40px; } }
.main-nav { margin-left: auto; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 15.5px; color: var(--c-body);
  transition: background .15s, color .15s;
}
.main-nav a:hover { color: var(--c-primary); background: var(--c-primary-tint); }
.has-sub { position: relative; }
.has-sub > a::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .5; }
.submenu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 268px;
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: .18s ease;
}
.has-sub:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: 10px 12px; border-radius: 9px; font-size: 15px; }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* language switcher */
.lang { display: flex; gap: 2px; background: var(--c-bg-soft); border: 1px solid var(--c-border); border-radius: 999px; padding: 3px; }
.lang button, .lang .lang-btn { border: 0; background: transparent; color: var(--c-muted); font-weight: 700; font-size: 13px; padding: 6px 11px; border-radius: 999px; transition: .15s; text-decoration: none; display: inline-block; cursor: pointer; }
.lang button.active, .lang .lang-btn.active { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }

.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--c-border); background: #fff; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--c-ink); margin-inline: auto; position: relative; transition: .2s;
}
.nav-toggle span::before { position: absolute; top: -6px; left: 0; }
.nav-toggle span::after  { position: absolute; top: 6px;  left: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 120% at 85% -10%, var(--c-cyan) 0%, var(--c-primary) 38%, var(--c-primary-dark) 100%);
}
.hero::before { content:""; position:absolute; inset:0;
  background-image: radial-gradient(rgba(255,255,255,.10) 1.5px, transparent 1.6px);
  background-size: 26px 26px; opacity:.5; mask-image: linear-gradient(180deg, #000, transparent 80%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: clamp(48px, 7vw, 88px); }
.hero h1 { color: #fff; font-size: clamp(32px, 5vw, 56px); }
.hero .lead { margin-top: 20px; font-size: clamp(17px, 2vw, 21px); color: rgba(255,255,255,.92); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-trust { display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap; }
.hero-trust .num { font-size: clamp(24px, 3vw, 34px); font-weight: 800; color: #fff; }
.hero-trust .lbl { font-size: 14px; color: rgba(255,255,255,.8); }
.hero-card {
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius-xl);
  backdrop-filter: blur(8px); padding: clamp(20px, 3vw, 30px); box-shadow: var(--shadow-lg);
}
.hero-card h2 { color: #fff; font-size: 20px; }
.hero-card p { color: rgba(255,255,255,.85); font-size: 15px; margin-top: 6px; }
.hero-card .mini { display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: var(--radius); background: rgba(255,255,255,.1); margin-top: 14px; }
.hero-card .mini .ic { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: none; }
.hero-card .mini b { color: #fff; display: block; font-size: 15px; }
.hero-card .mini span { color: rgba(255,255,255,.78); font-size: 13px; }
.hero-wave { position: relative; display:block; width:100%; height: auto; color: var(--c-bg); }

/* ---------- Specialty grid ---------- */
.spec-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.spec-card {
  display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--c-border); transition: .18s ease;
}
.spec-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.spec-card .ic { width: 50px; height: 50px; border-radius: 14px; background: var(--c-primary-light); color: var(--c-primary); display: grid; place-items: center; }
.spec-card b { color: var(--c-ink); font-size: 16px; }
.spec-card span { font-size: 13.5px; color: var(--c-muted); }

/* ---------- Main directions (4 на главной) ---------- */
.dir-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.dir-card { display: flex; flex-direction: column; gap: 14px; padding: 28px 24px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--c-border); position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.dir-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--c-cyan), var(--c-primary)); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.dir-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.dir-card:hover::before { transform: scaleX(1); }
.dir-card .ic { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--c-cyan), var(--c-primary-dark)); transition: transform .3s ease; }
.dir-card:hover .ic { transform: scale(1.08) rotate(-4deg); }
.dir-card .ic--img { width: 64px; height: 64px; background: none; border-radius: 0; }
.dir-card .ic--img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.dir-card h3, .dir-card h2 { font-size: 19px; }
.dir-card p { color: var(--c-muted); font-size: 14.5px; flex: 1; }
.dir-card .meta { font-size: 12.5px; font-weight: 700; color: var(--c-primary); text-transform: uppercase; letter-spacing: .04em; }
.dir-card .go { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--c-primary); font-size: 14px; }
.dir-card .go svg { transition: transform .2s ease; }
.dir-card:hover .go svg { transform: translateX(4px); }

/* ---------- Course cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--gap); }
.course-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); overflow: hidden; transition: .18s ease;
}
.course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.course-thumb { position: relative; aspect-ratio: 16/9; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark)); }
.course-thumb.alt1 { background: linear-gradient(135deg, #2563EB, #1E3A8A); }
.course-thumb.alt2 { background: linear-gradient(135deg, #7C3AED, #4C1D95); }
.course-thumb.alt3 { background: linear-gradient(135deg, #0891B2, #155E75); }
.course-thumb.alt4 { background: linear-gradient(135deg, #DB2777, #831843); }
.course-thumb svg { width: 64px; height: 64px; opacity: .9; }
.course-thumb .thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.course-card:hover .course-thumb .thumb-img { transform: scale(1.05); transition: transform .4s ease; }
.course-badge { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.92); color: var(--c-primary-dark);
  font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.course-badge--new { background: var(--c-primary); color: #fff; }
.course-badge--free { background: #1A9E6B; color: #fff; }
.course-badge--pedia { background: #7C3AED; color: #fff; }

/* ---------- Level indicator (psychology-informed) ---------- */
.level { position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: #fff; box-shadow: var(--shadow-sm); }
.level .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.level .bars i { width: 3px; border-radius: 1px; background: currentColor; opacity: .22; }
.level .bars i:nth-child(1) { height: 5px; }
.level .bars i:nth-child(2) { height: 8px; }
.level .bars i:nth-child(3) { height: 11px; }
.level--start  { color: #1A9E6B; }   /* зелёный: безопасно, старт, рост */
.level--adv    { color: #E08A0B; }   /* янтарный: средний */
.level--expert { color: #C0392B; }   /* красный: высокий */
.level--start  .bars i:nth-child(1) { opacity: 1; }
.level--adv    .bars i:nth-child(1), .level--adv .bars i:nth-child(2) { opacity: 1; }
.level--expert .bars i { opacity: 1; }
/* мягкая зелёная окантовка обложки у курсов «с нуля» — подсознательный сигнал «вход здесь» */
.course-thumb.is-start::after { content: ""; position: absolute; inset: 0; border: 3px solid rgba(26,158,107,.55); border-radius: inherit; pointer-events: none; }
/* статичная легенда уровней */
.level-legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.level-legend .level { position: static; box-shadow: none; border: 1px solid var(--c-border); }
.level-legend .lg-note { font-size: 14px; color: var(--c-muted); }
.course-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.course-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--c-muted); }
.course-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.course-card h3 { font-size: 18px; line-height: 1.3; }
.course-card p { font-size: 14.5px; color: var(--c-muted); flex: 1; }
.course-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--c-border); }
.course-ask { display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 10px; padding: 9px 12px;
  background: rgba(14,143,163,.07); border: 1px solid rgba(14,143,163,.30); border-radius: 11px;
  color: #0e8fa3; cursor: pointer; text-align: left; font: inherit; transition: background .15s, border-color .15s; }
.course-ask:hover { background: rgba(14,143,163,.14); border-color: rgba(14,143,163,.55); }
.course-ask svg { flex: 0 0 auto; }
.course-ask .ca-txt b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.15; }
.course-ask .ca-txt small { display: block; font-size: 11px; color: var(--c-muted); line-height: 1.2; margin-top: 1px; }
.course-tutor { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--c-ink); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--c-primary), var(--c-cyan)); flex: none; }
.avatar--photo { object-fit: cover; background: none; padding: 0; }

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 26px 16px; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.stat .big { font-size: clamp(32px, 4vw, 46px); font-weight: 800; color: var(--c-primary); letter-spacing: -.03em; }
.stat .cap { color: var(--c-muted); font-size: 15px; margin-top: 4px; }

/* ---------- Feature / advantages ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.feature { padding: 26px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--c-border); }
.feature .ic { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--c-primary), var(--c-cyan)); margin-bottom: 16px; }
.feature h3 { font-size: 19px; }
.feature p { color: var(--c-muted); font-size: 15px; margin-top: 8px; }

/* ---------- Split / test CTA ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.callout {
  border-radius: var(--radius-xl); padding: clamp(28px, 4vw, 48px); color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, var(--c-cyan), var(--c-primary) 45%, var(--c-primary-dark));
}
.callout h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); }
.callout p { color: rgba(255,255,255,.9); margin-top: 12px; max-width: 520px; }

/* ---------- Trial / list ---------- */
.checklist li { display: flex; gap: 12px; padding: 9px 0; align-items: flex-start; }
.checklist .tick { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--c-primary-light); color: var(--c-primary); display: grid; place-items: center; font-size: 13px; font-weight: 800; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.news-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); overflow: hidden; transition: .18s; display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--c-cyan), var(--c-primary-dark)); position: relative; }
.news-thumb .tag { position: absolute; top: 12px; left: 12px; background: var(--c-accent); color: #3a2600; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.news-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-date { font-size: 13px; color: var(--c-muted); }
.news-card h3 { font-size: 17px; line-height: 1.32; }
.news-more { margin-top: auto; font-weight: 700; color: var(--c-primary); font-size: 14px; }

/* ---------- Testimonials ---------- */
.quote { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.quote .stars { color: var(--c-accent); font-size: 18px; letter-spacing: 2px; }
.quote p { color: var(--c-body); font-size: 16px; margin: 14px 0 18px; font-style: italic; }
.quote .who { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--c-ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-primary-dark); color: rgba(255,255,255,.78); padding-top: clamp(48px, 6vw, 76px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 40px; }
.site-footer .brand { color: #fff; }
.site-footer h2 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.site-footer a { color: rgba(255,255,255,.78); }
.site-footer a:hover { color: #fff; }
.footer-links li { padding: 6px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-block: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 14px; }
.footer-contact li { display: flex; gap: 10px; padding: 7px 0; }

/* ---------- Breadcrumbs / page header ---------- */
.page-hero { background: var(--c-primary-tint); border-bottom: 1px solid var(--c-border); padding-block: clamp(28px, 4vw, 46px); }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--c-muted); margin-bottom: 12px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--c-primary); }
.crumbs span { opacity: .5; }
.page-hero h1 { font-size: clamp(26px, 4vw, 42px); }

/* ---------- Каталог литературы (.lit-grid) ---------- */
.lit-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 720px) { .lit-grid { grid-template-columns: 1fr 1fr; } }
.lit-card { display: flex; gap: 18px; background: #fff; border: 1px solid var(--c-border); border-radius: 16px; padding: 18px; transition: box-shadow .2s, transform .2s; }
.lit-card:hover { box-shadow: 0 10px 30px rgba(16,42,67,.10); transform: translateY(-2px); }
.lit-cover { flex: 0 0 120px; width: 120px; display: block; }
.lit-cover img { width: 120px; height: 168px; object-fit: cover; border-radius: 10px; box-shadow: 0 6px 18px rgba(16,42,67,.18); background: var(--c-bg-soft); transition: transform .2s; }
.lit-cover:hover img { transform: scale(1.03); }
.lit-cover .ic { display: flex; align-items: center; justify-content: center; width: 120px; height: 168px; border-radius: 10px; background: var(--c-bg-soft); color: var(--c-primary); }
.lit-cover .ic svg { width: 48px; height: 48px; }
.lit-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lit-tag { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--c-primary); background: var(--c-bg-soft); border-radius: 999px; padding: 3px 10px; margin-bottom: 8px; align-self: flex-start; }
.lit-body h3, .lit-body h2 { font-size: 17px; line-height: 1.35; font-weight: 700; margin: 0 0 6px; }
.lit-body h3 a, .lit-body h2 a { color: var(--c-ink); text-decoration: none; }
.lit-body h3 a:hover, .lit-body h2 a:hover { color: var(--c-primary); }
.lit-author { font-size: 14px; font-weight: 600; color: var(--c-muted); margin: 0 0 8px; }
.lit-desc { font-size: 14.5px; line-height: 1.6; color: var(--c-muted); margin: 0 0 12px; }
.lit-price { font-size: 20px; font-weight: 800; color: var(--c-ink); white-space: nowrap; margin: 0 0 12px; }
.lit-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.lit-more, .lit-order { padding: 9px 20px; font-size: 14px; }

/* Детальная страница издания */
.detail-grid .prose { max-width: none; }
.lit-detail-cover { width: 100%; max-width: 280px; display: block; margin: 0 auto 16px; border-radius: 12px; box-shadow: 0 10px 28px rgba(16,42,67,.20); }
.lit-detail-price { font-size: 26px; font-weight: 800; color: var(--c-ink); text-align: center; margin-bottom: 16px; }

/* ---------- Текстовая страница / юр. документы (.prose) ---------- */
.prose { max-width: 900px; line-height: 1.75; }
.prose--full { max-width: none; }
.prose > p:first-child { font-size: 1.08em; color: var(--c-ink); }
.prose h2 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; line-height: 1.3; margin: 30px 0 12px; color: var(--c-ink); }
.prose h3 { font-size: clamp(17px, 2vw, 20px); font-weight: 700; margin: 22px 0 10px; color: var(--c-ink); }
.prose p { margin-bottom: 14px; }
.prose b, .prose strong { font-weight: 700; }
.prose ul, .prose ol { list-style: revert; padding-left: 24px; margin: 8px 0 18px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose ul ul { list-style: circle; margin: 6px 0; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { opacity: .8; }
.prose .legal-table { border-collapse: collapse; width: 100%; max-width: 760px; margin: 10px 0 20px; font-size: 15px; }
.prose .legal-table td { border: 1px solid var(--c-border); padding: 8px 12px; vertical-align: top; }
.prose .legal-table td p { margin: 0; }
.prose .legal-table tr td:first-child { width: 280px; background: var(--c-bg-soft); }

/* ---------- Команда: сетка преподавателей ---------- */
.teacher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 24px 18px; margin-top: 8px; }
.tcard { margin: 0; text-align: center; }
.tcard-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); display: block; background: var(--c-bg-soft); }
.tcard-cap { display: block; margin-top: 12px; }
.tcard-name { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; }
.tcard-role { display: block; margin-top: 4px; font-size: 12.5px; color: var(--c-muted); line-height: 1.35; }
.teacher-count { margin-top: 30px; text-align: center; color: var(--c-muted); }
.tcard-ph { display: flex; align-items: center; justify-content: center; background: var(--c-primary-light); color: var(--c-primary); }
.tcard-ph span { font-size: clamp(34px, 6vw, 54px); font-weight: 800; letter-spacing: .04em; }
.tcard--link { display: block; text-decoration: none; color: inherit; transition: transform .18s; }
.tcard--link .tcard-img { transition: box-shadow .18s; }
.tcard--link:hover { transform: translateY(-4px); }
.tcard--link:hover .tcard-img { box-shadow: 0 14px 32px rgba(16,42,67,.22); }
.tcard--link:hover .tcard-name { color: var(--c-primary); }
.tcard-more { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--c-primary); opacity: 0; transition: opacity .18s; }
.tcard--link:hover .tcard-more { opacity: 1; }

/* Страница преподавателя */
.teacher-lead { font-size: 18px; line-height: 1.6; color: var(--c-ink); margin: 0 0 20px; }
.detail-grid .prose h4 { font-size: 17px; font-weight: 700; color: var(--c-ink); margin: 22px 0 8px; }
.teacher-detail-photo { width: 100%; max-width: 240px; aspect-ratio: 1/1; object-fit: cover; display: block; margin: 0 auto 14px; border-radius: 50%; box-shadow: var(--shadow); }
.teacher-detail-photo.tcard-ph { display: flex; }
.teacher-detail-name { font-weight: 700; font-size: 17px; text-align: center; }
/* Вкладка «Преподаватель» на странице курса */
.tutor-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.tutor-photo { width: 88px; height: 88px; flex: 0 0 88px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }
span.tutor-photo { display: flex; align-items: center; justify-content: center; background: var(--c-primary-light); color: var(--c-primary); font-weight: 800; }
.tutor-role { font-size: 14px; color: var(--c-muted); margin: 4px 0 0; line-height: 1.4; }
#t-tutor .prose h4 { font-size: 16px; margin: 18px 0 7px; }
#t-tutor .teacher-lead { font-size: 16px; }
.teacher-detail-role { font-size: 13.5px; color: var(--c-muted); text-align: center; margin: 6px 0 4px; line-height: 1.4; }

/* ---------- Переливающиеся кнопки-фильтры по уровню ---------- */
.course-filters { display: flex; flex-direction: column; gap: 12px; margin: 0 0 26px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; }
.lvl-btn {
  position: relative; overflow: hidden; isolation: isolate;
  border: 2px solid transparent; border-radius: 999px;
  padding: 12px 24px; font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1;
  color: #fff; cursor: pointer; background: var(--c-primary);
  box-shadow: var(--shadow-brand);
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}
.lvl-btn::after {
  content: ""; position: absolute; top: 0; left: -160%; z-index: -1;
  width: 70%; height: 100%; transform: skewX(-22deg);
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  animation: btn-shine 3.4s ease-in-out infinite;
}
.lvl-btn:hover { transform: translateY(-2px); }
.lvl-btn:hover::after { animation-duration: 1.4s; }
.lvl-btn:not(.is-active) { opacity: .9; }
.lvl-btn.is-active { background: var(--c-primary-dark); box-shadow: 0 0 0 3px rgba(46,170,190,.30), var(--shadow-brand); transform: translateY(-1px); }
.course-empty { color: var(--c-muted); padding: 16px 0 4px; }
@media (prefers-reduced-motion: reduce) { .lvl-btn::after { animation: none !important; } }

/* ---------- Форма заявки / консультации ---------- */
.request-context { background: var(--c-primary-tint); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 14px 18px; color: var(--c-ink); margin-bottom: 22px; }
.request-errors { background: #FDECEC; border: 1px solid #F5B5B5; color: #B42318; border-radius: var(--radius, 12px); padding: 10px 16px; margin-bottom: 18px; }
.request-errors p { margin: 2px 0; }
.request-form label { display: block; margin-bottom: 16px; font-weight: 600; color: var(--c-ink); }
.request-form .req { color: var(--c-primary); margin-left: 2px; }
.request-form input, .request-form textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; font-weight: 400; border: 1.5px solid var(--c-border); border-radius: var(--radius, 12px); background: #fff; }
.request-form input:focus, .request-form textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(46,170,190,.18); }

/* ---------- Filters (catalog) ---------- */
.layout { display: grid; grid-template-columns: 264px 1fr; gap: 32px; align-items: start; }
.filter { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: 90px; }
.filter h4 { font-size: 15px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--c-border); background: #fff; font-size: 14px; font-weight: 600; color: var(--c-body); transition: .15s; }
.chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.chip.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.filter-list li { padding: 4px 0; }
.filter-list a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 9px; font-size: 14.5px; }
.filter-list a:hover, .filter-list a.active { background: var(--c-primary-tint); color: var(--c-primary); font-weight: 600; }
.filter-list .count { color: var(--c-muted); font-size: 13px; }

/* ---------- Course detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 36px; align-items: start; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 26px 0; }
.fact { background: var(--c-bg-soft); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px; }
.fact b { display: block; color: var(--c-ink); font-size: 22px; }
.fact span { font-size: 13.5px; color: var(--c-muted); }
.course-when { display: inline-flex; align-items: center; gap: 9px; margin: 18px 0 2px; padding: 10px 18px;
  background: var(--c-bg-soft); border: 1.5px solid var(--c-brand, #2EAABE); color: var(--c-brand, #1d8a9c);
  border-radius: 999px; font-weight: 700; font-size: 16px; line-height: 1.2; }
.course-when svg { flex: 0 0 auto; }

/* Кастомный лаунчер Alex (правый нижний угол, на всех страницах) */
.alex-launcher { position: fixed; right: 20px; bottom: 20px; z-index: 2147483500; display: flex; align-items: center;
  gap: 11px; background: #fff; border: 1px solid #d7e3e6; border-radius: 999px; padding: 8px 19px 8px 9px;
  cursor: pointer; box-shadow: 0 8px 26px rgba(0,0,0,.16); max-width: 330px; overflow: hidden;
  animation: alexBob 5.5s ease-in-out infinite, alexGlow 2.4s ease-in-out infinite; }
.alex-launcher:hover { box-shadow: 0 10px 30px rgba(0,0,0,.24); }
.alex-launcher::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(110deg, transparent 38%, rgba(38,198,188,.55) 50%, transparent 62%);
  transform: translateX(-100%); animation: alexShimmer 3.4s ease-in-out infinite; }
.alex-launcher .alex-ava { position: relative; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  background: #0e8fa3; color: #fff; display: flex; align-items: center; justify-content: center; }
.alex-launcher .alex-online { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%;
  background: #2ec27e; border: 2px solid #fff; animation: alexBlink 1.8s ease-in-out infinite; }
.alex-launcher .alex-txt b { display: block; font-size: 15.5px; font-weight: 700; color: var(--c-ink); line-height: 1.15; }
.alex-launcher .alex-txt span { display: block; font-size: 12.5px; color: var(--c-muted); line-height: 1.25; margin-top: 2px; }
@keyframes alexBob { 0%, 86%, 100% { transform: translateY(0); } 90% { transform: translateY(-7px); } 94% { transform: translateY(-2px); } }
@keyframes alexDot { 0%, 75%, 100% { box-shadow: 0 0 0 0 rgba(46,194,126,.6); } 90% { box-shadow: 0 0 0 7px rgba(46,194,126,0); } }
@keyframes alexGlow {
  0%, 100% { box-shadow: 0 8px 26px rgba(0,0,0,.16), 0 0 0 0 rgba(38,198,188,0); border-color: #d7e3e6; }
  50% { box-shadow: 0 8px 26px rgba(0,0,0,.16), 0 0 22px 3px rgba(38,198,188,.7); border-color: #26c6bc; }
}
@keyframes alexShimmer { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }
@keyframes alexBlink { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.alex-teaser { position: fixed; right: 20px; bottom: 88px; z-index: 2147483499; max-width: 330px; background: #fff;
  border: 1px solid #d7e3e6; border-radius: 16px; padding: 13px 34px 14px 15px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
  cursor: pointer; animation: alexTeaserIn .45s ease both; }
.alex-teaser .alex-teaser-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; color: var(--c-ink); }
.alex-teaser .alex-ava-sm { width: 24px; height: 24px; border-radius: 50%; background: #0e8fa3; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.alex-teaser p { margin: 7px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--c-muted); }
.alex-teaser-x { position: absolute; top: 7px; right: 10px; border: 0; background: transparent; font-size: 20px;
  line-height: 1; color: var(--c-muted); cursor: pointer; padding: 2px 4px; }
@keyframes alexTeaserIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  .alex-launcher { max-width: none; padding: 10px; }
  .alex-launcher .alex-txt { display: none; }
  .alex-teaser { left: 16px; right: 16px; max-width: none; bottom: 82px; }
}
@media (prefers-reduced-motion: reduce) { .alex-launcher, .alex-launcher::before, .alex-online, .alex-teaser { animation: none; } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-border); margin: 8px 0 22px; flex-wrap: wrap; }
.tab-btn { border: 0; background: transparent; padding: 12px 16px; font-weight: 700; color: var(--c-muted); border-bottom: 3px solid transparent; }
.tab-btn.active { color: var(--c-primary); border-color: var(--c-primary); }
.tab-panel { display: none; } .tab-panel.active { display: block; }
.tab-panel h3, .tab-panel .tab-title { margin: 18px 0 10px; font-size: 19px; }
.tab-panel ul:not(.plain) li { display: flex; gap: 11px; padding: 8px 0; }
.tab-panel ul:not(.plain) li::before { content: "✓"; color: var(--c-primary); font-weight: 800; flex: none; }
.enroll-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); position: sticky; top: 90px; }
.enroll-card .price { font-size: 16px; color: var(--c-muted); margin-bottom: 4px; }
.enroll-card .price b { color: var(--c-ink); font-size: 26px; }
.enroll-card .price-note { font-size: 14.5px; line-height: 1.6; color: var(--c-muted); margin: 0 0 14px; }
.enroll-card .price-note b { color: var(--c-primary); font-weight: 700; }

/* ---------- Forms ---------- */
.form-row { display: grid; gap: 12px; margin-bottom: 12px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--c-ink); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  font: inherit; font-size: 15px; color: var(--c-ink); background: #fff; transition: border .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-light); }
.consent { font-size: 12.5px; color: var(--c-muted); margin-top: 8px; }

/* ---------- Misc ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.tutors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tutor { text-align: center; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 22px 16px; transition: .18s; }
.tutor:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.tutor .avatar { width: 72px; height: 72px; font-size: 22px; margin: 0 auto 12px; }
.tutor b { color: var(--c-ink); font-size: 16px; }
.tutor span { color: var(--c-muted); font-size: 13.5px; }
.fade-up { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.in { opacity: 1; transform: none; }

/* ---------- Rich motion ---------- */
/* анимированный градиент героя */
.hero { background-size: 170% 170%; animation: heroShift 20s ease-in-out infinite; }
@keyframes heroShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
/* плавающая карточка героя */
.hero-card { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
/* пульс логотипа */
.brand .logo-mark { animation: logoPulse 4.5s ease-in-out infinite; }
@keyframes logoPulse { 0%,100% { box-shadow: var(--shadow-brand); } 50% { box-shadow: 0 0 0 7px rgba(46,170,190,.16), var(--shadow-brand); } }
/* подчёркивание в меню */
.main-nav > ul > li > a { position: relative; }
.main-nav > ul > li > a::before { content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px; background: var(--c-primary); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.main-nav > ul > li > a:hover::before { transform: scaleX(1); }
/* микро-интеракции карточек */
.spec-card .ic, .feature .ic, .course-thumb svg, .btn svg { transition: transform .3s ease; }
.spec-card:hover .ic { transform: translateY(-3px) scale(1.08) rotate(-4deg); }
.feature:hover .ic { transform: scale(1.08) rotate(3deg); }
.course-card:hover .course-thumb svg { transform: scale(1.14) rotate(3deg); }
.btn:hover svg { transform: translateX(3px); }
/* появление счётчиков */
.stat .big, .hero-trust .num { display: inline-block; }
.stat.pop .big { animation: pop .55s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
/* мягкое всплытие секций-карточек */
.course-card, .spec-card, .news-card, .feature, .tutor { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .hero, .hero-card, .brand .logo-mark, .stat.pop .big { animation: none !important; }
  .fade-up { transition: none; opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
  .course-grid, .news-grid, .feature-grid, .dir-grid { grid-template-columns: repeat(2, 1fr); }
  .tutors-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; margin-left: auto; }
  .main-nav { position: fixed; inset: 72px 0 auto 0; background: #fff; border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-lg); padding: 12px; transform: translateY(-120%); transition: .25s ease; max-height: calc(100vh - 72px); overflow:auto; }
  .main-nav.open { transform: translateY(0); }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { padding: 13px 14px; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 14px; }
  .has-sub > a::after { margin-left: auto; }
  .hero-inner, .split, .detail-grid, .layout, .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .filter { position: static; }
  .enroll-card { position: static; }
  .header-actions .btn--brand { display: none; }
}
@media (max-width: 560px) {
  .spec-grid, .course-grid, .news-grid, .feature-grid, .tutors-grid, .footer-grid, .facts, .dir-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

/* ---------- Промо-баннер (летняя распродажа, ru, до 30.06) ---------- */
.promo-banner {
  position: relative;
  width: 100%;
  background: #2f5810;           /* тёмно-зелёный под траву — леттербокс на широких экранах */
  line-height: 0;
  text-align: center;
}
.promo-banner img {
  display: inline-block;
  width: 100%;
  max-width: var(--maxw);        /* 1280px — по ширине контента сайта */
  height: auto;
  vertical-align: top;
}
.promo-x {
  position: absolute;
  top: 10px; right: 14px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  border: none; border-radius: 50%;
  background: rgba(0,0,0,.32);
  color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; z-index: 3;
  transition: background .15s ease;
}
.promo-x:hover { background: rgba(0,0,0,.55); }
html.promo-off .promo-banner { display: none; }
@media (max-width: 767px) {
  .promo-x { top: 8px; right: 8px; width: 34px; height: 34px; font-size: 24px; }
}
