/* ════════════════════════════════════════════════════════════════════
   pages.css — shared components for the inner pages of accountants.uz.
   Builds on tokens + header/footer/buttons defined in landing.css.
   Palette: brand red (--r-*), graphite (--d-*), cream, Onest.
   ════════════════════════════════════════════════════════════════════ */

/* ─────────── Page hero (graphite band, replaces dark-photo hero) ─────────── */
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--g-graphite);
  color: white;
  padding: 72px 0 76px;
}
.page-hero::before {
  /* dot grid, fades toward edges */
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.10) 1.3px, transparent 1.3px);
  background-size: 30px 30px;
  -webkit-mask: radial-gradient(ellipse 60% 75% at 80% 30%, black 0%, transparent 70%);
          mask: radial-gradient(ellipse 60% 75% at 80% 30%, black 0%, transparent 70%);
}
.page-hero .ph-orb {
  position: absolute; border-radius: 50%; filter: blur(80px);
  z-index: 0; pointer-events: none;
}
.page-hero .ph-orb-1 {
  width: 460px; height: 460px; top: -180px; right: -100px;
  background: radial-gradient(circle, color-mix(in oklab, var(--r-500) 55%, transparent) 0%, transparent 70%);
  opacity: 0.5;
}
.page-hero .ph-orb-2 {
  width: 300px; height: 300px; bottom: -160px; left: 8%;
  background: radial-gradient(circle, color-mix(in oklab, var(--cream-200) 45%, transparent) 0%, transparent 70%);
  opacity: 0.18;
}
.page-hero .ph-ring {
  position: absolute; z-index: 0; pointer-events: none;
  border: 1.5px solid rgba(255,255,255,0.10); border-radius: 50%;
}
.page-hero .ph-ring-1 { width: 220px; height: 220px; top: 30px; right: 16%; }
.page-hero .ph-ring-2 { width: 90px;  height: 90px;  bottom: -20px; right: 30%; border-color: color-mix(in oklab, var(--r-400) 30%, transparent); }
.page-hero .wrap { position: relative; z-index: 1; }

.page-hero .eyebrow {
  background: rgba(255,255,255,0.08);
  color: var(--r-400);
  backdrop-filter: blur(4px);
}
.page-hero .eyebrow .dot { background: var(--r-400); }
.page-hero h1 {
  color: white;
  font-size: 60px;
  line-height: 1.02;
  margin-top: 20px;
}
.page-hero .ph-sub {
  margin-top: 20px;
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255,255,255,0.72);
  max-width: 640px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.55);
}
.breadcrumb a { color: rgba(255,255,255,0.55); transition: color .15s; }
.breadcrumb a:hover { color: white; }
.breadcrumb .sep { width: 18px; height: 1px; background: rgba(255,255,255,0.3); display: inline-block; }
.breadcrumb .cur { color: var(--r-400); }
@media (max-width: 575px) {
  .breadcrumb { flex-direction: column; align-items: flex-start; gap: 6px; }
  .breadcrumb .sep { display: none; }
}

/* ─────────── Section scaffold ─────────── */
.section { padding: 96px 0; position: relative; }
.section.tight { padding: 72px 0; }
.section.cream { background: var(--cream-50); }
.section.dark { background: var(--g-graphite); color: white; }

.sect-head { max-width: 720px; margin-bottom: 48px; }
.sect-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sect-head .kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--r-600);
}
.sect-head .kicker::before { content: ''; width: 26px; height: 2px; background: var(--r-600); border-radius: 2px; }
.sect-head.center .kicker::before { display: none; }
.dark .sect-head .kicker { color: var(--r-400); }
.sect-head h2 { font-size: 42px; margin-top: 16px; line-height: 1.06; }
.dark .sect-head h2 { color: white; }
.sect-head p { margin-top: 16px; font-size: 17px; line-height: 1.6; color: var(--d-600); }
.dark .sect-head p { color: rgba(255,255,255,0.7); }

/* ─────────── Editorial prose ─────────── */
.prose p { font-size: 16px; line-height: 1.72; color: var(--d-700); margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong, .prose b { color: var(--d-900); font-weight: 700; }
.prose .lead-p { font-size: 19px; line-height: 1.6; color: var(--d-900); font-weight: 500; }

/* Pull-quote */
.pullquote {
  position: relative;
  padding: 8px 0 8px 32px;
  border-left: 3px solid var(--r-500);
  margin: 4px 0;
}
.pullquote p { font-size: 20px; line-height: 1.5; font-style: italic; color: var(--d-800); font-weight: 500; }
.pullquote cite { display: block; margin-top: 14px; font-style: normal; font-size: 14px; font-weight: 600; color: var(--r-600); }

/* ─────────── Red stat band ─────────── */
.stat-band {
  background: var(--g-red);
  border-radius: var(--rd-lg);
  padding: 52px 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  box-shadow: var(--sh-red);
  position: relative;
  overflow: hidden;
}
.stat-band::after {
  content: ''; position: absolute; right: -80px; top: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.16) 0%, transparent 70%);
}
.stat-band .sb-stat { position: relative; z-index: 1; text-align: center; color: white; background: transparent; padding: 0; }
.stat-band .sb-stat + .sb-stat { border-left: 1px solid rgba(255,255,255,0.22); }
.stat-band .sb-stat .num { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: #fff; }
.stat-band .sb-stat .num small { font-size: 28px; vertical-align: top; color: rgba(255,255,255,0.8); margin-left: 2px; }
.stat-band .sb-stat .lbl { margin-top: 12px; font-size: 14px; line-height: 1.4; color: rgba(255,255,255,0.88); font-weight: 500; text-transform: none; letter-spacing: 0; }

/* ─────────── Icon feature cards ─────────── */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.icon-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.icon-card {
  background: var(--paper);
  border: 1px solid var(--d-100);
  border-radius: var(--rd-lg);
  padding: 32px;
  box-shadow: var(--sh-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.icon-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--r-200); }
.icon-card .ic {
  width: 56px; height: 56px; border-radius: var(--rd-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--r-50); color: var(--r-600);
  margin-bottom: 22px;
}
.icon-card .ic svg { width: 28px; height: 28px; }
.icon-card h3 { font-size: 19px; line-height: 1.3; margin-bottom: 10px; }
.icon-card p { font-size: 15px; line-height: 1.6; color: var(--d-600); }

/* On dark sections, cards turn translucent */
.dark .icon-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  box-shadow: none;
}
.dark .icon-card:hover { background: rgba(255,255,255,0.07); border-color: color-mix(in oklab, var(--r-400) 40%, transparent); transform: translateY(-4px); }
.dark .icon-card .ic { background: color-mix(in oklab, var(--r-500) 22%, transparent); color: var(--r-400); }
.dark .icon-card h3 { color: white; }
.dark .icon-card p { color: rgba(255,255,255,0.68); }

