/* =========================================================================
   Учебный центр Bridge Group — site styles
   ========================================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.site-header__logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--fg);
}
.site-header__logo img { height: 38px; width: auto; }
.site-header__logo-divider {
  width: 1px;
  height: 28px;
  background: var(--border-strong);
}
.site-header__sub {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-90);
}
.site-header__nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.site-header__nav a {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: 0.02em;
}
.site-header__nav a:hover { color: var(--ink-90); }
.site-header__phone {
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: var(--fg);
  white-space: nowrap;
}
.site-header__cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-ink);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 4px;
  position: relative;
  transition: background var(--dur-fast) var(--ease-out);
}
.site-header__cart-btn:hover { background: #2a2a2b; }
.site-header__cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--bg-yellow);
  color: var(--bg-ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
@media (max-width: 980px) {
  .site-header__nav { display: none; }
}
@media (max-width: 720px) {
  .site-header__phone { display: none; }
  .site-header__sub, .site-header__logo-divider { display: none; }
  .site-header__inner { height: 64px; }
}

/* ============ STATS BAR (horizontal infographic) ============ */
.stats-bar {
  background: var(--bg-ink);
  color: #fff;
  padding: 48px 0 36px;
  position: relative;
  overflow: hidden;
}
.stats-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('assets/texture-dark.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  pointer-events: none;
}
.stats-bar .container { position: relative; z-index: 1; }
.stats-bar__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.stats-bar__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stats-bar__num {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--bg-yellow);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.stats-bar__num span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(255,255,255,0.7);
  text-transform: lowercase;
}
.stats-bar__label {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255,255,255,0.78);
  max-width: 220px;
}
.stats-bar__divider {
  width: 1px;
  height: 56px;
  background: rgba(255,255,255,0.12);
}
.stats-bar__footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.stats-bar__licenses {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
}
.stats-bar__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.85);
}
.stats-bar__chip svg { color: var(--bg-yellow); }

@media (max-width: 980px) {
  .stats-bar__inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px 20px;
  }
  .stats-bar__divider { display: none; }
  .stats-bar__label { max-width: none; font-size: 12px; }
}
@media (max-width: 520px) {
  .stats-bar__inner { grid-template-columns: 1fr; }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  background: var(--bg);
  padding: 32px 0 40px;
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
@media (max-width: 980px) { .hero { min-height: 0; padding: 32px 0 48px; } }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('assets/bridge-icon-faded.png');
  background-repeat: no-repeat;
  background-position: right -120px bottom -120px;
  background-size: 520px;
  opacity: 0.06;
  pointer-events: none;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-90);
  padding: 6px 12px;
  background: var(--yellow-10);
  border: 1px solid var(--yellow-50);
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero__eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--bg-yellow);
  border-radius: 999px;
}
.hero h1 {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(to top, var(--bg-yellow) 30%, transparent 30%);
  padding: 0 4px;
}
.hero__lead {
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-muted);
  margin: 0 0 22px;
  max-width: 560px;
}
.hero__benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}
.hero__benefits li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.45;
  color: var(--fg);
}
.hero__benefits .check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 4px;
  background: var(--bg-yellow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.hero__benefits .check svg { width: 14px; height: 14px; color: var(--bg-ink); }
.hero__benefits b { font-weight: 600; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__benefits { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 56px; }
}

/* Hero photo composition */
.hero__media {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: calc(100vh - 160px);
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}
.hero__photo {
  position: absolute;
  inset: 0;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
}
.hero__photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('assets/bridge-icon-faded.png');
  background-repeat: no-repeat;
  background-position: center 110%;
  background-size: 80%;
  opacity: 0;
}
.hero__photo img {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom center;
}
.hero__media::after {
  content: "";
  position: absolute;
  right: -20px; bottom: -20px;
  width: 100px; height: 100px;
  background: var(--bg-yellow);
  z-index: -1;
}
.hero__chip {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 4px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: var(--shadow-md);
  z-index: 2;
  max-width: 220px;
}
.hero__chip--top { top: 28px; right: -16px; }
.hero__chip--mid { bottom: 28px; left: -16px; }
.hero__chip-icon {
  width: 32px; height: 32px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-ink);
  flex-shrink: 0;
}
.hero__chip-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
}
.hero__chip-val {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 2px;
  line-height: 1.3;
}
@media (max-width: 980px) {
  .hero__chip--top { right: 12px; top: 16px; }
  .hero__chip--mid { left: 12px; bottom: 16px; }
  .hero__media { max-height: none; max-width: 420px; }
}
.hero__badge {
  display: none;
}
.hero__badge {
  position: absolute;
  left: 24px; bottom: 24px;
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: 4px;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.hero__badge-num {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--bg-ink);
  line-height: 1;
}
.hero__badge-num + div {
  font-size: 12px;
  line-height: 1.3;
  color: var(--fg-muted);
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  border-radius: 4px;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--bg-yellow);
  color: var(--bg-ink);
}
.btn-primary:hover { background: var(--yellow-90); box-shadow: var(--shadow-yellow); }
.btn-primary:disabled { background: var(--ink-30); color: var(--ink-70); cursor: not-allowed; box-shadow: none; }

