/* ═══════════════════════════════════════════════════════════════
   CRO.CSS — Конверсионные компоненты
   Urgency Strip, Pain Section, Solution Card, Final CTA,
   Exit-Intent Popup, Price Anchor Note, Hero guarantees
   ═══════════════════════════════════════════════════════════════ */

/* ── URGENCY STRIP ─────────────────────────────────────────────── */
.urgency-strip {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: linear-gradient(90deg, #1e3a5f 0%, #1a2744 50%, #1e3a5f 100%);
  border-bottom: 1px solid rgba(37,99,235,0.3);
  padding: 8px 42px 8px 16px;
  z-index: 1001;
  transition: transform var(--dur-base) var(--ease-spring), opacity var(--dur-base);
  box-sizing: border-box;
}
.urgency-strip.is-hidden {
  display: none !important;
}
.urgency-strip__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  flex-wrap: nowrap;
}
.urgency-strip__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--clr-orange);
  flex-shrink: 0;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
.urgency-strip__text {
  font-size: var(--fs-sm);
  line-height: 1.35;
  color: rgba(255,255,255,0.92);
  text-align: center;
}
.urgency-strip__text strong { color: #FBBF24; font-weight: 700; }
.urgency-strip__cta {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--clr-orange);
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity var(--dur-fast);
}
.urgency-strip__cta:hover { opacity: 0.8; }
.urgency-strip__close {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background var(--dur-fast), color var(--dur-fast);
  z-index: 2;
}
.urgency-strip__close:hover {
  background: rgba(255,255,255,0.25);
  color: #ffffff;
}

/* Push header down when strip is visible */
.header { top: 0; }
body.has-strip .header { top: var(--strip-h, 42px); }
body.has-strip .hero { padding-top: calc(var(--strip-h, 42px) + 72px + 20px); }
body.has-strip .mobile-menu { top: calc(var(--strip-h, 42px) + 72px); }
body.has-strip { padding-top: 0; }

/* ── HERO GUARANTEES (inline strip) ──────────────────────────── */
.hero__guarantees {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.hero__guarantee-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-green);
}
.hero__guarantee-item svg { flex-shrink: 0; }

/* ── HERO MICRO-COPY ──────────────────────────────────────────── */
.hero__micro-copy {
  font-size: var(--fs-sm);
  color: var(--clr-text-dim);
  margin-top: var(--sp-3);
}

/* ── PAIN / SOLUTION SECTION ──────────────────────────────────── */
.pain-section {
  background: var(--clr-bg-2);
  overflow: hidden;
}

.pain__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: start;
}

/* Pain list */
.pain__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}
.pain__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--radius-md);
}
.pain__item-icon--bad {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(239,68,68,0.15);
  color: #EF4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1;
}
.pain__item-body {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: var(--lh-base);
}
.pain__item-body strong { color: var(--clr-white); }

/* Solution Card */
.solution-card {
  background: linear-gradient(135deg, #0d1f38 0%, var(--clr-bg-card) 80%);
  border: 1px solid rgba(37,99,235,0.4);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  box-shadow: 0 0 0 1px rgba(37,99,235,0.15), 0 20px 60px rgba(37,99,235,0.15);
}
.solution-card__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
.solution-card__emoji {
  font-size: 2rem;
  line-height: 1;
}
.solution-card__title {
  font-family: var(--font-head);
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--clr-white);
}
.solution-card__items {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}
.solution-card__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: var(--lh-base);
}
.solution-card__item svg { flex-shrink: 0; margin-top: 2px; }
.solution-card__micro {
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--clr-text-dim);
  margin-top: var(--sp-3);
}

/* ── PRICING CARD MICRO TEXT ──────────────────────────────────── */
.pricing-card__micro {
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--clr-text-dim);
  margin-top: var(--sp-2);
}

/* ── PRICE ANCHOR NOTE ────────────────────────────────────────── */
.pricing__anchor-note {
  margin-top: var(--sp-8);
}
.anchor-note {
  background: rgba(251,191,36,0.07);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  max-width: 720px;
  margin: 0 auto;
}
.anchor-note svg { flex-shrink: 0; margin-top: 2px; }
.anchor-note p {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: var(--lh-base);
}
.anchor-note p strong { color: var(--clr-white); }
.anchor-note p em { color: var(--clr-green); font-style: normal; font-weight: 600; }

/* ── FINAL CTA SECTION ────────────────────────────────────────── */
.final-cta-section {
  background: var(--clr-bg-2);
  position: relative;
  overflow: hidden;
}

/* ── QUIZ FINAL EMOJI & GUARANTEE ─────────────────────────────── */
.quiz__final-emoji {
  font-size: 3rem;
  margin-bottom: var(--sp-4);
  line-height: 1;
}
.quiz__final-guarantee {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--clr-green);
  font-weight: 600;
  margin-bottom: var(--sp-6);
  padding: 6px 16px;
  background: rgba(34,197,94,0.1);
  border-radius: var(--radius-full);
  border: 1px solid rgba(34,197,94,0.2);
}

