import os

page_path = 'src/app/page.tsx'
with open(page_path, 'r') as f:
    page_content = f.read()

# Make the CTA text and button smaller on mobile so they fit side-by-side
page_content = page_content.replace(
    '<h2 className="text-3xl font-black text-white mb-2 break-words">Want to sell your land?</h2>',
    '<h2 className="text-xl md:text-3xl font-black text-white mb-1 md:mb-2 break-words">Want to sell your land?</h2>'
)
page_content = page_content.replace(
    '<p className="text-white/80">Post your property in minutes and reach thousands of verified buyers.</p>',
    '<p className="text-white/80 text-xs md:text-base">Post your property in minutes and reach verified buyers.</p>'
)
page_content = page_content.replace(
    'className="bg-white text-emerald-700 font-black px-8 py-4 rounded-2xl hover:bg-emerald-50 transition-colors shrink-0 text-lg"',
    'className="bg-white text-emerald-700 font-black px-4 py-2 md:px-8 md:py-4 rounded-xl hover:bg-emerald-50 transition-colors shrink-0 text-sm md:text-lg"'
)

with open(page_path, 'w') as f:
    f.write(page_content)

print("CTA adjusted for mobile side-by-side.")