.btn-dark { background: var(--bg-ink); color: #fff; }
.btn-dark:hover { background: #2a2a2b; }

.btn-outline {
  background: transparent;
  color: var(--bg-ink);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--bg-ink); background: var(--bg-soft); }

.btn-sm { padding: 10px 18px; font-size: 13px; }

/* ============ Section common ============ */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--bg-ink); color: var(--fg-inverse); }
.section-dark h2, .section-dark h3 { color: #fff; }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.section-head p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-muted);
}

/* ============ Catalog ============ */
.catalog-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: flex-start;
}
@media (max-width: 1100px) {
  .catalog-layout { grid-template-columns: 1fr; }
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  border-radius: 4px;
  transition: all var(--dur-fast) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
}
.tab:hover { background: var(--bg-soft); color: var(--fg); }
.tab--active {
  background: var(--bg-ink);
  color: #fff;
}
.tab--active:hover { background: var(--bg-ink); color: #fff; }
.tab__count {
  font-size: 11px;
  background: rgba(255,255,255,0.18);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.tab:not(.tab--active) .tab__count { background: var(--neutral-50); color: var(--fg-muted); }

/* Section heading inside catalog */
.catalog-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--bg-ink);
}
.catalog-section__head h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.catalog-section__head p {
  font-size: 14px;
  color: var(--fg-muted);
  margin: 0;
  max-width: 540px;
}
.catalog-section__count {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-70);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Program list */
.programs { display: flex; flex-direction: column; gap: 0; }
.program {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-fast);
}
.program:hover { background: var(--bg-soft); }
.program__title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--fg);
}
.program__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-70);
  margin-top: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}
.program__price {
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
  text-align: right;
  white-space: nowrap;
}
.program__price small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-70);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.program__add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
  border: 1.5px solid var(--bg-ink);
  color: var(--bg-ink);
  font-weight: 600;
  font-size: 13px;
  border-radius: 4px;
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.program__add:hover { background: var(--bg-yellow); border-color: var(--bg-yellow); }
.program__add--added { background: var(--yellow-10); border-color: var(--bg-yellow); color: var(--bg-ink); }
.program__add svg { width: 14px; height: 14px; }

@media (max-width: 720px) {
  .program { grid-template-columns: 1fr; gap: 12px; padding: 20px 0; }
  .program__price { text-align: left; }
  .program__add { width: 100%; justify-content: center; }
}

/* Clickable row + Подробнее affordance */
.program--clickable { cursor: pointer; padding-left: 4px; padding-right: 4px; margin-left: -4px; margin-right: -4px; border-radius: 3px; }
.program--clickable:focus-visible { outline: 2px solid var(--bg-yellow); outline-offset: 2px; }
.program__details {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  padding: 2px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-90);
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--ink-50);
  cursor: pointer;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.program__details:hover { color: var(--bg-ink); border-bottom-color: var(--bg-ink); }
.program__details svg { transition: transform var(--dur-fast); }
.program__details:hover svg { transform: translateX(2px); }
.program--clickable:hover .program__details { color: var(--bg-ink); border-bottom-color: var(--bg-ink); }

/* ============ Program Modal ============ */
.pm-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 20, 22, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: pm-fade 0.18s var(--ease-out);
}
@keyframes pm-fade { from { opacity: 0; } to { opacity: 1; } }
.pm-dialog {
  position: relative;
  background: #fff;
  border-radius: 6px;
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
  animation: pm-rise 0.22s var(--ease-out);
}
@keyframes pm-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.pm-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--ink-70);
  border-radius: 4px;
  cursor: pointer;
  z-index: 2;
  transition: all var(--dur-fast);
}
.pm-close:hover { background: var(--bg-soft); color: var(--bg-ink); }