/* Numbered variant — big ghosted index */
.icon-card.numbered { position: relative; overflow: hidden; }
.icon-card.numbered .idx {
  position: absolute; top: 14px; right: 22px;
  font-size: 64px; font-weight: 800; line-height: 1;
  color: var(--r-50);
  letter-spacing: -0.04em;
}
.dark .icon-card.numbered .idx { color: rgba(255,255,255,0.05); }

/* ─────────── Media frame (image-slot wrapper) ─────────── */
.media-frame {
  border-radius: var(--rd-lg);
  overflow: hidden;
  box-shadow: var(--sh-lg);
  background: var(--d-100);
  position: relative;
}
.media-frame image-slot { width: 100%; height: 100%; display: block; }

/* Credential chip (reused from hero) */
.credit-chip {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--paper);
  border: 1px solid var(--d-100);
  border-radius: var(--rd-md);
  padding: 16px 22px;
  box-shadow: var(--sh-md);
}
.credit-chip .mark {
  font-weight: 800; font-size: 20px; color: white;
  background: var(--g-red); border-radius: 10px;
  padding: 8px 12px; letter-spacing: 0.02em;
  box-shadow: var(--sh-red);
}
.credit-chip .txt b { display: block; font-size: 14px; color: var(--d-900); }
.credit-chip .txt span { font-size: 12.5px; color: var(--d-500); }

/* ─────────── Team / teachers grid ─────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.team-card {
  background: var(--paper);
  border: 1px solid var(--d-100);
  border-radius: var(--rd-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  display: flex; flex-direction: column;
}
.team-card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: var(--r-200); }
.team-card .photo {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--cream-100);
  overflow: hidden;
}
.team-card .photo image-slot { width: 100%; height: 100%; display: block; }
.team-card .photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,22,28,0.28) 0%, transparent 42%);
  pointer-events: none;
}
.team-card .tc-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.team-card .tc-role { font-size: 13px; line-height: 1.45; color: var(--d-500); font-weight: 500; min-height: 36px; }
.team-card .tc-name { font-size: 20px; font-weight: 800; color: var(--d-900); letter-spacing: -0.02em; margin-top: 8px; line-height: 1.15; }
.team-card .tc-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 5px 11px; border-radius: var(--rd-pill);
  background: var(--r-50); color: var(--r-600);
}
.tag.alt { background: var(--cream-100); color: var(--gold-600, #c08a2a); }
.tag.sage { background: var(--sage-200, #d8e3d4); color: var(--sage-500, #4f7a55); }
.team-card .tc-more {
  margin-top: auto; padding-top: 18px;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 700; color: var(--r-600);
  transition: gap .18s ease;
}
.team-card .tc-more svg { width: 16px; height: 16px; }
.team-card:hover .tc-more { gap: 11px; }
@media (max-width: 991px) { .team-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; } }
@media (max-width: 575px) { .team-grid { grid-template-columns: 1fr; } }

/* ─────────── Teacher detail modal ─────────── */
.tm-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 24px;
  background: color-mix(in oklab, var(--d-900) 62%, transparent);
  backdrop-filter: blur(6px);
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.tm-overlay.open { opacity: 1; visibility: visible; }
body.tm-locked { overflow: hidden; }

.tm-dialog {
  position: relative;
  width: 100%; max-width: 980px;
  max-height: 90vh;
  background: var(--paper);
  border-radius: var(--rd-xl, 20px);
  box-shadow: 0 40px 90px -24px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.18);
  margin: auto;
  overflow: hidden;
  display: flex;
  transform: translateY(18px) scale(0.985);
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.tm-overlay.open .tm-dialog { transform: none; }

.tm-close {
  position: absolute; top: 20px; right: 22px; z-index: 5;
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; cursor: pointer;
  background: var(--paper); color: var(--d-700);
  box-shadow: var(--sh-sm);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.tm-close:hover { background: var(--r-50); color: var(--r-600); transform: rotate(90deg); }
.tm-close svg { width: 24px; height: 24px; }

.tm-layout {
  display: grid;
  grid-template-columns: 326px 1fr;
  width: 100%; min-height: 0;
}

/* ── Identity rail ── */
.tm-side {
  background: var(--cream-50);
  border-right: 1px solid var(--d-100);
  padding: 48px 38px;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.tm-photo { position: relative; }
.tm-photo::after {
  content: ''; position: absolute; right: -16px; bottom: -16px;
  width: 100%; height: 100%; z-index: 0;
  background: var(--d-800);
  border-radius: var(--rd-md, 14px);
}
.tm-photo .ph-photo,
.tm-photo img {
  position: relative; z-index: 1; display: flex;
  width: 100%; height: 312px;
  border-radius: var(--rd-md, 14px);
  overflow: hidden;
  box-shadow: var(--sh-md);
}
.tm-photo img { object-fit: cover; }

/* Striped placeholder used for every teacher photo */
.ph-photo {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(45deg,
      color-mix(in oklab, var(--d-900) 7%, var(--cream-100)) 0 11px,
      var(--cream-100) 11px 22px);
}
.ph-photo span {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px; letter-spacing: 0.04em; color: var(--d-600);
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  padding: 6px 11px; border-radius: 7px;
  box-shadow: var(--sh-sm);
  max-width: 80%; text-align: center; line-height: 1.35;
}
.tm-id { margin-top: 28px; }
.tm-id h2 {
  font-size: 30px; font-weight: 800; line-height: 1.08;
  letter-spacing: -0.02em; color: var(--d-900);
  margin: 0; text-wrap: balance;
}
.tm-sub {
  font-style: italic; font-size: 15.5px; color: var(--d-500);
  margin-top: 12px; line-height: 1.45;
}
.tm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tm-chip {
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  padding: 6px 12px; border-radius: var(--rd-pill);
  background: var(--r-50); color: var(--r-600);
}

/* ── Content column ── */
.tm-content { padding: 50px 56px; overflow-y: auto; }
.tm-section { padding: 26px 0; border-top: 1px solid var(--d-100); }
.tm-section:first-child { padding-top: 4px; border-top: none; }
.tm-section p { font-size: 15.5px; line-height: 1.6; color: var(--d-700); margin: 0; }
.tm-section p + p { margin-top: 12px; }
.tm-h {
  display: flex; align-items: center; gap: 11px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--r-600); margin: 0 0 18px;
}
.tm-h::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: var(--r-600); }

