/* BIP — CTA-банер для статей блогу
   Шрифт e-Ukraine вже підключений темою сайту.
   Адаптив — за шириною блоку статті (container query), не екрана. */

.bip-cta-wrap {
  container-type: inline-size;
  margin: 40px 0;
}

.bip-cta {
  --bip-navy: #252D55;
  --bip-blue: #1C54F4;
  --bip-light: #F2F4F8;
  --bip-light-blue: #DFE7F9;
  --bip-muted: #5C677D;
  --bip-hl: #9DB8FF;
  --bip-ease: cubic-bezier(.2, .8, .2, 1);
  box-sizing: border-box;
  font-family: "e-Ukraine", system-ui, sans-serif;
}
.bip-cta *,
.bip-cta *::before,
.bip-cta *::after { box-sizing: border-box; }

/* Скидання стилів статті */
.bip-cta p { margin: 0; }
.bip-cta svg { display: block; flex: none; }

/* ---------- Кнопка (спільна) ---------- */
.bip-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 6px 6px 6px 26px;
  border-radius: 40px;
  background: var(--bip-blue);
  color: #FFFFFF !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  transition: transform .25s var(--bip-ease), box-shadow .25s ease, filter .25s ease;
}
.bip-cta__btn:hover,
.bip-cta__btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(28, 84, 244, .7);
  filter: brightness(1.08);
}
.bip-cta__btn:active { transform: translateY(0); box-shadow: none; }
.bip-cta__btn:focus-visible { outline: 2px solid var(--bip-hl); outline-offset: 3px; }

.bip-cta__ico {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--bip-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s var(--bip-ease);
}
.bip-cta__btn:hover .bip-cta__ico,
.bip-cta__btn:focus-visible .bip-cta__ico { transform: rotate(45deg) scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  .bip-cta__btn, .bip-cta__ico { transition: none; }
  .bip-cta__btn:hover, .bip-cta__btn:focus-visible { transform: none; }
}

/* ---------- MAIN (кінець статті) ---------- */
.bip-cta--main {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  grid-template-areas: "body aside" "actions aside";
  column-gap: 28px;
  row-gap: 24px;
  padding: 36px 36px 36px 44px;
  border-radius: 32px;
  background: var(--bip-navy);
  color: #FFFFFF;
}
/* Декор: синє коло + тонке кільце */
.bip-cta--main::before,
.bip-cta--main::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.bip-cta--main::before { right: -90px; bottom: -150px; width: 340px; height: 340px; background: var(--bip-blue); }
.bip-cta--main::after  { right: -170px; bottom: -230px; width: 500px; height: 500px; border: 1px solid rgba(255, 255, 255, .12); }

.bip-cta__body    { grid-area: body; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.bip-cta__aside   { grid-area: aside; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; }
.bip-cta__actions { grid-area: actions; position: relative; z-index: 1; align-self: end; }

.bip-cta__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 40px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .02em;
}
.bip-cta__badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3DD68C;
}

/* Не h2 — щоб не ламати структуру заголовків статті */
.bip-cta--main .bip-cta__title {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #FFFFFF;
}
.bip-cta__hl { color: var(--bip-hl); }

.bip-cta--main .bip-cta__text {
  max-width: 400px;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 300;
  color: #D3D8EC;
}

.bip-cta__card {
  flex: 1 1 0;
  border-radius: 24px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.bip-cta__card--rating { background: #FFFFFF; color: var(--bip-navy); }
.bip-cta__rating { display: flex; align-items: baseline; gap: 10px; }
.bip-cta__score { font-size: 36px; line-height: 1; font-weight: 700; }
.bip-cta__stars { display: inline-flex; gap: 2px; color: #F5B82E; }
.bip-cta__card--rating .bip-cta__card-text { font-size: 13px; line-height: 1.4; font-weight: 300; color: var(--bip-muted); }

.bip-cta__card--promise {
  background: rgba(37, 45, 85, .55);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #FFFFFF;
  gap: 10px;
}
.bip-cta__card--promise .bip-cta__card-text { font-size: 14px; line-height: 1.4; font-weight: 400; }

/* MAIN — вузький блок (мобільний макет 360px) */
@container (max-width: 640px) {
  .bip-cta--main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "body" "aside" "actions";
    row-gap: 18px;
    padding: 28px 22px 22px;
    border-radius: 28px;
  }
  .bip-cta--main::before { right: -110px; top: -110px; bottom: auto; width: 240px; height: 240px; }
  .bip-cta--main::after  { right: -170px; top: -170px; bottom: auto; width: 360px; height: 360px; }
  .bip-cta__body { gap: 14px; }
  .bip-cta--main .bip-cta__title { font-size: 25px; line-height: 1.22; }
  .bip-cta--main .bip-cta__text { font-size: 14px; }
  .bip-cta__aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bip-cta__card { border-radius: 20px; padding: 14px 16px; gap: 6px; justify-content: flex-start; }
  .bip-cta__score { font-size: 24px; }
  .bip-cta__stars svg { width: 11px; height: 11px; }
  .bip-cta__card--rating .bip-cta__card-text,
  .bip-cta__card--promise .bip-cta__card-text { font-size: 12px; line-height: 1.35; }
  .bip-cta__card--promise svg { width: 20px; height: 20px; }
  .bip-cta--main .bip-cta__btn { width: 100%; justify-content: space-between; min-height: 56px; padding-left: 24px; }
  .bip-cta--main .bip-cta__ico { width: 44px; height: 44px; }
}

/* ---------- COMPACT (всередині тексту) ---------- */
.bip-cta--compact {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 20px 20px 24px;
  border-radius: 28px;
  background: var(--bip-light);
  color: var(--bip-navy);
}
.bip-cta__icon-box {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: var(--bip-light-blue);
  color: var(--bip-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bip-cta--compact .bip-cta__content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bip-cta--compact .bip-cta__title { font-size: 17px; line-height: 1.3; font-weight: 700; color: var(--bip-navy); }
.bip-cta--compact .bip-cta__text  { font-size: 14px; line-height: 1.45; font-weight: 300; color: var(--bip-muted); }
.bip-cta--compact .bip-cta__btn   { flex: none; gap: 12px; padding-left: 22px; font-size: 14px; }
.bip-cta--compact .bip-cta__btn:focus-visible { outline-color: var(--bip-blue); }

@container (max-width: 600px) {
  .bip-cta--compact { flex-wrap: wrap; gap: 16px; padding: 20px; }
  .bip-cta__icon-box { width: 52px; height: 52px; border-radius: 16px; }
  .bip-cta--compact .bip-cta__content { flex-basis: calc(100% - 68px); }
  .bip-cta--compact .bip-cta__btn { width: 100%; justify-content: space-between; }
}
