/**
 * Lead Generation CSS — all visual components
 * Stats counters, client logos, testimonials, social share,
 * blog CTAs, lead magnets, exit popup, sticky CTA, toasts, newsletter
 */

/* ============================================================
 * STATS COUNTERS
 * ============================================================ */
.stats-counter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: center;
}
@media (max-width: 768px) {
  .stats-counter-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-counter-item {
  padding: 24px 14px;
  border-radius: 16px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.stat-number {
  display: block;
  font-size: 42px;
  font-weight: 800;
  color: var(--brand, #3b5bff);
  line-height: 1.1;
}
.stat-suffix {
  font-size: 28px;
  font-weight: 700;
}
.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted, #475569);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
 * CLIENT LOGOS
 * ============================================================ */
.client-logos-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.client-logo-item {
  display: inline-flex;
  align-items: center;
  opacity: 0.65;
  transition: opacity 0.2s, transform 0.2s;
  filter: grayscale(100%);
}
.client-logo-item:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.08);
}
.client-logo-item img {
  height: 38px;
  max-width: 120px;
  object-fit: contain;
}

/* ============================================================
 * TESTIMONIALS
 * ============================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.testimonial-card {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.testimonial-stars { font-size: 16px; }
.testimonial-text {
  font-style: italic;
  color: var(--fg, #1e293b);
  line-height: 1.6;
  flex: 1;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border, #e2e8f0);
}
.testimonial-company {
  display: block;
  font-size: 12px;
  color: var(--muted, #475569);
}

/* ============================================================
 * SOCIAL SHARE BAR (Blog)
 * ============================================================ */
.lg-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.lg-share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #64748b);
}
.lg-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  transition: transform 0.15s, box-shadow 0.15s;
}
.lg-share-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.lg-share-twitter   { background: #000; }
.lg-share-linkedin  { background: #0077b5; }
.lg-share-facebook  { background: #1877f2; }
.lg-share-whatsapp  { background: #25d366; }
.lg-share-email     { background: #6b7280; }

/* ============================================================
 * BLOG INLINE CTA
 * ============================================================ */
.lg-blog-cta {
  margin: 18px 0;
  padding: 24px;
  background: linear-gradient(135deg, #eef2ff, #e0ecff);
  border: 2px solid #c7d2fe;
  border-radius: 16px;
  text-align: center;
}
html[data-theme="dark"] .lg-blog-cta {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-color: #4338ca;
}
.lg-blog-cta h3 {
  margin: 0 0 6px;
  font-size: 20px;
}
.lg-blog-cta p {
  margin: 0 0 12px;
  color: var(--muted, #64748b);
}
.lg-blog-cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, #3b5bff, #14b8ff);
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(59, 91, 255, 0.25);
  transition: transform 0.15s;
}
.lg-blog-cta-btn:hover { transform: translateY(-2px); }

/* ============================================================
 * LEAD MAGNET
 * ============================================================ */
.lg-lead-magnet {
  margin: 18px 0;
  padding: 20px;
  background: var(--card, #fff);
  border: 2px dashed #c7d2fe;
  border-radius: 16px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.lg-lead-magnet-icon {
  font-size: 36px;
  flex-shrink: 0;
}
.lg-lead-magnet-body { flex: 1; }
.lg-lead-magnet-body h4 { margin: 0 0 4px; }
.lg-lead-magnet-body p { margin: 0 0 10px; font-size: 14px; color: var(--muted, #64748b); }
.lg-lead-magnet-form {
  display: flex;
  gap: 8px;
}
.lg-lead-magnet-form input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 10px;
  font: inherit;
}
.lg-lead-magnet-form button {
  padding: 10px 16px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
@media (max-width: 640px) {
  .lg-lead-magnet { flex-direction: column; }
  .lg-lead-magnet-form { flex-direction: column; }
}

/* ============================================================
 * BLOG NEWSLETTER BOX
 * ============================================================ */
.lg-blog-newsletter {
  margin: 18px 0;
  padding: 20px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  text-align: center;
}
html[data-theme="dark"] .lg-blog-newsletter {
  background: #052e16;
  border-color: #166534;
}
.lg-blog-newsletter h4 { margin: 0 0 4px; }
.lg-blog-newsletter p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }

/* ============================================================
 * FOOTER NEWSLETTER
 * ============================================================ */
.footer-newsletter-col { min-width: 200px; }
.footer-newsletter-form {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.footer-newsletter-form input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
}
.footer-newsletter-form input::placeholder { color: rgba(255, 255, 255, 0.5); }
.footer-newsletter-form button {
  padding: 9px 14px;
  background: #3b5bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* ============================================================
 * EXIT-INTENT POPUP
 * ============================================================ */
.lg-exit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.lg-exit-popup {
  background: var(--card, #fff);
  border-radius: 20px;
  padding: 32px;
  max-width: 440px;
  width: 92%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: lgPopIn 0.3s ease;
}
@keyframes lgPopIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lg-exit-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
.lg-exit-popup h2 { margin: 0 0 8px; }
.lg-exit-popup p { margin: 0 0 16px; color: var(--muted); }
.lg-exit-form {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.lg-exit-form input {
  flex: 1;
  max-width: 220px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}
.lg-exit-form button {
  padding: 12px 18px;
  background: linear-gradient(135deg, #3b5bff, #14b8ff);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .lg-exit-form { flex-direction: column; }
  .lg-exit-form input { max-width: none; }
}

/* ============================================================
 * FLOATING CTA POPUP
 * ============================================================ */
.lg-cta-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  max-width: 380px;
  width: calc(100% - 48px);
  background: linear-gradient(135deg, #1e3a8a, #3b5bff);
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
  padding: 22px 24px;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.lg-cta-popup.lg-cta-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.lg-cta-popup.lg-cta-hidden {
  display: none !important;
}
.lg-cta-popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lg-cta-popup-close:hover { background: rgba(255,255,255,0.35); }
.lg-cta-popup-text {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 14px;
  padding-right: 28px;
}
.lg-cta-popup-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.lg-cta-popup-btn {
  display: inline-block;
  padding: 10px 18px;
  background: #fff;
  color: #1e3a8a;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.15s;
  white-space: nowrap;
}
.lg-cta-popup-btn:hover { transform: scale(1.05); }
.lg-cta-popup-phone { background: #22c55e; color: #fff; }
@media (max-width: 480px) {
  .lg-cta-popup { bottom: 12px; right: 12px; max-width: calc(100% - 24px); padding: 16px 18px; }
  .lg-cta-popup-actions { flex-direction: column; }
}

/* ============================================================
 * SOCIAL PROOF TOASTS
 * ============================================================ */
.lg-toast-container {
  position: fixed;
  bottom: 80px;
  left: 18px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.lg-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-width: 340px;
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.35s, transform 0.35s;
  pointer-events: auto;
}
.lg-toast.lg-toast-in {
  opacity: 1;
  transform: translateX(0);
}
.lg-toast.lg-toast-out {
  opacity: 0;
  transform: translateX(-30px);
}
.lg-toast-icon { font-size: 22px; flex-shrink: 0; }
.lg-toast-body { font-size: 13px; line-height: 1.35; }
.lg-toast-body small { color: var(--muted, #64748b); }
