/* ================================================================
   hero-conversion-boost.css — Mobile-first conversion polish
   CSS ONLY. Zero layout changes. Zero JS/event changes.
   Updated: 2026-04-29 (fhp-mobile-polish)
   ================================================================ */


/* ── Global: Headline weight + tracking ─────────────────────── */
.hero-section .hero-title,
.hero-section h1.hero-title {
  font-weight: 800;
  letter-spacing: -0.3px;
}


/* ── Global: CTA glow (main search button) ──────────────────── */
.qsm-btn-search {
  box-shadow: 0 0 28px rgba(255, 120, 200, 0.28),
              0 4px 18px rgba(225, 48, 108, 0.22) !important;
  transition: box-shadow .2s ease, transform .18s ease !important;
}
.qsm-btn-search:hover,
.qsm-btn-search:focus-visible {
  box-shadow: 0 0 38px rgba(255, 120, 200, 0.42),
              0 6px 22px rgba(225, 48, 108, 0.32) !important;
  transform: translateY(-1px) !important;
}


/* ── Global: Trust block (default / desktop) ────────────────── */
.hcb-trust-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 8px;
}

.hcb-trust-item {
  font-size: 0.74rem;
  opacity: 0.82;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.hcb-trust-sep {
  font-size: 0.6rem;
  opacity: 0.4;
  color: rgba(255, 255, 255, 0.5);
}


/* ── Global: FOMO line ──────────────────────────────────────── */
.hcb-fomo {
  font-size: 0.74rem;
  color: rgba(255, 120, 100, 0.92);
  margin-top: 4px;
  text-shadow: 0 0 10px rgba(255, 80, 60, 0.15);
}


/* ── Global: micro trust below secondary CTA ────────────────── */
.hcb-micro-trust {
  font-size: 0.68rem !important;
  opacity: 0.58 !important;
  text-align: center;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.65) !important;
}


/* ================================================================
   MOBILE — max-width: 768px
   Full flex-order map for .hero-content (flex-direction: column)

   Existing orders from homepage-conversion-optimizer.css:
     .hero-title                         → order: 1
     .hero-subtitle                      → order: 2
     .marketplace-secondary-entry        → order: 3 ← must move to 8
     #hero-quick-search / .search-box    → order: 4
     .qsm-btn-search (inside search)     → order: 10

   Our overrides:
     #hero-quick-search                  → order: 3 (pull search up)
     .marketplace-secondary-entry        → order: 8 (push secondary down)
     .hcb-fomo                           → order: 5 (DOM reordered to match — directly after search)
     .hcb-trust-block                    → order: 6 (DOM reordered to match — after FOMO)
     .hcb-artisan-block                  → order: 9 (soften, push lower)
   ================================================================ */

@media (max-width: 768px) {

  /* ── ORDER MAP — using #home prefix to beat optimizer's (1,1,0) specificity ──
     Optimizer final block sets:
       #home search        → order:3
       #home secondary     → order:4   ← this is what was winning
       #home artisan       → order:5
       hcb-fomo/trust      → order:0   ← floated to top (no rule = 0)
     Our overrides below use #home to match specificity + load after = WIN
  ─────────────────────────────────────────────────────────────────────────── */

  /* Search: order 3 (same as optimizer — no change needed) */
  #home #hero-quick-search,
  #home #hero-quick-search.qsm-inline-host,
  #home .hero-content > .search-box {
    order: 3 !important;
    margin-top: 0 !important;
  }

  /* FOMO: order 5 — directly under search/CTA */
  #home .hcb-fomo {
    order: 5 !important;
    margin-top: -2px !important;
    padding-top: 6px !important;
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 0.72rem !important;
  }

  /* Trust block: order 6 — right after FOMO */
  #home .hcb-trust-block {
    order: 6 !important;
    margin-top: 6px !important;
    opacity: 0.85;
    justify-content: center !important;
    gap: 4px 8px !important;
    font-size: 0.75rem !important;
  }

  #home .hcb-trust-item {
    font-size: 0.75rem !important;
  }

  /* Secondary CTA: order 8 — after trust (beats optimizer's order:4) */
  #home .marketplace-secondary-entry {
    order: 8 !important;
    margin-top: 10px !important;
    opacity: 0.88;
    transform: scale(0.97);
    transform-origin: center top;
  }

  /* Artisan block: order 9 — lowest, softest */
  #home .hero-artisan-entry,
  #home .hcb-artisan-block {
    order: 9 !important;
    opacity: 0.75 !important;
    margin-top: 14px !important;
  }

  /* Soften secondary CTA button vs main CTA */
  #home .marketplace-secondary-entry .btn-secondary-marketplace {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    min-height: 50px !important;
    opacity: 1 !important;
  }

  /* Micro trust below secondary CTA */
  #home .hcb-micro-trust {
    font-size: 0.65rem !important;
    opacity: 0.55 !important;
    margin-top: 4px;
  }

  /* Reduce quick-filter visual weight so CTA dominates */
  #home .qsm-service-suggestions,
  #home .qsm-quick-filters-row,
  #home .qsm-filters-row {
    opacity: 0.75;
  }

  /* Ensure CTA button never overflows */
  #home .qsm-btn-search {
    min-width: 0 !important;
    width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
    font-size: 0.95rem !important;
    min-height: 54px !important;
  }

}


