/* Кейс «Полный редизайн»: обложка до/после, вкладки экранов, разделы с визуалом (дополняет case.css) */

/* Обложка до / после */
.ba { position: relative; aspect-ratio: 2 / 1; background: #141414; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.ba__img { position: absolute; top: 0; left: 0; width: 100%; height: auto; pointer-events: none; }
.ba__after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.ba__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1px; background: #fff; pointer-events: none; }
.ba__handle { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: #fff; color: #141414; box-shadow: 0 4px 16px rgba(0, 0, 0, .35); display: flex; align-items: center; justify-content: center; }
.ba__handle svg { width: 20px; height: 20px; flex: none; }
.ba:has(.ba__range:focus-visible) .ba__handle { outline: 2px solid var(--accent); outline-offset: 3px; }
.ba__label { position: absolute; bottom: 24px; padding: 10px 20px; border-radius: var(--r-pill); font: 600 18px/25px var(--sans); pointer-events: none; }
.ba__label--before { left: 24px; background: var(--accent); color: #fff; }
.ba__label--after { right: 24px; background: var(--accent); color: #fff; }

/* Карточки */
.rd-main { gap: 40px; }
.intro .done, .rd-main .done { column-gap: 40px; }
.block--tiles { gap: 16px; }
.ic-box { display: flex; align-items: center; justify-content: center; background: var(--line); }
.ic-box img { width: 24px; height: 24px; }

/* Вкладки экранов */
.screens { display: flex; flex-direction: column; gap: 20px; }
.screens__tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.screens__tab { height: 32px; padding: 0 14px; border-radius: var(--r-pill); background: var(--card-raised); color: var(--ink); font: 400 14px/20px var(--sans); transition: background .2s, color .2s; }
.screens__tab:hover { background: #313136; }
.screens__tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.screens__frame { border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.screens__panel img { width: 100%; height: auto; aspect-ratio: 1118 / 620; object-fit: cover; }

/* Разделы с визуалом */
.rd-sec.card--row { align-items: stretch; }
.rd-sec__text { flex: 620 1 0; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.rd-sec.card--row .rd-sec__text .args { flex: 1; }
.rd-sec__visual { flex: 460 1 0; align-self: flex-start; min-width: 0; width: 100%; border-radius: var(--r-l); }
.rd-visual { width: 100%; border-radius: var(--r-l); }
.rd-subs { width: 100%; }
.rd-icons { display: grid; grid-template-columns: 570fr 538fr; gap: 12px; }

.callout { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r-ml); padding: 24px; }
.callout img { width: 24px; height: 24px; flex: none; }
.callout h4 { font: 500 16px/22px var(--sans); }
.callout p { font: 400 14px/20px var(--sans); color: var(--muted); margin-top: 4px; }

@media (max-width: 1100px) {
  .rd-icons { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .ba__handle { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
  .ba__handle svg { width: 16px; height: 16px; }
  .ba__label { bottom: 12px; padding: 4px 12px; font: 600 14px/20px var(--sans); }
  .ba__label--before { left: 12px; }
  .ba__label--after { right: 12px; }
  .rd-main { gap: 24px; }
  .rd-sec__text, .rd-sec__visual { flex: none; }
  .rd-sec__visual, .rd-visual { border-radius: var(--r-m); }
  .callout { padding: 16px; }
}
