<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>What They Don’t Tell You About Debt Relief (My Story)</title>
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <link rel="stylesheet" href="inc/main.css?v=1781286771" />
  <style>
  /* Hidden by default (desktop) */
  .mobile-quiz-bar { display: none; }

  /* Mobile only */
  @media (max-width: 768px) {
    body { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom)); }
    body.quiz-bar-hidden { padding-bottom: env(safe-area-inset-bottom); }

    .mobile-quiz-bar {
      display: block;
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 9999;
      background: #ffffff;
      border-top: 1px solid var(--border);
      padding: 0.6rem 0.75rem;
      box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
      padding-bottom: calc(0.6rem + env(safe-area-inset-bottom)); /* nice for iPhone */
    }

    .mobile-quiz-btn {
      display: block;
      width: 100%;
      text-align: center;
      background: var(--accent);
      color: #f0fdf4;
      font-size: 0.95rem;
      font-weight: 600;
      padding: 0.75rem 1rem;
      border-radius: 999px;
      text-decoration: none;
    }

    .mobile-quiz-btn:hover { filter: brightness(1.05); text-decoration: none; }

    /* Prevent content from being hidden behind bar */
    body {
      padding-bottom: calc(4.25rem + env(safe-area-inset-bottom));
    }
  }

  </style>
<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1406657970940399');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1406657970940399&ev=PageView&noscript=1"
/></noscript>
<!-- End Meta Pixel Code -->

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-M5K9BXGZ');</script>
<!-- End Google Tag Manager -->


<script type="text/javascript">
    (function(c,l,a,r,i,t,y){
        c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
        t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
        y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
    })(window, document, "clarity", "script", "v69mfwrzvg");
</script>

<script>
let engagementFired = false;
setTimeout(function () {
  if (!engagementFired && document.visibilityState === 'visible') {
    window.dataLayer = window.dataLayer || [];
    dataLayer.push({
      event: 'engagement_5s',
      engagement_time_msec: 5000,
      threshold: 5,
      page: window.location.pathname
    });
    engagementFired = true;
    if (typeof fbq !== 'undefined') {
      fbq('trackCustom', 'engagement_5s', {
        funnel_variant: 'advertorial',
        threshold: 5,
        page_path: window.location.pathname
      });
    }
  }
}, 5000);
</script>
<script src="/inc/tracking-helpers.js?v=1781286771"></script>

