#!/usr/bin/env python3
"""
Fix unclosed tags in Arabic service detail page.
"""

def fix_tags():
    file_path = 'ourServicedetail-ar.html'
    
    with open(file_path, 'r', encoding='utf-8') as f:
        lines = f.readlines()
    
    # Find the line with </main> and add missing closing tags before it
    for i, line in enumerate(lines):
        if '</main>' in line:
            # Insert closing tags before </main>
            lines.insert(i, '        </div>\n')
            lines.insert(i+1, '      </section>\n')
            break
    
    with open(file_path, 'w', encoding='utf-8') as f:
        f.writelines(lines)
    
    print(f"✓ Fixed {file_path}")

if __name__ == '__main__':
    fix_tags()