@media (max-width: 820px) {
  .tm-dialog { max-height: 92vh; flex-direction: column; overflow-y: auto; }
  .tm-layout { grid-template-columns: 1fr; }
  .tm-side {
    border-right: none; border-bottom: 1px solid var(--d-100);
    overflow: visible; flex-direction: column; gap: 0; align-items: stretch;
    padding: 40px 30px;
  }
  .tm-photo { width: 100%; }
  .tm-photo .ph-photo,
  .tm-photo img { height: 280px; }
  .tm-photo::after { right: -10px; bottom: -10px; }
  .tm-id { margin-top: 24px; min-width: 0; }
  .tm-id h2 { font-size: 24px; }
  .tm-content { overflow: visible; padding: 34px 30px; }
}

/* ─────────── Course category cards (Курсы) ─────────── */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.cat-card {
  background: var(--paper);
  border: 1px solid var(--d-100);
  border-radius: var(--rd-lg);
  padding: 38px 38px 30px;
  box-shadow: var(--sh-sm);
  display: flex; flex-direction: column;
  transition: box-shadow .22s ease, transform .22s ease;
}
.cat-card:hover { box-shadow: var(--sh-lg); transform: translateY(-4px); }
.cat-card .cat-top { margin-bottom: 24px; }
.cat-card h3 { font-size: 23px; line-height: 1.15; color: var(--d-900); }
.cat-card .cat-desc { font-size: 14.5px; line-height: 1.55; color: var(--d-600); margin-top: 10px; }
.cat-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.cat-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 4px; border-top: 1px solid var(--d-100);
  font-size: 15.5px; font-weight: 600; color: var(--r-600);
  transition: color .15s ease, padding-left .18s ease;
}
.cat-item:last-child { border-bottom: 1px solid var(--d-100); }
.cat-item:hover { color: var(--r-700); padding-left: 8px; }
.cat-item .go {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  background: var(--d-800); color: white;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.cat-item .go svg { width: 14px; height: 14px; }
.cat-item:hover .go { background: var(--r-600); }
/* Rich course row (single-programmes): title, desc, meta; price always on its own line */
.cat-item-rich { align-items: flex-start; }
.cat-item-rich .go { margin-top: 2px; }
.cat-item-body { min-width: 0; flex: 1; }
.cat-item-body p { margin-top: 6px; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--d-600); }
.cat-item-meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin-top: 10px; font-size: 13.5px; font-weight: 500; color: var(--d-600);
}
.cat-item-meta b { font-weight: 700; color: var(--d-800); }
.cat-item-meta .cat-item-price {
  flex-basis: 100%;
  margin-top: 4px;
  font-size: 15px; color: var(--d-500);
}
.cat-item-meta .cat-item-price b { font-size: 18px; font-weight: 800; color: var(--d-900); letter-spacing: -0.01em; }
.cat-item-meta .cat-item-price .price-label { font-size: 12.5px; margin-bottom: 2px; }
.cat-item-meta .cat-item-price small { font-size: inherit; }
.cat-card .schedule-btn {
  margin-top: auto;
  width: 100%; justify-content: center;
  background: var(--cream-100); color: var(--d-800);
  border-radius: var(--rd-sm); padding: 15px;
  font-weight: 700; font-size: 14.5px;
  display: inline-flex; align-items: center; gap: 8px;
  border: none; cursor: pointer; transition: background .15s ease;
}
.cat-card .schedule-btn:hover { background: var(--cream-200); }
.cat-card .schedule-btn svg { width: 16px; height: 16px; transition: transform .2s ease; }
.cat-card.is-open .schedule-btn svg { transform: rotate(180deg); }
.cat-sched {
  display: none; margin-top: 14px;
}
.cat-card.is-open .cat-sched { display: flex; flex-direction: column; gap: 10px; }
.cat-sched .sched-cap {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--d-500); margin: 2px 2px 4px;
}
.sched-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--cream-50); border: 1px solid var(--d-100);
  border-radius: var(--rd-sm); padding: 14px 16px;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.sched-row:hover { border-color: var(--r-200); background: var(--paper); transform: translateX(2px); }
.sched-when { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sched-when .grp { font-size: 14.5px; font-weight: 700; color: var(--d-900); line-height: 1.2; }
.sched-when .time { font-size: 13px; color: var(--d-600); font-variant-numeric: tabular-nums; }
.sched-go {
  flex-shrink: 0; cursor: pointer;
  background: var(--d-800); color: white; border: none;
  border-radius: var(--rd-pill); padding: 10px 20px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.01em;
  transition: background .16s ease, box-shadow .16s ease;
}
.sched-go:hover { background: var(--r-600); box-shadow: var(--sh-red); }
.sched-row:hover .sched-go { background: var(--r-600); }
@media (max-width: 767px) {
  .cat-grid { grid-template-columns: 1fr; gap: 18px; }
  .cat-card { padding: 24px 22px 22px; }
  .cat-card .cat-top { margin-bottom: 18px; }
  .cat-card h3 { font-size: 20px; }
  .sched-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .sched-go { width: 100%; }
}

/* ═══════════ Course detail page ═══════════ */
/* Header card: info + media */
.course-head { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: start; }
.course-info .course-title { font-size: 36px; line-height: 1.08; color: var(--d-900); }
.course-price {
  display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap;
  margin-top: 18px; font-size: 30px; font-weight: 800; color: var(--r-600);
  letter-spacing: -0.02em;
}
.course-price small { font-size: 15px; font-weight: 600; color: var(--d-500); }
.course-lead { margin-top: 18px; font-size: 16px; line-height: 1.65; color: var(--d-700); }
.course-meta { margin-top: 24px; display: flex; flex-direction: column; gap: 2px; }
.course-meta .m-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0; border-top: 1px solid var(--d-100);
  font-size: 14.5px; color: var(--d-700);
}
.course-meta .m-row:last-child { border-bottom: 1px solid var(--d-100); }
.course-meta .m-row svg { width: 19px; height: 19px; color: var(--r-500); flex-shrink: 0; }
.course-meta .m-row b { color: var(--d-900); font-weight: 700; margin-left: auto; text-align: right; }
.course-cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.course-media { position: sticky; top: 130px; }
.course-media .media-frame { aspect-ratio: 4 / 3.4; }
.course-badges { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.course-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--d-100); border-radius: var(--rd-pill);
  padding: 9px 15px; font-size: 13px; font-weight: 600; color: var(--d-700);
  box-shadow: var(--sh-sm);
}
.course-badge svg { width: 16px; height: 16px; color: var(--r-500); }