</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M5K9BXGZ"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->  <div class="page">
    <header>
      <div class="tagline">Personal story, Sponsored article, Educational content</div>
      <h1><span class="blueline">I Thought I Was Handling My Debt</span> — Until I Realized What It Could Do to My Kids</h1>
      <div class="byline">By “Mike”</div>
      <p class="lede">
        I’m using a fake name because the shame is still real.<br />

        This isn’t financial advice. It’s the moment I realized my debt wasn’t just hurting me — 
        it was affecting my kids.<br />

        At my lowest point, I had over <strong>$100,000 in unsecured debt</strong>.
        Credit cards. Personal loans. Court papers.<br />

        If you have <strong>$10,000 or more in unsecured debt</strong> and you’re trying to protect your family,
        take 30 seconds to see what options might exist.
      </p>
    </header>

    <article>
      <figure class="hero-image">
        <img src="images/01-depressed-man-with-kid_web.jpg" alt="Stressed man surrounded by bills" />
        <figcaption class="caption">
          “I wasn’t hiding debt anymore — I was hiding fear.<br />
          Fear of the mail. <strong>Fear of the phone ringing</strong>. Fear of being asked questions I didn’t have answers to, and <strong>letting my family down</strong>”
        </figcaption>
      </figure>

      <p>
        For years, I did everything “right” — made payments, took a consolidation loan, tried to catch up.
        But late fees, penalty APRs, and closed accounts pushed me deeper into the hole.
      </p>

      <h2>The Spiral No One Warns You About</h2>
      <p>
        It started with a late payment here and there. Nothing huge at first. But that’s when my credit card
        companies hit me with <strong>penalty APRs</strong>, instantly jacking my interest rates to insane levels.
      </p>
      <p>
        Suddenly I wasn’t paying off debt — I was paying off <strong>interest on top of interest</strong>, and falling
        behind faster than ever. Then the closures started: Chase United, Citi Costco, Chase Marriott Bonvoy,
        multiple AMEX cards. Every closure tanked my score. Limits dropped. Utilization shot up. Options disappeared.
      </p>

      <h2>The “Help” That Didn’t Help</h2>
      <p>
        Like many people, I turned to a <strong>consolidation loan</strong>. Best Egg approved me.
        I paid off some cards and thought I was resetting.
      </p>
      <p>
        I wasn’t. The loan came with high interest and high monthly payments. My credit didn’t rebound.
        The pressure didn’t ease. I had just <strong>rearranged the debt</strong> — not reduced it.
      </p>

      <h2>Why Minimum Payments Keep You Stuck</h2>
      <p>
        Credit card companies make billions from people stuck making minimum payments.
        On some of my accounts, <strong>over 90% of my payment was interest</strong> —
        only 10% actually reduced the balance.
      </p>

      <figure class="inline-image">
        <img src="images/07b-before-pie-chart_web.jpg"
             alt="Pie chart showing 90% interest and 10% debt reduction when making minimum payments only" />
        <figcaption class="caption small">
          On some cards, when making minimum payments only, about <strong>90% of what I paid went to interest</strong> —
          only 10% actually reduced the balance.
        </figcaption>
      </figure>

      <h2>When Debt Shows Up at Your Door</h2>
      <p>
        It got real when a sheriff knocked on my door and handed me a stack of court papers from AMEX.
        Another time, a process server left a note taped to my front door:
      </p>
      <p class="bold red">
        “We have legal documents to deliver. Further attempts will follow.”
      </p>
      <p>
        One of my kids found it after school and asked what it meant. That look in their eyes —
        confusion and fear — is something I’ll never forget.
      </p>
      <p>
        After AMEX won the judgment, I opened my banking app one morning and saw:
      </p>
      <p class="bold red">
        Available Balance: –$32,720.00<br>Court judgment hold
      </p>
      <p class="bold">
        My personal and business accounts were frozen...
      </p>
      <p>
        I couldn’t pay rent. I couldn’t buy groceries. I couldn’t operate my business.
      </p>

      <h2>Receivership: Paying and Never Catching Up</h2>
      <p>
        After the freeze, the court appointed a <strong>receiver</strong> — someone legally authorized
        to take money from me every single month:
      </p>
      <ul>
        <li><strong>$1,278 every month</strong></li>
        <li>$988 to AMEX</li>
        <li>The rest to receivership fees</li>
      </ul>
      <p>
        I started paying in April 2024. After more than a year, I wasn’t even close to done —
        I was barely a third of the balance paid, with years still ahead.
      </p>

      <h2>The One Thing I Wish I’d Known Sooner</h2>
      <p>
        In desperation, I finally discovered something I wish someone had told me years earlier:
      </p>
      <p>
        <strong>There are companies that legally negotiate down unsecured debt — even lawsuits and judgments —
        as part of structured, state-regulated programs.</strong>
      </p>
      <p>
        These aren’t government programs. They’re private companies. But they are required to follow
        federal and <strong>state-level regulations</strong> about how they operate and when they can charge fees.
      </p>
      <p>
        They negotiate every day with major creditors like AMEX, Chase, Citi, Discover, Capital One, Best Egg,
        SoFi, Lending Club, and more. And they focus on <strong>unsecured debt</strong>:
      </p>
      <ul>
        <li>Credit cards</li>
        <li>Personal loans</li>
        <li>Store cards</li>
        <li>Some medical and collection accounts</li>
      </ul>
      <p>
        Things like mortgages, auto loans, HELOCs, and title loans are usually <strong>not</strong> eligible
        because they’re secured by collateral.
      </p>

      <h2>My Numbers After Enrolling</h2>
      <p>
        I enrolled <strong>$110,812</strong> of unsecured debt into a structured relief program.
        My monthly payments changed roughly from:
      </p>
      <ul>
        <li><strong>$3,524–$3,706 per month</strong> across cards, loans, and court-ordered payments</li>
        <li>Down to about <strong>$1,426 per month</strong> into one structured program account</li>
      </ul>
      <p>
        No new interest piling up. A clear end date. And the first real chance in years to breathe.
      </p>

      <div class="story-box">
        <strong>Important:</strong>
        <p>
          I’m not a lawyer, financial advisor, or credit counselor. This is just my personal experience
          and what I wish someone had explained to me before things got as bad as they did.
        </p>
        <p class="hint">
          Results are different for everyone. Debt relief isn’t magic and it can impact your credit in the short term —
          but for me, it finally stopped the spiral.
        </p>
      </div>
    </article>

    <!-- QUIZ BLOCK -->
    <section class="quiz-card" id="quiz-section">

      <div class="quiz-reassurance">
        <div class="qr-title">Before You Continue — Here’s What This Is (and Isn’t)</div>
        <ul class="qr-list">
          <li>This does <strong>not</strong> affect your credit score</li>
          <li>No signup. No obligation. No upfront fees</li>
          <li>You’re not committing to a phone call</li>
          <li>This simply checks whether programs exist in your state</li>
        </ul>
        <p class="soft" style="color:#000;">
          If it turns out this isn’t a fit, you’ll see other options instead.
        </p>
      </div>
      <button type="button" class="call-what-btn" id="call-what-btn">
        See what a first call actually covers →
      </button>

      <div class="call-modal" id="call-modal" aria-hidden="true">
        <div class="call-modal-backdrop" data-close="1"></div>
        <div class="call-modal-card" role="dialog" aria-modal="true">
          <button class="call-modal-x" data-close="1">✕</button>
          <h3>What happens on the first call</h3>
          <ul>
            <li>You explain your debt (amount + type) and your situation.</li>
            <li>They tell you what programs may be available in your state.</li>
            <li>You get a realistic range of monthly payment options and timeline.</li>
            <li><strong>No obligation</strong> — you can hang up with info only.</li>
          </ul>
          <a class="call-modal-call call-button" href="tel:18882175352">Call (888) 217-5352</a>
          <div class="call-modal-note">No upfront fees. No pressure. Just clarity.</div>
        </div>
      </div>

      <h2 class="quiz-title">Quick Check:<br>Could this help protect your family?</h2>
      <p class="quiz-sub">Takes ~30 seconds. This checks whether your debt type and amount may qualify for state-regulated debt relief programs (usually for $10,000+ unsecured debt).</p>

      <!-- STEP 1 -->
      <div class="step active" id="step-1">
        <div class="question">How much unsecured debt are you dealing with?</div>
        <p class="tiny" id="unsecured-note">
          Unsecured debt does <strong>not</strong> include auto loans or mortgages.
        </p>
        <div class="btn-row" id="debt-buttons">
          <button class="btn" data-debt="lt_5k" data-min="0" data-max="4999">Less than $5,000</button>
          <button class="btn" data-debt="5_10k" data-min="5000" data-max="9999">$5,000 – $10,000</button>
          <button class="btn" data-debt="10_20k" data-min="10000" data-max="19999">$10,000 – $20,000</button>
          <button class="btn" data-debt="20_50k" data-min="20000" data-max="49999">$20,000 – $50,000</button>
          <button class="btn" data-debt="50k_plus" data-min="50000" data-max="">$50,000+</button>
        </div>
      </div>

      <!-- STEP 2 -->
      <div class="step" id="step-2">
        <div class="question">Are you behind or struggling to keep up with payments?</div>
        <div class="btn-row">
          <button class="btn" onclick="answerStep(2, 'yes')">Yes, I’m behind or close to it</button>
          <button class="btn secondary" onclick="answerStep(2, 'no')">No, but it’s tight</button>
        </div>
      </div>

      <!-- STEP 3 -->
      <div class="step" id="step-3">
        <div class="question">Which state do you live in?</div>
        <select id="state-select" class="state-select">
          <option value="">Select your state</option>
          <option value="AL">Alabama</option>
          <option value="AK">Alaska</option>
          <option value="AZ">Arizona</option>
          <option value="AR">Arkansas</option>
          <option value="CA">California</option>
          <option value="CO">Colorado</option>
          <option value="CT">Connecticut</option>
          <option value="DE">Delaware</option>
          <option value="FL">Florida</option>
          <option value="GA">Georgia</option>
          <option value="HI">Hawaii</option>
          <option value="ID">Idaho</option>
          <option value="IL">Illinois</option>
          <option value="IN">Indiana</option>
          <option value="IA">Iowa</option>
          <option value="KS">Kansas</option>
          <option value="KY">Kentucky</option>
          <option value="LA">Louisiana</option>
          <option value="ME">Maine</option>
          <option value="MD">Maryland</option>
          <option value="MA">Massachusetts</option>
          <option value="MI">Michigan</option>
          <option value="MN">Minnesota</option>
          <option value="MS">Mississippi</option>
          <option value="MO">Missouri</option>
          <option value="MT">Montana</option>
          <option value="NE">Nebraska</option>
          <option value="NV">Nevada</option>
          <option value="NH">New Hampshire</option>
          <option value="NJ">New Jersey</option>
          <option value="NM">New Mexico</option>
          <option value="NY">New York</option>
          <option value="NC">North Carolina</option>
          <option value="ND">North Dakota</option>
          <option value="OH">Ohio</option>
          <option value="OK">Oklahoma</option>
          <option value="OR">Oregon</option>
          <option value="PA">Pennsylvania</option>
          <option value="RI">Rhode Island</option>
          <option value="SC">South Carolina</option>
          <option value="SD">South Dakota</option>
          <option value="TN">Tennessee</option>
          <option value="TX">Texas</option>
          <option value="UT">Utah</option>
          <option value="VT">Vermont</option>
          <option value="VA">Virginia</option>
          <option value="WA">Washington</option>
          <option value="WV">West Virginia</option>
          <option value="WI">Wisconsin</option>
          <option value="WY">Wyoming</option>
          <option value="DC">Washington, DC</option>
        </select>
        <div class="btn-row">
          <button class="btn" onclick="submitState()">Next</button>
        </div>
        <p class="tiny">
          Some debt relief programs aren’t available in every state. We’ll let you know on the next step.
        </p>
      </div>

      <!-- RESULT: QUALIFIED -->
      <div class="step" id="step-qualified">
        <div class="result-good">
          <strong>Good news!</strong><br>
          Based on your answers, you may be a good fit for certain
          <strong>state-regulated debt relief programs</strong> that work with people who have
          $10,000 or more in unsecured debt.<br><br>

          <!-- Dynamic copy -->
          <span id="qualified-dynamic-copy"></span><br><br>

          Next, you can get my free guide explaining what most people are never told about debt relief,
          plus see the exact steps I took to reduce my monthly payments.
          <br><br />
          <b>OR</b><br />
          If you’d rather skip my guide and speak with a debt relief specialist right away,
        </div>

        <!-- PRIMARY CTA: CALL NOW -->
        <div class="call-box">
          <p class="call-label">Talk to a state-regulated debt relief specialist now:</p>
          <a href="tel:18882175352" class="call-button">📞 Call (888) 217-5352</a>
          <br />or if now is not a good time to get on the phone:<br /><a href="https://trkmcl.com/wy8odpg43k/w4lzrxq187" style="text-decoration:underline;">go to this website to see your options</a>
          <p class="call-note">
            No upfront fees. No obligation to enroll. Just a real person explaining your options.<br>Licensed providers operate under federal and state regulations and can explain your options in more detail.
          </p>
        </div>

        <center>OR</center><br />
        <div class="btn-row">
          <button class="btn"
                  onclick="trackEvent('cta_get_guide'); window.location.href='guide.php';">
            Get the Free Guide &amp; See My Exact Steps
          </button>
        </div>

      </div>

      <!-- RESULT: NOT QUALIFIED -->
      <div class="step" id="step-not-qualified">
        <div class="result-bad">
          Based on your answers, you may not qualify for a traditional debt relief program in your state.
        </div>
        <p class="hint" style="text-align:center; margin-bottom:0.75rem;">
          You still have options: you may be able to use a
          <strong>personal / consolidation loan</strong> or <strong>credit repair</strong> to start
          moving in the right direction.
        </p>
        <p class="hint" style="text-align:center; margin-bottom:0.9rem;">
          <a href="loan-lander.php"><strong>Click here</strong></a> to compare consolidation / personal loan options,<br>
          or <a href="credit-repair-lander.php"><strong>click here</strong></a> to see credit repair &amp; rebuilding offers.
        </p>
        <p class="hint" style="text-align:center; margin-bottom:0.85rem;">
          You can also get my free guide with everything I learned the hard way, plus
          credit rebuilding tips that may help even if debt settlement isn’t an option.
        </p>
        <div class="btn-row">
          <button class="btn secondary"
                  onclick="trackEvent('cta_get_guide_only'); window.location.href='guide.php';">
            Get the Free Guide Anyway
          </button>
        </div>
      </div>

      <p class="tiny" id="quick-disclaimer">
        This quick check is for educational purposes only and does not guarantee approval, results, or savings.
      </p>
    </section>

    <footer>
      © 2026 Debt Story Guide. This is personal experience, not legal or financial advice.
      <br>
      <a href="privacy.php">Privacy Policy</a>
      <a href="terms.php">Terms &amp; Conditions</a>
      <a href="affiliate-disclosure.php">Affiliate Disclosure</a>
    </footer>
  </div>


