/* ============================================================
   «До та після» (before/after) — светлый, палитра Events.
   Фон страницы — молочный; тексты — тёмно-синие из палитры
   (#192247 «синий на грани чёрного», вторичный #4D5876).
   Слайдер без карточки/фона — крупное фото, 2 в ряд.
   ============================================================ */
.rba,
.evt-nav-wrapper {
  /* готовая СВЕТЛАЯ палитра из шаблона (slate + indigo) */
  --color-background: #f8fafc;
  --color-primary: #0f172a;
  --color-secondary: #e2e8f0;
  --color-secondary-hover: #cbd5e1;
  --color-accent: #6366f1;
  --color-accent-hover: #4f46e5;
  --color-blue-300: #a5b4fc;
  --color-blue-500: #6366f1;
  --color-gray-300: #334155;
  --color-gray-400: #475569;
  --color-gray-500: #64748b;
  --color-gray-600: #94a3b8;
  --color-gray-700: #cbd5e1;
  --color-gray-800: #e2e8f0;

  /* семантические алиасы на готовую палитру */
  --ink: var(--color-primary);        /* #0f172a */
  --ink-soft: var(--color-gray-400);  /* #475569 */
  --milk: var(--color-background);    /* #f8fafc */

  --font-family-primary: 'PT Sans', Arial, Helvetica, sans-serif;
  --font-family-secondary: 'Montserrat', Arial, Helvetica, sans-serif;

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 40px; --space-8: 48px;
  --space-9: 56px; --space-10: 64px;

  --transition-duration: .4s;
  --transition-ease: ease;
  --evt-container-width: 1320px;
}

/* молочный фон страницы (значение хардкодом — переменная не в scope body) */
html body { background-color: #f8fafc; }

.rba { box-sizing: border-box; }
.rba *, .rba *::before, .rba *::after { box-sizing: border-box; }

/* секция-категория: много воздуха, без фонов/панелей */
.rba {
  position: relative;
  max-width: var(--evt-container-width);
  margin: 0 auto;
  padding: 0;
  font-family: var(--font-family-primary);
  color: var(--ink-soft);
}
.rba__bleed { padding: clamp(18px, 2.4vw, 36px) 0 0; }
.rba__inner { max-width: 1180px; margin: 0 auto; }

/* шапка */
.rba__head { margin: 0 0 clamp(28px, 3.5vw, 48px); }
.rba .rba__title {
  font-family: var(--font-family-secondary);
  font-weight: 900;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 115%;
  color: var(--ink);
  margin: 0;
  max-width: 900px;
}
.rba .rba__subtitle {
  font-family: var(--font-family-primary);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 138%;
  color: var(--ink-soft);
  margin: var(--space-4) 0 0;
  max-width: 760px;
}

/* сетка пар — 2 в ряд, крупно, с воздухом */
.rba__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 3.2vw, 56px) clamp(24px, 2.6vw, 44px);
}

/* кейс — просто фото + подпись, без карточки */
.rba__card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* comparison slider — крупное фото, скруглённое, без фона/карточки */
.rba__compare {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--space-5);
  background: var(--color-secondary);
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
}
.rba__card[data-orient="portrait"] .rba__compare { aspect-ratio: 3 / 4; }

.rba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}
.rba__img--after { z-index: 1; }
.rba__before-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
}
.rba__before-wrap .rba__img--before { position: absolute; }

/* разделитель — единственный элемент с градиентом (навигация-цвет -> акцент) */
.rba__handle {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  width: 2px;
  height: 100%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .15);
  transform: translateX(-50%);
  cursor: ew-resize;
  outline: none;
}
.rba__handle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 32px;
  height: 100%;
  transform: translateX(-50%);
}
/* ползунок — аккуратный круглый хват с двунаправленной стрелкой */
.rba__handle-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(15, 23, 42, .1);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.rba__handle-icon { width: 22px; height: 22px; }

/* подпись — тёмно-синяя, чистая */
.rba figure.rba__card figcaption.rba__caption {
  font-family: var(--font-family-secondary);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 135%;
  color: var(--ink);
  text-align: left;
  margin: 0;
}