/* Prose blocks with red kicker headings */
.course-body { max-width: 820px; }
.cblock { margin-bottom: 40px; }
.cblock:last-child { margin-bottom: 0; }
.cblock h3 {
  display: inline-flex; align-items: center; gap: 11px;
  font-size: 22px; color: var(--d-900); margin-bottom: 16px;
}
.cblock h3::before { content: ''; width: 26px; height: 3px; border-radius: 2px; background: var(--r-600); }
.cblock p { font-size: 16px; line-height: 1.7; color: var(--d-700); margin-bottom: 14px; }
.cblock p:last-child { margin-bottom: 0; }
.cblock ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.cblock ul li { position: relative; padding-left: 30px; font-size: 15.5px; line-height: 1.6; color: var(--d-700); }
.cblock ul li::before {
  content: ''; position: absolute; left: 0; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--r-50);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ad2324' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* Course quote */
.course-quote {
  background: var(--cream-50);
  border-radius: var(--rd-lg);
  padding: 40px 48px;
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
}
.course-quote::before {
  content: '“'; font-family: Georgia, serif; font-weight: 700;
  font-size: 64px; line-height: 0.6; color: var(--r-400);
}
.course-quote p { font-size: 20px; line-height: 1.5; font-style: italic; color: var(--d-800); font-weight: 500; }
.course-quote cite { font-style: normal; font-size: 14px; font-weight: 700; color: var(--r-600); }

/* Learn list (dark) */
.learn-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.learn-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--rd-md); padding: 22px 24px;
}
.learn-item .chk {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  background: var(--g-red); color: white;
  display: flex; align-items: center; justify-content: center;
}
.learn-item .chk svg { width: 16px; height: 16px; }
.learn-item p { font-size: 15.5px; line-height: 1.5; color: rgba(255,255,255,0.86); }
@media (max-width: 767px) { .learn-list { grid-template-columns: 1fr; } }

/* Program download rows */
.program-row {
  display: flex; align-items: center; gap: 20px;
  background: var(--paper); border: 1px solid var(--d-100); border-radius: var(--rd-md);
  padding: 20px 24px; box-shadow: var(--sh-sm);
}
.program-row + .program-row { margin-top: 14px; }
.program-row .p-ic {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: var(--rd-sm);
  background: var(--r-50); color: var(--r-600);
  display: flex; align-items: center; justify-content: center;
}
.program-row .p-ic svg { width: 22px; height: 22px; }
.program-row .p-txt { flex: 1; }
.program-row .p-txt b { display: block; font-size: 16px; color: var(--d-900); }
.program-row .p-txt span { font-size: 13px; color: var(--d-500); }

/* Video cards */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.video-card {
  background: var(--paper); border: 1px solid var(--d-100); border-radius: var(--rd-lg);
  overflow: hidden; box-shadow: var(--sh-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.video-card .v-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--d-800); overflow: hidden; }
.video-card .v-thumb image-slot { width: 100%; height: 100%; }
.video-card .v-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.video-card .v-play span {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.92); color: var(--r-600);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-md);
}
.video-card .v-play svg { width: 22px; height: 22px; margin-left: 3px; }
.video-card .v-body { padding: 18px 22px 22px; }
.video-card .v-body b { font-size: 16px; color: var(--d-900); }
.video-card .v-body span { display: block; font-size: 13px; color: var(--d-500); margin-top: 4px; }
.video-card { cursor: pointer; }
@media (max-width: 991px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .video-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Modal base (shared by .video_modal and .exam__modal)
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.modal .overlay {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--d-900) 72%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal .close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  padding: 12px;
  z-index: 50;
  cursor: pointer;
  background: var(--paper);
  border-radius: 50%;
  box-shadow: var(--sh-md);
  transition: transform .25s ease;
}
.modal .close:hover { transform: rotate(90deg); }
.modal .modal_container {
  position: relative;
  z-index: 20;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal .modal_container .modal_content {
  position: relative;
  z-index: 40;
  background: var(--paper);
  border-radius: var(--rd-lg);
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 40px 120px color-mix(in oklab, var(--d-900) 45%, transparent);
}
@media (max-width: 575px) {
  .modal .modal_container { padding: 12px; }
  .modal .close { top: 14px; right: 14px; width: 38px; height: 38px; padding: 10px; }
}

/* Video modal */
.video_modal .modal_content {
  max-width: 900px;
  display: flex;
  flex-direction: column;
}
.video_modal .modal_content .video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--d-900);
  border-top-left-radius: var(--rd-lg);
  border-top-right-radius: var(--rd-lg);
  overflow: hidden;
}
.video_modal .modal_content .video iframe,
.video_modal .modal_content .video video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: contain;
}
.video_modal .modal_content .video_text {
  padding: 28px 32px 32px;
}
.video_modal .modal_content .video_text h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--d-900);
  margin: 0 0 12px;
  letter-spacing: -.01em;
}
.video_modal .modal_content .video_text p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--d-500);
  margin: 0;
}
@media (max-width: 575px) {
  .video_modal .modal_content .video_text { padding: 20px 22px 24px; }
  .video_modal .modal_content .video_text h3 { font-size: 19px; }
}