.pm-head {
  padding: 32px 64px 20px 32px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pm-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin-bottom: 10px;
}
.pm-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--fg);
  margin: 0 0 16px;
}
.pm-meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.pm-meta__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-90);
  background: var(--bg-soft);
  padding: 6px 10px;
  border-radius: 4px;
}
.pm-meta__price {
  font-size: 18px;
  font-weight: 800;
  color: var(--fg);
  margin-left: auto;
}
.pm-meta__price small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin-top: 2px;
  text-align: right;
}

.pm-body {
  padding: 24px 32px 28px;
  overflow-y: auto;
  flex: 1;
  /* Soft scrollbar */
  scrollbar-width: thin;
}
.pm-body::-webkit-scrollbar { width: 8px; }
.pm-body::-webkit-scrollbar-thumb { background: var(--neutral-50); border-radius: 4px; }

.pm-lead {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg);
  margin: 0 0 24px;
}

.pm-fields {
  margin: 0 0 28px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
}
.pm-field {
  display: contents;
}
.pm-field dt, .pm-field dd {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0;
}
.pm-field dt {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--ink-90);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-left: 16px;
}
.pm-field dd {
  color: var(--fg-muted);
  padding-right: 16px;
}

.pm-plan {
  border-top: 2px solid var(--bg-ink);
  padding-top: 18px;
}
.pm-plan__head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-90);
  margin-bottom: 14px;
}
.pm-plan__list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: plan;
}
.pm-plan__item {
  position: relative;
  padding: 10px 0 10px 38px;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg);
  counter-increment: plan;
}
.pm-plan__item::before {
  content: counter(plan, decimal-leading-zero);
  position: absolute;
  left: 0; top: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-50);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.pm-plan__item:last-child { border-bottom: 0; }
.pm-plan__item--final {
  font-weight: 700;
  color: var(--bg-ink);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  background: var(--yellow-10);
  margin: 4px -8px 0;
  padding-left: 46px;
  padding-right: 12px;
  border-radius: 4px;
  border-bottom: 0;
}
.pm-plan__item--final::before { left: 12px; color: var(--bg-ink); }

.pm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 0 0 6px 6px;
  flex-shrink: 0;
}
.pm-foot__price { display: flex; flex-direction: column; }
.pm-foot__price-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--fg);
  line-height: 1;
}
.pm-foot__price-unit {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin-top: 4px;
}
.pm-add--in { background: var(--yellow-10) !important; }

@media (max-width: 720px) {
  .pm-backdrop { padding: 0; align-items: flex-end; }
  .pm-dialog { max-height: 92vh; border-radius: 8px 8px 0 0; }
  .pm-head { padding: 28px 56px 18px 20px; }
  .pm-title { font-size: 19px; }
  .pm-meta__price { margin-left: 0; }
  .pm-body { padding: 20px; }
  .pm-fields { grid-template-columns: 1fr; }
  .pm-field dt { padding: 10px 14px 4px; border-bottom: 0; }
  .pm-field dd { padding: 4px 14px 14px; }
  .pm-foot { flex-direction: column; align-items: stretch; padding: 16px 20px; }
  .pm-foot .btn { width: 100%; justify-content: center; }
}

/* Accordion variant */
.accordion-section {
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 12px;
  background: #fff;
  overflow: hidden;
}
.accordion-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 17px;
  font-weight: 600;
  text-align: left;
  transition: background var(--dur-fast);
}
.accordion-head:hover { background: var(--bg-soft); }
.accordion-head__title { display: flex; align-items: center; gap: 14px; flex: 1; }
.accordion-head__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-70);
  background: var(--neutral-50);
  padding: 4px 10px;
  border-radius: 999px;
}
.accordion-chevron {
  transition: transform var(--dur-base) var(--ease-out);
  flex-shrink: 0;
}
.accordion-section--open .accordion-chevron { transform: rotate(180deg); }
.accordion-body {
  padding: 0 24px 12px;
  border-top: 1px solid var(--border);
}

/* ============ Cart Aside ============ */
.cart-aside {
  position: sticky;
  top: 96px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}
.cart-aside__head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-aside__title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cart-aside__title::before {
  content: "";
  width: 4px; height: 18px;
  background: var(--bg-yellow);
}
.cart-aside__count {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 500;
}
.cart-aside__items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
}
.cart-aside__empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--fg-muted);
}
.cart-aside__empty-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  background: var(--neutral-50);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-50);
}
.cart-aside__empty-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 4px;
}
.cart-aside__empty-hint {
  font-size: 13px;
  color: var(--fg-muted);
}

