/* a-signals: #problem, #reference-problem, #reference-signals (макет Figma 73:291, 85:383, 96:583) */

/* ========== #problem — «В b2b всё решает момент» ========== */
.rs-problem-title { max-width: 590px; }
.rs-problem-grid { display: grid; gap: 16px; margin-top: 40px; }

.rs-problem-head { margin: 0; font: inherit; letter-spacing: 0; }
.rs-problem-tab {
  display: flex; align-items: center; gap: 20px; width: 100%; padding: 0;
  border: 0; background: none; text-align: left; cursor: pointer;
  font: 600 25px/1.2 var(--sans); color: var(--black);
}
.rs-problem-tab:focus-visible { outline-offset: 4px; border-radius: 14px; }
.rs-problem-num {
  display: grid; place-items: center; flex: none; width: 52px; height: 52px;
  border-radius: 14px; background: var(--black); color: var(--white);
  font: 600 25px/1 var(--sans); transition: background-color .2s, color .2s;
}
.rs-problem-item.is-active .rs-problem-num { background: var(--yellow); color: var(--black); }
.rs-problem-tab:hover .rs-problem-num { background: var(--yellow); color: var(--black); }

.rs-problem-desc { margin-top: 16px; color: var(--muted); font-size: 16px; font-weight: 300; line-height: 1.4; }

/* Сцена-иллюстрация */
.rs-scene {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
  min-height: 438px; padding: 40px 50px; border-radius: 40px; background: var(--light);
}
.rs-scene-waves {
  position: absolute; z-index: -1; left: 0; top: 50%; width: 100%; height: auto;
  transform: translateY(-50%); pointer-events: none;
}
.rs-bubble { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 20px; }
.rs-bubble p { font-size: 20px; line-height: 1.4; }
.rs-bubble-in { align-self: flex-start; padding-right: 42px; border-bottom-left-radius: 0; background: var(--white); color: var(--black); }
.rs-bubble-in p { max-width: 350px; }
.rs-bubble-out { align-self: flex-end; border-bottom-right-radius: 0; background: var(--black); color: var(--white); }
.rs-bubble-out p { max-width: 434px; }
.rs-bubble-meta, .rs-contact-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rs-bubble-meta { font: 400 16px/1.2 var(--sans); }
.rs-bubble-meta b { font-weight: 400; }
.rs-bubble-meta span, .rs-contact-name span { color: var(--muted); }
.rs-bubble-meta span::before, .rs-contact-name span::before {
  content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 8px;
  border-radius: 50%; background: var(--muted); vertical-align: middle;
}
.rs-contact {
  display: flex; flex-direction: column; gap: 8px; padding: 20px 42px 20px 20px;
  border-radius: 20px; border-bottom-left-radius: 0; background: var(--white);
}
.rs-contact-name { font-size: 20px; line-height: 1.4; }
.rs-contact-name b { font-weight: 400; }
.rs-contact-name span::before { margin-right: 8px; }
.rs-contact-status { color: #f94545; font: 400 16px/1.2 var(--sans); }

.rs-problem-footer { text-align: center; font: 600 20px/1.2 var(--sans); color: var(--black); }

/* Десктоп: список слева, иллюстрация активного пункта справа */
@media (min-width: 961px) {
  .rs-problem-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 80px;
    grid-template-rows: auto auto auto auto auto auto auto 1fr auto;
  }
  .rs-problem-grid, .rs-problem-item { display: contents; }
  .rs-problem-title { grid-column: 1; grid-row: 1; margin-bottom: 56px; }
  .rs-problem-head { grid-column: 1; }
  .rs-problem-item:nth-child(1) .rs-problem-head { grid-row: 2; }
  .rs-problem-item:nth-child(2) .rs-problem-head { grid-row: 4; margin-top: 24px; }
  .rs-problem-item:nth-child(3) .rs-problem-head { grid-row: 6; margin-top: 24px; }
  /* Описание раскрывается «гармошкой», как в варианте lulilo7k (23.10.2026): высота и прозрачность за 0,35 с */
  .rs-problem-desc {
    position: relative; box-sizing: border-box; grid-column: 1; max-height: 24px; overflow: hidden;
    margin-top: 0; padding: 0 0 24px 72px; border-bottom: 1px solid var(--light); color: transparent; font-size: 18px;
    transition: max-height .35s ease-in-out, color .35s ease-in-out, padding-top .35s ease-in-out;
  }
  .rs-problem-item:nth-child(1) .rs-problem-desc { grid-row: 3; }
  .rs-problem-item:nth-child(2) .rs-problem-desc { grid-row: 5; }
  .rs-problem-item:nth-child(3) .rs-problem-desc { grid-row: 7; }
  .rs-problem-item.is-active .rs-problem-desc { max-height: 10em; color: var(--body); padding-top: 12px; }
  /* Таймер автопереключения (4 с) — невидимая полоса: по её окончании открывается следующий пункт */
  .rs-problem-grid.is-auto .rs-problem-item.is-active .rs-problem-desc::after {
    content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; opacity: 0;
    animation: rs-problem-progress 4s linear both;
  }
  .rs-problem-grid.is-paused .rs-problem-item.is-active .rs-problem-desc::after { animation-play-state: paused; }
  /* Сцены лежат в одной ячейке и сменяются растворением за 0,6 с */
  .rs-scene { grid-column: 2; grid-row: 1 / 9; align-self: center; transition: opacity .6s ease, visibility .6s; }
  .rs-problem-item:not(.is-active) .rs-scene { opacity: 0; visibility: hidden; }
  .rs-problem-footer { grid-column: 2; grid-row: 9; margin-top: 32px; }
}
@keyframes rs-problem-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* Появление блока при прокрутке: всплывает снизу (только если блок был ниже экрана при загрузке) */
.rs-problem.rs-reveal .rs-problem-layout {
  opacity: 0; transform: translateY(30px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, .61, .36, 1);
}
.rs-problem.rs-reveal.is-visible .rs-problem-layout { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rs-problem-desc, .rs-scene { transition: none; }
  .rs-problem.rs-reveal .rs-problem-layout { opacity: 1; transform: none; transition: none; }
}

