import os

# Update Formation
with open('ministries-formation.html', 'r', encoding='utf-8') as f:
    fc = f.read()

fc = fc.replace("""                    <div style="display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem;">
                        <span style="width: 6px; height: 6px; background-color: #4A2A18; border-radius: 50%;"></span>
                        <span style="color: #4A2A18; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; font-family: 'Instrument Sans', sans-serif;">OUR MINISTRIES</span>
                    </div>""", "")

with open('ministries-formation.html', 'w', encoding='utf-8') as f:
    f.write(fc)

# Update Education
with open('ministries-education.html', 'r', encoding='utf-8') as f:
    ec = f.read()

ec = ec.replace("""                    <div style="display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem;">
                        <span style="width: 6px; height: 6px; background-color: #4A2A18; border-radius: 50%;"></span>
                        <span style="color: #4A2A18; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; font-family: 'Instrument Sans', sans-serif;">OUR MINISTRIES</span>
                    </div>""", "")

with open('ministries-education.html', 'w', encoding='utf-8') as f:
    f.write(ec)

print("Removed redundant 'OUR MINISTRIES' pill tags from Formation and Education as well!")
