/* Секция «Готовые сценарии/шаблоны» — общие стили без привязки к slug страницы.
   Figma: 2269:122 (Telegram), 2379:1042 (Отели) и аналоги.
   Карточка со скриншотом / изображением сценария сверху, заголовком, описанием
   и кнопкой «Использовать шаблон». 3 колонки на десктопе, 12px зазор. */

.bh-scenarios {
  --bh-scenarios-head-gap: 64px;
  box-sizing: border-box;
  width: 100%;
  position: relative;
  background: #fff;
  overflow: hidden;
  margin: 50px 0;
  padding: 0;
}

.bh-scenarios--no-lead {
  --bh-scenarios-head-gap: 40px;
}

.bh-scenarios__wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--bh-scenarios-head-gap);
}

.bh-scenarios__head {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bh-scenarios__head-spacer {
  align-self: stretch;
  display: inline-flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.bh-scenarios__title-row {
  flex: 1 1 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.bh-scenarios__title {
  margin: 0;
  flex: 1 1 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #212121;
  font-size: 36px;
  font-family: "Ubuntu Sans", Ubuntu, sans-serif;
  font-weight: 700;
  line-height: 40px;
  overflow-wrap: break-word;
}

.bh-scenarios__lead {
  margin: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 768px;
  align-self: center;
  padding-top: 16px;
  text-align: center;
  color: #212121;
  font-size: 18px;
  font-family: Roboto, sans-serif;
  font-weight: 400;
  line-height: 28px;
  opacity: 0.8;
  overflow-wrap: break-word;
}

.bh-scenarios__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  align-content: flex-start;
  gap: 12px;
  width: 100%;
}

/* ── Карточка сценария ── */
.bh-scenario-card {
  box-sizing: border-box;
  padding: 30px;
  background: #f8faff;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 20px;
  flex: 0 0 calc((100% - 24px) / 3);
  max-width: calc((100% - 24px) / 3);
  min-width: 0;
}

.bh-scenario-card__img {
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 323 / 221;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 17px 11px 37.8px rgba(255, 255, 255, 0.25);
  display: block;
}

.bh-scenario-card__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

.bh-scenario-card__title {
  margin: 0;
  align-self: stretch;
  color: #212121;
  font-size: 24px;
  font-family: "Ubuntu Sans", Ubuntu, sans-serif;
  font-weight: 700;
  line-height: 28.8px;
  overflow-wrap: break-word;
}

.bh-scenario-card__stack {
  flex: 1 1 auto;
  min-height: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 16px;
}

.bh-scenario-card__desc {
  margin: 0;
  align-self: stretch;
  color: #212121;
  font-size: 16px;
  font-family: Roboto, sans-serif;
  font-weight: 400;
  line-height: 23.2px;
  opacity: 0.8;
  overflow-wrap: break-word;
}

.bh-scenario-card__actions {
  margin-top: auto;
  display: inline-flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
}

.bh-scenario-card__btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #ff4d4d;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: Roboto, sans-serif;
  font-weight: 500;
  line-height: 24px;
  text-align: center;
  text-decoration: none;
  overflow-wrap: break-word;
}

@media (max-width: 767px) {
  .bh-scenarios {
    --bh-scenarios-head-gap: 32px;
  }

  .bh-scenarios__grid {
    flex-direction: column;
  }

  .bh-scenario-card {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }

  .bh-scenario-card__img {
    width: 100%;
    height: auto;
  }

  .bh-scenario-card__body {
    width: 100%;
    max-width: 100%;
  }
}