<div class="mobile-quiz-bar" id="mobile-quiz-bar">
  <a class="mobile-quiz-btn" href="#quiz-section" id="mobile-quiz-jump">Do you have $10,000+ in unsecured debt?</a>
</div>


<script>
(function (w,d,s,o,f,js,fjs) { w[o] = w[o] || function () { (w[o].q = w[o].q || []).push(arguments) }; js = d.createElement(s), fjs = d.getElementsByTagName(s)[0]; js.id = o; js.src = f; js.async = 1; fjs.parentNode.insertBefore(js, fjs);}(window, document, 'script', 'mcc', 'https://marketcall.com/js/mc-calltracking.js'));
mcc('init', { site: 2753, serviceBaseUrl: '//www.marketcall.com' });
mcc('requestTrackingNumber', {
  campaign:"335807",
  selector:[{type:"dom",value:"a[href^='tel:']"}],
  mask:"📞 Call  +x (xxx) xxx-xxxx",
  utm_source:"",
  utm_medium:"",
  utm_campaign:"",
  utm_term:"",
  utm_content:"",
  subid:"",
  subid1:"",
  subid2:"",
  subid3:"",
  subid4:""
});
</script>

<script>
const stateNotEligible = ["CT", "DE", "HI", "ID", "ME", "ND", "PR", "OR", "SC", "VI", "VT", "WA", "WV"];