/* ── Very small screens (375px–) ─────────────────────────────── */
@media (max-width: 420px) {

  .hcb-trust-item {
    font-size: 0.62rem !important;
  }

  .hcb-fomo {
    font-size: 0.68rem !important;
  }

  .hcb-micro-trust {
    font-size: 0.6rem !important;
  }

  /* Keep trust on one line — hide separators if wrapping */
  .hcb-trust-sep {
    display: none;
  }

  .hcb-trust-block {
    gap: 3px 6px !important;
  }

}


/* ================================================================
   MICRO ANIMATIONS — Mobile only, premium safe mode
   Targets: main CTA (.qsm-btn-search) + FOMO (.hcb-fomo)
   Animate: opacity + box-shadow ONLY (no transform, no layout)
   Updated: 2026-04-29 (fhp-micro-anim)
   ================================================================ */

/* ── Keyframes (defined globally, activated mobile-only) ──────── */
@keyframes hcb-cta-pulse {
  0%   { box-shadow: 0 0 28px rgba(255, 120, 200, 0.28), 0 4px 18px rgba(225, 48, 108, 0.22), 0 0 0 rgba(255, 102, 0, 0.18); }
  50%  { box-shadow: 0 0 34px rgba(255, 120, 200, 0.36), 0 4px 22px rgba(225, 48, 108, 0.28), 0 0 16px rgba(255, 102, 0, 0.22); }
  100% { box-shadow: 0 0 28px rgba(255, 120, 200, 0.28), 0 4px 18px rgba(225, 48, 108, 0.22), 0 0 0 rgba(255, 102, 0, 0.18); }
}

@keyframes hcb-fomo-breathe {
  0%   { opacity: 0.82; }
  50%  { opacity: 1; }
  100% { opacity: 0.82; }
}


/* ── Mobile-only activation ───────────────────────────────────── */
@media (max-width: 768px) {

  /* CTA: ultra-soft glow pulse — 3.2s, no transform, no scale */
  #home .qsm-btn-search {
    animation: hcb-cta-pulse 3.2s ease-in-out infinite !important;
  }
  /* Keep hover/focus override clean — stops pulse, shows full glow */
  #home .qsm-btn-search:hover,
  #home .qsm-btn-search:focus-visible {
    animation: none !important;
    box-shadow: 0 0 38px rgba(255, 120, 200, 0.42),
                0 6px 22px rgba(225, 48, 108, 0.32) !important;
  }

  /* FOMO: live breath — 3.6s, opacity only, 0.8s delay */
  #home .hcb-fomo {
    animation: hcb-fomo-breathe 3.6s ease-in-out 0.8s infinite !important;
  }

}


/* ── Respect user motion preference ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #home .qsm-btn-search,
  .qsm-btn-search {
    animation: none !important;
  }
  #home .hcb-fomo,
  .hcb-fomo {
    animation: none !important;
    opacity: 0.9 !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   HERO CONVERSION V2 — Clean Hero UX
   T1: hide fake signals  T4: city-smart  T5: CTA  T6: mobile
   Appended — loads after other hero CSS → wins all specificity ties
═══════════════════════════════════════════════════════════════ */

/* ── T1: Kill fake signals — belt-and-suspenders ── */
.hcb-fomo,
.hcb-trust-block,
.qsm-filters-row,
.qsm-qfilter,
.hero-quick-filters {
  display: none !important;
}

/* ── T2: Headline — clean & direct ── */
.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem) !important;
  line-height: 1.18 !important;
  letter-spacing: -0.03em !important;
  font-weight: 800 !important;
}

.hero-subtitle {
  font-size: clamp(0.88rem, 2vw, 1.05rem) !important;
  opacity: 0.72 !important;
  margin-top: 10px !important;
  letter-spacing: 0.01em !important;
}

