/* ═══════════════════════════════════════════════════════════
   MOBILE FIXES v3 — surgical, aware of fixed positioning
   Target: screens <= 768px
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* --- Prevent horizontal overflow --- */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* --- Urgency bar: keep it FIXED at top (matches desktop behaviour),
         but constrain width and reduce padding --- */
  .urgency-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    font-size: 0.65rem !important;
    padding: 8px 36px 8px 14px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    z-index: 101 !important;
    min-height: auto !important;
    height: auto !important;
  }
  .ub-dismiss {
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  /* --- Nav: position below the urgency bar (approx 54px tall on mobile) --- */
  #mainNav, nav#mainNav {
    top: 54px !important;
    padding: 10px 14px !important;
  }

  /* --- Nav logo: keep at fixed size --- */
  .nav-logo {
    flex-shrink: 0 !important;
    width: 140px !important;
  }
  .nav-logo svg {
    width: 140px !important;
    height: auto !important;
    max-width: 140px !important;
    display: block !important;
  }

  /* --- Hero: reduce the huge 120px top padding --- */
  .hero {
    padding-top: 140px !important;   /* urgency(54) + nav(~60) + space */
    padding-bottom: 40px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    box-sizing: border-box !important;
    min-height: auto !important;
  }
  .hero-content {
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* --- Watermark "$": make it background decoration, not a huge tall element --- */
  .watermark-dollar {
    font-size: 14rem !important;
    opacity: 0.03 !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: 0 !important;
    line-height: 1 !important;
    height: auto !important;
    max-width: none !important;
    width: auto !important;
  }

  /* --- Hero bill background: reduce its height --- */
  .hero-bill {
    max-width: 100% !important;
    overflow: hidden !important;
    height: 100% !important;
  }

  /* --- Ticker wrap: scrolls horizontally --- */
  .ticker-wrap, .ticker {
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .ticker-wrap::-webkit-scrollbar,
  .ticker::-webkit-scrollbar { display: none !important; }

  /* --- Social proof bar: wrap into column, compact --- */
  .social-proof-bar {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: center !important;
    padding: 10px 18px !important;
    flex-wrap: wrap !important;
    max-width: 100% !important;
  }
  .sp-item {
    font-size: 0.9rem !important;
    white-space: normal !important;
    text-align: center !important;
  }
  .sp-divider { display: none !important; }

  /* --- Hero title --- */
  .hero-eyebrow {
    font-size: 0.58rem !important;
    letter-spacing: 0.08em !important;
    white-space: normal !important;
    text-align: center !important;
    margin-bottom: 14px !important;
  }
  .hero-title {
    font-size: clamp(1.9rem, 9vw, 2.6rem) !important;
    line-height: 1.1 !important;
    text-align: center !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
  .dollar-green {
    font-size: inherit !important;
    display: inline !important;
  }
  .hero-sub {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 18px 0 !important;
  }

  /* --- Search widget: stack input above button --- */
  .search-widget {
    width: 100% !important;
    padding: 0 !important;
  }
  .search-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }
  .search-row {
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }
  .search-input {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
  }
  .search-row > button,
  .search-widget button {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
  }

  /* --- Optimizer CTA row --- */
  .only-here-badge,
  [class*="only-here"],
  [class*="exclusive"] {
    font-size: 0.62rem !important;
    padding: 4px 10px !important;
  }

  /* --- Prevent img overflow (but allow nav logo SVG its fixed size above) --- */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* --- Section padding defaults --- */
  section, main > section {
    padding-left: 18px !important;
    padding-right: 18px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 380px) {
  .hero-title { font-size: 1.7rem !important; }
  .hero-sub { font-size: 0.9rem !important; }
  .urgency-bar { font-size: 0.6rem !important; padding: 7px 30px 7px 12px !important; }
  .hero { padding-top: 130px !important; }
  .social-proof-bar { padding: 10px 14px !important; gap: 6px !important; }
  .sp-item { font-size: 0.82rem !important; }
  .nav-logo, .nav-logo svg { width: 120px !important; max-width: 120px !important; }
}