/** --------- *
 *  Helpers   *
 *  --------- */
function buildPayload(extra){
  const utm = (typeof window.getUtmPayload === 'function') ? window.getUtmPayload() : {};
  return Object.assign({
    funnel_variant: 'advertorial',
    page_path: window.location.pathname
  }, utm, (extra || {}));
}

function safeGet(key) {
  try { return window.sessionStorage.getItem(key); } catch(e) { return null; }
}
function safeSet(key, val) {
  try { window.sessionStorage.setItem(key, val); return true; } catch(e) { return false; }
}
function setDebtBracket(bracket, min, max) {
  safeSet('dr_debt_bracket', bracket);
  safeSet('dr_debt_min', String(min ?? ''));
  safeSet('dr_debt_max', String(max ?? ''));
}
function getDebtBracket() {
  return safeGet('dr_debt_bracket') || '';
}



function getQualifiedCopy(bracket) {
  if (bracket === '50k_plus') {
    return "With higher unsecured debt amounts, there may be more structured options available depending on your state.";
  }
  if (bracket === '20_50k') {
    return "Many state-regulated programs are designed for people with mid-to-high unsecured debt, depending on eligibility.";
  }
  return "Some programs may be available depending on your debt type, state, and overall situation.";
}

function showQualifiedResult(debtBracket) {
  const copyEl = document.getElementById('qualified-dynamic-copy');
  if (!copyEl) return;

  copyEl.textContent = getQualifiedCopy(debtBracket);
}