/* ============================================================
   НИЖНЯЯ НАВИГАЦИЯ — точные классы Events (.evt-nav-*), светлое стекло.
   ============================================================ */
.evt-nav-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  pointer-events: none;
  font-family: var(--font-family-secondary);
}
.evt-nav-wrapper .evt-container {
  width: 100%;
  max-width: var(--evt-container-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
  box-sizing: border-box;
}
.evt-nav-wrapper .evt-nav-inner { display: flex; justify-content: center; }
.evt-nav-wrapper .evt-nav-menu {
  position: relative;
  display: flex;
  align-items: center;
  pointer-events: auto;
  top: 70px;
  padding: var(--space-3) var(--space-6);
  background: hsla(40, 30%, 99%, .8);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: var(--space-2);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .06),
              0 18px 48px rgba(15, 23, 42, .14);
  transition: transform .3s ease;
  will-change: transform;
}
.evt-nav-wrapper .evt-nav-menu-visible { transform: translate(0, -95px); }
.evt-nav-wrapper .evt-nav-menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-family-secondary);
  font-size: 18px;
  font-weight: bold;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin: 0 var(--space-6) 0 0;
  padding: 2px 0;
  transition: color var(--transition-duration) var(--transition-ease), border-color var(--transition-duration) var(--transition-ease);
  text-decoration: none;
  white-space: nowrap;
}
.evt-nav-wrapper .evt-nav-menu-link:last-child { margin-right: 0; }
.evt-nav-wrapper .evt-nav-menu-link:hover { color: var(--ink); }
.evt-nav-wrapper .evt-nav-menu-link-avtive { color: var(--color-accent); border-color: var(--color-accent); }
.evt-nav-wrapper .evt-nav-menu-line {
  width: 1px;
  height: var(--space-4);
  background: rgba(15, 23, 42, .18);
  margin: 0;
  flex: none;
}

/* responsive — брейкпоинты Events */
@media (max-width: 1199px) {
  .evt-nav-wrapper .evt-nav-menu { padding: var(--space-3) var(--space-5); }
  .evt-nav-wrapper .evt-nav-menu-link { font-size: 16px; margin-right: var(--space-5); }
}
@media (max-width: 991px) {
  .rba__title { font-size: var(--space-6); }
  .rba__subtitle { font-size: 18px; }
  .evt-nav-wrapper .evt-nav-menu { top: 45px; }
  .evt-nav-wrapper .evt-nav-menu-visible { transform: translate(0, -70px); }
}
@media (max-width: 767px) {
  .rba__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-7); }
  .rba__title { font-size: var(--space-5); line-height: 120%; }
  .rba__subtitle { font-size: 16px; }
  .rba__compare { aspect-ratio: 3 / 2; }
  .rba__card[data-orient="portrait"] .rba__compare { aspect-ratio: 4 / 5; }
  .evt-nav-wrapper .evt-nav-menu { overflow-x: auto; max-width: calc(100vw - var(--space-8)); }
}
@media (max-width: 575px) {
  .rba__bleed { padding-top: var(--space-8); }
}

/* editor */
.rba-editor .rba-ed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 12px 0; }
.rba-editor .rba-ed-item { border: 1px solid #e0e0e0; border-radius: 10px; padding: 12px; background: #fff; }
.rba-editor .rba-ed-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.rba-editor .rba-ed-cell { display: flex; flex-direction: column; gap: 4px; }
.rba-editor .rba-ed-tag { font-size: 12px; font-weight: 700; color: #757575; }
.rba-editor .rba-ed-has { display: flex; flex-direction: column; gap: 4px; }
.rba-editor .rba-ed-thumb { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; cursor: pointer; }
.rba-editor .rba-ed-replace { justify-content: center; }
.rba-editor .rba-ed-choose { width: 100%; height: 90px; justify-content: center; }
.rba-editor .rba-ed-actions { display: flex; gap: 4px; justify-content: flex-end; margin-top: 4px; }
.rba-editor .rba-ed-add { margin-top: 8px; }