.cart-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item__title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--fg);
  padding-right: 24px;
  position: relative;
}
.cart-item__remove {
  position: absolute;
  top: 0; right: 0;
  width: 22px; height: 22px;
  color: var(--ink-50);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all var(--dur-fast);
}
.cart-item__remove:hover { color: #c4302b; background: var(--neutral-50); }
.cart-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.qty button {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--fg);
  transition: background var(--dur-fast);
}
.qty button:hover { background: var(--bg-soft); }
.qty input {
  width: 40px;
  height: 28px;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; background: var(--yellow-10); }

.cart-item__price {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
}
.cart-item__unit {
  font-size: 11px;
  color: var(--ink-70);
  margin-top: 4px;
}

.cart-aside__foot {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 0 0 4px 4px;
}
.cart-aside__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.cart-aside__total-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.cart-aside__total-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.cart-aside__hint {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 12px;
  line-height: 1.4;
}
.cart-aside__group-note {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--yellow-10);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-90);
  margin-bottom: 14px;
}

/* mobile cart drawer trigger */
.cart-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--bg-ink);
  color: #fff;
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: 14px;
}
.cart-fab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  background: var(--bg-yellow);
  color: var(--bg-ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
@media (max-width: 1100px) {
  .cart-aside { display: none; }
  .cart-fab { display: inline-flex; }
}

/* Drawer overlay */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
.drawer-backdrop--open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #fff;
  z-index: 101;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
}
.drawer--open { transform: translateX(0); }
.drawer__head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer__close {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.drawer__close:hover { background: var(--bg-soft); }

/* ============ Steps (Как проходит обучение) ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 32px;
  left: 5%; right: 5%;
  height: 2px;
  background: repeating-linear-gradient(to right, var(--ink-30) 0 6px, transparent 6px 12px);
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
}
.step__num {
  width: 64px; height: 64px;
  background: var(--bg-yellow);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--bg-ink);
  margin-bottom: 20px;
  border: 6px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.section-soft .step__num { border-color: var(--bg-soft); }
.step h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
}
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps::before { display: none; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
}

/* ============ Documents ============ */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .docs-grid { grid-template-columns: 1fr; } }
.doc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0;
  overflow: hidden;
  transition: all var(--dur-base) var(--ease-out);
}
.doc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.doc-card__preview {
  height: 220px;
  background: linear-gradient(135deg, #F4F4F2, #E8E8E4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.doc-card__preview[data-accent="yellow"] { background: linear-gradient(135deg, #FFF8E1, #FFE9A8); }
.doc-card__preview[data-accent="purple"] { background: linear-gradient(135deg, #F2EFFE, #E5DFFE); }
.doc-card__preview[data-accent="ink"] { background: linear-gradient(135deg, #F4F4F2, #DCDCD8); }
.doc-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  filter: drop-shadow(0 8px 16px rgba(31,31,32,0.12));
  transition: transform var(--dur-base) var(--ease-out);
}
.doc-card:hover .doc-card__img { transform: translateY(-2px) scale(1.015); }
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}
.doc-card__paper {
  width: 70%;
  height: 80%;
  background: #fff;
  box-shadow: var(--shadow-md);
  position: relative;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.doc-card__paper::before {
  content: "";
  position: absolute;
  top: 10px; right: 10px;
  width: 28px; height: 28px;
  background: var(--bg-yellow);
  border-radius: 999px;
  opacity: 0.4;
}
.doc-card__paper-line {
  height: 4px;
  background: var(--neutral-50);
  border-radius: 2px;
}
.doc-card__paper-line--head { width: 50%; height: 6px; background: var(--bg-ink); }
.doc-card__paper-line--full { width: 100%; }
.doc-card__paper-line--3 { width: 70%; }
.doc-card__paper-stamp {
  margin-top: auto;
  width: 44px; height: 44px;
  border: 2px solid var(--bg-purple);
  border-radius: 999px;
  align-self: flex-end;
  opacity: 0.6;
}
.doc-card__body { padding: 20px 24px; }
.doc-card__type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin-bottom: 8px;
}
.doc-card__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}
.doc-card__desc {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* ============ FAQ ============ */
.faq-list { max-width: 880px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  font-size: 17px;
  font-weight: 600;
  text-align: left;
  color: var(--fg);
}
.faq-q__icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--neutral-50);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-base);
}
.faq-item--open .faq-q__icon {
  background: var(--bg-yellow);
  transform: rotate(45deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-out);
}
.faq-item--open .faq-a { max-height: 400px; }
.faq-a__inner {
  padding: 0 0 24px;
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.6;
  max-width: 720px;
}

/* ============ Form ============ */
.form-section {
  background: var(--bg-ink);
  padding-top: 72px;
  padding-bottom: 72px;
  background-image: url('assets/texture-dark.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  position: relative;
}
.form-section::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(64,64,65,0.85), rgba(64,64,65,0.95));
}
.form-section .container { position: relative; z-index: 1; }
.form-section h2, .form-section h3 { color: #fff; }
.form-section .section-eyebrow { color: var(--bg-yellow); }

.form-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: flex-start;
}
@media (max-width: 980px) { .form-grid { grid-template-columns: 1fr; gap: 40px; } }