document.addEventListener('click', function(e){
  const btn = e.target.closest('#debt-buttons button[data-debt]');
  if(!btn) return;

  const bracket = btn.getAttribute('data-debt');
  const min = btn.getAttribute('data-min');
  const max = btn.getAttribute('data-max');

  setDebtBracket(bracket, min, max);

  // send step 1 as the bracket instead of yes/no
  answerStep(1, bracket);
});



/** -----------------------------
 *  Reddit: don’t let it break flow
 *  ----------------------------- */
function safeRdtTrack(eventName) {
  try {
    if (typeof rdt !== 'undefined') rdt('track', eventName);
  } catch(e) {}
}


/** -----------------------------
 *  UI step control
 *  ----------------------------- */
function showStep(id) {
  document.querySelectorAll(".step").forEach(el => el.classList.remove("active"));
  const step = document.getElementById(id);
  if (step) step.classList.add("active");
}

/** -----------------------------
 *  “Send then redirect” helper
 *  (gives pixels time to transmit)
 *  ----------------------------- */
function redirectSoon(url, delayMs = 350) {
  setTimeout(() => { window.location.href = url; }, delayMs);
}

/** -----------------------------
 *  Core tracking events
 *  ----------------------------- */
function trackQuizStep(stepNumber, answer){
  const payload = buildPayload({
    step: 'q' + String(stepNumber),
    answer: String(answer),
    debt_bracket: getDebtBracket()
  });

  gtmEvent('quiz_step', payload);          // keep name
  // if you have a second event name, keep it, but don't duplicate the same string
  // gtmEvent('rt_quiz_step', payload);

  safeFbqTrack('trackCustom', 'QuizStep', payload);
}