/* ── EXIT-INTENT POPUP ─────────────────────────────────────────── */
.exit-popup {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}
.exit-popup[hidden] { display: none; }

.exit-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.exit-popup__card {
  position: relative;
  z-index: 1;
  background: var(--clr-bg-card);
  border: 1px solid rgba(37,99,235,0.35);
  border-radius: var(--radius-xl);
  padding: var(--sp-10);
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(37,99,235,0.1), 0 40px 80px rgba(0,0,0,0.6);
  animation: popup-in 0.4s var(--ease-spring) both;
}
@keyframes popup-in {
  from { transform: translateY(24px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.exit-popup__close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--clr-text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.exit-popup__close:hover { background: rgba(255,255,255,0.15); color: white; }

.exit-popup__emoji {
  font-size: 3rem;
  margin-bottom: var(--sp-4);
  line-height: 1;
}
.exit-popup__title {
  font-family: var(--font-head);
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--clr-white);
  margin-bottom: var(--sp-3);
  line-height: var(--lh-snug);
}
.exit-popup__text {
  font-size: var(--fs-base);
  color: var(--clr-text-muted);
  line-height: var(--lh-base);
  margin-bottom: var(--sp-6);
}
.exit-popup__text strong { color: var(--clr-orange); }
.exit-popup__form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.exit-popup__form input {
  background: var(--clr-bg-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: var(--fs-base);
  color: var(--clr-white);
  width: 100%;
  transition: border-color var(--dur-fast);
}
.exit-popup__form input:focus {
  border-color: var(--clr-blue);
  outline: none;
}
.exit-popup__form input::placeholder { color: var(--clr-text-dim); }
.exit-popup__micro {
  font-size: var(--fs-xs);
  color: var(--clr-text-dim);
  margin-top: var(--sp-2);
}

/* ── CALLBACK WIDGET (mobile) ─────────────────────────────────── */
.callback-widget {
  position: fixed;
  bottom: 96px; right: 16px;
  z-index: 800;
  background: var(--clr-bg-card);
  border: 1px solid rgba(37,99,235,0.35);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  max-width: 280px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--dur-slow) var(--ease-spring),
              opacity var(--dur-slow);
  display: none;
}
.callback-widget.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.callback-widget__title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: var(--sp-2);
}
.callback-widget__sub {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-4);
}
.callback-widget__form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.callback-widget__input {
  background: var(--clr-bg-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: var(--fs-sm);
  color: var(--clr-white);
  width: 100%;
}
.callback-widget__close {
  position: absolute;
  top: 8px; right: 10px;
  background: none;
  border: none;
  color: var(--clr-text-dim);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .pain__grid { grid-template-columns: 1fr; }
  .urgency-strip { padding: 7px 38px 7px 12px; }
  .urgency-strip__dot { display: none; } /* Приховуємо окрему крапку на мобільних, щоб не висіла зверху */
  .urgency-strip__text { font-size: 12px; line-height: 1.32; }
  .urgency-strip__cta { display: none; }
  .exit-popup__card { padding: var(--sp-6); }
  .exit-popup__title { font-size: var(--fs-xl); }
}

@media (max-width: 480px) {
  .urgency-strip { padding: 6px 36px 6px 10px; }
  .urgency-strip__text { font-size: 11.5px; line-height: 1.28; }
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT THEME OVERRIDES FOR CRO COMPONENTS
   ═══════════════════════════════════════════════════════════════ */
[data-theme="light"] .solution-card {
  background: linear-gradient(140deg, #EFF6FF 0%, #FFFFFF 70%);
  border: 1.5px solid rgba(37, 99, 235, 0.25);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .solution-card__title {
  color: #0F172A;
}

[data-theme="light"] .solution-card__item {
  color: #0F172A;
  font-weight: 500;
}

[data-theme="light"] .solution-card__micro {
  color: #64748B;
}

[data-theme="light"] .pain__item {
  background: #FFF5F5;
  border-color: rgba(239, 68, 68, 0.18);
}

[data-theme="light"] .pain__item-body {
  color: #334155;
}

[data-theme="light"] .pain__item-body strong {
  color: #0F172A;
}

[data-theme="light"] .anchor-note {
  background: #FFFBEB;
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.04);
}

[data-theme="light"] .anchor-note p {
  color: #334155;
}

[data-theme="light"] .anchor-note p strong {
  color: #0F172A;
}

[data-theme="light"] .exit-popup__close {
  background: rgba(15, 23, 42, 0.06);
  color: var(--clr-text-muted);
}

[data-theme="light"] .exit-popup__close:hover {
  background: rgba(15, 23, 42, 0.12);
  color: var(--clr-text);
}

[data-theme="light"] .exit-popup__title {
  color: #0F172A;
}

[data-theme="light"] .exit-popup__text {
  color: #475569;
}

[data-theme="light"] .callback-widget {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .callback-widget__title {
  color: #0F172A;
}

[data-theme="light"] .callback-widget__sub {
  color: #475569;
}

[data-theme="light"] .callback-widget__input {
  background: #F8FAFC;
  border-color: var(--clr-border);
  color: #0F172A;
}