/* ── T4: Smart city line ── */
.hero-city-smart {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 10px !important;
  padding: 8px 14px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 10px !important;
  font-size: 0.84rem !important;
  color: rgba(255,255,255,0.75) !important;
  cursor: pointer !important;
  width: fit-content !important;
  max-width: 100% !important;
  transition: background 0.2s, border-color 0.2s !important;
  user-select: none !important;
}
.hero-city-smart:hover {
  background: rgba(255,255,255,0.10) !important;
  border-color: rgba(255,255,255,0.18) !important;
}
.hero-city-icon {
  font-size: 0.95rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}
#hero-city-label {
  font-size: 0.84rem !important;
  color: inherit !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 280px !important;
}

/* ── T3: Remove visual weight from search bar labels ── */
.qsm-seg-label {
  display: none !important;
}

/* ── T5: CTA dominance ── */
.qsm-btn-search,
#qsm-btn-search {
  background: linear-gradient(135deg, #e1306c 0%, #833ab4 100%) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  padding: 14px 28px !important;
  border-radius: 14px !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 8px 28px rgba(225,48,108,0.40) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
  flex-shrink: 0 !important;
}
.qsm-btn-search:hover,
#qsm-btn-search:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 36px rgba(225,48,108,0.52) !important;
}

/* ── T5: Secondary CTA — lower visual weight ── */
.btn-secondary-marketplace {
  opacity: 0.72 !important;
  font-size: 0.88rem !important;
}
.btn-secondary-marketplace:hover {
  opacity: 1 !important;
}

/* ── T6: Mobile — clean vertical stack ── */
@media (max-width: 768px) {
  .hero-city-smart {
    width: 100% !important;
    max-width: 100% !important;
  }
  #hero-city-label {
    max-width: 100% !important;
  }
  .hero-city-smart {
    justify-content: center !important;
  }
  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.6rem) !important;
    text-align: center !important;
  }
  .hero-subtitle {
    text-align: center !important;
    font-size: 0.86rem !important;
  }
  .qsm-btn-search,
  #qsm-btn-search {
    width: 100% !important;
    padding: 13px 20px !important;
    font-size: 0.95rem !important;
  }
}

/* ── T7: Visual cleanup — reduce clutter ── */
.marketplace-secondary-copy.hcb-micro-trust {
  opacity: 0.55 !important;
  font-size: 0.76rem !important;
}
.qsm-filters-label {
  display: none !important;
}


/* ═══════════════════════════════════════════════════════════════
   HERO CONVERSION V3 — Single CTA / Clean Flow
   T2: one CTA  T3: hide post-strip  T4: secondary link
   T6: mobile stack  T7: hierarchy  T8: clutter removal
   Appended last → wins all specificity ties
═══════════════════════════════════════════════════════════════ */

/* ── T3: Hide hero-post-strip (button overload + artisan section) ── */
.hero-post-strip {
  display: none !important;
}

/* ── T4: Secondary text link — inside hero-content ── */
.hero-secondary-link-wrap {
  margin-top: 12px !important;
  text-align: center !important;
  width: 100% !important;
}
.hero-secondary-link {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  font-size: 0.88rem !important;
  color: rgba(255,255,255,0.60) !important;
  cursor: pointer !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-color: rgba(255,255,255,0.25) !important;
  transition: color 0.2s, text-decoration-color 0.2s !important;
  letter-spacing: 0.01em !important;
}
.hero-secondary-link:hover {
  color: rgba(255,255,255,0.88) !important;
  text-decoration-color: rgba(255,255,255,0.55) !important;
}

/* ── T5: City label "Modifier" hint styling ── */
.hero-city-smart {
  /* already defined in V2 — augment only */
  position: relative !important;
}
/* "· Modifier" visual hint — city line acts as tap target */
.hero-city-smart::after {
  content: '' !important; /* label already contains "· Modifier" text */
  pointer-events: none !important;
}

/* ── T7: Visual hierarchy — reduce weight below CTA ── */
.hero-city-smart {
  opacity: 0.82 !important;
  font-size: 0.82rem !important;
}
.hero-city-smart:hover {
  opacity: 1 !important;
}
.hero-secondary-link-wrap {
  opacity: 0.85 !important;
}

/* ── T2: CTA is the ONLY dominant button in hero ── */
/* Ensure no other button in #home competes */
#home .hero-content button:not(.hero-secondary-link) {
  /* qsm-btn-search is rendered INSIDE #hero-quick-search, not direct child — safe */
}

/* ── T8: Remove redundant spacing / noise under hero ── */
.mobile-social-proof {
  display: none !important;
}
.hero-post-strip + .section-divider {
  display: none !important;
}

