/* Stanley Bankruptcy Law — City landing pages */

const CB = window.StanleyBankruptcyLawDesignSystem_1e6713;

/* City-page responsive styles (injected once; every route loads this file) */
if (typeof document !== 'undefined' && !document.getElementById('city-page-responsive')) {
  const cityCss = document.createElement('style');
  cityCss.id = 'city-page-responsive';
  cityCss.textContent = `
.city-page{overflow-x:hidden}
.city-hero-inner{position:relative;max-width:var(--container);margin:0 auto;padding:70px 24px 68px;display:grid;grid-template-columns:1.15fr 0.85fr;gap:52px;align-items:center}
.city-hero-h1{color:#F7F5EE;font-size:46px;line-height:1.06;margin:0 0 18px;letter-spacing:-0.022em}
.city-hero-p{color:#D7E3DA;font-size:18px;line-height:1.62;max-width:54ch;margin:0 0 28px}
.city-ctx-grid{display:grid;grid-template-columns:1.2fr 0.8fr;gap:52px;align-items:center}
.city-stats{display:flex;flex-wrap:wrap;gap:32px}
.city-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.city-chapters{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.city-hero-inner>*,.city-ctx-grid>*,.city-steps>*,.city-chapters>*{min-width:0}
.city-hero-inner a,.city-page a{overflow-wrap:anywhere}
@media (max-width:960px){.city-steps{grid-template-columns:1fr 1fr}}
@media (max-width:860px){
.city-hero-inner{grid-template-columns:1fr;gap:28px;padding:40px 18px 44px}
.city-hero-h1{font-size:31px}
.city-hero-p{font-size:16.5px;max-width:none}
.city-ctx-grid{grid-template-columns:1fr;gap:28px}
.city-stats{gap:18px 28px}
.city-chapters{grid-template-columns:1fr}
}
@media (max-width:560px){.city-steps{grid-template-columns:1fr}.city-hero-h1{font-size:28px}
.city-chapters button,.city-hero-inner button,.city-hero-inner a[role="button"]{max-width:100%;white-space:normal;text-align:left}
}
`;
  document.head.appendChild(cityCss);
}

