/* ==========================================================================
   TheCBD — Партнёрская программа (/partners/, Figma 7411:2119)
   Использует дизайн-токены tokens.css, base.css и общие секции home.css
   ========================================================================== */

.cbd-partners-page {
  background: var(--color-bg-page, #ffffff);
  color: var(--color-text-primary, #202c25);
}

/* 1. Первый экран (Figma 7481:2541) */
.cbd-partners-hero {
  position: relative;
  min-height: 592px;
  overflow: hidden;
  background: #274838;
  display: flex;
  align-items: stretch;
}

.cbd-partners-hero__leaves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.cbd-partners-hero__decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.cbd-partners-hero__blob {
  position: absolute;
  max-width: none;
  pointer-events: none;
}

.cbd-partners-hero__blob--1 {
  width: 892px;
  height: 892px;
  left: -109px;
  top: -175px;
}

.cbd-partners-hero__blob--2 {
  width: 438px;
  height: 438px;
  left: -128px;
  top: -20px;
}

.cbd-partners-hero__blob--3 {
  width: 503px;
  height: 503px;
  left: -128px;
  top: 323px;
}

.cbd-partners-hero__blob--4 {
  width: 385px;
  height: 385px;
  left: 238px;
  top: 189px;
}

.cbd-partners-hero__photo {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 840px;
  max-width: 60%;
  height: 574px;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.cbd-partners-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scaleX(-1);
}

.cbd-partners-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 40px;
  padding-bottom: 48px;
  width: 100%;
}

.cbd-partners-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 28px;
}

.cbd-partners-crumbs a {
  color: rgba(25, 25, 25, 0.72);
  text-decoration: none;
  transition: color var(--transition-fast, 150ms ease);
}

.cbd-partners-crumbs a:hover {
  color: #191919;
  text-decoration: underline;
}

.cbd-partners-crumbs__sep {
  color: rgba(25, 25, 25, 0.45);
}

.cbd-partners-crumbs__current {
  color: #191919;
  font-weight: 600;
}

.cbd-partners-hero__content {
  margin-top: auto;
  margin-bottom: auto;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 0;
}

.cbd-partners-hero__title {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
  color: #202c25;
}

.cbd-partners-hero__desc {
  margin: 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: #343635;
}

.cbd-partners-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cbd-partners-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast, 150ms ease), border-color var(--transition-fast, 150ms ease), color var(--transition-fast, 150ms ease);
}

