/* ==========================================================================
   Affiliate Offer Card Component (.affiliate-offer-card)
   Канон Swiss Private Banking 2026 (Zero Lead Waste 2.0 / D-037 / D-039)
   Автоматический рендеринг нативных карточек офферов в блоге Kapital77
   ========================================================================== */

.affiliate-offer-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  padding: 24px 28px;
  margin: 32px 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.affiliate-offer-card:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Швейцарская цветовая полоса слева */
.affiliate-offer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #059669 0%, #10B981 100%);
  border-radius: 12px 0 0 12px;
}

.affiliate-offer-card--b2b::before {
  background: linear-gradient(180deg, #1E3A8A 0%, #2563EB 100%);
}

.affiliate-offer-card--legal::before {
  background: linear-gradient(180deg, #475569 0%, #64748B 100%);
}

.affiliate-offer-card--fin::before {
  background: linear-gradient(180deg, #D97706 0%, #F59E0B 100%);
}

/* Шапка карточки: Бейдж, редакторская метка и бренд */
.affiliate-offer-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.affiliate-offer-card__badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.affiliate-offer-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #ECFDF5;
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #065F46;
  letter-spacing: 0.02em;
}

.affiliate-offer-card--b2b .affiliate-offer-card__badge {
  background: #EFF6FF;
  border-color: rgba(30, 58, 138, 0.2);
  color: #1E3A8A;
}

.affiliate-offer-card--legal .affiliate-offer-card__badge {
  background: #F1F5F9;
  border-color: rgba(71, 85, 105, 0.2);
  color: #334155;
}

.affiliate-offer-card--fin .affiliate-offer-card__badge {
  background: #FFFBEB;
  border-color: rgba(217, 119, 6, 0.2);
  color: #92400E;
}

.affiliate-offer-card__badge-icon {
  flex-shrink: 0;
}

.affiliate-offer-card__editorial-tag {
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.affiliate-offer-card__brand {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #F8FAFC;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
}

/* Заголовок и вводное описание оффера */
.affiliate-offer-card__title {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 8px 0;
  line-height: 1.35;
}

.affiliate-offer-card__desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #475569;
  margin: 0 0 16px 0;
}

/* Буллеты преимуществ */
.affiliate-offer-card__benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.affiliate-offer-card__benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: #1E293B;
}

.affiliate-offer-card__check-icon {
  flex-shrink: 0;
  margin-top: 3px;
  color: #059669;
}

.affiliate-offer-card--b2b .affiliate-offer-card__check-icon {
  color: #2563EB;
}

/* Кнопка действия (CTA) */
.affiliate-offer-card__action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 16px;
}

.affiliate-offer-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #059669;
  color: #FFFFFF !important;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 10px;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
  transition: background-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  min-height: 48px;
}

.affiliate-offer-card__btn:hover {
  background: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
  color: #FFFFFF !important;
}

.affiliate-offer-card--b2b .affiliate-offer-card__btn {
  background: #1E3A8A;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
}

.affiliate-offer-card--b2b .affiliate-offer-card__btn:hover {
  background: #172554;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.35);
}

.affiliate-offer-card__btn svg {
  transition: transform 0.15s ease;
}

.affiliate-offer-card__btn:hover svg {
  transform: translateX(3px);
}

/* Интеграция с контекстным мостом (.article-context-bridge) */
.article-context-bridge--offer {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 32px 0 !important;
}

.article-context-bridge--offer .affiliate-offer-card {
  margin: 0 !important;
}

/* Блок раскрытия рисков и закона: микрошрифт, 347-ФЗ, erid и 38-ФЗ */
.affiliate-offer-card__legal {
  padding-top: 14px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  line-height: 1.45;
  color: #64748B;
}

.affiliate-offer-card__disclaimer {
  color: #64748B;
  font-weight: 500;
}

.affiliate-offer-card__erid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #475569;
  letter-spacing: 0.02em;
  font-weight: 600;
}

.affiliate-offer-card__statutory-warning {
  color: #94A3B8;
  font-style: italic;
}

/* Слот для Position 2 перед FAQ */
.article-affiliate-bottom-slot {
  margin-top: 40px;
  margin-bottom: 24px;
}

/* Адаптивность для мобильных экранов */
@media (max-width: 680px) {
  .affiliate-offer-card {
    padding: 20px 16px;
    margin: 24px 0;
    border-radius: 12px;
  }

  .affiliate-offer-card__title {
    font-size: 1.15rem;
  }

  .affiliate-offer-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .affiliate-offer-card__action {
    width: 100%;
  }

  .affiliate-offer-card__btn {
    width: 100%;
    min-height: 50px;
    font-size: 15px;
  }
}