.form-card {
  background: #fff;
  color: var(--fg);
  border-radius: 4px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 720px) { .form-card { padding: 24px; } }

/* Bitrix24 embedded form variant: no white wrapper, just headline + mount */
.form-card--bx {
  background: transparent;
  color: #fff;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
  margin-top: -8px;
}
.form-card--bx h3 { color: #fff; }
.form-card--bx .section-eyebrow { color: var(--bg-yellow) !important; }
.form-card--bx .b24-form-mount:empty::before { color: rgba(255,255,255,0.5); }

.b24-form-mount {
  min-height: 320px;
}
.b24-form-mount:empty::before {
  content: "Загрузка формы…";
  display: block;
  text-align: center;
  padding: 60px 0;
  color: var(--fg-muted);
  font-size: 13px;
}

.form-card__bx-note {
  margin-top: 24px;
  padding: 12px 16px;
  background: var(--yellow-10);
  border-left: 3px solid var(--bg-yellow);
  font-size: 12px;
  color: var(--ink-90);
  line-height: 1.4;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--fg);
}
.field label .req { color: #c4302b; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--fg);
  transition: border-color var(--dur-fast);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--bg-ink);
}
.field input.error, .field textarea.error { border-color: #c4302b; }
.field__err {
  display: block;
  font-size: 12px;
  color: #c4302b;
  margin-top: 4px;
}
.field textarea { resize: vertical; min-height: 80px; }

.honeypot { position: absolute; left: -9999px; opacity: 0; }

.form-summary h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.form-summary p {
  color: rgba(255,255,255,0.78);
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 32px;
}
.summary-cart {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.summary-cart__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg-yellow);
  margin-bottom: 16px;
}
.summary-cart__item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
}
.summary-cart__item:last-of-type { border-bottom: 0; }
.summary-cart__item-title { flex: 1; line-height: 1.4; }
.summary-cart__item-qty { color: rgba(255,255,255,0.6); white-space: nowrap; }
.summary-cart__item-price { font-weight: 700; white-space: nowrap; }
.summary-cart__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--bg-yellow);
}
.summary-cart__total-label { font-size: 14px; font-weight: 600; }
.summary-cart__total-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--bg-yellow);
  letter-spacing: -0.01em;
}

/* Success state */
.success {
  text-align: center;
  padding: 56px 24px;
}
.success__icon {
  width: 72px; height: 72px;
  background: var(--bg-yellow);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.success h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}
.success p { color: var(--fg-muted); font-size: 16px; line-height: 1.55; max-width: 460px; margin: 0 auto; }

/* ============ Contacts ============ */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 800px) { .contacts-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--bg-yellow);
  padding: 28px;
  border-radius: 4px;
}
.contact-card__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin-bottom: 8px;
}
.contact-card__val {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  display: block;
  line-height: 1.4;
}
.contact-card__sub {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 8px;
}

/* ============ Footer ============ */
.footer {
  background: var(--bg-ink);
  color: rgba(255,255,255,0.7);
  padding: 56px 0 32px;
}
.footer__main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 800px) { .footer__main { grid-template-columns: 1fr; gap: 32px; } }
.footer__about p {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  line-height: 1.55;
  margin-top: 16px;
  max-width: 380px;
}
.footer__col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg-yellow);
  margin-bottom: 16px;
}
.footer__col a {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  text-decoration: none;
  padding: 6px 0;
}
.footer__col a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 16px;
}
.footer__bottom a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer__bottom a:hover { color: #fff; text-decoration: underline; }

/* ============ Toast ============ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-ink);
  color: #fff;
  padding: 14px 22px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur-base) var(--ease-out);
  z-index: 200;
}
.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast__icon {
  width: 20px; height: 20px;
  background: var(--bg-yellow);
  color: var(--bg-ink);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* anchor offset */
section[id] { scroll-margin-top: 88px; }