/* Мобильный (макет 180:4181): все пункты раскрыты, у каждого своя сцена */
@media (max-width: 960px) {
  .rs-problem-grid { gap: 20px; margin-top: 24px; }
  .rs-problem-tab { gap: 10px; font-size: 21px; cursor: default; }
  .rs-problem-num { width: 42px; height: 42px; border-radius: 12px; font-size: 21px; background: var(--yellow); color: var(--black); }
  .rs-problem-desc { font-size: 14px; }
  .rs-scene { margin-top: 16px; max-width: 590px; }
  .rs-problem-footer { margin-top: 30px; }
}
@media (max-width: 640px) {
  .rs-scene { min-height: 238px; gap: 10px; padding: 24px 27px; border-radius: 22px; }
  .rs-bubble, .rs-contact { gap: 4px; padding: 11px; border-radius: 11px; }
  .rs-bubble-in, .rs-contact { padding-right: 22px; border-bottom-left-radius: 0; }
  .rs-bubble-out { border-bottom-right-radius: 0; }
  .rs-bubble p, .rs-contact-name { font-size: 12px; }
  .rs-bubble-in p { max-width: 190px; }
  .rs-bubble-out p { max-width: 236px; }
  .rs-bubble-meta, .rs-contact-status { font-size: 10px; }
  .rs-bubble-meta, .rs-contact-name { gap: 4px; }
  .rs-bubble-meta span::before, .rs-contact-name span::before { width: 2px; height: 2px; margin-right: 4px; }
  .rs-problem-footer { font-size: 17px; }
}

/* ========== #reference-problem — тёмный блок «Сейлзы тратят время…» ========== */
.rs-pain .rs-pain-container { width: min(1400px, calc(100% - 40px)); }
.rs-pain-block {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 72px 40px; border-radius: 40px; background: var(--black); color: var(--white); text-align: center;
}
.rs-pain-block::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../../assets/intent/reference-problem/waves-light.svg") center / cover no-repeat;
}
.rs-pain-block h2 { max-width: 900px; margin-inline: auto; color: var(--white); }
.rs-pain-block h2 em { color: var(--yellow); }

@media (max-width: 960px) {
}
@media (max-width: 640px) {
  .rs-pain .rs-pain-container { width: 100%; }
  .rs-pain-block { padding: 40px 20px; border-radius: 24px; }
  .rs-pain-block h2 { font-size: 28px; }
    }