/* Exam materials modal */
.exam__modal .modal_content { max-width: 1040px; padding: 36px 40px; }
.exam__modal .title_block { margin-bottom: 24px; }
.exam__modal .section_title { font-size: 28px; font-weight: 800; color: var(--d-900); margin: 0; letter-spacing: -.02em; }
.exam-materials__item__filters { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.exam-materials__item__filters__item { width: 280px; max-width: 100%; }
.exam-materials__item__filters__item p { font-size: 13px; font-weight: 600; color: var(--d-700); margin: 0 0 6px; }
.exam-materials__item__filters__item select {
  width: 100%; height: 48px; padding: 0 14px;
  font-size: 14px; color: var(--d-900);
  background: var(--d-50);
  border: 1.5px solid var(--d-100); border-radius: var(--rd-sm);
}
.exam-materials__item__result { font-size: 14px; color: var(--d-700); }
.exam-materials__item__result__value { font-weight: 700; color: var(--r-600); margin-left: 4px; }
.exam-materials__item { border-top: 1px solid var(--d-100); padding: 18px 0 !important; }
.exam-materials__item__title { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.exam-materials__item__title h4 { font-size: 17px; font-weight: 700; color: var(--d-900); margin: 0; flex: 1; min-width: 200px; }
.exam-materials__item__btns { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.exam-materials__item__download-btn,
.exam-materials__item__download-answers-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px;
  font-size: 13px; font-weight: 600; color: #fff;
  background: var(--r-600);
  border-radius: var(--rd-sm);
  text-decoration: none; white-space: nowrap;
  transition: background .2s ease;
}
.exam-materials__item__download-btn:hover { background: var(--r-700, #8a1a1b); }
.exam-materials__item__download-answers-btn { background: var(--d-800); }
.exam-materials__item__download-answers-btn:hover { background: var(--d-900); }
.exam-materials__item .content { margin-top: 14px; }
.exam-materials__item__table { width: 100%; border-collapse: collapse; border: 1px solid var(--d-100); border-radius: var(--rd-sm); overflow: hidden; }
.exam-materials__item__table th { background: var(--d-900); color: #fff; font-size: 13px; font-weight: 600; text-align: left; padding: 12px 14px; }
.exam-materials__item__table td { padding: 12px 14px; font-size: 14px; color: var(--d-700); border-top: 1px solid var(--d-100); }
.exam-materials__item__table__row_found td { background: color-mix(in oklab, var(--r-500, #c92b2c) 8%, transparent); }

/* Test rows (reused by course page & tests page) */
.test-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 28px; align-items: center;
  padding: 24px 4px; border-top: 1px solid var(--d-100);
}
.test-list .test-row:last-child { border-bottom: 1px solid var(--d-100); }
.test-row .t-title { font-size: 16.5px; font-weight: 700; color: var(--d-900); line-height: 1.35; }
.test-row .t-sub { font-size: 13.5px; color: var(--d-500); margin-top: 4px; line-height: 1.4; }
.test-row .t-count { text-align: center; min-width: 90px; }
.test-row .t-count .n { font-size: 24px; font-weight: 800; color: var(--r-600); line-height: 1; }
.test-row .t-count .l { font-size: 12px; color: var(--d-500); margin-top: 4px; }
.test-row .btn { flex-shrink: 0; }
@media (max-width: 639px) {
  .test-row { grid-template-columns: 1fr auto; gap: 14px; }
  .test-row .t-title-wrap { grid-column: 1 / -1; }
  .test-row .t-count { text-align: left; }
  .test-row .btn { grid-column: 2; }
}

/* Course aside form */
.course-final { display: grid; grid-template-columns: 1fr 0.85fr; gap: 48px; align-items: start; }
.course-final .prose-final .cblock { margin-bottom: 28px; }
.lead-card {
  background: var(--g-graphite); color: white;
  border-radius: var(--rd-lg); padding: 36px;
  position: relative; overflow: hidden;
  position: sticky; top: 130px;
}
.lead-card::after {
  content: ''; position: absolute; right: -70px; top: -70px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--r-500) 30%, transparent), transparent 70%);
}
.lead-card h3 { font-size: 24px; color: white; line-height: 1.18; position: relative; z-index: 1; }
.lead-card p { font-size: 14.5px; color: rgba(255,255,255,0.72); margin-top: 12px; position: relative; z-index: 1; }
.lead-card form { margin-top: 22px; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; }
.lead-card input {
  width: 100%; outline: none; font-family: inherit; font-size: 14px;
  color: white; background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.14); border-radius: var(--rd-sm);
  padding: 14px 16px;
}
.lead-card input::placeholder { color: rgba(255,255,255,0.5); }
.lead-card .btn { width: 100%; justify-content: center; margin-top: 4px; }
.lead-card .small { font-size: 12px; color: rgba(255,255,255,0.5); text-align: center; }
@media (max-width: 991px) {
  .course-head { grid-template-columns: 1fr; gap: 32px; }
  .course-media { position: static; }
  .course-final { grid-template-columns: 1fr; gap: 32px; }
  .lead-card { position: static; }
  .course-info .course-title { font-size: 30px; }
  .course-price { font-size: 18px; }
}

/* ═══════════ Tests accordion ═══════════ */
.acc { display: flex; flex-direction: column; gap: 16px; }
.acc-item {
  background: var(--paper);
  border: 1px solid var(--d-100);
  border-radius: var(--rd-lg);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}
.acc-item.open { box-shadow: var(--sh-md); border-color: var(--r-200); }
.acc-head {
  display: flex; align-items: center; gap: 18px;
  padding: 26px 32px; cursor: pointer;
  user-select: none;
}
.acc-head .a-ic {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: var(--rd-sm);
  background: var(--r-50); color: var(--r-600);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.acc-item.open .a-ic { background: var(--g-red); color: white; box-shadow: var(--sh-red); }
.acc-head .a-ic svg { width: 23px; height: 23px; }
.acc-head .a-ttl { flex: 1; }
.acc-head .a-ttl b { font-size: 21px; font-weight: 800; color: var(--d-900); letter-spacing: -0.02em; }
.acc-head .a-ttl span { display: block; font-size: 13.5px; color: var(--d-500); margin-top: 3px; }
.acc-head .a-count { font-size: 13px; font-weight: 700; color: var(--r-600); background: var(--r-50); padding: 6px 13px; border-radius: var(--rd-pill); white-space: nowrap; }
.acc-head .a-chev {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: var(--d-50); color: var(--d-700);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s ease, background .2s ease;
}
.acc-head .a-chev svg { width: 16px; height: 16px; }
.acc-item.open .a-chev { transform: rotate(180deg); background: var(--r-600); color: white; }
.acc-body { display: none; padding: 0 32px 12px; }
.acc-item.open .acc-body { display: block; }
.acc-body .test-row:first-child { border-top: 1px solid var(--d-100); }
@media (max-width: 639px) {
  .acc-head { padding: 20px; gap: 12px; }
  .acc-head .a-count { display: none; }
  .acc-head .a-ttl b { font-size: 17px; }
  .acc-body { padding: 0 20px 10px; }
}

/* ═══════════ Contacts ═══════════ */
.contacts-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 48px; align-items: start; }
.contact-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; }
.info-block .lbl {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--r-600); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.info-block .lbl svg { width: 16px; height: 16px; }
.info-block .val { font-size: 17px; line-height: 1.5; color: var(--d-900); font-weight: 600; }
.info-block .val.sm { font-size: 15px; font-weight: 500; color: var(--d-700); }
.info-block a.val { transition: color .15s ease; }
.info-block a.val:hover { color: var(--r-600); }
.info-block + .info-block { margin-top: 0; }
.contact-divider { grid-column: 1 / -1; height: 1px; background: var(--d-100); margin: 4px 0; }
.contact-socials { display: flex; gap: 12px; margin-top: 12px; }
.contact-socials a {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--g-graphite); color: var(--d-700);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease-in-out, color .15s ease, transform .15s ease;
}
.contact-socials a:hover { background: var(--g-red); color: white; transform: translateY(-2px); }
.contact-socials a svg { width: 19px; height: 19px; }

.map-card { border-radius: var(--rd-lg); overflow: hidden; box-shadow: var(--sh-lg); border: 1px solid var(--d-100); }

/* Map stack = address selector cards + map, tied together */
.map-stack { display: flex; flex-direction: column; gap: 16px; }
.addr-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.addr-card {
  display: flex; align-items: flex-start; gap: 14px; text-align: left;
  cursor: pointer; font-family: inherit;
  background: var(--paper); border: 1.5px solid var(--d-100);
  border-radius: var(--rd-md); padding: 18px 20px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.addr-card:hover { border-color: var(--r-200); }
.addr-card.active { border-color: var(--r-500); background: var(--r-50); box-shadow: var(--sh-sm); }
.addr-card .ac-pin {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50% 50% 50% 5px;
  background: var(--cream-100); color: var(--d-500);
  display: flex; align-items: center; justify-content: center;
  transition: background .18s ease, color .18s ease;
}
.addr-card.active .ac-pin { background: var(--g-red); color: white; box-shadow: var(--sh-red); }
.addr-card .ac-pin svg { width: 20px; height: 20px; }
.addr-card .ac-txt { flex: 1; min-width: 0; }
.addr-card .ac-txt b { font-size: 15px; color: var(--d-900); }
.addr-card .ac-txt .ac-addr { display: block; font-size: 13px; line-height: 1.45; color: var(--d-900); font-weight: 600; margin-top: 6px; }
.addr-card .ac-txt .ac-metro { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--d-500); margin-top: 7px; }
.addr-card .ac-txt .ac-metro svg { width: 13px; height: 13px; color: var(--r-500); flex-shrink: 0; }
.map-hint {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--d-600); padding: 2px 2px 0;
}
.map-hint svg { width: 15px; height: 15px; color: var(--r-500); flex-shrink: 0; }
.map-hint b { color: var(--d-900); font-weight: 700; }
.map-frame { position: relative; aspect-ratio: 16 / 11; background: var(--cream-100); }
.map-frame iframe { position: relative; z-index: 1; width: 100%; height: 100%; border: 0; display: block; filter: saturate(0.95); }
/* Fallback shown behind the iframe — visible if the embed is blocked */
.map-fallback {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  text-align: center; padding: 24px;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--r-200) 40%, transparent), transparent 40%),
    linear-gradient(135deg, var(--cream-50), var(--cream-100));
  background-image:
    linear-gradient(var(--d-100) 1px, transparent 1px),
    linear-gradient(90deg, var(--d-100) 1px, transparent 1px);
  background-size: 100% 100%, 38px 38px, 38px 38px;
}
.map-fallback .pin {
  width: 56px; height: 56px; border-radius: 50% 50% 50% 0;
  background: var(--g-red); transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-red);
}
.map-fallback .pin svg { width: 24px; height: 24px; color: white; transform: rotate(45deg); }
.map-fallback b { font-size: 16px; color: var(--d-900); }
.map-fallback a { font-size: 14px; font-weight: 700; color: var(--r-600); }
@media (max-width: 991px) {
  .contacts-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 575px) {
  .contact-cols { grid-template-columns: 1fr; }
  .addr-cards { grid-template-columns: 1fr; }
}

