import os
import re

files = [
    'artist-celebrity.html',
    'av-solutions.html',
    'branding-marketing.html',
    'drone-shoot.html',
    'reels.html',
    'web-development.html'
]

base_path = r'c:\Users\DHRUMIL GAJJAR\Desktop\FYSY'

for filename in files:
    path = os.path.join(base_path, filename)
    if not os.path.exists(path):
        continue
        
    with open(path, 'r', encoding='utf-8') as f:
        content = f.read()
    
    # Wrap nav...footer in site-frame-wrapper
    # Find <nav class="navbar"
    # Find </footer>
    
    if '<div class="site-frame-wrapper">' not in content:
        # Insert <div class="site-frame-wrapper"> before <nav class="navbar"
        content = content.replace('<nav class="navbar"', '<div class="site-frame-wrapper">\n    <nav class="navbar"')
        # Insert </div> after </footer>
        content = content.replace('</footer>', '</footer>\n    </div>')
        
        with open(path, 'w', encoding='utf-8') as f:
            f.write(content)
        print(f"Processed {filename}")
    else:
        print(f"Skipped {filename} (already processed)")