/* ========== #reference-signals — типы сигналов + источники ========== */
.rs-types-grid {
  position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
}
.rs-types-grid .rs-card { display: flex; flex-direction: column; padding: 20px; border-color: var(--light); }
.rs-types-head { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.rs-types-head strong { font: 600 20px/1.2 var(--sans); color: var(--black); }
.rs-types-grid .rs-card > p { margin-top: 12px; color: var(--muted); font-size: 16px; font-weight: 300; line-height: 1.4; }
.rs-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--yellow); }
.rs-ic svg { width: 20px; height: 20px; stroke: var(--black); }

.rs-more { margin-top: auto; padding-top: 14px; font-size: 14px; }
.rs-more summary { width: fit-content; color: var(--muted); cursor: pointer; list-style: none; border-bottom: 1px dashed currentColor; }
.rs-more summary::-webkit-details-marker { display: none; }
.rs-more summary:hover { color: var(--black); }
.rs-types-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* «что входит» — всплывающая подсказка над ссылкой, карточка не растягивается */
.rs-more { position: relative; }
.rs-more[open] summary { color: var(--black); }
.rs-more .rs-types-tags {
  position: absolute; left: -8px; bottom: calc(100% + 10px); z-index: 5;
  width: max-content; max-width: min(300px, calc(100vw - 48px)); margin: 0; padding: 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--white);
  box-shadow: 0 12px 32px rgb(32 34 36 / 0.14);
}
.rs-more .rs-types-tags::after {
  content: ""; position: absolute; left: 20px; bottom: -6px; width: 10px; height: 10px;
  border: solid var(--line); border-width: 0 1px 1px 0; background: var(--white); transform: rotate(45deg);
}
.rs-ltag { padding: 4px 10px; border-radius: 999px; background: var(--light); font-size: 13px; line-height: 1.3; }

/* «Скоро»: то, что сервис ещё не собирает (ТЗ work/landing-soon-v1) */
.rs-ltag.is-soon, .rs-sources-list li.is-soon { border: 1px dashed #c3c8d2; background: var(--white); }
.rs-ltag.is-soon small, .rs-sources-list li.is-soon small { margin-left: 6px; color: #5f666e; font-size: 12px; }
.rs-types-grid .rs-card { position: relative; }
.rs-soon {
  position: absolute; top: 20px; right: 20px; display: inline-flex; align-items: center; height: 28px; padding: 0 14px;
  border-radius: 999px; background: var(--light); color: var(--black); font-size: 12px; font-weight: 500;
}

/* «Показать ещё»: свёрнутый список с затуханием (класс ставит JS) */
[data-collapsible].is-collapsed { overflow: hidden; }
[data-collapsible].is-collapsed::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background: linear-gradient(rgb(255 255 255 / 0), var(--white)); pointer-events: none;
}
.rs-types-grid.is-collapsed { max-height: 440px; }
.rs-types .rs-head { margin-bottom: 48px; }
.rs-types .rs-head .rs-lead { max-width: 760px; }
.rs-more-toggle {
  display: flex; align-items: center; gap: 8px; margin: 16px auto 0; padding: 8px 12px;
  border: 0; background: none; color: var(--black); font-size: 16px; cursor: pointer;
}
.rs-more-toggle[hidden] { display: none; }
.rs-more-toggle::after {
  content: ""; width: 7px; height: 7px; margin-top: -4px;
  border: solid var(--yellow); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.rs-sources { margin-top: 48px; }
.rs-sources-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.rs-sources-top strong { font: 600 20px/1.2 var(--sans); }
.rs-sources-top span { color: var(--muted); font-size: 14px; }
.rs-sources-list { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; list-style: none; }
.rs-sources-list li {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--light); border-radius: 999px; background: var(--white); font-size: 14px; line-height: 1.2;
}
.rs-sources-list img { flex: none; width: 20px; height: 20px; object-fit: contain; border-radius: 50%; }

@media (max-width: 1100px) {
  .rs-types-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-types-grid.is-collapsed { max-height: 640px; }
}
@media (max-width: 640px) {
  .rs-types-grid { grid-template-columns: 1fr; gap: 16px; }
  .rs-types-grid.is-collapsed { max-height: 880px; }
  .rs-types-head { gap: 24px; }
  .rs-types-head strong { font-size: 18px; }
  .rs-types-grid .rs-card > p { font-size: 14px; }
  .rs-sources { margin-top: 32px; }
  .rs-sources-top { flex-direction: column; gap: 8px; }
  .rs-sources-list.is-collapsed { max-height: 248px; }
  .rs-sources-list li { min-height: 38px; padding: 8px 14px; }
}
