/* =========================
   B2B LEGAL PAGE (Article)
   ЕДИНЫЙ CSS БЕЗ ПАТЧЕЙ
   ========================= */

/* Базовые переменные (чтобы работало даже если .b2b-legal не обернуло весь блок) */
:root {
  --b2b-green: #8CCE49;
  --b2b-green-dark: #76ad31;
  --b2b-text: #2c2c2c;
  --b2b-muted: #666;
  --b2b-border: #e9ecef;
  --b2b-bg-soft: #f7f8fa;
  --b2b-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Общие правила */
.b2b-legal,
.b2b-legal * {
  box-sizing: border-box;
}

.b2b-legal {
  color: var(--b2b-text);
  margin: 0;
  padding: 0;
  overflow-wrap: anywhere;
}

.b2b-legal img {
  max-width: 100%;
  height: auto;
  display: block;
}

.b2b-legal a {
  text-decoration: none;
}

.b2b-legal__section {
  margin: 0 0 28px;
}

.b2b-legal__h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--b2b-text);
}

.b2b-legal__lead {
  margin: 0;
  color: var(--b2b-muted);
  font-size: 15px;
  line-height: 1.6;
}

.b2b-legal__section-title {
  margin: 0 0 16px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--b2b-text);
}

.b2b-legal__section-title--sm {
  font-size: 26px;
  margin-bottom: 14px;
}

.b2b-card {
  background: #fff;
  border: 1px solid var(--b2b-border);
  border-radius: 16px;
  box-shadow: var(--b2b-shadow);
}

/* ---------- Buttons ---------- */

.b2b-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  transition: all .2s ease;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none !important;
}

/* Зелёные кнопки — как на hero-баннерах: градиент, белый текст, тень */
.b2b-btn--primary {
  min-height: auto;
  padding: 24px 32px;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: #fff !important;
  background: linear-gradient(180deg, #9dd85a 0%, #8CCE49 50%, #7ab83d 100%) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.b2b-btn--primary:hover {
  color: #fff !important;
  background: linear-gradient(180deg, #9dd85a 0%, #8CCE49 50%, #7ab83d 100%) !important;
  filter: brightness(1.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.b2b-btn--ghost {
  background: #fff;
  border-color: var(--b2b-border);
  color: var(--b2b-text) !important;
}

.b2b-btn--ghost:hover {
  border-color: #d7dbe0;
  background: #fafbfc;
  color: var(--b2b-text) !important;
}

/* ---------- Hero ---------- */

.b2b-legal__hero {
  margin-bottom: 28px;
}

.b2b-legal__hero-content {
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--b2b-border);
  background:
    radial-gradient(circle at top right, rgba(140, 206, 73, 0.08), transparent 40%),
    #fff;
  box-shadow: var(--b2b-shadow);
}

.b2b-legal__hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.b2b-legal__hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.b2b-legal__hero-tags li {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--b2b-bg-soft);
  border: 1px solid var(--b2b-border);
  color: #4f5965;
  font-size: 13px;
  line-height: 1.2;
}

/* ---------- Advantages ---------- */

.b2b-adv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.b2b-adv-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  min-height: 130px;
}

.b2b-adv-card__icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--b2b-green);
}

.b2b-adv-card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.b2b-adv-card__body h3 {
  margin: 2px 0 7px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--b2b-text);
}

.b2b-adv-card__body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--b2b-muted);
}

/* ---------- Steps (flow style) ---------- */

.b2b-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.b2b-steps--flow {
  position: relative;
  overflow: visible;
}

.b2b-step {
  padding: 16px;
  min-height: 190px;
}

.b2b-step--flow {
  position: relative;
  min-height: 205px;
  border-radius: 14px;
  overflow: visible;
}

.b2b-step__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

/* Базовая нумерация (fallback, если где-то старый HTML без b2b-step--flow) */
.b2b-step__num {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(140, 206, 73, 0.14);
  color: #5b8f22;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 18px;
}

/* Новая нумерация для flow */
.b2b-step--flow .b2b-step__num {
  width: auto;
  height: auto;
  min-width: 0;
  border-radius: 0;
  background: transparent;
  color: var(--b2b-green);
  display: block;
  margin: 0;
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
  flex: 0 0 auto;
}

.b2b-step--flow .b2b-step__num::after {
  content: ".";
}

