/* ─────────────────────────────────────────────────────────────────────────
   Акция «Ремонт за копейку» — тема кампании.
   Грузится в repair/_header.php ПОСЛЕ Canvas-CSS → переопределяет каскадом.
   Брендовый акцент: #ffd21f (жёлтый), голос: #16a34a (зелёный).
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --rk-yellow: #ffd21f;
  --rk-yellow-d: #e9bd00;
  --rk-ink: #1d1d1f;
  --rk-green: #15803d;        /* AA 4.5:1 с белым текстом (было #16a34a ≈ 3:1) */
  --rk-green-d: #166534;
  --rk-muted: #6b7280;
}

.repair-page { background: #fff; }
.repair-page #content { overflow: visible; }
/* Убираем большой дефолтный отступ Canvas .content-wrap (80px) под хедером */
.repair-page #content .content-wrap { padding-top: 6px; }

/* ── Хедер ───────────────────────────────────────────────────────────────── */
.repair-page #header,
.repair-page #header-wrap { background: var(--rk-yellow); box-shadow: 0 2px 0 rgba(0,0,0,.06); }
.repair-page #header .header-row { align-items: center; min-height: 72px; }
.repair-page .primary-menu .menu-link { color: var(--rk-ink); font-weight: 700; text-transform: none; font-size: 15px; }
.repair-page .primary-menu .menu-item.current > .menu-link,
.repair-page .primary-menu .menu-link:hover { color: #000; }
.repair-page .primary-menu .menu-item.current > .menu-link div::after {
  content: ""; display: block; height: 3px; background: var(--rk-ink); border-radius: 2px; margin-top: 4px;
}
/* Прячем Canvas-гамбургер (анимированный SVG-бургер для мобилы) — у кампании
   всего 5 коротких ссылок, показываем нав всегда, без JS-коллапса. */
.repair-page #primary-menu-trigger { display: none !important; }
.repair-page .primary-menu { display: block !important; }
.repair-page .primary-menu .menu-container { display: flex; flex-wrap: wrap; align-items: center; }
@media (max-width: 991px) {
  .repair-page .header-row { flex-wrap: wrap; row-gap: 4px; }
  .repair-page #logo { padding: 8px 0; }
  .repair-page .primary-menu .menu-container { gap: 2px 18px; padding: 6px 0 10px; }
  .repair-page .primary-menu .menu-link { padding: 6px 0; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.rk-breadcrumb { color: var(--rk-muted); font-size: 13px; padding: 18px 0 0; }
.rk-breadcrumb a { color: var(--rk-muted); }
.rk-hero { padding: 0 0 26px; }
.rk-hero-title { font-size: clamp(34px, 6vw, 64px); font-weight: 800; letter-spacing: -.5px; margin: 6px 0 14px; color: var(--rk-ink); }
.rk-hero-sub { font-size: 18px; line-height: 1.5; color: #374151; max-width: 760px; margin: 0 0 18px; }
.rk-hero-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.rk-pill { background: var(--rk-yellow); color: var(--rk-ink); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 999px; }

/* ── Грид серий ───────────────────────────────────────────────────────────── */
.rk-grid { padding: 18px 0 8px; }
.rk-card { background: #fff; border: 1px solid #ececec; border-radius: 16px; overflow: hidden; height: 100%;
  display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
.rk-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,.12); }
.rk-card-media { position: relative; display: block; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.rk-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.rk-card:hover .rk-card-media img { transform: scale(1.05); }
.rk-card-badge { position: absolute; top: 10px; left: 10px; background: var(--rk-yellow); color: var(--rk-ink);
  font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.rk-card-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; display: flex; align-items: center;
  justify-content: center; background: rgba(0,0,0,.55); color: #fff; border-radius: 50%; font-size: 26px; opacity: .92; }
.rk-card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.rk-card-title { font-size: 18px; font-weight: 800; margin: 0 0 6px; line-height: 1.25; }
.rk-card-title a { color: var(--rk-ink); }
.rk-card-room { font-size: 13px; color: var(--rk-green-d); font-weight: 700; margin-bottom: 8px; }
.rk-card-lead { font-size: 14px; color: #4b5563; line-height: 1.45; margin: 0 0 14px; flex: 1; }
.rk-card-link { font-weight: 700; color: var(--rk-ink); font-size: 14px; }
.rk-card-link:hover { color: var(--rk-yellow-d); }
.rk-intro-card .rk-card-badge { background: var(--rk-ink); color: var(--rk-yellow); }

/* ── Фичер-лейаут: большой пилот + 4 семьи 2×2 ───────────────────────────── */
.rk-feature-row { align-items: stretch; }
.rk-feature-row > [class*="col-"] { display: flex; }
.rk-feature-row .row { flex: 1; }

/* большой пилот: медиа растягивается по высоте 2×2 семей */
.rk-card-feature { height: 100%; }
.rk-card-feature .rk-card-media { flex: 1 1 auto; aspect-ratio: auto; min-height: 320px; }
.rk-card-feature .rk-card-badge.rk-intro-badge { font-size: 13px; padding: 6px 14px; }
.rk-card-feature .rk-card-play { width: 72px; height: 72px; font-size: 34px; }
.rk-card-feature .rk-card-body { padding: 24px; }
.rk-card-feature .rk-card-title { font-size: 28px; }
.rk-card-feature .rk-card-lead { font-size: 16px; }

/* компактные карточки семей справа */
.rk-card-sm .rk-card-body { padding: 13px 15px 16px; }
.rk-card-sm .rk-card-title { font-size: 15px; margin-bottom: 5px; }
.rk-card-sm .rk-card-room { font-size: 12px; margin-bottom: 4px; }
.rk-card-sm .rk-card-votes { font-size: 12px; margin-bottom: 8px; }
.rk-card-sm .rk-card-link { font-size: 13px; }

@media (max-width: 991px) {
  .rk-feature-row > [class*="col-"] { display: block; }
  .rk-card-feature { margin-bottom: 30px; }
  .rk-card-feature .rk-card-media { min-height: 220px; }
}

/* ── Кнопки ───────────────────────────────────────────────────────────────── */
.rk-btn { display: inline-block; background: var(--rk-yellow); color: var(--rk-ink) !important; font-weight: 800;
  padding: 13px 24px; border-radius: 12px; border: 0; cursor: pointer; font-size: 15px; transition: background .15s ease, transform .1s ease; text-decoration: none; }
.rk-btn:hover { background: var(--rk-yellow-d); transform: translateY(-1px); }
.rk-btn-ghost { background: transparent; color: var(--rk-ink) !important; border: 2px solid var(--rk-ink); padding: 11px 22px; }
.rk-btn-ghost:hover { background: var(--rk-ink); color: #fff !important; }
.rk-btn-wide { width: 100%; text-align: center; }

/* ── CTA ──────────────────────────────────────────────────────────────────── */
.rk-cta { background: var(--rk-yellow); border-radius: 18px; padding: 30px; margin: 26px 0 40px; text-align: center; }
.rk-cta h3 { font-weight: 800; margin: 0 0 10px; color: var(--rk-ink); }
.rk-cta p { color: #3a3a3a; max-width: 640px; margin: 0 auto 16px; }
.rk-cta .rk-btn { background: var(--rk-ink); color: var(--rk-yellow) !important; }
.rk-cta .rk-btn:hover { background: #000; }
.rk-cta-inline { margin-top: 36px; }

/* ── Детальная: плеер + оверлей ───────────────────────────────────────────── */
.rk-story-head { padding: 8px 0 22px; }
.rk-badge-inline { position: static; display: inline-block; margin-bottom: 10px; }
.rk-story-title { font-size: clamp(26px, 4vw, 40px); font-weight: 800; margin: 0 0 6px; color: var(--rk-ink); }
.rk-story-subtitle { font-size: 18px; color: var(--rk-muted); margin: 0; }

.rk-player { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.rk-player iframe, .rk-player .rk-yt { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.rk-end { position: absolute; inset: 0; z-index: 5; background: var(--rk-yellow); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 24px; }
.rk-end-title { font-size: 22px; font-weight: 800; color: var(--rk-ink); margin: 0; }
.rk-end-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ── Детальная: история сбоку ─────────────────────────────────────────────── */
.rk-story-side { padding-left: 6px; }
.rk-goal { display: flex; flex-direction: column; gap: 2px; background: #f3f4f6; border-left: 4px solid var(--rk-green);
  padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; }
.rk-goal-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--rk-muted); font-weight: 700; }
.rk-goal-room { font-size: 18px; font-weight: 800; color: var(--rk-ink); }
.rk-story-text p { font-size: 16px; line-height: 1.6; color: #374151; margin: 0 0 14px; }

/* ── Голос ────────────────────────────────────────────────────────────────── */
.rk-vote-box { margin-top: 22px; padding-top: 18px; border-top: 1px solid #eee; }
.rk-vote-btn { width: 100%; background: var(--rk-green); color: #fff; font-weight: 800; font-size: 16px; border: 0;
  padding: 16px; border-radius: 12px; cursor: pointer; transition: background .15s ease; }
.rk-vote-btn:hover:not(:disabled) { background: var(--rk-green-d); }
.rk-vote-btn:disabled { opacity: .6; cursor: not-allowed; }
.rk-vote-msg { margin-top: 10px; font-size: 14px; color: var(--rk-green-d); font-weight: 600; }
.rk-vote-note { font-size: 12.5px; color: var(--rk-muted); margin-top: 10px; }
.rk-vote-count { font-size: 14px; color: var(--rk-ink); margin-bottom: 10px; }
.rk-vote-count .rk-vote-num { font-size: 22px; color: var(--rk-green-d); }
.rk-voted { background: #eafaf0; color: var(--rk-green-d); font-weight: 700; padding: 14px; border-radius: 12px; text-align: center; }
.rk-vote-info { background: #f3f4f6; color: var(--rk-ink); padding: 14px; border-radius: 12px; text-align: center; font-weight: 600; font-size: 14px; line-height: 1.4; }
.rk-vote-warn { background: #fff7e6; color: #92660a; }
a.rk-vote-login.rk-vote-btn { display: block; text-align: center; text-decoration: none; line-height: 1.2; }
.rk-tg-confirm { display: block; text-align: center; text-decoration: none; background: #229ed9; color: #fff !important; margin-top: 8px; }
.rk-tg-confirm:hover { background: #1c8dc2; }
.rk-vote-msg--err { color: #b91c1c; }
.rk-pill-count { background: var(--rk-ink); color: var(--rk-yellow); }
.rk-pill-count strong { color: #fff; }
.rk-card-votes { font-size: 13px; color: var(--rk-green-d); font-weight: 700; margin-bottom: 10px; }

.rk-story-nav { display: flex; justify-content: space-between; gap: 12px; margin: 36px 0 50px; flex-wrap: wrap; }

/* ── Текстовые разделы ────────────────────────────────────────────────────── */
.rk-doc { max-width: 760px; padding-top: 26px; padding-bottom: 30px; }   /* ~65-75 симв/строка */
.rk-doc-h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--rk-ink); margin: 10px 0 14px; }
.rk-doc-h2 { font-size: 22px; font-weight: 800; color: var(--rk-ink); margin: 28px 0 10px; }
.rk-doc-lead { font-size: 18px; color: #374151; line-height: 1.55; margin-bottom: 8px; }
.rk-doc p { font-size: 16px; line-height: 1.6; color: #374151; }
.rk-doc-list { padding-left: 0; list-style: none; }
.rk-doc-list li { position: relative; padding-left: 26px; margin-bottom: 10px; font-size: 16px; line-height: 1.55; color: #374151; }
.rk-doc-list li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 8px; height: 8px; background: var(--rk-yellow-d); border-radius: 50%; }
.rk-muted { color: var(--rk-muted); font-size: 13.5px; }

.rk-steps { display: grid; gap: 14px; margin: 16px 0; }
.rk-step { display: flex; gap: 14px; align-items: flex-start; background: #f9fafb; border: 1px solid #eee; border-radius: 12px; padding: 16px; }
.rk-step-n { flex: 0 0 36px; width: 36px; height: 36px; background: var(--rk-yellow); color: var(--rk-ink); font-weight: 800;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.rk-step div { font-size: 16px; line-height: 1.5; color: #374151; }

.rk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0 8px; }
.rk-stat { background: #f9fafb; border: 1px solid #eee; border-radius: 14px; padding: 18px; text-align: center; }
.rk-stat-n { display: block; font-size: 26px; font-weight: 800; color: var(--rk-ink); }
.rk-stat-l { display: block; font-size: 13px; color: var(--rk-muted); margin-top: 4px; }

/* ── Футер ────────────────────────────────────────────────────────────────── */
/* Футер — серый (не near-black Canvas dark) */
.repair-page #footer.repair-footer { background-color: #51555c; }
.repair-page #footer.repair-footer #copyrights { background-color: #474b52; }
.repair-footer .rk-footer-title { color: var(--rk-yellow); font-weight: 800; }
.repair-footer .rk-muted { color: #cbd0d6; }
.repair-footer, .repair-footer a, .repair-footer p { color: #e8eaed; }
.repair-footer a:hover { color: #fff; }

/* ── Соц-иконки ───────────────────────────────────────────────────────────── */
.rk-socials { display: flex; flex-direction: column; gap: 10px; }
.rk-socials--inline { flex-direction: row; flex-wrap: wrap; gap: 12px 20px; }
.rk-social { display: inline-flex; align-items: center; gap: 10px; color: var(--rk-ink); font-weight: 600; text-decoration: none; }
.rk-social i { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  background: var(--rk-yellow); color: var(--rk-ink); border-radius: 50%; font-size: 19px; flex: 0 0 38px; transition: background .15s ease; }
.rk-social:hover i { background: var(--rk-yellow-d); }
.rk-social-note { color: var(--rk-muted); font-weight: 400; font-size: 12px; margin-left: 2px; }
.rk-social--off { opacity: .6; cursor: default; }
.repair-footer .rk-social { color: #e5e7eb; }
.repair-footer .rk-social:hover { color: #fff; }

/* ── Адаптив ──────────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .rk-story-side { padding-left: 0; margin-top: 24px; }
  .rk-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .rk-hero { padding-top: 22px; }
  .rk-stats { grid-template-columns: 1fr 1fr; }
}

/* ── Доступность (UI-скил §1 §2 §7) ──────────────────────────────────────── */
/* Видимый focus-ring для клавиатуры */
.repair-page a:focus-visible,
.repair-page button:focus-visible,
.rk-btn:focus-visible,
.rk-vote-btn:focus-visible,
.rk-social:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
  border-radius: 8px;
}
/* Убираем 300мс-задержку тапа на кнопках */
.rk-btn, .rk-vote-btn, .rk-card-link, .rk-social, .rk-restart, .rk-next { touch-action: manipulation; }

/* Уважаем prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .repair-page *, .repair-page *::before, .repair-page *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    transition: none !important;
  }
  .rk-card:hover { transform: none; }
  .rk-card:hover .rk-card-media img { transform: none; }
}