function trackAddToCartOnce(){
  const fired = safeGet('dr_atc_fired') === '1';
  if (fired) return;
  safeSet('dr_atc_fired', '1');

  const bracket = getDebtBracket();

  const payload = buildPayload({
    debt_bracket: bracket,
    source: 'quiz',
    step: 'q1_debt_bracket'
  });

  safeFbqTrack('track', 'AddToCart', Object.assign({
    content_name: 'Debt Relief Quiz - Q1 Debt Bracket',
    value: 0.00,
    currency: 'USD'
  }, payload));

  gtmEvent('add_to_cart', payload);        // keep name
  gtmEvent('quiz_add_to_cart', payload);   // keep if you already rely on it
}


function fire10kQualifierOnce(source){
  source = source || 'q1_debt_bracket';

  const fired = safeGet('dr_10k_qualifier_fired') === '1';
  if (fired) return;
  safeSet('dr_10k_qualifier_fired', '1');

  const payload = buildPayload({
    step: 'q1_yes',
    source: source,
    debt_bracket: getDebtBracket()
  });

  safeFbqTrack('trackCustom', 'QuizQualified10k', payload);
  gtmEvent('quiz_10k_qualifier', payload);

  trackAddToCartOnce();
}


function trackLeadOnce(state){
  const fired = safeGet('dr_lead_fired') === '1';
  if (fired) return;
  safeSet('dr_lead_fired', '1');

  const payload = buildPayload({
    debt_bracket: getDebtBracket(),
    state: state || '',
    source: 'quiz_qualified'
  });

  safeFbqTrack('track', 'Lead', Object.assign({
    content_name: 'Debt Relief Quiz Qualified'
  }, payload));

  gtmEvent('lead', payload);
  gtmEvent('quiz_lead', payload);
}


/** -----------------------------
 *  Quiz handlers (INLINE onclick calls these)
 *  ----------------------------- */
