import re

filepath = r"c:\Users\DHRUMIL GAJJAR\Desktop\FYSY\fysy.html"
with open(filepath, 'r', encoding='utf-8') as f:
    content = f.read()

# 1. Remove REELS CSS
content = re.sub(r'        /\* ===================== REELS SECTION ===================== \*/.*?        /\* ===================== RESPONSIVE ===================== \*/\n        @media \(max-width: 1060px\) {',
                 r'        /* ===================== RESPONSIVE ===================== */\n        @media (max-width: 1060px) {', content, flags=re.DOTALL)

# 2. Remove REELS HTML
content = re.sub(r'        <!-- REELS SECTION -->.*?<!-- CONTACT -->\n        <section class="contact-section section-padding" id="contact">',
                 r'        <!-- CONTACT -->\n        <section class="contact-section section-padding" id="contact">', content, flags=re.DOTALL)

# 3. Remove REELS JS
content = re.sub(r'            }, 7000\);\n\n            /\* ---- REELS INTERACTION ---- \*/.*?        \}\)\(\);\n\n        /\* ---- GLOBAL HELPERS ---- \*/',
                 r'            }, 7000);\n\n        })();\n\n        /* ---- GLOBAL HELPERS ---- */', content, flags=re.DOTALL)

with open(filepath, 'w', encoding='utf-8') as f:
    f.write(content)

print("Reels sections removed.")