/* ── T6: Mobile vertical stack — augment V2 rules ── */
@media (max-width: 768px) {
  .hero-secondary-link-wrap {
    margin-top: 14px !important;
    text-align: center !important;
  }
  .hero-secondary-link {
    font-size: 0.84rem !important;
    display: inline-block !important;
    padding: 4px 0 !important;
  }
  .hero-city-smart {
    margin-top: 10px !important;
    font-size: 0.80rem !important;
  }
  /* Ensure search form stacks vertically */
  .qsm-bar-card {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .qsm-seg-divider {
    display: none !important;
  }
  .qsm-segment {
    width: 100% !important;
    min-width: 0 !important;
  }
  .qsm-btn-search,
  #qsm-btn-search {
    width: 100% !important;
    margin-top: 4px !important;
  }
}


/* ═══════════════════════════════════════════════════════════════
   HERO V3 — ORDER FIX (critical)
   Root cause: .hero-city-smart and .hero-secondary-link-wrap
   had order:0 (default) → rendered BEFORE hero-title (order:1)
   Fix: explicit order values — appended last → guaranteed win
═══════════════════════════════════════════════════════════════

   FINAL FLEX ORDER MAP for .hero-content:
   order:1  → .hero-title            (headline, dominant)
   order:2  → .hero-subtitle         (subtext)
   order:3  → #hero-quick-search     (search bar = first interactive)
   order:4  → .hero-city-smart       (smart city, below search)
   order:5  → .hero-secondary-link-wrap (discreet secondary action)
   order:9+ → all hidden/legacy elements

═══════════════════════════════════════════════════════════════ */

/* ── T1/T2/T5: Enforce strict visual order ── */
#home .hero-content > .hero-title {
  order: 1 !important;
}
#home .hero-content > .hero-subtitle,
#home .hero-content > p.hero-subtitle {
  order: 2 !important;
}
#home .hero-content > #hero-quick-search,
#home .hero-content > .search-box {
  order: 3 !important;
}
#home .hero-content > .hero-city-smart,
#home .hero-content > #hero-city-smart {
  order: 4 !important;
  margin-top: 8px !important;
}
#home .hero-content > .hero-secondary-link-wrap {
  order: 5 !important;
  margin-top: 10px !important;
}

/* ── T7: Spacing guide ── */
#home .hero-content > .hero-title {
  margin-bottom: 0 !important;
}
#home .hero-content > .hero-subtitle {
  margin-top: 12px !important;
  margin-bottom: 0 !important;
}
#home .hero-content > #hero-quick-search,
#home .hero-content > .search-box {
  margin-top: 24px !important;
}

/* ── T2: Smart city — below search, aligned left (desktop) ── */
#home .hero-content > .hero-city-smart {
  opacity: 0.70 !important;
  font-size: 0.82rem !important;
  width: fit-content !important;
  text-align: left !important;
  align-self: flex-start !important;
}

/* ── T3: Secondary link — lowest priority, centered ── */
#home .hero-content > .hero-secondary-link-wrap {
  opacity: 0.60 !important;
  text-align: center !important;
  width: 100% !important;
  align-self: center !important;
}

/* ── T6: Mobile — centre everything, full-width city ── */
@media (max-width: 768px) {
  #home .hero-content > .hero-city-smart {
    width: 100% !important;
    align-self: stretch !important;
    text-align: center !important;
    justify-content: center !important;
  }
  #home .hero-content > .hero-secondary-link-wrap {
    margin-top: 12px !important;
  }
}

/* ── Belt-and-suspenders: push ALL legacy/hidden elements out ── */
#home .hero-content > .hcb-fomo,
#home .hero-content > .hcb-trust-block,
#home .hero-content > .marketplace-secondary-entry,
#home .hero-content > .hcb-artisan-block {
  order: 99 !important;
}

/* ═══════════════════════════════════════════════════════════════
   HERO GEO FINAL POLISH — v10
   T2: geo block centred under search  T3: spacing
   Appended last → guaranteed win
═══════════════════════════════════════════════════════════════ */

/* ── T2: Centre geo line under search bar ── */
#home .hero-content > .hero-city-smart,
#home .hero-content > #hero-city-smart {
  margin: 8px auto 0 !important;
  max-width: min(90vw, 920px) !important;
  width: auto !important;
  align-self: center !important;
  text-align: center !important;
  justify-content: center !important;
}

/* ── T3: Spacing: search→geo 8px already set; geo→secondary 10px ── */
#home .hero-content > .hero-secondary-link-wrap {
  margin-top: 10px !important;
}

/* ── T2: Mobile — centred, max 90vw, text wraps ── */
@media (max-width: 768px) {
  #home .hero-content > .hero-city-smart,
  #home .hero-content > #hero-city-smart {
    max-width: 90vw !important;
    width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  #hero-city-label {
    white-space: normal !important;
    word-break: break-word !important;
    max-width: 100% !important;
  }
}