function answerStep(stepNumber, answer) {
  // Always record the step to GTM/FB
  trackQuizStep(stepNumber, answer);

  if (stepNumber === 1) {
    safeSet('dr_debt_bracket', bracket);

    const d = document.getElementById("quick-disclaimer");
    if (d) d.style.display = "none";

    const bracket = String(answer || '');
    const qualifiesForSettlement = ['10_20k','20_50k','50k_plus'].includes(bracket);

    // Track LeadIntent always (we want signal even if they don't qualify)
    const startPayload = buildPayload({
      step: 'q1_debt_bracket',
      debt_bracket: bracket
    });

    safeFbqTrack('trackCustom', 'LeadIntent', startPayload);
    gtmEvent('quiz_start_all', startPayload);

    if (qualifiesForSettlement) {
      gtmEvent('quiz_start', startPayload);

      fire10kQualifierOnce('q1_debt_bracket');

      showStep("step-2");
      return;
    }

    // Below 10k → not qualified flow
    gtmEvent('under10k', buildPayload({ debt_bracket: debtBracketForTracking }));
    safeFbqTrack('trackCustom', 'LeadIntent_No', buildPayload({
      step: 'q1_under_10k',
      debt_bracket: debtBracketForTracking
    }));

    showStep("step-not-qualified");
    redirectSoon('/not-qualified.php?reason=under10k', 400);
    return;
  }


  // Step 2 logic is just progression
  if (stepNumber === 2) {
    showStep("step-3");
    return;
  }

  // Fallback progression (if you add more steps later)
  const next = stepNumber + 1;
  showStep("step-" + next);
}

function submitState() {
  const select = document.getElementById("state-select");
  const val = (select && select.value) ? select.value : "";
  if (!val) return;

  // Track the state selection as a step event
  trackQuizStep(3, val);

  if (stateNotEligible.includes(val)) {
    showStep("step-not-qualified");

    const ineligiblePayload = buildPayload({ state: val });
    gtmEvent('state_not_eligible', ineligiblePayload);
    safeFbqTrack('trackCustom', 'StateNotEligible', ineligiblePayload);

    // Delay redirect to preserve tracking
    redirectSoon('/not-qualified.php?reason=state', 400);
    return;
  }

  // Qualified
  trackLeadOnce(val);
  showStep("step-qualified");

  // inject dynamic copy based on bracket selected at step 1
  showQualifiedResult(getDebtBracket());
}

/** -----------------------------
 *  Track generic events (used by your guide CTA)
 *  ----------------------------- */
function trackEvent(name, extra){
  console.log("Event:", name);
  const payload = buildPayload(extra || {});
  gtmEvent(name, payload);
  safeFbqTrack('trackCustom', name, payload);
}


/** -----------------------------
 *  DOM Ready
 *  ----------------------------- */
document.addEventListener('DOMContentLoaded', function() {

  // Try flushing fbq queue a few times
  let qTries = 0;
  (function tryFlush(){
    qTries++;
    flushFbqQueue();
    if (typeof fbq === 'undefined' && qTries < 20) setTimeout(tryFlush, 250);
  })();

  // Advertorial view event (headline variant)
  let tries = 0;
  (function fireView(){
    tries++;
    if (typeof fbq !== 'undefined') {
      safeFbqTrack('trackCustom', 'AdvertorialView', buildPayload({headline_variant: 'C'}));
      gtmEvent('advertorial_view', buildPayload({ headline_variant: 'C' }));
    } else if (tries < 10) {
      setTimeout(fireView, 250);
    }
  })();

  // Track call clicks (final step)
  document.querySelectorAll('.call-button').forEach(function(btn) {
    btn.addEventListener('click', function() {
      const callPayload = buildPayload({
        position: 'qualified_step',
        click_location: 'call_button'
      });
      safeFbqTrack('trackCustom', 'CallClick', callPayload);
      gtmEvent('call_click', callPayload);
      safeRdtTrack('Lead');
    });
  });

  // Optional opt-in form
  const optinForm = document.getElementById('optin-form');
  if (optinForm) {
    const optinPayload = buildPayload({ lead_type: 'email_phone_optin' });
    safeFbqTrack('trackCustom', 'OptIn', optinPayload);
    gtmEvent('opt_in', optinPayload);
  }
});
</script>

