import re
import os

html_files = [
    'd:\\iss\\Franciscan Society\\index.html',
    'd:\\iss\\Franciscan Society\\about.html',
    'd:\\iss\\Franciscan Society\\gallery.html'
]

for file_path in html_files:
    if not os.path.exists(file_path):
        continue
        
    with open(file_path, 'r', encoding='utf-8') as f:
        content = f.read()
    
    # 1. Remove overflow: hidden !important; from header
    content = content.replace('overflow: hidden !important;', '')
    
    # 2. Change font-family of the logo title to Phudu
    # The title is the first span in the flex column
    # Current: font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: clamp(1.1rem...
    content = content.replace(
        "font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: clamp(1.1rem, 1.6vw, 1.45rem);",
        "font-family: 'Phudu', sans-serif; font-weight: 700; font-size: clamp(1.1rem, 1.6vw, 1.45rem);"
    )
    
    with open(file_path, 'w', encoding='utf-8') as f:
        f.write(content)
    print(f"Fixed header and logo font in {file_path}")