.b2b-step__icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  color: var(--b2b-green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.b2b-step__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.b2b-step h3,
.b2b-step--flow h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--b2b-text);
}

.b2b-step p,
.b2b-step--flow p {
  margin: 0;
  color: var(--b2b-muted);
  font-size: 14px;
  line-height: 1.45;
}

/* Стрелки между шагами (только десктоп) */
.b2b-step--flow:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -26px;
  top: 34px;
  z-index: 3;
  font-size: 34px;
  line-height: 1;
  color: var(--b2b-green);
  font-weight: 500;
  pointer-events: none;
  opacity: .95;
}

.b2b-step--flow:not(:last-child) {
  margin-right: 6px;
}

/* ---------- Contacts + Banner ---------- */

.b2b-contact-banner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  padding: 16px;
  align-items: stretch;
}

.b2b-contact-banner__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.b2b-contact-banner__content .b2b-legal__section-title {
  margin-bottom: 14px;
}

/* На случай, если старый список остался в HTML */
.b2b-contact-list {
  display: none !important;
}

.b2b-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 22px;
  margin: 2px 0 10px;
  max-width: 620px;
}

.b2b-contact-grid__col {
  display: grid;
  gap: 12px;
  align-content: start;
}

.b2b-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 30px;
  min-width: 0;
}

.b2b-contact-item__icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--b2b-green);
  margin-top: 1px;
}

.b2b-contact-item__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.b2b-contact-item__link,
.b2b-contact-item__text {
  font-size: 14px;
  line-height: 1.35;
  color: var(--b2b-text);
}

.b2b-contact-item__link {
  color: var(--b2b-text) !important;
  border-bottom: 1px dashed transparent;
  text-decoration: none !important;
}

.b2b-contact-item__link:hover {
  border-bottom-color: rgba(0, 0, 0, .22);
}

.b2b-contact-item__sub {
  color: var(--b2b-muted);
}

.b2b-contact-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 0;
}

.b2b-contact-banner__image {
  border-radius: 12px;
  overflow: hidden;
  min-height: 220px;
  background: #f2f4f6;
}

.b2b-contact-banner__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Docs ---------- */

.b2b-docs {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  padding: 16px;
  align-items: center;
}

.b2b-docs__left {
  min-width: 0;
}

.b2b-docs__text {
  margin: 0 0 12px;
  color: var(--b2b-muted);
  font-size: 14px;
  line-height: 1.5;
}

.b2b-docs__list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.b2b-docs__list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--b2b-text);
}

.b2b-docs__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #5b8f22;
  font-weight: 700;
}

.b2b-docs__right {
  border-radius: 12px;
  overflow: hidden;
  background: #f2f4f6;
  min-height: 210px;
}

.b2b-docs__right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- FAQ ---------- */

.b2b-faq {
  display: grid;
  gap: 10px;
}

.b2b-faq__item {
  border: 1px solid var(--b2b-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--b2b-shadow);
  overflow: hidden;
}

.b2b-faq__item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 14px 42px 14px 14px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--b2b-text);
}

.b2b-faq__item summary::-webkit-details-marker {
  display: none;
}

.b2b-faq__item summary::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(140, 206, 73, 0.12);
  color: #5b8f22;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.b2b-faq__item[open] summary::after {
  content: "–";
}