<script>
// Smooth scroll for the mobile quiz jump link
(function () {
  var link = document.getElementById('mobile-quiz-jump');
  if (!link) return;
  link.addEventListener('click', function (e) {
    var target = document.getElementById('quiz-section');
    if (!target) return;
    e.preventDefault();
    try {
      target.scrollIntoView({ behavior: 'smooth', block: 'start' });
    } catch (err) {
      // fallback
      window.location.hash = 'quiz-section';
    }
    // Optional: track click
    trackEvent('StickyQuizCTA', { lead_type: 'mobile_bottom_bar' });
  });
})();

document.addEventListener('DOMContentLoaded', function () {
  const bar = document.getElementById('mobile-quiz-bar');
  const quiz = document.getElementById('quiz-section');
  if (!bar || !quiz) return;

  const obs = new IntersectionObserver((entries) => {
    entries.forEach(entry => {
      if (entry.isIntersecting) {
        bar.style.display = 'none';
        document.body.classList.add('quiz-bar-hidden');
      } else {
        bar.style.display = '';
        document.body.classList.remove('quiz-bar-hidden');
      }
    });
  }, { threshold: 0.15, rootMargin: '0px 0px -35% 0px' });

  obs.observe(quiz);
});

document.addEventListener('DOMContentLoaded', function(){
  const btn = document.getElementById('call-what-btn');
  const modal = document.getElementById('call-modal');
  if(!btn || !modal) return;

  function openModal(){
    modal.classList.add('open');
    modal.setAttribute('aria-hidden','false');
  }
  function closeModal(){
    modal.classList.remove('open');
    modal.setAttribute('aria-hidden','true');
  }

  btn.addEventListener('click', openModal);
  modal.addEventListener('click', function(e){
    if(e.target && e.target.getAttribute('data-close') === '1') closeModal();
  });
  document.addEventListener('keydown', function(e){
    if(e.key === 'Escape') closeModal();
  });
});
</script>

<script>
(function () {
  const params = new URLSearchParams(window.location.search);
  if (![...params].length) return;

  document.querySelectorAll('a[href]').forEach(link => {
    const href = link.getAttribute('href');
    if (!href || href.startsWith('#') || href.startsWith('tel:') || href.startsWith('mailto:')) return;

    try {
      const url = new URL(href, window.location.origin);
      params.forEach((v, k) => {
        if (!url.searchParams.has(k)) {
          url.searchParams.set(k, v);
        }
      });
      link.setAttribute('href', url.toString());
    } catch (e) {}
  });
})();
</script>

<script>
(function(){
  let fired = false;

  function pctScrolled(){
    const doc = document.documentElement;
    const scrollTop = window.pageYOffset || doc.scrollTop || 0;
    const winH = window.innerHeight || doc.clientHeight || 0;
    const docH = Math.max(doc.scrollHeight, doc.offsetHeight, doc.clientHeight);
    if (docH <= 0) return 0;
    return (scrollTop + winH) / docH;
  }

  function onScroll(){
    if (fired) return;

    const pct = pctScrolled();
    // TEMP DEBUG (remove later)
    // console.log('[SCROLL]', Math.round(pct*100) + '%');

    if (pct >= 0.50){
      fired = true;

      const utm = (typeof window.getUtmPayload === 'function') ? window.getUtmPayload() : {};
      const payload = Object.assign({
        funnel_variant: 'advertorial_state',
        page_path: location.pathname,
        scroll_depth: 50
      }, utm);

      console.log('%c[SCROLL DEPTH FIRED]', 'color:orange;font-weight:bold;', payload);

      // GA4/GTM event (so you can build audiences + reports)
      if (typeof window.gtmEvent === 'function') {
        window.gtmEvent('scroll_depth_50', payload);
      }

      // FB event
      if (typeof window.safeFbqTrack === 'function') {
        window.safeFbqTrack('trackCustom', 'ScrollDepth_50', payload);
      } else if (typeof window.fbq !== 'undefined') {
        try { window.fbq('trackCustom', 'ScrollDepth_50', payload); } catch(e) {}
      }

      window.removeEventListener('scroll', onScroll);
    }
  }

  window.addEventListener('scroll', onScroll, { passive: true });
})();
</script>

  
</body>
</html>