const CITIES_DATA = {
  pikeville: {
    city: 'Pikeville', county: 'Pike', slug: 'pikeville',
    hero: 'Bankruptcy attorney serving Pikeville and Pike County, Kentucky',
    intro: 'Pikeville is Dalton Stanley\'s home county. If you are carrying credit card debt, medical bills, or facing a foreclosure or garnishment in Pike County, you have a local attorney who knows the court, knows the community, and will walk with you every step of the way.',
    context: 'Pike County families and small business owners face real financial pressures. Whether you are dealing with unexpected medical costs, a job loss, or debt that has simply piled up over the years, Chapter 7 and Chapter 13 bankruptcy exist to give you a legal path forward.',
    nearby: ['Elkhorn City', 'Hellier', 'Shelbiana', 'Belfry', 'Kimper'],
    keywords: 'Chapter 7 and Chapter 13 bankruptcy attorney in Pikeville, KY',
    court: 'U.S. Bankruptcy Court for the Eastern District of Kentucky (London Division)',
    relatedCities: [{ slug: 'prestonsburg', label: 'Prestonsburg' }, { slug: 'hazard', label: 'Hazard' }],
  },
  hazard: {
    city: 'Hazard', county: 'Perry', slug: 'hazard',
    hero: 'Bankruptcy attorney serving Hazard and Perry County, Kentucky',
    intro: 'Hazard sits at the heart of Perry County, and for generations its economy rose and fell with coal. If mining layoffs, a reduced-hours job, or medical bills from an aging population have left you behind on payments, Stanley Bankruptcy Law offers the same honest, plain-spoken counsel we bring to every Eastern Kentucky client, with a free consultation and no pressure to decide on the spot.',
    context: 'Perry County has lived through one of the sharpest economic transitions in the region, as coal employment declined and healthcare, retail, and public-sector jobs became the area\'s main employers. That shift has meant lower or less predictable household income for a lot of Hazard families, even while debts from better years, medical bills, and car loans stayed the same size. Chapter 7 can discharge most unsecured debt in a matter of months; Chapter 13 can restructure what you owe into one payment sized to today\'s income, not yesterday\'s.',
    courtInfo: 'Bankruptcy cases filed from Perry County are handled by the U.S. Bankruptcy Court for the Eastern District of Kentucky, London Division. Nearly all filings are submitted electronically, and the required "meeting of creditors" for Hazard-area clients is very often conducted by video rather than in person, so a trip to the London courthouse usually is not necessary just to move your case forward.',
    economicContext: 'Coal built Hazard and Perry County, and the long decline in mining jobs over the past few decades has hit household budgets hard, layoffs, reduced hours, and a shift toward lower-wage retail and service work. At the same time, the regional hospital and healthcare sector have grown into one of the county\'s largest employers, offering steadier but often lower-paying jobs than mining once did. That combination, old debt built up during better-paying years plus a smaller paycheck today, is one reason Perry County families end up looking seriously at bankruptcy for the first time.',
    servicesFramed: 'For many Hazard clients, the honest starting question is not "Chapter 7 or Chapter 13" but "what does my income actually look like right now." If your household income has dropped and most of your debt is unsecured, credit cards, medical bills, personal loans, Chapter 7 can often wipe that out in a few months with $0 down to begin. If you are behind on a mortgage or vehicle loan and want to keep it, Chapter 13 reorganizes what you owe into one affordable monthly payment over three to five years. Kentucky\'s exemptions are built to protect the basics, your home, your vehicle, and your personal belongings, in either chapter.',
    cityFaqs: [
      { q: 'I was laid off from a mine and I\'m behind on bills, is bankruptcy really the right move?', a: 'It can be. A job loss or a big drop in income is one common reasons people file, and it is not a personal failing. It is exactly what the bankruptcy is designed for. We will look at your full picture, income, debts, and assets, before recommending anything.' },
      { q: 'Do I have to drive to London for my case?', a: 'Usually not. Most paperwork is handled electronically, and the required meeting of creditors for Perry County clients is commonly done by video, so most of the process can happen without leaving Hazard.' },
      { q: 'My income has been inconsistent since I left mining, does that affect which chapter I qualify for?', a: 'It can. Kentucky\'s median income figures are used in the means test, and a recent drop in your household income can actually make Chapter 7 more accessible than it might have been in the past. We will walk through your specific numbers together.' },
      { q: 'Can bankruptcy help with medical debt from the regional hospital?', a: 'Yes. Medical bills are unsecured debt just like credit cards, and bankruptcy typically discharges them. If you also have other debts you want to catch up on, like a car payment, Chapter 13 can combine everything into one plan.' },
      { q: 'How much does it cost to get started?', a: 'You can begin your Chapter 7 case with $0 down. We explain the court filing fee and our fee structure clearly during your free, no-obligation consultation.' },
    ],
    relatedCities: [{ slug: 'prestonsburg', label: 'Prestonsburg' }, { slug: 'whitesburg', label: 'Whitesburg' }],
  },
  whitesburg: {
    city: 'Whitesburg', county: 'Letcher', slug: 'whitesburg',
    hero: 'Bankruptcy attorney serving Whitesburg and Letcher County, Kentucky',
    intro: 'Whitesburg and Letcher County residents dealing with crushing debt, collection calls, or a looming foreclosure can get real relief through bankruptcy. Stanley Bankruptcy Law is here with straightforward answers and a plan tailored to your situation.',
    context: 'Letcher County families deserve an attorney who will give them honest counsel about their options, not just a stack of forms. Whether Chapter 7, Chapter 13, or a different chapter is the right fit depends on your income, your assets, and your goals. We help you figure that out together, free.',
    nearby: ['Jenkins', 'Neon', 'Fleming-Neon', 'Cromona', 'Isom'],
    keywords: 'Chapter 7 and Chapter 13 bankruptcy attorney in Whitesburg, KY',
    court: 'U.S. Bankruptcy Court for the Eastern District of Kentucky (London Division)',
    relatedCities: [{ slug: 'hazard', label: 'Hazard' }, { slug: 'eastern-kentucky', label: 'Eastern Kentucky' }],
  },
  grayson: {
    city: 'Grayson', county: 'Carter', slug: 'grayson',
    hero: 'Bankruptcy attorney serving Grayson and Carter County, Kentucky',
    intro: 'Grayson sits along the AA Highway and I-64 corridor that ties Carter County to Ashland\'s larger job market, so a lot of local households depend on paychecks and healthcare from just over the county line. When a plant cuts hours, a medical bill arrives, or a car repossession threatens your ability to get to work, Stanley Bankruptcy Law offers a free, no-pressure consultation to walk Carter County residents through Chapter 7 and Chapter 13 in plain language.',
    context: 'From the town of Grayson itself to the rural hollers further out, Carter County households carry a mix of manufacturing, retail, timber, and commuter income, and financial hardship does not discriminate between them. Chapter 7 can wipe out most unsecured debts in just a few months, and Chapter 13 gives you a path to catching up on a mortgage or car loan without losing them.',
    courtInfo: 'Because Carter County borders Boyd County, bankruptcy cases from Grayson are generally handled through the Ashland Division of the U.S. Bankruptcy Court for the Eastern District of Kentucky. Filing itself is done electronically in nearly every case, and the meeting of creditors is frequently held by video conference, so most Grayson clients never need to make the drive to a courthouse at all.',
    economicContext: 'Carter County\'s economy leans on its position along the I-64 and AA Highway corridor, commuting distance to Ashland\'s industrial and healthcare employers, plus local retail, timber, and small manufacturing. That commuter relationship cuts both ways: when a regional employer trims hours or a household loses a second income, the mortgage and car payment that made sense on two paychecks can quickly become unmanageable on one. Medical bills and credit card debt accumulated during better months are the most common triggers we see from Grayson-area clients.',
    servicesFramed: 'For Grayson clients, keeping a working vehicle is often the single most urgent priority, since so many jobs sit outside Carter County entirely. Chapter 13 is built specifically to let you catch up on a car loan or mortgage while Kentucky\'s exemptions protect what you need to keep working. If most of what you owe is unsecured, credit cards, medical bills, personal loans, Chapter 7 can often clear that out in a few months, with $0 down to begin, freeing up your income for the bills that matter most.',
    cityFaqs: [
      { q: 'Do I have to travel to Ashland for my bankruptcy hearing?', a: 'In most cases, no. The required meeting of creditors is very commonly handled by video for Carter County clients, and the rest of the filing is done electronically.' },
      { q: 'I commute outside Carter County for work, can bankruptcy protect my car?', a: 'Yes, in most cases. Federal exemptions are designed to protect a vehicle you need for work, and Chapter 13 exists specifically to help you catch up on a car loan you have fallen behind on rather than lose it.' },
      { q: 'My household lost a second income and we are behind on the mortgage, what are our options?', a: 'Chapter 13 reorganizes what you owe into one affordable monthly payment over three to five years and is specifically designed to let you catch up on missed mortgage payments while keeping your home.' },
      { q: 'Which court handles a Grayson bankruptcy filing?', a: 'The Ashland Division of the U.S. Bankruptcy Court for the Eastern District of Kentucky typically has jurisdiction over Carter County cases.' },
      { q: 'How much does it cost to file?', a: 'You can start your Chapter 7 with $0 down. We are upfront about the court filing fee and our fee structure from your very first call.' },
    ],
    relatedCities: [{ slug: 'ashland', label: 'Ashland' }, { slug: 'eastern-kentucky', label: 'Eastern Kentucky' }],
  },
  salyersville: {
    city: 'Salyersville', county: 'Magoffin', slug: 'salyersville',
    hero: 'Bankruptcy attorney serving Salyersville and Magoffin County, Kentucky',
    intro: 'Magoffin County is small, rural, and tight-knit, and a lot of Salyersville-area households rely on a mix of seasonal work, self-employment, and single-employer paychecks rather than a large local job market. Stanley Bankruptcy Law meets you where you are, explains your options honestly, and works around the long drives that come with living in a rural county, so getting help does not mean losing a day of work.',
    context: 'Bankruptcy is a legal tool, not a personal failing, and the law was designed exactly for situations Magoffin County families face every day, uneven income, an unexpected medical bill, or debt that built up slowly and never quite got paid down. A free consultation costs you nothing and gives you real, honest answers about whether Chapter 7 or Chapter 13 fits your situation.',
    courtInfo: 'Magoffin County bankruptcy cases fall under the Ashland Division of the U.S. Bankruptcy Court for the Eastern District of Kentucky. Given the distance from Salyersville to Ashland, we lean heavily on video conferencing wherever the court allows it, so a rural client does not have to lose a full day of work or arrange a long drive just to move their case forward.',
    economicContext: 'Magoffin County\'s economy is smaller and more rural than many of its neighbors, built on a mix of agriculture, coal\'s long legacy, small local employers, and self-employment. Without a large local job market, many Salyersville-area households patch together income from more than one source, which can make monthly income look different from one month to the next. That variability is exactly the kind of situation bankruptcy law accounts for, but it does mean your case benefits from an attorney who takes the time to understand your real income, not just a single pay stub.',
    servicesFramed: 'If your income varies month to month, whether from seasonal work, self-employment, or a combination of jobs, we take the time to calculate your means test correctly rather than relying on a single snapshot. Chapter 7 can discharge most unsecured debts, credit cards, medical bills, personal loans, often within a few months, with $0 down to start. If you are behind on a vehicle you need for a long rural commute, Chapter 13 is built to help you catch up without losing it.',
    cityFaqs: [
      { q: 'My income changes a lot month to month because I am self-employed, can I still file?', a: 'Yes. Self-employed and variable income is common in Magoffin County, and we take extra care to calculate your means test using an accurate picture of your real income rather than a single pay period.' },
      { q: 'Do I have to make the drive to Ashland for my case?', a: 'We minimize that wherever possible. Much of the process is handled electronically, and the meeting of creditors is conducted by video for clients. The vast majority of our clients never have to leave the comfort of their own home throughout the entire process.' },
      { q: 'Can I keep my truck if I file? I need it for work.', a: 'In most cases, yes. Federal exemptions are designed to protect a vehicle you rely on for work, and Chapter 13 exists specifically to help you catch up on a car loan rather than lose it.' },
      { q: 'What does a free consultation actually involve?', a: 'A straightforward conversation about your income, your debts, and your goals, so we can give you an honest recommendation. There is no obligation and no pressure to file that day.' },
    ],
    relatedCities: [{ slug: 'paintsville', label: 'Paintsville' }, { slug: 'prestonsburg', label: 'Prestonsburg' }],
  },
  prestonsburg: {
    city: 'Prestonsburg', county: 'Floyd', slug: 'prestonsburg',
    hero: 'Bankruptcy attorney serving Prestonsburg and Floyd County, Kentucky',
    intro: 'Prestonsburg anchors Floyd County as one of the Big Sandy region\'s hubs for healthcare and education, home to a regional hospital and a community college campus that today employ far more local residents than coal does. If wage garnishment, a mortgage behind on payments, or medical debt has you searching for options, Stanley Bankruptcy Law offers the legal focus and local knowledge to help you find the right path forward.',
    context: 'Floyd County sits at the heart of the Big Sandy region, and our practice focuses exclusively on bankruptcy (primarily on Chapter 7 and Chapter 13 bankruptcy), which means Prestonsburg clients are getting a specialist, not a generalist, when their financial future is on the line.',
    courtInfo: 'Floyd County bankruptcy cases are handled by the London Division of the U.S. Bankruptcy Court for the Eastern District of Kentucky. Most filings are completed electronically, and the required meeting of creditors is commonly held by video, so Prestonsburg clients rarely need to travel far to keep their case moving.',
    economicContext: 'Prestonsburg has transitioned from a coal-dependent economy toward one anchored by healthcare and education, the regional hospital and Big Sandy Community and Technical College are now among Floyd County\'s largest employers, alongside coal\'s continuing but reduced presence. Steady hospital or college employment does not always mean financial security, though, medical bills, credit card debt from years of tight budgets, and car loans still add up, and even a two-income household can fall behind after an illness or a period of reduced hours.',
    servicesFramed: 'Many Prestonsburg clients work for the hospital, the college, or a related employer, and are current on day-to-day bills but carrying medical debt or credit cards that have grown past what a single paycheck can handle. Chapter 7 discharges most of that unsecured debt in a matter of months, with $0 down to begin. If you are behind on your mortgage and want to keep your home, Chapter 13 reorganizes what you owe into one manageable monthly payment over three to five years.',
    cityFaqs: [
      { q: 'I work at the hospital and have steady income, but medical and credit card debt built up during a hard stretch. Do I qualify for Chapter 7?', a: 'Often, yes. Chapter 7 eligibility depends on your household income compared to the Kentucky median for your family size, not just whether you currently have a job. We will run the numbers together during your free consultation.' },
      { q: 'Which court handles a Prestonsburg bankruptcy filing?', a: 'The London Division of the U.S. Bankruptcy Court for the Eastern District of Kentucky typically has jurisdiction over Floyd County cases.' },
      { q: 'Can I keep my house if I am behind on the mortgage?', a: 'In most cases, yes. Chapter 13 is built specifically to let you catch up on missed mortgage payments over time while you keep your home.' },
      { q: 'Do I need to take time off work to attend my hearing in London?', a: 'Usually not. The meeting of creditors is conducted by video, and most of the filing process happens electronically.' },
      { q: 'What is the difference between Chapter 7 and Chapter 13 for someone with steady income?', a: 'Chapter 7 typically fits when your income is below the threshold and you don\'t need an extended time to catch up on mortgage or car payments to keep the home or vehicle. Chapter 13 fits when you have steady income and want to catch up on a mortgage or car loan over three to five years rather than lose them.' },
    ],
    relatedCities: [{ slug: 'paintsville', label: 'Paintsville' }, { slug: 'pikeville', label: 'Pikeville' }],
  },
  paintsville: {
    city: 'Paintsville', county: 'Johnson', slug: 'paintsville',
    hero: 'Bankruptcy attorney serving Paintsville and Johnson County, Kentucky',
    intro: 'Paintsville is one of the regional hubs of the Big Sandy Valley, home to a regional hospital and a retail base that draws workers and shoppers from nearby counties. When medical debt, a layoff, or unexpected expenses push a Johnson County household to the edge, Dalton Stanley offers a free bankruptcy consultation with straightforward answers, no judgment and no runaround.',
    context: 'The families here work hard, often in healthcare, retail, or small business roles that anchor the local economy. Knowing your legal options matters, and we make that process straightforward and affordable from the very first conversation.',
    courtInfo: 'Johnson County cases are handled through the Ashland Division of the U.S. Bankruptcy Court for the Eastern District of Kentucky. Filing is done electronically for nearly every case, and the required meeting of creditors is frequently held by video, so most Paintsville clients can move their case forward without a long drive.',
    economicContext: 'Paintsville\'s role as a regional hub means Johnson County\'s economy leans on healthcare and retail employment more than the coal mining that shaped earlier generations here. Hospital and retail jobs offer more stability than mining did in its later years, but wages have not always kept pace with the cost of housing, vehicles, and medical care, especially for households supporting family members further out in Blaine, Oil Springs, or Van Lear who commute in for work and services. Medical debt and car loans are the common pressures faced by people in the Paintsville-area.',
    servicesFramed: 'Because many Paintsville clients work in healthcare or retail with relatively steady but modest income, the choice between Chapter 7 and Chapter 13 usually comes down to whether you are behind on a car or mortgage payment you want to keep. Chapter 7 clears most unsecured debts like medical bills and credit cards in a few months, with $0 down to start. Chapter 13 is the better fit if you need to catch up on a secured debt over time while protecting the property Kentucky\'s exemptions are designed to let you keep.',
    cityFaqs: [
      { q: 'I work at the hospital in Paintsville and have good but not great income, can I still qualify for Chapter 7?', a: 'It depends on your household size and income compared to the Kentucky median, not just your job. Many hospital and retail employees do qualify. We will walk through your specific numbers for free.' },
      { q: 'I live outside Paintsville, out in Johnson County, can I still work with your office without a long drive?', a: 'Yes. We work with clients throughout Johnson County by phone, email, and e-signature, so where you live in the county does not change how we handle your case. We can arrange for remote meetings.' },
      { q: 'Which court handles a Paintsville bankruptcy case?', a: 'The Ashland Division of the U.S. Bankruptcy Court for the Eastern District of Kentucky typically has jurisdiction over Johnson County filings.' },
      { q: 'Can bankruptcy stop a car repossession?', a: 'Yes. The moment your case is filed, an automatic stay goes into effect that stops most repossessions, and Chapter 13 can help you catch up on a car loan you have fallen behind on. Even if your car or truck is already repossessed, it\'s still possible that you may be able to recover it by filing bankruptcy.' },
      { q: 'How much does it cost to begin?', a: 'You can start your Chapter 7 case with $0 down. We explain the court filing fee and our fee structure clearly during your free consultation.' },
    ],
    relatedCities: [{ slug: 'prestonsburg', label: 'Prestonsburg' }, { slug: 'salyersville', label: 'Salyersville' }],
  },
  ashland: {
    city: 'Ashland', county: 'Boyd', slug: 'ashland',
    hero: 'Bankruptcy attorney serving Ashland and Boyd County, Kentucky',
    intro: 'Ashland is one of the largest cities in Eastern Kentucky, and Boyd County residents dealing with serious debt have the same options as anyone in the region. Stanley Bankruptcy Law serves Ashland clients looking for a bankruptcy attorney who will give them an honest assessment and a clear path forward.',
    context: 'Boyd County sits at the tri-state junction where Kentucky meets West Virginia and Ohio. Regardless of where your debt originated, filing in Kentucky is what matters, and the Eastern District of Kentucky covers Ashland. We handle Chapter 7 and Chapter 13 cases for Boyd and Greenup County residents.',
    nearby: ['Catlettsburg', 'Coalton', 'Westwood', 'Grayson Road area', 'Flatwoods'],
    keywords: 'Chapter 7 and Chapter 13 bankruptcy attorney in Ashland, KY',
    court: 'U.S. Bankruptcy Court for the Eastern District of Kentucky (Ashland Division)',
    relatedCities: [{ slug: 'grayson', label: 'Grayson' }, { slug: 'eastern-kentucky', label: 'Eastern Kentucky' }],
  },
  'eastern-kentucky': {
    city: 'Eastern Kentucky', county: 'Eastern Kentucky', slug: 'eastern-kentucky',
    hero: 'Bankruptcy attorney serving all of Eastern Kentucky',
    intro: 'Stanley Bankruptcy Law serves families and individuals across Eastern Kentucky. Whether you are in a city or a rural community, you deserve honest answers about your debt options from a local attorney who knows this region.',
    context: 'Eastern Kentucky communities have faced unique economic pressures for decades. When medical bills, job loss, or years of piling debt finally become unmanageable, Chapter 7 and Chapter 13 bankruptcy are federal tools that exist specifically to give hardworking people a legal path forward. Dalton Stanley is a Eastern Kentucky native and former U.S. Bankruptcy Court clerk who brings firsthand knowledge of how Eastern Kentucky courts handle these cases.',
    nearby: ['Pikeville', 'Hazard', 'Prestonsburg', 'Paintsville', 'Ashland', 'Whitesburg', 'Grayson', 'Salyersville', 'London', 'Corbin', 'Hindman', 'Harlan'],
    keywords: 'Chapter 7 and Chapter 13 bankruptcy attorney in Eastern Kentucky',
    court: 'U.S. Bankruptcy Court for the Eastern District of Kentucky',
    cityFaqs: [
      { q: 'Do I have to travel far to work with a bankruptcy attorney from Eastern Kentucky?', a: 'No. We handle most of the process by phone, email, and e-signature. We work with clients across Eastern Kentucky and can set up remote consultations.' },
      { q: 'Which court will handle my bankruptcy case?', a: 'The U.S. Bankruptcy Court for the Eastern District of Kentucky has jurisdiction over cases filed from Eastern Kentucky counties.' },
      { q: 'How much does it cost to file?', a: 'You can start your Chapter 7 with $0 down. We are transparent about the court filing fee and our fee structure from the very first call.' },
      { q: 'Can I keep my house or car?', a: 'In most cases, yes. Federal exemptions protect most essential property in a Chapter 7 case, and Chapter 13 is specifically designed to help you catch up on a mortgage or car loan.' },
    ],
    relatedCities: [{ slug: 'pikeville', label: 'Pikeville' }, { slug: 'hazard', label: 'Hazard' }],
  },
  london: {
    city: 'London', county: 'Laurel', slug: 'london',
    hero: 'Bankruptcy attorney serving London and Laurel County, Kentucky',
    intro: 'London sits on the I-75 corridor as one of the fastest-growing cities in our service area, and Laurel County\'s rapid growth in retail, logistics, and tourism has brought new residents, new jobs, and new debt loads alike. Whether you have lived here for decades or moved to the area recently for work, Stanley Bankruptcy Law offers free consultations and honest guidance on Chapter 7 and Chapter 13 for Laurel and Knox County residents.',
    context: 'Laurel County is one of the fastest-growing counties in Eastern Kentucky, and financial pressures grow alongside a growing population. Whether you are a longtime resident or a newer arrival, bankruptcy relief is available and accessible regardless of where you moved from.',
    courtInfo: 'London is unusual among our service area in that it is itself home to a divisional office, the London Division of the U.S. Bankruptcy Court for the Eastern District of Kentucky. That means Laurel County filers may have their meeting of creditors scheduled right in London, though many meetings are now conducted by video regardless of location.',
    economicContext: 'Laurel County\'s position on the I-75 corridor has made it a genuine growth engine for the region, retail, logistics, and tourism tied to the Cumberland Falls area have all expanded here in ways that are less common elsewhere in our service area. That growth is a double-edged sword for household finances: more jobs and new housing developments, but also rising costs of living and a steady flow of new residents taking on mortgages, car loans, and credit in a market that looks different than it did a decade ago.',
    servicesFramed: 'For London-area clients, debt can be tied to a recent move, a new mortgage, a vehicle purchase, or credit used to furnish a new home, that became unmanageable after a job change or medical bill. Chapter 7 can discharge most unsecured debts like credit cards and medical bills in a few months, with $0 down to start. Chapter 13 fits if you are behind on a mortgage or car loan and want to catch up rather than lose what you have.',
    cityFaqs: [
      { q: 'I moved to London recently for work and I am already behind on bills, does that matter for my case?', a: 'No. How long you have lived in Kentucky does not affect your right to file and we can walk you through everything.' },
      { q: 'Will my hearing actually be held in London?', a: 'It is very unlikely you\'ll ever need to go to Court. We can take care of everything for you. The meetings of creditors is now conducted by video rather than in person, so you\'ll most likely never leave the comfort of your own home throughout the entire process.' },
      { q: 'I have more consumer debt than I expected after buying a house here, is that a problem?', a: 'Not at all, that is a very common situation for newer Laurel County residents, and it is exactly the kind of unsecured debt that Chapter 7 is built to discharge.' },
      { q: 'Can bankruptcy help if I am behind on a car I bought after moving here?', a: 'Yes. Chapter 13 is designed specifically to let you catch up on a vehicle loan over time instead of losing the car, while the automatic stay stops repossession the moment your case is filed.' },
      { q: 'How much does it cost to get started?', a: 'You can begin your Chapter 7 with $0 down. We are upfront about the filing fee and our fee structure from your first call.' },
    ],
    relatedCities: [{ slug: 'eastern-kentucky', label: 'Eastern Kentucky' }, { slug: 'hazard', label: 'Hazard' }],
  },
};

