/* ============================================================
   BUILDSBYBUCHANAN — CTA SYSTEM v2
   Enhanced WhatsApp-first conversion architecture
   ============================================================ */

/*  FLOATING WHATSAPP BUTTON  */
.wa-fab {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #0a1500;
  border: none;
  border-radius: 50px;
  padding: 13px 20px 13px 16px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(37,211,102,0.35), 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.22s cubic-bezier(.34,1.56,.64,1), box-shadow 0.22s ease, opacity 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
  animation: wa-fab-enter 0.6s cubic-bezier(.34,1.56,.64,1) 1.2s both;
}

@keyframes wa-fab-enter {
  from { transform: translateY(80px) scale(0.8); opacity: 0; }
  to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

.wa-fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 32px rgba(37,211,102,0.45), 0 4px 12px rgba(0,0,0,0.4);
}

.wa-fab:active { transform: scale(0.97); }

.wa-fab-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  animation: wa-fab-pulse 3.5s ease-in-out 3s infinite;
}

@keyframes wa-fab-pulse {
  0%, 80%, 100% { transform: scale(1); }
  85%           { transform: scale(1.18); }
  95%           { transform: scale(0.95); }
}

.wa-fab-text { line-height: 1; }

/* Compact on mobile when sticky bar shows */
@media (max-width: 768px) {
  .wa-fab {
    bottom: 80px; /* sit above sticky bar */
    right: 16px;
    padding: 12px;
    border-radius: 50%;
    gap: 0;
  }
  .wa-fab-text { display: none; }
  .wa-fab-icon svg { width: 22px; height: 22px; }
  /* Hide FAB on mobile when sticky bar is visible — sticky bar's WA button covers it */
  .has-sticky-bar .wa-fab { display: none !important; }
}

/* Hide fab when user has scrolled very far up (only show after 300px) */
.wa-fab.hidden { opacity: 0; pointer-events: none; transform: translateY(16px) scale(0.9); }