.cbd-partners-btn--primary {
  background: var(--color-brand-primary, #317627);
  color: #ffffff;
  border: 1px solid var(--color-brand-primary, #317627);
}

.cbd-partners-btn--primary:hover {
  background: var(--color-brand-hover, #275e1f);
  border-color: var(--color-brand-hover, #275e1f);
}

.cbd-partners-btn--soft {
  background: #e6efe2;
  color: var(--color-brand-primary, #317627);
  border: 1px solid #dce4d9;
}

.cbd-partners-btn--soft:hover {
  background: #d8e7d2;
}

.cbd-partners-btn--wide {
  width: 100%;
  max-width: 414px;
  background: var(--color-brand-accent, #3f892c);
  border-color: var(--color-brand-accent, #3f892c);
  font-size: 16px;
  font-weight: 500;
}

.cbd-partners-btn--wide:hover {
  background: var(--color-brand-primary, #317627);
  border-color: var(--color-brand-primary, #317627);
}

/* 2. Как это работает? — 3 шага (Figma 7411:2164) */
.cbd-partners-steps {
  padding: 64px 0 48px;
}

.cbd-partners-steps__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cbd-partners-step-card {
  border: 1px solid #dce4d9;
  border-radius: 16px;
  background: #ffffff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cbd-partners-step-card__badge {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #ecf3ea;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.cbd-partners-step-card__ring {
  position: absolute;
  left: 1px;
  top: -6px;
  width: 96px;
  height: 96px;
  pointer-events: none;
}

.cbd-partners-step-card__num {
  position: relative;
  z-index: 1;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.05;
  color: var(--color-brand-accent, #3f892c);
  transform: translateY(-2px);
}

.cbd-partners-step-card__word {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-brand-accent, #3f892c);
  transform: translateY(-2px);
}

.cbd-partners-step-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: #202c25;
}

.cbd-partners-step-card__text {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: #5b685f;
}

.cbd-partners-step-card__text a {
  color: var(--color-brand-accent, #3f892c);
  text-decoration: underline;
}

/* 3. Инструменты (Figma 7411:2555) */
.cbd-partners-tools {
  padding: 56px 0 64px;
}

.cbd-partners-tools__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cbd-partners-tool-card {
  border: 1px solid var(--color-brand-accent, #3f892c);
  border-radius: 16px;
  background: #ffffff;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cbd-partners-tool-card__icon {
  height: 54px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.cbd-partners-tool-card__icon img {
  display: block;
  max-height: 54px;
  width: auto;
}

.cbd-partners-tool-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

.cbd-partners-tool-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #1e1e1e;
}

.cbd-partners-tool-card__text {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: #1e1e1e;
}

.cbd-partners-tool-card__link {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-brand-primary, #317627);
  text-decoration: underline;
  cursor: pointer;
}

.cbd-partners-tool-card__link:hover {
  color: #204f19;
}

.cbd-partners-tools__cta {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}

/* 4. Акцентный баннер % (Figma 7480:2529) */
.cbd-partners-callout-section {
  padding: 0 0 32px;
}

.cbd-partners-callout {
  background: #ecf3ea;
  border-radius: 15px;
  padding: 44px 48px;
  text-align: center;
}

.cbd-partners-callout__text {
  margin: 0 auto;
  max-width: 1097px;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.36;
  color: #000000;
}

.cbd-partners-callout__accent {
  font-weight: 700;
  color: var(--color-brand-accent, #3f892c);
}

/* 5. Бренды в нашем каталоге (Figma 7411:2414) */
.cbd-partners-brands {
  padding: 64px 0;
}

.cbd-partners-brands__desc {
  margin: 0 0 24px;
  max-width: 632px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: #5b685f;
}

.cbd-partners-brands__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.cbd-partners-brand-card {
  height: 112px;
  background: #ffffff;
  border: 1px solid #dce4d9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
}

.cbd-partners-brand-card img {
  max-width: 100%;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.cbd-partners-brand-card__mask {
  width: 196px;
  max-width: 100%;
  height: 40px;
  background: #4a4a4a;
  -webkit-mask-image: url("/assets/about/brand-motherplant-mask.png");
  mask-image: url("/assets/about/brand-motherplant-mask.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* 7. FAQ (Figma 7411:2672) */
.cbd-partners-faq {
  padding: 64px 0 16px;
}

.cbd-partners-faq__title {
  margin: 0 0 30px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  color: #111827;
}

.cbd-partners-faq__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cbd-partners-faq__item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color var(--transition-fast, 150ms ease), background var(--transition-fast, 150ms ease);
}

.cbd-partners-faq__item.is-open {
  background: #ffffff;
  border-color: #cde0c7;
}

.cbd-partners-faq__trigger {
  width: 100%;
  padding: 20px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: #111827;
  cursor: pointer;
}

.cbd-partners-faq__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.cbd-partners-faq__item.is-open .cbd-partners-faq__icon {
  transform: rotate(45deg);
}

.cbd-partners-faq__panel {
  display: none;
  padding: 0 20px 20px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  color: #4b5563;
}

.cbd-partners-faq__item.is-open .cbd-partners-faq__panel {
  display: block;
}

.cbd-partners-subscribe-wrap {
  padding: 0 0 80px;
}

.cbd-partners-subscribe-wrap .cbd-subscribe {
  margin-top: 48px;
}

/* Модалка «Принцип работы» */
.cbd-partners-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(17, 24, 39, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cbd-partners-modal.is-open {
  display: flex;
}

.cbd-partners-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cbd-partners-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #f3f5f2;
  color: #202c25;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.cbd-partners-modal__title {
  margin: 0;
  padding-right: 36px;
  font-size: 20px;
  font-weight: 600;
  color: #202c25;
}

.cbd-partners-modal__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #4b5563;
}

/* Адаптив: Планшет и мобилка */
@media (max-width: 1199px) {
  .cbd-partners-hero__photo {
    width: 620px;
    max-width: 56%;
  }

  .cbd-partners-steps__grid,
  .cbd-partners-tools__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .cbd-partners-tool-card,
  .cbd-partners-step-card {
    padding: 20px;
  }

  .cbd-partners-callout {
    padding: 36px 32px;
  }

  .cbd-partners-callout__text {
    font-size: 22px;
  }

  .cbd-partners-brands__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 959px) and (min-width: 768px) {
  /* Вертикальный планшет: 2 карточки сверху + 3-я горизонтально на всю ширину без пустой дыры */
  .cbd-partners-steps__grid,
  .cbd-partners-tools__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .cbd-partners-step-card:nth-child(3),
  .cbd-partners-tool-card:nth-child(3) {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }

  .cbd-partners-step-card:nth-child(3) .cbd-partners-step-card__badge {
    margin-bottom: 0;
  }

  .cbd-partners-hero {
    min-height: 460px;
  }

  .cbd-partners-hero__photo {
    width: 440px;
    max-width: 52%;
    height: 440px;
    opacity: 0.9;
  }
}

@media (max-width: 767px) {
  .cbd-partners-hero {
    min-height: 0;
    background: linear-gradient(180deg, #dce9d8 0%, #eff5ec 100%);
  }

  .cbd-partners-hero__leaves,
  .cbd-partners-hero__photo {
    display: none;
  }

  .cbd-partners-hero__inner {
    padding-top: 20px;
    padding-bottom: 32px;
    gap: 16px;
  }

  .cbd-partners-hero__content {
    padding: 0;
    gap: 16px;
  }

  .cbd-partners-hero__title {
    font-size: 24px;
  }

  .cbd-partners-hero__desc {
    font-size: 15px;
  }

  .cbd-partners-btn {
    width: 100%;
    height: 48px;
  }

  .cbd-partners-steps,
  .cbd-partners-tools,
  .cbd-partners-brands {
    padding: 40px 0;
  }

  .cbd-partners-steps__grid,
  .cbd-partners-tools__grid {
    grid-template-columns: 1fr;
  }

  .cbd-partners-step-card__badge {
    width: 80px;
    height: 80px;
  }

  .cbd-partners-step-card__ring {
    width: 80px;
    height: 80px;
    top: -5px;
    left: 1px;
  }

  .cbd-partners-step-card__num {
    font-size: 24px;
  }

  .cbd-partners-step-card__word {
    font-size: 12px;
  }

  .cbd-partners-callout {
    padding: 24px 20px;
  }

  .cbd-partners-callout__text {
    font-size: 18px;
  }

  .cbd-partners-brands__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .cbd-partners-brand-card {
    height: 88px;
    padding: 12px;
  }

  .cbd-partners-faq {
    padding: 40px 0 8px;
  }

  .cbd-partners-faq__title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .cbd-partners-faq__trigger {
    padding: 16px;
    font-size: 14px;
  }

  .cbd-partners-subscribe-wrap {
    padding: 0 0 48px;
  }
}