const CITY_SLUGS = Object.keys(CITIES_DATA);

function CityJsonLd({ d, canonicalUrl }) {
  const schema = {
    '@context': 'https://schema.org',
    '@type': 'LegalService',
    '@id': canonicalUrl + '#service',
    name: 'Stanley Bankruptcy Law',
    parentOrganization: { '@id': 'https://www.stanleybankruptcylaw.com/#firm' },
    url: canonicalUrl,
    telephone: '+1-276-409-5541',
    areaServed: { '@type': 'AdministrativeArea', name: d.city === d.county ? d.county : (d.county + ' County, KY') },
    address: { '@type': 'PostalAddress', streetAddress: '156 Ky Oil Village', addressLocality: 'Betsy Layne', addressRegion: 'KY', postalCode: '41605', addressCountry: 'US' },
  };
  return <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }} />;
}

function CityPage({ citySlug, navigate }) {
  const { Button, Badge, Card, Stat } = CB;
  const d = CITIES_DATA[citySlug];
  if (!d) return null;
  const isRegion = d.city === d.county;
  const countyLabel = isRegion ? d.county : d.county + ' County';
  const canonicalUrl = (window.hrefFor ? 'https://www.stanleybankruptcylaw.com' + window.hrefFor('city-' + citySlug) : '');

  const steps = [
    { icon:'calendar-check', n:'1', t:'Schedule a free consult', body:'A no-obligation call to talk through your situation and which chapter fits.' },
    { icon:'file-text',       n:'2', t:'We prepare your case',   body:'We handle the paperwork, explain every form, and file when you are ready.' },
    { icon:'shield-check',   n:'3', t:'The stay goes into effect', body:'The moment we file, the automatic stay halts collection calls, garnishments, and foreclosure.' },
    { icon:'sunrise',        n:'4', t:'Your fresh start begins', body:'Chapter 7 discharges most debts in months. Chapter 13 gives you a single payment plan.' },
  ];

  const genericFaqs = [
    { q: `Do I have to travel far to work with a bankruptcy attorney from ${d.city}?`, a: 'No. We handle most of the process by phone, email, and e-signature. We work with clients across Eastern Kentucky and can set up remote consultations.' },
    { q: `Which court handles a bankruptcy case filed from ${d.county} County?`, a: `${d.court} has jurisdiction over cases filed from ${d.county} County.` },
    { q: 'How much does it cost to file?', a: 'You can start your Chapter 7 with $0 down. We are transparent about the court filing fee and our fee structure from the very first call.' },
    { q: 'Can I keep my house or car?', a: 'In most cases, yes. Federal exemptions protect most essential property in a Chapter 7 case, and Chapter 13 is specifically designed to help you catch up on a mortgage or car loan.' },
  ];
  const faqs = d.cityFaqs || genericFaqs;

  const [openFaq, setOpenFaq] = React.useState(null);

  return (
    <main className="city-page">
      {canonicalUrl && <CityJsonLd d={d} canonicalUrl={canonicalUrl} />}
      {/* HERO */}
      <div style={{ background:'var(--brand)', position:'relative', overflow:'hidden' }}>
        <div style={{ position:'absolute', inset:0, background:'radial-gradient(110% 100% at 88% 0%, rgba(200,151,47,0.14) 0%, transparent 55%)' }} />
        <div style={{ position:'absolute', inset:0, background:'repeating-linear-gradient(125deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 30px)' }} />
        <div className="city-hero-inner">
          <div>
            <div style={{ display:'flex', gap:'8px', marginBottom:'16px', flexWrap:'wrap' }}>
              <Badge variant="brand" style={{ background:'rgba(255,255,255,0.1)', color:'#E4EDE7', borderColor:'rgba(255,255,255,0.2)' }}>{countyLabel}</Badge>
              <Badge variant="accent">Free consultation</Badge>
              <Badge variant="accent">$0 down to file</Badge>
            </div>
            <h1 className="city-hero-h1">
              Bankruptcy attorney serving <span style={{ color:'var(--gold-300)' }}>{d.city}</span>
            </h1>
            <p className="city-hero-p">{d.intro}</p>
            <div style={{ display:'flex', gap:'14px', flexWrap:'wrap' }}>
              <Button variant="accent" size="lg" onClick={()=>navigate('contact')} iconLeft={<Icon name="calendar-check" size={18} />}>Schedule a free consult</Button>
              <Button variant="outline" size="lg" onClick={()=>navigate('types')} style={{ color:'#F4F2EA', borderColor:'rgba(244,242,234,0.4)' }} iconRight={<Icon name="arrow-right" size={17} />}>Explore your options</Button>
            </div>
          </div>
          <div style={{ display:'flex', flexDirection:'column', gap:'14px' }}>
            {[
              { icon:'map-pin', t:'Serving '+d.city, s:'Eastern Kentucky bankruptcy practice' },
              { icon:'phone', t:<a href="tel:+12764095541" style={{ color:'#F4F2EA', textDecoration:'none' }}>(276) 409-5541</a>, s:<span>Call anytime · or <a href="sms:+12764095541" style={{ color:'var(--gold-300)', textDecoration:'none' }}>send a text</a></span> },
              { icon:'scale', t:'Chapter 7 and Chapter 13', s:'$0 down to begin your Chapter 7' },
              { icon:'gavel', t:'Former U.S. Bankruptcy Court Clerk', s:'Experience working with bankruptcy judges' },
            ].map((item)=>(
              <div key={item.icon} style={{ display:'flex', alignItems:'flex-start', gap:'14px', background:'rgba(255,255,255,0.07)', borderRadius:'var(--radius-md)', border:'1px solid rgba(255,255,255,0.12)', padding:'14px 16px' }}>
                <span style={{ color:'var(--gold-300)', flexShrink:0, marginTop:'1px' }}><Icon name={item.icon} size={20} /></span>
                <div>
                  <div style={{ fontFamily:'var(--font-sans)', fontWeight:600, fontSize:'15px', color:'#F4F2EA' }}>{item.t}</div>
                  <div style={{ fontFamily:'var(--font-sans)', fontSize:'13px', color:'rgba(244,242,234,0.65)', marginTop:'2px' }}>{item.s}</div>
                </div>
              </div>
            ))}
          </div>
        </div>
      </div>

      {/* CONTEXT + STATS */}
      <Section bg="paper" pad="md">
        <div className="city-ctx-grid">
          <div>
            <Eyebrow>Serving {d.city}</Eyebrow>
            <h2 style={{ fontSize:'32px', margin:'0 0 16px' }}>Real relief for {countyLabel} families</h2>
            <p style={{ fontSize:'17px', lineHeight:1.66, color:'var(--ink-700)', margin:'0 0 16px' }}>{d.context}</p>
            {d.economicContext && (
              <p style={{ fontSize:'17px', lineHeight:1.66, color:'var(--ink-700)', margin:'0 0 16px' }}>{d.economicContext}</p>
            )}
            <p style={{ fontSize:'17px', lineHeight:1.66, color:'var(--ink-700)', margin:'0 0 22px' }}>
              Dalton Stanley is a Pikeville native and former Judicial Law Clerk at the U.S. Bankruptcy Court for the Eastern District of Kentucky. That means he understands how judges evaluate cases, what trustees look for, and how to prepare a filing that stands up. He brings that experience to every client across the region, including {d.city}.
            </p>
            <div className="city-stats">
              <Stat value="$0" label="Down to file" sublabel="Chapter 7 bankruptcy" />
              <Stat value="Free" label="Consultation" sublabel="No obligation" />
              <Stat value="12+" label="Counties served" sublabel="Across Eastern KY" />
            </div>
          </div>
          <Card padding="lg" accentTop>
            <div style={{ fontFamily:'var(--font-sans)', fontWeight:700, fontSize:'14px', letterSpacing:'0.06em', textTransform:'uppercase', color:'var(--accent-strong)', marginBottom:'16px' }}>{isRegion ? 'Cities and towns served' : 'Also serving nearby'}</div>
            <div style={{ display:'flex', flexWrap:'wrap', gap:'8px', marginBottom:'20px' }}>
              {(d.nearby || []).map((n)=>(
                <span key={n} style={{ fontFamily:'var(--font-sans)', fontSize:'13.5px', background:'var(--green-50)', border:'1px solid var(--green-200)', borderRadius:'999px', padding:'6px 13px', color:'var(--brand)', fontWeight:500 }}>{n}</span>
              ))}
            </div>
            <div style={{ borderTop:'1px solid var(--border)', paddingTop:'16px', fontSize:'14px', lineHeight:1.55, color:'var(--ink-700)' }}>
              <strong style={{ color:'var(--text-strong)', display:'block', marginBottom:'5px' }}>Jurisdiction</strong>
              {d.courtInfo || d.court}
            </div>
          </Card>
        </div>
      </Section>

      {/* HOW IT WORKS */}
      <Section bg="surface" pad="md">
        <div style={{ textAlign:'center', marginBottom:'36px' }}>
          <Eyebrow>Simple process</Eyebrow>
          <h2 style={{ fontSize:'30px', margin:'0 0 10px' }}>What happens after you call</h2>
          <p style={{ fontSize:'16.5px', color:'var(--ink-700)', maxWidth:'52ch', margin:'0 auto' }}>Four steps from the first conversation to a fresh start. The whole process is designed to be clear, low-stress, and on your schedule.</p>
        </div>
        <div className="city-steps">
          {steps.map((s)=>(
            <Card key={s.n} padding="md" style={{ position:'relative' }}>
              <div style={{ width:'38px', height:'38px', borderRadius:'999px', background:'var(--brand)', color:'var(--gold-300)', display:'flex', alignItems:'center', justifyContent:'center', fontFamily:'var(--font-display)', fontWeight:700, fontSize:'16px', marginBottom:'14px' }}>{s.n}</div>
              <Icon name={s.icon} size={22} color="var(--accent-strong)" />
              <div style={{ fontFamily:'var(--font-display)', fontWeight:600, fontSize:'17px', margin:'10px 0 7px', color:'var(--text-strong)', lineHeight:1.2 }}>{s.t}</div>
              <p style={{ fontSize:'14px', lineHeight:1.58, color:'var(--ink-700)', margin:0 }}>{s.body}</p>
            </Card>
          ))}
        </div>
      </Section>

      {/* CHAPTER CARDS / SERVICES FRAMED */}
      <Section bg="paper" pad="md">
        <div style={{ textAlign:'center', marginBottom:'32px' }}>
          <Eyebrow>Your options</Eyebrow>
          <h2 style={{ fontSize:'30px', margin:'0 0 10px' }}>Chapter 7 or Chapter 13 in {countyLabel}?</h2>
          <p style={{ fontSize:'16.5px', color:'var(--ink-700)', maxWidth:'54ch', margin:'0 auto' }}>Both chapters can give {d.city} residents a path to relief. The right fit depends on your income, assets, and whether you want to keep secured property.</p>
        </div>
        {d.servicesFramed && (
          <p style={{ fontSize:'16.5px', lineHeight:1.66, color:'var(--ink-700)', maxWidth:'760px', margin:'0 auto 32px' }}>{d.servicesFramed}</p>
        )}
        <div className="city-chapters">
          {[
            { tag:'Chapter 7', icon:'sunrise', color:'var(--brand)', sub:'Eliminate most debts fast', points:['Wipes out credit cards, medical bills, and personal loans','Most filers complete the process in a few months','$0 down to begin','Stops creditor calls and wage garnishments immediately'] },
            { tag:'Chapter 13', icon:'calendar-range', color:'var(--gold-700)', sub:'Reorganize and repay', points:['One affordable monthly payment over 3 to 5 years','Stops foreclosure and saves your home','Stops vehicle repossession','Catch up on missed mortgage payments within the plan'] },
          ].map((c)=>(
            <Card key={c.tag} accentTop interactive padding="lg" style={{ display:'flex', flexDirection:'column' }}>
              <div style={{ display:'flex', alignItems:'center', gap:'14px', marginBottom:'14px' }}>
                <div style={{ width:'50px', height:'50px', borderRadius:'var(--radius-md)', background:c.color, color:'var(--gold-300)', display:'flex', alignItems:'center', justifyContent:'center' }}><Icon name={c.icon} size={26} /></div>
                <div>
                  <div style={{ fontFamily:'var(--font-display)', fontSize:'23px', fontWeight:600, color:'var(--text-strong)', lineHeight:1.1 }}>{c.tag}</div>
                  <div style={{ fontFamily:'var(--font-sans)', fontSize:'13px', color:'var(--accent-strong)', fontWeight:600, textTransform:'uppercase', letterSpacing:'0.04em' }}>{c.sub}</div>
                </div>
              </div>
              <ul style={{ listStyle:'none', padding:0, margin:'0 0 20px', display:'flex', flexDirection:'column', gap:'10px' }}>
                {c.points.map((pt)=>(
                  <li key={pt} style={{ display:'flex', alignItems:'flex-start', gap:'10px', fontSize:'15px', color:'var(--ink-700)', lineHeight:1.5 }}>
                    <span style={{ color:'var(--success)', flexShrink:0, marginTop:'1px' }}><Icon name="check" size={17} strokeWidth={2.4} /></span>{pt}
                  </li>
                ))}
              </ul>
              <div style={{ marginTop:'auto' }}>
                <Button variant="outline" onClick={()=>navigate(c.tag==='Chapter 7'?'chapter-7':'chapter-13')} iconRight={<Icon name="arrow-right" size={15} />}>Learn more about {c.tag}</Button>
              </div>
            </Card>
          ))}
        </div>
      </Section>

      {/* FAQ */}
      <Section bg="surface" narrow pad="md">
        <div style={{ textAlign:'center', marginBottom:'28px' }}>
          <Eyebrow>Common questions from {d.city}</Eyebrow>
          <h2 style={{ fontSize:'30px', margin:0 }}>Answers for {countyLabel} residents</h2>
        </div>
        <div style={{ display:'flex', flexDirection:'column', gap:'12px' }}>
          {faqs.map((f,i)=>(
            <div key={i} style={{ background:'var(--paper)', border:'1px solid var(--border)', borderRadius:'var(--radius-md)', boxShadow: openFaq===i?'var(--shadow-md)':'var(--shadow-sm)', overflow:'hidden', transition:'box-shadow var(--dur) var(--ease-out)' }}>
              <button onClick={()=>setOpenFaq(openFaq===i?null:i)} style={{ width:'100%', display:'flex', alignItems:'center', justifyContent:'space-between', gap:'16px', padding:'18px 22px', background:'transparent', border:'none', cursor:'pointer', textAlign:'left', fontFamily:'var(--font-display)', fontSize:'17.5px', fontWeight:600, color:'var(--text-strong)' }}>
                {f.q}
                <span style={{ flexShrink:0, color:'var(--accent-strong)', transform: openFaq===i?'rotate(180deg)':'none', transition:'transform var(--dur) var(--ease-out)' }}><Icon name="chevron-down" size={21} /></span>
              </button>
              <div style={{ maxHeight: openFaq===i?'320px':'0', transition:'max-height var(--dur-slow) var(--ease-out)', overflow:'hidden' }}>
                <p style={{ padding:'0 22px 20px', margin:0, fontSize:'15.5px', lineHeight:1.65, color:'var(--ink-700)' }}>{f.a}</p>
              </div>
            </div>
          ))}
        </div>
      </Section>

      {/* INTERNAL LINKS — full service-area mesh */}
      <Section bg="paper" pad="md">
        <div style={{ textAlign:'center', marginBottom:'24px' }}>
          <Eyebrow>Service areas</Eyebrow>
          <h2 style={{ fontSize:'27px', margin:'0 0 10px' }}>Bankruptcy help across Eastern Kentucky</h2>
          <p style={{ fontSize:'16px', color:'var(--ink-700)', maxWidth:'56ch', margin:'0 auto' }}>We serve families and individuals in communities throughout the region. Find the page for your area:</p>
        </div>
        <div style={{ display:'flex', flexWrap:'wrap', gap:'10px', justifyContent:'center', maxWidth:'840px', margin:'0 auto 28px' }}>
          {CITY_SLUGS.filter((s)=>s!==citySlug).map((s)=>{
            const cd = CITIES_DATA[s];
            const hub = cd.city === cd.county;
            return (
              <a key={s} href={window.hrefFor ? window.hrefFor('city-'+s) : '#'} onClick={(e)=>{e.preventDefault();navigate('city-'+s);}}
                style={{ display:'inline-flex', alignItems:'center', gap:'6px', fontFamily:'var(--font-sans)', fontSize:'14px', fontWeight:600, color: hub?'var(--gold-700)':'var(--brand)', textDecoration:'none', background: hub?'var(--surface)':'var(--green-50)', border:'1px solid '+(hub?'var(--gold-300)':'var(--green-200)'), borderRadius:'999px', padding:'8px 15px' }}>
                <Icon name={hub?'map':'map-pin'} size={13} color="var(--accent-strong)" />
                {hub ? 'All of Eastern Kentucky' : 'Bankruptcy attorney in '+cd.city}
              </a>
            );
          })}
        </div>
        <div style={{ display:'flex', flexWrap:'wrap', gap:'10px', alignItems:'center', justifyContent:'center', fontFamily:'var(--font-sans)', fontSize:'14.5px' }}>
          <span style={{ color:'var(--text-muted)' }}>Learn more:</span>
          <a href={window.hrefFor ? window.hrefFor('types') : '#'} onClick={(e)=>{e.preventDefault();navigate('types');}} style={{ color:'var(--brand)', fontWeight:600, textDecoration:'none' }}>Chapter 7 vs Chapter 13 explained</a>
          <span style={{ color:'var(--border-strong)' }}>·</span>
          <a href={window.hrefFor ? window.hrefFor('faq') : '#'} onClick={(e)=>{e.preventDefault();navigate('faq');}} style={{ color:'var(--brand)', fontWeight:600, textDecoration:'none' }}>Debts FAQ</a>
          <span style={{ color:'var(--border-strong)' }}>·</span>
          <a href={window.hrefFor ? window.hrefFor('blog') : '#'} onClick={(e)=>{e.preventDefault();navigate('blog');}} style={{ color:'var(--brand)', fontWeight:600, textDecoration:'none' }}>Bankruptcy blog</a>
          <span style={{ color:'var(--border-strong)' }}>·</span>
          <a href="/" onClick={(e)=>{e.preventDefault();navigate('home');}} style={{ color:'var(--brand)', fontWeight:600, textDecoration:'none' }}>Home</a>
        </div>
      </Section>

      {/* CTA */}
      <CtaBand navigate={navigate} />
    </main>
  );
}

/* Thin wrapper per city for clean routing */
const makeCityPage = (slug) => ({ navigate }) => <CityPage citySlug={slug} navigate={navigate} />;

const CityPages = {};
CITY_SLUGS.forEach(slug => { CityPages['city-'+slug] = makeCityPage(slug); });

Object.assign(window, { CityPages, CITIES_DATA, CITY_SLUGS });