.b2b-faq__answer {
  padding: 0 14px 14px;
  color: var(--b2b-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Final CTA ---------- */

.b2b-final-cta {
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(140, 206, 73, 0.22);
  background:
    radial-gradient(circle at right top, rgba(140, 206, 73, 0.16), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #fbfdf7 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.b2b-final-cta__content {
  min-width: 0;
}

.b2b-final-cta h2 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--b2b-text);
}

.b2b-final-cta p {
  margin: 0;
  color: var(--b2b-muted);
  font-size: 14px;
  line-height: 1.45;
  max-width: 700px;
}

.b2b-final-cta__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

/* =========================
   Adaptive
   ========================= */

@media (max-width: 1199px) {
  .b2b-legal__h1 {
    font-size: 30px;
  }

  .b2b-legal__section-title {
    font-size: 26px;
  }

  .b2b-adv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .b2b-steps,
  .b2b-steps--flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* На 2 ряда стрелки между шагами отключаем */
  .b2b-step--flow::after {
    display: none;
  }

  .b2b-contact-banner {
    grid-template-columns: 1fr;
  }

  .b2b-contact-banner__image {
    min-height: 260px;
  }

  .b2b-docs {
    grid-template-columns: 1fr;
  }

  .b2b-docs__right {
    min-height: 240px;
  }

  .b2b-final-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 991px) {
  .b2b-legal__hero-content {
    padding: 18px;
  }

  .b2b-adv-card,
  .b2b-step,
  .b2b-step--flow {
    min-height: 0;
  }

  .b2b-contact-grid {
    max-width: 100%;
    gap: 10px 16px;
  }

  .b2b-final-cta h2 {
    font-size: 22px;
  }
}

@media (max-width: 767px) {
  .b2b-legal__section {
    margin-bottom: 20px;
  }

  .b2b-legal__h1 {
    font-size: 24px;
    line-height: 1.15;
    margin-bottom: 10px;
  }

  .b2b-legal__lead {
    font-size: 14px;
    line-height: 1.5;
  }

  .b2b-legal__section-title {
    font-size: 22px;
    margin-bottom: 12px;
  }

  .b2b-legal__section-title--sm {
    font-size: 20px;
  }

  .b2b-legal__hero-content {
    padding: 14px;
    border-radius: 12px;
  }

  .b2b-legal__hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .b2b-legal__hero-actions .b2b-btn {
    width: 100%;
  }

  .b2b-btn--primary {
    padding: 18px 22px;
    font-size: 14px;
    border-radius: 8px;
  }

  .b2b-legal__hero-tags {
    margin-top: 12px;
    gap: 6px;
  }

  .b2b-legal__hero-tags li {
    font-size: 12px;
    padding: 6px 9px;
  }

  .b2b-adv-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .b2b-adv-card {
    padding: 12px;
    border-radius: 12px;
    gap: 10px;
  }

  .b2b-adv-card__icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .b2b-adv-card__body h3 {
    font-size: 15px;
    margin-bottom: 5px;
  }

  .b2b-adv-card__body p {
    font-size: 13px;
    line-height: 1.4;
  }

  .b2b-steps,
  .b2b-steps--flow {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .b2b-step,
  .b2b-step--flow {
    padding: 12px;
    min-height: 0;
    border-radius: 12px;
  }

  .b2b-step__top {
    gap: 8px;
    margin-bottom: 8px;
  }

  .b2b-step--flow .b2b-step__num {
    font-size: 32px;
  }

  .b2b-step__icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .b2b-step h3,
  .b2b-step--flow h3 {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .b2b-step p,
  .b2b-step--flow p {
    font-size: 13px;
    line-height: 1.4;
  }

  .b2b-step--flow::after {
    display: none;
  }

  .b2b-contact-banner {
    padding: 12px;
    gap: 12px;
    border-radius: 12px;
  }

  .b2b-contact-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }

  .b2b-contact-grid__col {
    gap: 10px;
  }

  .b2b-contact-item {
    gap: 8px;
  }

  .b2b-contact-item__icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }

  .b2b-contact-item__link,
  .b2b-contact-item__text {
    font-size: 13px;
    line-height: 1.35;
  }

  .b2b-contact-banner__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 12px;
  }

  .b2b-contact-banner__actions .b2b-btn {
    width: 100%;
  }

  .b2b-contact-banner__image {
    min-height: 190px;
    border-radius: 10px;
  }

  .b2b-docs {
    padding: 12px;
    gap: 12px;
    border-radius: 12px;
  }

  .b2b-docs__text,
  .b2b-docs__list li {
    font-size: 13px;
  }

  .b2b-docs .b2b-btn {
    width: 100%;
  }

  .b2b-docs__right {
    min-height: 180px;
    border-radius: 10px;
  }

  .b2b-faq__item {
    border-radius: 10px;
  }

  .b2b-faq__item summary {
    padding: 12px 40px 12px 12px;
    font-size: 14px;
  }

  .b2b-faq__answer {
    padding: 0 12px 12px;
    font-size: 13px;
  }

  .b2b-final-cta {
    padding: 14px;
    border-radius: 12px;
    gap: 12px;
  }

  .b2b-final-cta h2 {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .b2b-final-cta p {
    font-size: 13px;
    line-height: 1.4;
  }

  .b2b-final-cta__actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .b2b-final-cta__actions .b2b-btn {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .b2b-legal__h1 {
    font-size: 22px;
  }

  .b2b-legal__section-title {
    font-size: 20px;
  }
}

/* =======================================
   СХЕМА РАБОТЫ — единый блок (как в примере)
   ======================================= */

.b2b-steps-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 14px 10px;
  border-radius: 16px;
  position: relative;
  overflow: visible;
}

.b2b-steps-strip__item {
  position: relative;
  padding: 10px 16px 12px;
  min-width: 0;
}

.b2b-steps-strip__item:not(:last-child) {
  border-right: 1px solid rgba(233, 236, 239, 0.8);
}

.b2b-steps-strip__item:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -13px;
  top: 18px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--b2b-green, #8CCE49);
  font-size: 28px;
  line-height: 1;
  background: #fff;
  z-index: 2;
  pointer-events: none;
}