/* ─────────── Section divider (star) — reused look ─────────── */
.divider {
  display: flex; align-items: center; gap: 20px;
  max-width: 1320px; margin: 0 auto; padding: 0 56px;
}
.divider .line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--d-200), transparent); }
.divider .star { width: 22px; height: 22px; color: var(--r-400); flex-shrink: 0; }

/* ─────────── Inline CTA reminder bar ─────────── */
.cta-strip {
  background: var(--g-graphite);
  border-radius: var(--rd-lg);
  padding: 44px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  color: white; position: relative; overflow: hidden;
}
.cta-strip::after {
  content: ''; position: absolute; right: -60px; bottom: -120px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--r-500) 28%, transparent) 0%, transparent 70%);
}
.cta-strip .ct { position: relative; z-index: 1; }
.cta-strip h3 { font-size: 28px; color: white; line-height: 1.15; }
.cta-strip p { margin-top: 10px; font-size: 15px; color: rgba(255,255,255,0.7); max-width: 460px; }
.cta-strip .btn { position: relative; z-index: 1; flex-shrink: 0; }

/* ─────────── Responsive ─────────── */
@media (max-width: 991px) {
  .page-hero { padding: 56px 0 60px; }
  .page-hero h1 { font-size: 44px; }
  .section { padding: 72px 0; }
  .sect-head h2 { font-size: 34px; }
  .stat-band { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; padding: 44px 32px; }
  .stat-band .sb-stat:nth-child(odd) { border-left: none; }
  .stat-band .sb-stat:nth-child(3) { border-top: 1px solid rgba(255,255,255,0.22); padding-top: 28px; }
  .stat-band .sb-stat:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.22); padding-top: 28px; }
  .icon-grid, .icon-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .cta-strip { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 639px) {
  .page-hero h1 { font-size: 34px; }
  .stat-band { grid-template-columns: 1fr 1fr; }
  .icon-grid, .icon-grid.cols-2 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Very-small-phone hardening (≤460px, comfortable to 340px).
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 460px) {
  .page-hero { padding: 48px 0 52px; }
  .page-hero h1 { font-size: 30px; }
  .page-hero .ph-sub { font-size: 16px; }
  .section, .section.tight { padding: 56px 0; }
  .sect-head { margin-bottom: 36px; }
  .sect-head h2 { font-size: 28px; }

  .stat-band { padding: 34px 22px; gap: 26px 20px; }
  .stat-band .sb-stat .num { font-size: 38px; }
  .stat-band .sb-stat .num small { font-size: 22px; }
  .stat-band .sb-stat .lbl { font-size: 13px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Tiny phones (≤400px). Numbers like «10 000+» need to fit a 2-col cell. */
@media (max-width: 400px) {
  .stat-band { padding: 28px 18px; gap: 22px 14px; }
  .stat-band .sb-stat .num { font-size: 28px; letter-spacing: -0.02em; }
  .stat-band .sb-stat .num small { font-size: 16px; }
  .stat-band .sb-stat .lbl { font-size: 12px; margin-top: 8px; }
}

@media (max-width: 460px) {
  .icon-card { padding: 26px 22px; }

  /* Program download rows — let the action wrap below the label instead of
     pushing past the right edge */
  .program-row { flex-wrap: wrap; padding: 18px 20px; gap: 14px 16px; }
  .program-row .p-txt { flex-basis: calc(100% - 62px); }
  .program-row .btn { width: 100%; justify-content: center; }

  /* Course detail */
  .course-info .course-title { font-size: 26px; }
  .course-meta .m-row { flex-wrap: wrap; row-gap: 4px; }
  .course-meta .m-row b {
    flex-basis: 100%;
    margin-left: 33px;
    text-align: left;
  }
  .course-quote { padding: 28px 22px; }
  .course-quote p { font-size: 17px; }
  .lead-card { padding: 26px 22px; }
  .cblock h3, .cblock { } /* keep */

  /* Tests accordion */
  .acc-head { padding: 18px 16px; gap: 12px; }
  .acc-head .a-ttl b { font-size: 16px; }
  .acc-head .a-ic { width: 40px; height: 40px; }
  .acc-body { padding: 0 16px 8px; }

  /* CTA strip */
  .cta-strip { padding: 30px 22px; }
  .cta-strip h3 { font-size: 23px; }

  /* Star divider — match page gutter instead of 56px */
  .divider { padding-left: 18px; padding-right: 18px; gap: 12px; }

  /* Test rows */
  .test-row { gap: 12px 14px; padding: 20px 2px; }
  .test-row .t-title { font-size: 15.5px; }
}

/* ─────────── Сертификаты выпускников ─────────── */
.alumni-certs{position:relative;overflow:hidden;background:var(--d-900)!important}
.alumni-certs::before{content:'';position:absolute;inset:0;pointer-events:none;background:radial-gradient(45% 60% at 10% 0%,rgba(202,165,74,.20),transparent 70%),radial-gradient(40% 55% at 95% 100%,rgba(196,53,57,.22),transparent 70%)}
.alumni-certs::after{content:'';position:absolute;inset:0;pointer-events:none;opacity:.5;background-image:radial-gradient(rgba(255,255,255,.07) 1px,transparent 1px);background-size:22px 22px;-webkit-mask-image:linear-gradient(180deg,#000,transparent 75%);mask-image:linear-gradient(180deg,#000,transparent 75%)}
.alumni-certs .wrap{position:relative;z-index:1}
.alumni-certs .sect-head{margin-bottom:48px}
.alumni-certs .sect-head .kicker{color:#e0c27a}
.alumni-certs .sect-head h2{color:#fff}
.alumni-certs .sect-head p{color:rgba(255,255,255,.66)}
/* A4 portrait (210×297). Flex instead of grid so an incomplete last row stays centred under the heading. */
.ac-grid{--ac-cols:3;--ac-gap:28px;display:flex;flex-wrap:wrap;justify-content:center;gap:var(--ac-gap);max-width:1080px;margin:0 auto}
.ac-card{display:block;flex:0 0 calc((100% - (var(--ac-cols) - 1) * var(--ac-gap)) / var(--ac-cols));min-width:0;background:none;border:0;padding:0;font:inherit;cursor:zoom-in;text-align:left}
.ac-frame{position:relative;aspect-ratio:210/297;border-radius:12px;background:linear-gradient(160deg,#fff,#f6efe0);padding:10px;box-shadow:0 0 0 1px rgba(202,165,74,.35),0 20px 44px rgba(0,0,0,.35);transition:transform .4s cubic-bezier(.2,.8,.3,1),box-shadow .4s ease}
.ac-card:hover .ac-frame{transform:translateY(-6px);box-shadow:0 0 0 1px rgba(224,194,122,.8),0 30px 60px rgba(0,0,0,.45),0 0 40px rgba(202,165,74,.18)}
.ac-card:focus-visible{outline:none}
.ac-card:focus-visible .ac-frame{box-shadow:0 0 0 3px #e0c27a,0 20px 44px rgba(0,0,0,.35)}
.ac-frame .inner{position:relative;width:100%;height:100%;overflow:hidden;border-radius:5px;background:#fff;box-shadow:0 0 0 1px rgba(30,27,35,.08)}
.ac-frame .inner::after{content:'';position:absolute;z-index:2;top:0;left:-60%;width:45%;height:100%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.6),transparent);transform:skewX(-14deg);transition:left .8s cubic-bezier(.3,.7,.3,1);pointer-events:none}
.ac-card:hover .ac-frame .inner::after{left:125%}
/* contain: a scan that is not exactly A4 gets thin white margins instead of cropped edges */
.ac-frame image-slot,.ac-frame .inner img{display:block;width:100%;height:100%;object-fit:contain;transition:transform .6s cubic-bezier(.2,.8,.3,1)}
.ac-card:hover .ac-frame image-slot,.ac-card:hover .ac-frame .inner img{transform:scale(1.03)}
.ac-zoom{position:absolute;z-index:3;right:18px;bottom:18px;height:34px;padding:0 14px;border-radius:var(--rd-pill);background:var(--d-900);color:#fff;box-shadow:0 8px 20px rgba(30,27,35,.3);display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:600;opacity:0;transform:translateY(6px);transition:opacity .25s ease,transform .25s ease;pointer-events:none}
.ac-zoom svg{width:14px;height:14px}
.ac-card:hover .ac-zoom,.ac-card:focus-visible .ac-zoom{opacity:1;transform:translateY(0)}
/* lightbox */
.ac-lb{position:fixed;inset:0;z-index:300;display:flex;flex-direction:column;background:rgba(18,16,22,.94);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s}
.ac-lb.open{opacity:1;visibility:visible}
.ac-lb-top{display:flex;align-items:center;justify-content:space-between;padding:20px 28px;color:rgba(255,255,255,.7);font-size:13px;font-variant-numeric:tabular-nums}
.ac-lb-top b{color:#fff;font-weight:700}
.ac-lb-tools{display:flex;gap:8px}
.ac-lb-btn{width:42px;height:42px;border-radius:50%;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s ease,border-color .2s ease}
.ac-lb-btn:hover{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.3)}
.ac-lb-btn svg{width:18px;height:18px}
.ac-lb-stage{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:0 96px;overflow:hidden}
.ac-lb-view{position:relative;max-width:100%;max-height:100%;display:flex;align-items:center;justify-content:center;transition:opacity .25s ease,transform .35s cubic-bezier(.2,.8,.3,1)}
.ac-lb-view.swap{opacity:0;transform:scale(.97)}
.ac-lb-view img{display:block;max-width:100%;max-height:calc(100vh - 200px);max-height:calc(100dvh - 200px);border-radius:6px;box-shadow:0 30px 80px rgba(0,0,0,.5);cursor:zoom-in;transition:transform .35s cubic-bezier(.2,.8,.3,1);transform-origin:center}
.ac-lb-view.zoomed img{cursor:zoom-out;transform:scale(2)}
.ac-lb-empty{height:calc(100vh - 200px);height:calc(100dvh - 200px);max-width:80vw;aspect-ratio:210/297;border-radius:8px;border:1px dashed rgba(255,255,255,.25);display:flex;align-items:center;justify-content:center;text-align:center;padding:30px;font-size:14px;color:rgba(255,255,255,.6)}
.ac-lb-arrow{position:absolute;top:50%;transform:translateY(-50%);width:56px;height:56px}
.ac-lb-arrow.l{left:24px}.ac-lb-arrow.r{right:24px}
.ac-lb.single .ac-lb-arrow{display:none}
.ac-lb-thumbs{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;padding:18px 28px 26px}
.ac-lb-thumbs button{width:52px;aspect-ratio:210/297;border-radius:5px;overflow:hidden;border:2px solid transparent;padding:0;background:rgba(255,255,255,.08);cursor:pointer;opacity:.5;transition:opacity .2s ease,border-color .2s ease,transform .2s ease}
.ac-lb-thumbs button:hover{opacity:.85}
.ac-lb-thumbs button.on{opacity:1;border-color:#caa54a;transform:translateY(-2px)}
.ac-lb-thumbs img{width:100%;height:100%;object-fit:cover;display:block}
body.ac-lock{overflow:hidden}
@media (max-width:1100px){.ac-grid{--ac-gap:24px}}
/* Mobile: one certificate per slide, native swipe via scroll-snap.
   Counter + dots (.ac-nav) are injected by alumni-certs.js. */
.ac-nav{display:none}
@media (max-width:767px){
  .ac-grid{--ac-gap:16px;position:relative;flex-wrap:nowrap;justify-content:flex-start;max-width:none;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:6px 0 28px;margin-bottom:-12px}
  .ac-grid::-webkit-scrollbar{display:none}
  .ac-card{flex:0 0 100%;scroll-snap-align:center;scroll-snap-stop:always;cursor:pointer}
  .ac-frame{width:min(100%,340px);margin:0 auto;padding:8px;border-radius:10px}
  .ac-card:hover .ac-frame{transform:none}
  .ac-zoom{opacity:1;transform:none;right:14px;bottom:14px;height:30px;padding:0 12px;font-size:11px}
  .ac-nav{display:flex;flex-direction:column;align-items:center;gap:8px}
  .ac-count{font-size:13px;color:rgba(255,255,255,.6);font-variant-numeric:tabular-nums;white-space:nowrap}
  .ac-count b{color:#fff;font-weight:700}
  .ac-dots{--ac-dot:18px;width:calc(var(--ac-dots-visible) * var(--ac-dot));max-width:100%;overflow:hidden}
  .ac-dots-strip{display:flex;transform:translateX(calc(var(--ac-dots-shift, 0) * var(--ac-dot) * -1));transition:transform .3s ease}
  .ac-dots button{position:relative;flex:0 0 var(--ac-dot);height:24px;border:0;padding:0;background:none;cursor:pointer}
  .ac-dots button::before{content:'';position:absolute;left:50%;top:50%;width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.28);transform:translate(-50%,-50%);transition:transform .25s ease,background .25s ease}
  .ac-dots button.on::before{background:#caa54a;transform:translate(-50%,-50%) scale(1.3)}
  .ac-dots button.edge::before{transform:translate(-50%,-50%) scale(.55)}
}
@media (max-width:600px){.ac-lb-stage{padding:0 12px}.ac-lb-arrow{display:none}.ac-lb-thumbs{gap:8px;padding:14px 16px 20px}.ac-lb-thumbs button{width:38px}.ac-lb-top{padding:14px 16px}}
@media (max-width:380px){.ac-frame{padding:6px}}
.admin-bar .ac-lb{top:32px}
@media (max-width:782px){.admin-bar .ac-lb{top:46px}}