/* Prevent blue tap highlight on all buttons and interactive elements */
button, a, [role="button"] {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/*  TRUST MICROCOPY BAR  */
.cta-trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.cta-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-muted, #888);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.cta-trust-item svg {
  color: var(--accent, #A8D66A);
  flex-shrink: 0;
}

/*  HERO CTA PAIR  */
.hero-cta-pair {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/*  INLINE CTA SECTION BLOCKS  */
.cta-block {
  background: linear-gradient(135deg, rgba(168,214,106,0.07) 0%, rgba(168,214,106,0.03) 100%);
  border: 1px solid rgba(168,214,106,0.18);
  border-radius: 16px;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin: 48px 0 0;
}

.cta-block-left { flex: 1; }
.cta-block-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, #A8D66A);
  margin-bottom: 8px;
}

.cta-block-title {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700;
  color: var(--text-strong, #f0f0f0);
  margin: 0 0 6px;
  line-height: 1.25;
}

.cta-block-title em {
  font-style: normal;
  color: var(--accent, #A8D66A);
}

.cta-block-desc {
  font-size: 13.5px;
  color: var(--text-muted, #888);
  margin: 0;
  line-height: 1.6;
  max-width: 420px;
}

.cta-block-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.cta-block-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

@media (max-width: 860px) {
  .cta-block {
    flex-direction: column;
    padding: 28px 24px;
    align-items: flex-start;
    gap: 20px;
  }
  .cta-block-right { align-items: flex-start; }
  .cta-block-actions { align-items: flex-start; }
}

/*  ENTERPRISE CTA PANEL  */
.enterprise-cta {
  background: var(--surface-1, #111);
  border: 1px solid var(--border, #222);
  border-radius: 12px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
}

.enterprise-cta-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(168,214,106,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, #A8D66A);
  flex-shrink: 0;
}

.enterprise-cta-body { flex: 1; }
.enterprise-cta-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-strong, #f0f0f0);
  margin: 0 0 3px;
}
.enterprise-cta-desc {
  font-size: 12px;
  color: var(--text-muted, #888);
  margin: 0;
}

.enterprise-cta-btn {
  background: transparent;
  border: 1px solid var(--border-strong, #333);
  color: var(--text-strong, #f0f0f0);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
  white-space: nowrap;
  flex-shrink: 0;
}

.enterprise-cta-btn:hover {
  border-color: var(--accent, #A8D66A);
  color: var(--accent, #A8D66A);
  background: rgba(168,214,106,0.06);
}

@media (max-width: 640px) {
  .enterprise-cta { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
  .enterprise-cta-btn { width: 100%; text-align: center; }
}

/*  IMPROVED WA MODAL  */
.wa-modal-context {
  background: rgba(168,214,106,0.07);
  border: 1px solid rgba(168,214,106,0.15);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted, #888);
  font-family: var(--mono, monospace);
  margin: 8px 0 16px;
  display: none;
  word-break: break-word;
  line-height: 1.5;
}
.wa-modal-context.visible { display: block; }
.wa-modal-context-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent, #A8D66A);
  margin-bottom: 4px;
}

/*  MODE-AWARE CTA VISIBILITY  */
.cta-personal-only { display: flex; }
.cta-business-only { display: none; }

body.mode-business .cta-personal-only { display: none; }
body.mode-business .cta-business-only { display: flex; }

/*  SECONDARY CTA LINK  */
.btn-secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted, #888);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: color 0.18s;
}
.btn-secondary-link:hover { color: var(--text-strong, #f0f0f0); }
.btn-secondary-link svg { transition: transform 0.18s; }
.btn-secondary-link:hover svg { transform: translateX(3px); }

/*  PAGE-LEVEL CTA BANNER (service pages)  */
.page-cta-banner {
  background: linear-gradient(135deg, #0f1d0b 0%, #0a1208 100%);
  border-top: 1px solid rgba(168,214,106,0.12);
  padding: 60px 24px;
  text-align: center;
}

.page-cta-banner .sec-inner { max-width: 640px; margin: 0 auto; }
.page-cta-banner .sec-label { margin-bottom: 12px; }
.page-cta-banner .sec-title { margin-bottom: 10px; }
.page-cta-banner .sec-sub { margin-bottom: 28px; }

.page-cta-btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-cta-trust {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted, #888);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.page-cta-trust-item::before {
  content: ' ';
  color: var(--accent, #A8D66A);
}

/*  MODAL MESSAGE PREVIEW  */
#wa-modal .modal h3 + p { margin-bottom: 6px; }

/* ============================================================
   WA MODAL — EDITABLE MESSAGE + TEMPLATES
   ============================================================ */

/* Wider modal for the editor */
.wa-modal-wide {
  max-width: 520px !important;
}

/* Header row: icon + title */
.wa-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.wa-modal-header h3 { font-size: 1.05rem; }
.wa-modal-subtitle {
  font-size: 12.5px;
  color: var(--text-muted, #888);
  margin: 0;
}

/* Template chip row */
.wa-templates-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted, #888);
  margin-bottom: 8px;
}

.wa-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.wa-tpl {
  background: var(--surface-2, #1a1a1a);
  border: 1px solid var(--border, #2a2a2a);
  color: var(--text-muted, #aaa);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}

.wa-tpl:hover {
  border-color: var(--accent, #A8D66A);
  color: var(--accent, #A8D66A);
  background: rgba(168, 214, 106, 0.06);
}

.wa-tpl.active {
  /* overridden below in WA modal overrides section */
}

/* Editor label row */
.wa-msg-editor-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #888);
  margin-bottom: 7px;
}

.wa-char-count {
  font-size: 11px;
  font-weight: 500;
  font-family: var(--mono, monospace);
  color: var(--text-muted, #888);
  transition: color 0.2s;
}
.wa-char-count.wa-char-warn {
  color: #f0a030;
}

/* Editable textarea */
.wa-msg-editor {
  width: 100%;
  background: var(--surface-2, #141414);
  border: 1px solid var(--border-strong, #333);
  border-radius: 10px;
  color: var(--text-strong, #f0f0f0);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
  min-height: 88px;
  max-height: 200px;
  box-sizing: border-box;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
}

.wa-msg-editor:focus {
  /* see WA modal overrides section below */
  outline: none;
}

.wa-msg-editor::placeholder {
  color: var(--text-muted, #555);
}

/* Hint below textarea */
.wa-msg-hint {
  font-size: 11.5px;
  color: var(--text-muted, #666);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.wa-msg-hint::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #A8D66A);
  opacity: 0.4;
  flex-shrink: 0;
}

/* ── WA modal overrides: active chip uses dark bg + green text ── */

/* Active template chip: dark bg + green text, NOT green bg */
.wa-tpl.active {
  border-color: var(--accent, #8ABF3C);
  color: var(--accent, #8ABF3C);
  background: rgba(138, 191, 60, 0.08);
}

/* Softer focus ring on textarea */
.wa-msg-editor:focus {
  border-color: var(--accent, #8ABF3C);
  box-shadow: 0 0 0 2px rgba(138, 191, 60, 0.08);
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .wa-templates { gap: 5px; }
  .wa-tpl { font-size: 11.5px; padding: 5px 10px; }
  .wa-msg-editor { font-size: 13px; }
}

/* ============================================================
   CTA MODAL — Service card quick-action overlay
   ============================================================ */

.cta-modal-box {
  max-width: 460px !important;
}

.cta-modal-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, #8abf3c);
  margin-bottom: 16px;
}

.cta-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.cta-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft, rgba(138,191,60,.09));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, #8abf3c);
  flex-shrink: 0;
}

.cta-modal-header-text { flex: 1; }

.cta-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-strong, #f0f4f8);
  margin: 0 0 4px;
  line-height: 1.25;
}

.cta-modal-subtitle {
  font-size: 12.5px;
  color: var(--text-muted, #7a8799);
  margin: 0;
  line-height: 1.5;
}

.cta-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.cta-modal-tag {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2, #181b1f);
  border: 1px solid var(--border, #1c2026);
  color: var(--text-muted, #7a8799);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 500;
}

.cta-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.cta-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.14s;
  border: none;
}

.cta-modal-btn:active { transform: scale(0.98); }

.cta-modal-btn-wa {
  background: #25d366;
  color: #0a1500;
}
.cta-modal-btn-wa:hover { background: #20bc5a; }

.cta-modal-btn-page {
  background: transparent;
  color: var(--text-muted, #7a8799);
  border: 1px solid var(--border-strong, #262c34);
}
.cta-modal-btn-page:hover {
  color: var(--text-strong, #f0f4f8);
  border-color: var(--border-strong, #3a4450);
  background: var(--surface-2, #181b1f);
  text-decoration: none;
}

.cta-modal-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-dim, #4a5568);
}
.cta-modal-divider::before,
.cta-modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, #1c2026);
}

.cta-modal-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft, #13161a);
}

.cta-modal-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted, #7a8799);
  font-weight: 500;
}

.cta-modal-trust-item svg {
  color: var(--accent, #8abf3c);
  flex-shrink: 0;
}