.b2b-steps-strip__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  min-height: 52px;
}

.b2b-steps-strip__num {
  color: var(--b2b-green, #8CCE49);
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
  flex: 0 0 auto;
}

.b2b-steps-strip__icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  color: var(--b2b-green, #8CCE49);
  display: flex;
  align-items: center;
  justify-content: center;
}

.b2b-steps-strip__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.b2b-steps-strip__item h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--b2b-text, #2c2c2c);
}

.b2b-steps-strip__item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--b2b-muted, #666);
}

@media (max-width: 1199px) {
  .b2b-steps-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }

  .b2b-steps-strip__item {
    padding: 10px 14px 12px;
  }

  .b2b-steps-strip__item:nth-child(odd) {
    border-right: 1px solid rgba(233, 236, 239, 0.8);
  }

  .b2b-steps-strip__item:nth-child(even) {
    border-right: none;
  }

  .b2b-steps-strip__item:nth-child(-n+2) {
    border-bottom: 1px solid rgba(233, 236, 239, 0.8);
  }

  .b2b-steps-strip__item::after {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .b2b-steps-strip {
    grid-template-columns: 1fr;
    padding: 8px;
    border-radius: 12px;
  }

  .b2b-steps-strip__item {
    padding: 10px 10px 12px;
    border-right: none !important;
    border-bottom: 1px solid rgba(233, 236, 239, 0.8);
  }

  .b2b-steps-strip__item:last-child {
    border-bottom: none;
  }

  .b2b-steps-strip__item::after {
    display: none !important;
  }

  .b2b-steps-strip__top {
    gap: 8px;
    margin-bottom: 8px;
    min-height: 40px;
  }

  .b2b-steps-strip__num {
    font-size: 32px;
  }

  .b2b-steps-strip__icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .b2b-steps-strip__item h3 {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .b2b-steps-strip__item p {
    font-size: 13px;
    line-height: 1.4;
  }
}

/* ===== СХЕМА РАБОТЫ: вариант БЕЗ вертикальных линий ===== */

.b2b-steps-strip__item:not(:last-child) {
  border-right: none !important;
}

.b2b-steps-strip {
  column-gap: 8px;
  padding: 14px 12px;
}

.b2b-steps-strip__item {
  padding: 10px 18px 12px;
}

.b2b-steps-strip__item:not(:last-child)::after {
  right: -10px;
  top: 18px;
  width: 20px;
  height: 20px;
  font-size: 24px;
  background: transparent;
  color: rgba(140, 206, 73, 0.95);
}

@media (max-width: 1199px) {
  .b2b-steps-strip__item,
  .b2b-steps-strip__item:nth-child(odd),
  .b2b-steps-strip__item:nth-child(even),
  .b2b-steps-strip__item:nth-child(-n+2) {
    border-right: none !important;
    border-bottom: none !important;
  }

  .b2b-steps-strip {
    gap: 6px 4px;
    padding: 10px;
  }

  .b2b-steps-strip__item {
    padding: 10px 14px 12px;
  }
}

@media (max-width: 767px) {
  .b2b-steps-strip__item,
  .b2b-steps-strip__item:last-child {
    border-bottom: none !important;
  }

  .b2b-steps-strip {
    gap: 8px;
    padding: 8px;
  }

  .b2b-steps-strip__item {
    padding: 10px 10px 12px;
  }
}
