import os
import re

# 1. Redesign ministries-pastoral.html
def redesign_pastoral():
    with open('ministries-pastoral.html', 'r', encoding='utf-8') as f:
        c = f.read()

    new_hero = """    <!-- Page Hero -->
    <section style="padding: 11rem 2rem 7rem 2rem; background-image: url('assets/images/new_uploads/ChatGPT_Image_Aug_18_2026_05_51_30_PM.png'); background-size: cover; background-position: center; position: relative; overflow: hidden;">
        <div style="position: absolute; inset: 0; background-color: rgba(12, 11, 10, 0.74);"></div>
        <div style="max-width: 900px; margin: 0 auto; position: relative; z-index: 2; text-align: center;">
            <div style="display: inline-flex; align-items: center; gap: 0.6rem; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); padding: 0.5rem 1.2rem; border-radius: 50px; margin-bottom: 1.5rem; border: 1px solid rgba(255,255,255,0.2);">
                <span style="width: 8px; height: 8px; background-color: #e6c888; border-radius: 50%; display: inline-block;"></span>
                <span style="color: #ffffff; font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-family: 'Instrument Sans', sans-serif;">PARISH &amp; EVANGELIZATION</span>
            </div>
            <h1 style="font-family: 'Phudu', sans-serif; font-size: clamp(2.8rem, 5.2vw, 4.4rem); font-weight: 700; color: #ffffff; text-transform: uppercase; margin: 0 0 1rem 0; letter-spacing: -0.01em;">PASTORAL MINISTRY</h1>
            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.15rem; color: #e7e2d6; max-width: 680px; margin: 0 auto; line-height: 1.6;">
                Proclaiming the Good News through compassionate pastoral care, sacramental life, and faithful service across 15 parishes.
            </p>
        </div>
    </section>"""

    new_content = """        <!-- Key Stats Bar -->
        <section style="background: #FAF7F0; padding: clamp(2rem, 4vw, 3rem) 0; border-bottom: 1px solid #ede7db;">
            <div style="max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem);">
                <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem;">
                    <div style="background: #ffffff; padding: 1.8rem; border-radius: 16px; border: 1px solid rgba(74,42,24,0.08); text-align: center;">
                        <div style="font-family: 'Phudu', sans-serif; font-size: 2.2rem; font-weight: 700; color: #4A2A18; line-height: 1; margin-bottom: 0.3rem;">15</div>
                        <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: #1c1917; text-transform: uppercase;">Parishes Served</div>
                    </div>
                    <div style="background: #ffffff; padding: 1.8rem; border-radius: 16px; border: 1px solid rgba(74,42,24,0.08); text-align: center;">
                        <div style="font-family: 'Phudu', sans-serif; font-size: 2.2rem; font-weight: 700; color: #a8813a; line-height: 1; margin-bottom: 0.3rem;">9</div>
                        <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: #1c1917; text-transform: uppercase;">Dioceses in India</div>
                    </div>
                    <div style="background: #ffffff; padding: 1.8rem; border-radius: 16px; border: 1px solid rgba(74,42,24,0.08); text-align: center;">
                        <div style="font-family: 'Phudu', sans-serif; font-size: 2.2rem; font-weight: 700; color: #4A2A18; line-height: 1; margin-bottom: 0.3rem;">1</div>
                        <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: #1c1917; text-transform: uppercase;">Mission in Germany</div>
                    </div>
                    <div style="background: #ffffff; padding: 1.8rem; border-radius: 16px; border: 1px solid rgba(74,42,24,0.08); text-align: center;">
                        <div style="font-family: 'Phudu', sans-serif; font-size: 2.2rem; font-weight: 700; color: #a8813a; line-height: 1; margin-bottom: 0.3rem;">100%</div>
                        <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: #1c1917; text-transform: uppercase;">Humble Service</div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Main Narrative & Imagery Section -->
        <section style="padding: clamp(3.5rem, 6vw, 5.5rem) 0; background: #FFFFFF; color: #1c1917;">
            <div style="max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem);">
                
                <div style="display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; margin-bottom: clamp(3.5rem, 6vw, 5rem);" class="responsive-ministry-row">
                    <div>
                        <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 PASTORAL MISSION</span>
                        </div>
                        <h2 style="font-family: 'Phudu', sans-serif; font-size: clamp(2rem, 3.2vw, 2.6rem); font-weight: 700; color: #1c1917; text-transform: uppercase; line-height: 1.2; margin: 0 0 1.5rem 0;">
                            HERALDS OF THE GOOD NEWS
                        </h2>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: #57534e; line-height: 1.85; margin-bottom: 1.2rem;">
                            St. Francis gathered brothers around him to become heralds of the Good News. Inspired by this vision, the TOR Franciscans of the Province actively engage in pastoral ministry in parishes. Through this vital service to the Church, the friars dedicate themselves wholeheartedly to the mission of evangelization by their pastoral presence and ministry.
                        </p>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: #57534e; line-height: 1.85; margin-bottom: 1.2rem;">
                            Through their participation in the life and mission of the Church, the friars seek to continue the zeal of St. Francis by inviting the faithful to an ongoing conversion to Gospel values. Their ministry extends beyond the celebration of the sacraments to a compassionate and attentive presence among the people.
                        </p>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: #57534e; line-height: 1.85; margin: 0;">
                            Through family visits, care for the sick and the elderly, pastoral counseling, and sacramental ministry, they strive to plant the seeds of the Gospel in the hearts of those they serve.
                        </p>
                    </div>

                    <div style="position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 45px rgba(74,42,24,0.15); border: 2px solid rgba(230,200,136,0.3);">
                        <img loading="lazy" decoding="async" src="assets/images/gallery/WhatsApp Image 2026-08-07 at 1.39.44 PM.jpeg" alt="Pastoral Mass & Sacramental Life" style="width: 100%; height: 480px; object-fit: cover; display: block;">
                        <div style="position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(12,11,10,0.9)); padding: 1.5rem; color: #ffffff;">
                            <div style="font-family: 'Phudu', sans-serif; font-size: 1.1rem; font-weight: 700; text-transform: uppercase;">Fraternity &amp; Pastoral Care</div>
                            <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.85rem; color: #e6c888;">Bringing Christ’s love and hope to communities</div>
                        </div>
                    </div>
                </div>

                <!-- 4 Core Pillars of Pastoral Care -->
                <div style="margin-bottom: clamp(3.5rem, 6vw, 5rem);">
                    <div style="text-align: center; margin-bottom: 2.8rem;">
                        <h3 style="font-family: 'Phudu', sans-serif; font-size: clamp(1.8rem, 2.8vw, 2.3rem); font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.6rem 0;">
                            KEY FOCUS AREAS
                        </h3>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1rem; color: #78716c; max-width: 550px; margin: 0 auto;">
                            Core dimensions of our pastoral commitment in parishes and rural missions.
                        </p>
                    </div>

                    <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.8rem;">
                        
                        <div style="background: #FAF7F0; padding: 2.2rem 1.8rem; border-radius: 20px; border: 1px solid rgba(74,42,24,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease;" onmouseover="this.style.transform='translateY(-6px)'; this.style.boxShadow='0 15px 35px rgba(74,42,24,0.08)';" onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='none';">
                            <div style="width: 52px; height: 52px; border-radius: 14px; background: #4A2A18; display: flex; align-items: center; justify-content: center; color: #e6c888; margin-bottom: 1.4rem;">
                                <svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2v20M2 12h20"/></svg>
                            </div>
                            <h4 style="font-family: 'Phudu', sans-serif; font-size: 1.25rem; font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.8rem 0;">Sacramental Life</h4>
                            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 0.95rem; color: #57534e; line-height: 1.6; margin: 0;">
                                Celebration of the Eucharist, Baptisms, Reconciliation, and liturgical spiritual guidance for faithful families.
                            </p>
                        </div>

                        <div style="background: #FAF7F0; padding: 2.2rem 1.8rem; border-radius: 20px; border: 1px solid rgba(74,42,24,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease;" onmouseover="this.style.transform='translateY(-6px)'; this.style.boxShadow='0 15px 35px rgba(74,42,24,0.08)';" onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='none';">
                            <div style="width: 52px; height: 52px; border-radius: 14px; background: #4A2A18; display: flex; align-items: center; justify-content: center; color: #e6c888; margin-bottom: 1.4rem;">
                                <svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>
                            </div>
                            <h4 style="font-family: 'Phudu', sans-serif; font-size: 1.25rem; font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.8rem 0;">Care for the Sick</h4>
                            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 0.95rem; color: #57534e; line-height: 1.6; margin: 0;">
                                Pastoral visits to hospitals, homebound elderly, and anointing of the sick with compassionate presence.
                            </p>
                        </div>

                        <div style="background: #FAF7F0; padding: 2.2rem 1.8rem; border-radius: 20px; border: 1px solid rgba(74,42,24,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease;" onmouseover="this.style.transform='translateY(-6px)'; this.style.boxShadow='0 15px 35px rgba(74,42,24,0.08)';" onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='none';">
                            <div style="width: 52px; height: 52px; border-radius: 14px; background: #4A2A18; display: flex; align-items: center; justify-content: center; color: #e6c888; margin-bottom: 1.4rem;">
                                <svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
                            </div>
                            <h4 style="font-family: 'Phudu', sans-serif; font-size: 1.25rem; font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.8rem 0;">Family Visits</h4>
                            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 0.95rem; color: #57534e; line-height: 1.6; margin: 0;">
                                Building deep personal connections with parishioners, blessing homes, and providing pastoral counseling.
                            </p>
                        </div>

                        <div style="background: #FAF7F0; padding: 2.2rem 1.8rem; border-radius: 20px; border: 1px solid rgba(74,42,24,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease;" onmouseover="this.style.transform='translateY(-6px)'; this.style.boxShadow='0 15px 35px rgba(74,42,24,0.08)';" onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='none';">
                            <div style="width: 52px; height: 52px; border-radius: 14px; background: #4A2A18; display: flex; align-items: center; justify-content: center; color: #e6c888; margin-bottom: 1.4rem;">
                                <svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
                            </div>
                            <h4 style="font-family: 'Phudu', sans-serif; font-size: 1.25rem; font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.8rem 0;">Evangelization</h4>
                            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 0.95rem; color: #57534e; line-height: 1.6; margin: 0;">
                                Inviting all to ongoing conversion in Gospel values through faith formation retreats and community missions.
                            </p>
                        </div>

                    </div>
                </div>

                <!-- Dioceses & Parishes Geographic Presence -->
                <div style="background: #FAF7F0; padding: clamp(2.5rem, 5vw, 3.5rem); border-radius: 24px; border: 1px solid rgba(74,42,24,0.1); margin-bottom: clamp(3rem, 5vw, 4.5rem);">
                    <div style="max-width: 800px; margin-bottom: 2rem;">
                        <h3 style="font-family: 'Phudu', sans-serif; font-size: 1.8rem; font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.8rem 0;">
                            DIOCESES &amp; REGIONS SERVED
                        </h3>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.02rem; color: #57534e; line-height: 1.7; margin: 0;">
                            The TOR Franciscans currently minister in 15 parishes across 9 Catholic Dioceses in India and the Archdiocese of Freiburg in Germany:
                        </p>
                    </div>

                    <div style="display: flex; flex-wrap: wrap; gap: 0.8rem;">
                        <span style="background: #ffffff; padding: 0.6rem 1.2rem; border-radius: 30px; font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 0.9rem; color: #4A2A18; border: 1px solid rgba(74,42,24,0.12);">Archdiocese of Ranchi</span>
                        <span style="background: #ffffff; padding: 0.6rem 1.2rem; border-radius: 30px; font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 0.9rem; color: #4A2A18; border: 1px solid rgba(74,42,24,0.12);">Diocese of Khunti</span>
                        <span style="background: #ffffff; padding: 0.6rem 1.2rem; border-radius: 30px; font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 0.9rem; color: #4A2A18; border: 1px solid rgba(74,42,24,0.12);">Diocese of Simdega</span>
                        <span style="background: #ffffff; padding: 0.6rem 1.2rem; border-radius: 30px; font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 0.9rem; color: #4A2A18; border: 1px solid rgba(74,42,24,0.12);">Diocese of Gumla</span>
                        <span style="background: #ffffff; padding: 0.6rem 1.2rem; border-radius: 30px; font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 0.9rem; color: #4A2A18; border: 1px solid rgba(74,42,24,0.12);">Diocese of Rourkela</span>
                        <span style="background: #ffffff; padding: 0.6rem 1.2rem; border-radius: 30px; font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 0.9rem; color: #4A2A18; border: 1px solid rgba(74,42,24,0.12);">Diocese of Purnea</span>
                        <span style="background: #ffffff; padding: 0.6rem 1.2rem; border-radius: 30px; font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 0.9rem; color: #4A2A18; border: 1px solid rgba(74,42,24,0.12);">Diocese of Bagdogra</span>
                        <span style="background: #ffffff; padding: 0.6rem 1.2rem; border-radius: 30px; font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 0.9rem; color: #4A2A18; border: 1px solid rgba(74,42,24,0.12);">Diocese of Jalpaiguri</span>
                        <span style="background: #ffffff; padding: 0.6rem 1.2rem; border-radius: 30px; font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 0.9rem; color: #4A2A18; border: 1px solid rgba(74,42,24,0.12);">Diocese of Bongaigaon</span>
                        <span style="background: #4A2A18; color: #ffffff; padding: 0.6rem 1.2rem; border-radius: 30px; font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 0.9rem;">Archdiocese of Freiburg (Germany)</span>
                    </div>
                </div>

                <!-- Call to Action Banner -->
                <div class="has-vine-watermark" style="position: relative; background: linear-gradient(135deg, #4A2A18, #6b3d28); color: #ffffff; padding: clamp(3rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem); border-radius: 24px; overflow: hidden; box-shadow: 0 15px 35px rgba(74,42,24,0.18);">
                    <img src="assets/images/shapes/vine-corner-watermark.png" class="vine-corner-watermark" alt="" aria-hidden="true" style="opacity: 0.35; filter: brightness(1.6);">
                    <div style="max-width: 700px; position: relative; z-index: 2;">
                        <h3 style="font-family: 'Phudu', sans-serif; font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; color: #ffffff; text-transform: uppercase; margin: 0 0 1rem 0;">
                            SUPPORT OUR PASTORAL APOSTOLATE
                        </h3>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: rgba(255,255,255,0.9); line-height: 1.7; margin: 0 0 1.8rem 0;">
                            If you would like to connect with a Franciscan parish, request pastoral support, or partner in our mission, we welcome your inquiry and prayers.
                        </p>
                        <a href="contact.html#enquiry" class="btn-fill-animation" style="display: inline-flex; align-items: center; gap: 0.6rem; background: #e6c888; color: #1c1917; padding: 0.95rem 2rem; border-radius: 8px; font-family: 'Instrument Sans', sans-serif; font-weight: 800; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none; transition: all 0.3s ease;">
                            <span>CONTACT US TODAY</span>
                            <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg>
                        </a>
                    </div>
                </div>

            </div>
        </section>"""

    main_regex = re.compile(r'<main id="main-content"[^>]*>.*?</main>', re.DOTALL)
    c = main_regex.sub(f'<main id="main-content" style="padding-top: 0; background-color: #FFFFFF;">\n{new_hero}\n{new_content}\n    </main>', c)
    with open('ministries-pastoral.html', 'w', encoding='utf-8') as f:
        f.write(c)
    print("Redesigned ministries-pastoral.html successfully!")

# 2. Redesign ministries-formation.html
def redesign_formation():
    with open('ministries-formation.html', 'r', encoding='utf-8') as f:
        c = f.read()

    new_hero = """    <!-- Page Hero -->
    <section style="padding: 11rem 2rem 7rem 2rem; background-image: url('assets/images/new_uploads/ChatGPT_Image_Aug_18_2026_05_51_30_PM.png'); background-size: cover; background-position: center; position: relative; overflow: hidden;">
        <div style="position: absolute; inset: 0; background-color: rgba(12, 11, 10, 0.74);"></div>
        <div style="max-width: 900px; margin: 0 auto; position: relative; z-index: 2; text-align: center;">
            <div style="display: inline-flex; align-items: center; gap: 0.6rem; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); padding: 0.5rem 1.2rem; border-radius: 50px; margin-bottom: 1.5rem; border: 1px solid rgba(255,255,255,0.2);">
                <span style="width: 8px; height: 8px; background-color: #e6c888; border-radius: 50%; display: inline-block;"></span>
                <span style="color: #ffffff; font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-family: 'Instrument Sans', sans-serif;">CONSECRATION &amp; DISCIPLESHIP</span>
            </div>
            <h1 style="font-family: 'Phudu', sans-serif; font-size: clamp(2.8rem, 5.2vw, 4.4rem); font-weight: 700; color: #ffffff; text-transform: uppercase; margin: 0 0 1rem 0; letter-spacing: -0.01em;">FORMATION MINISTRY</h1>
            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.15rem; color: #e7e2d6; max-width: 680px; margin: 0 auto; line-height: 1.6;">
                Nurturing the Franciscan charism through holistic spiritual, intellectual, human, and pastoral discipleship.
            </p>
        </div>
    </section>"""

    new_content = """        <!-- Key Stats Bar -->
        <section style="background: #FAF7F0; padding: clamp(2rem, 4vw, 3rem) 0; border-bottom: 1px solid #ede7db;">
            <div style="max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem);">
                <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem;">
                    <div style="background: #ffffff; padding: 1.8rem; border-radius: 16px; border: 1px solid rgba(74,42,24,0.08); text-align: center;">
                        <div style="font-family: 'Phudu', sans-serif; font-size: 2.2rem; font-weight: 700; color: #4A2A18; line-height: 1; margin-bottom: 0.3rem;">4</div>
                        <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: #1c1917; text-transform: uppercase;">Formation Houses</div>
                    </div>
                    <div style="background: #ffffff; padding: 1.8rem; border-radius: 16px; border: 1px solid rgba(74,42,24,0.08); text-align: center;">
                        <div style="font-family: 'Phudu', sans-serif; font-size: 2.2rem; font-weight: 700; color: #a8813a; line-height: 1; margin-bottom: 0.3rem;">2</div>
                        <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: #1c1917; text-transform: uppercase;">Minor Seminaries</div>
                    </div>
                    <div style="background: #ffffff; padding: 1.8rem; border-radius: 16px; border: 1px solid rgba(74,42,24,0.08); text-align: center;">
                        <div style="font-family: 'Phudu', sans-serif; font-size: 2.2rem; font-weight: 700; color: #4A2A18; line-height: 1; margin-bottom: 0.3rem;">1</div>
                        <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: #1c1917; text-transform: uppercase;">Novitiate House</div>
                    </div>
                    <div style="background: #ffffff; padding: 1.8rem; border-radius: 16px; border: 1px solid rgba(74,42,24,0.08); text-align: center;">
                        <div style="font-family: 'Phudu', sans-serif; font-size: 2.2rem; font-weight: 700; color: #a8813a; line-height: 1; margin-bottom: 0.3rem;">1</div>
                        <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: #1c1917; text-transform: uppercase;">Clericate House</div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Main Narrative & Imagery Section -->
        <section style="padding: clamp(3.5rem, 6vw, 5.5rem) 0; background: #FFFFFF; color: #1c1917;">
            <div style="max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem);">
                
                <div style="display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; margin-bottom: clamp(3.5rem, 6vw, 5rem);" class="responsive-ministry-row">
                    <div>
                        <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;">THE SACRED JOURNEY</span>
                        </div>
                        <h2 style="font-family: 'Phudu', sans-serif; font-size: clamp(2rem, 3.2vw, 2.6rem); font-weight: 700; color: #1c1917; text-transform: uppercase; line-height: 1.2; margin: 0 0 1.5rem 0;">
                            A LIFELONG PROCESS OF ONGOING CONVERSION
                        </h2>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: #57534e; line-height: 1.85; margin-bottom: 1.2rem;">
                            Formation is the foundational ministry through which the Franciscan TOR charism and spirituality are creatively and faithfully proposed to and shared with successive generations. In accordance with the mind of the Church and the Order, our primary objective is to prepare candidates for the total consecration of themselves to God in the following of Christ.
                        </p>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: #57534e; line-height: 1.85; margin-bottom: 1.2rem;">
                            As Pope John Paul II emphasizes in <em>Vita Consecrata</em>, formation is a dynamic, lifelong process that leads to ongoing conversion and helps individuals discover the signs of God in earthly realities. For this formation to be truly complete, it must be holistic—encompassing and integrating every aspect of Christian life.
                        </p>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: #57534e; line-height: 1.85; margin: 0;">
                            Ultimately, it is a sacred sharing in the work of the Father who, through the Spirit, fashions the inner attitudes of the Son in the hearts of young men.
                        </p>
                    </div>

                    <div style="position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 45px rgba(74,42,24,0.15); border: 2px solid rgba(230,200,136,0.3);">
                        <img loading="lazy" decoding="async" src="assets/images/gallery/WhatsApp Image 2025-09-17 at 11.30.25 AM (1).jpeg" alt="Seminarians in Prayer and Formation" style="width: 100%; height: 480px; object-fit: cover; display: block;">
                        <div style="position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(12,11,10,0.9)); padding: 1.5rem; color: #ffffff;">
                            <div style="font-family: 'Phudu', sans-serif; font-size: 1.1rem; font-weight: 700; text-transform: uppercase;">Discipleship in Community</div>
                            <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.85rem; color: #e6c888;">Forming joyful, committed religious brothers</div>
                        </div>
                    </div>
                </div>

                <!-- 4 Stages of Formation Timeline -->
                <div style="margin-bottom: clamp(3.5rem, 6vw, 5rem);">
                    <div style="text-align: center; margin-bottom: 2.8rem;">
                        <h3 style="font-family: 'Phudu', sans-serif; font-size: clamp(1.8rem, 2.8vw, 2.3rem); font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.6rem 0;">
                            OUR FORMATION HOUSES &amp; STAGES
                        </h3>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1rem; color: #78716c; max-width: 600px; margin: 0 auto;">
                            A structured path guiding candidates from initial discernment to solemn religious profession.
                        </p>
                    </div>

                    <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.8rem;">
                        
                        <!-- Stage 1 -->
                        <div style="background: #FAF7F0; padding: 2.2rem 1.8rem; border-radius: 20px; border: 1px solid rgba(74,42,24,0.08);">
                            <div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem;">
                                <span style="font-family: 'Phudu', sans-serif; font-size: 2rem; font-weight: 800; color: #a8813a;">01</span>
                                <span style="background: rgba(74,42,24,0.08); color: #4A2A18; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; padding: 0.35rem 0.8rem; border-radius: 20px;">Dorma, Khunti</span>
                            </div>
                            <h4 style="font-family: 'Phudu', sans-serif; font-size: 1.25rem; font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.8rem 0;">Minor Seminary (Dorma)</h4>
                            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 0.95rem; color: #57534e; line-height: 1.6; margin: 0;">
                                Initial discernment, foundational Christian education, discipline, and introduction to Franciscan communal fraternity.
                            </p>
                        </div>

                        <!-- Stage 2 -->
                        <div style="background: #FAF7F0; padding: 2.2rem 1.8rem; border-radius: 20px; border: 1px solid rgba(74,42,24,0.08);">
                            <div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem;">
                                <span style="font-family: 'Phudu', sans-serif; font-size: 2rem; font-weight: 800; color: #a8813a;">02</span>
                                <span style="background: rgba(74,42,24,0.08); color: #4A2A18; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; padding: 0.35rem 0.8rem; border-radius: 20px;">Ranchi</span>
                            </div>
                            <h4 style="font-family: 'Phudu', sans-serif; font-size: 1.25rem; font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.8rem 0;">Minor Seminary (Ranchi)</h4>
                            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 0.95rem; color: #57534e; line-height: 1.6; margin: 0;">
                                Academic preparation, spiritual deepening, language skills, and mature human development for young aspirants.
                            </p>
                        </div>

                        <!-- Stage 3 -->
                        <div style="background: #FAF7F0; padding: 2.2rem 1.8rem; border-radius: 20px; border: 1px solid rgba(74,42,24,0.08);">
                            <div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem;">
                                <span style="font-family: 'Phudu', sans-serif; font-size: 2rem; font-weight: 800; color: #a8813a;">03</span>
                                <span style="background: rgba(74,42,24,0.08); color: #4A2A18; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; padding: 0.35rem 0.8rem; border-radius: 20px;">Bichna, Khunti</span>
                            </div>
                            <h4 style="font-family: 'Phudu', sans-serif; font-size: 1.25rem; font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.8rem 0;">Novitiate House</h4>
                            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 0.95rem; color: #57534e; line-height: 1.6; margin: 0;">
                                Intense year of contemplation, study of the Third Order Regular Rule, vows of poverty, chastity, and obedience.
                            </p>
                        </div>

                        <!-- Stage 4 -->
                        <div style="background: #FAF7F0; padding: 2.2rem 1.8rem; border-radius: 20px; border: 1px solid rgba(74,42,24,0.08);">
                            <div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem;">
                                <span style="font-family: 'Phudu', sans-serif; font-size: 2rem; font-weight: 800; color: #a8813a;">04</span>
                                <span style="background: rgba(74,42,24,0.08); color: #4A2A18; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; padding: 0.35rem 0.8rem; border-radius: 20px;">Purulia Road</span>
                            </div>
                            <h4 style="font-family: 'Phudu', sans-serif; font-size: 1.25rem; font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.8rem 0;">The Clericate House</h4>
                            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 0.95rem; color: #57534e; line-height: 1.6; margin: 0;">
                                Philosophical and theological higher studies, pastoral integration, and preparation for solemn profession and holy orders.
                            </p>
                        </div>

                    </div>
                </div>

                <!-- Call to Action Banner -->
                <div class="has-vine-watermark" style="position: relative; background: linear-gradient(135deg, #4A2A18, #6b3d28); color: #ffffff; padding: clamp(3rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem); border-radius: 24px; overflow: hidden; box-shadow: 0 15px 35px rgba(74,42,24,0.18);">
                    <img src="assets/images/shapes/vine-corner-watermark.png" class="vine-corner-watermark" alt="" aria-hidden="true" style="opacity: 0.35; filter: brightness(1.6);">
                    <div style="max-width: 700px; position: relative; z-index: 2;">
                        <h3 style="font-family: 'Phudu', sans-serif; font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; color: #ffffff; text-transform: uppercase; margin: 0 0 1rem 0;">
                            CALLED TO THE FRANCISCAN LIFE?
                        </h3>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: rgba(255,255,255,0.9); line-height: 1.7; margin: 0 0 1.8rem 0;">
                            If you are discerning a religious vocation or wish to learn more about joining the Franciscan Friars of the Third Order Regular, our vocation directors are here to accompany you.
                        </p>
                        <a href="contact.html#enquiry" class="btn-fill-animation" style="display: inline-flex; align-items: center; gap: 0.6rem; background: #e6c888; color: #1c1917; padding: 0.95rem 2rem; border-radius: 8px; font-family: 'Instrument Sans', sans-serif; font-weight: 800; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none; transition: all 0.3s ease;">
                            <span>DISCERN YOUR VOCATION</span>
                            <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg>
                        </a>
                    </div>
                </div>

            </div>
        </section>"""

    main_regex = re.compile(r'<main id="main-content"[^>]*>.*?</main>', re.DOTALL)
    c = main_regex.sub(f'<main id="main-content" style="padding-top: 0; background-color: #FFFFFF;">\n{new_hero}\n{new_content}\n    </main>', c)
    with open('ministries-formation.html', 'w', encoding='utf-8') as f:
        f.write(c)
    print("Redesigned ministries-formation.html successfully!")

# 3. Redesign ministries-education.html
def redesign_education():
    with open('ministries-education.html', 'r', encoding='utf-8') as f:
        c = f.read()

    new_hero = """    <!-- Page Hero -->
    <section style="padding: 11rem 2rem 7rem 2rem; background-image: url('assets/images/new_uploads/ChatGPT_Image_Aug_18_2026_05_51_30_PM.png'); background-size: cover; background-position: center; position: relative; overflow: hidden;">
        <div style="position: absolute; inset: 0; background-color: rgba(12, 11, 10, 0.74);"></div>
        <div style="max-width: 900px; margin: 0 auto; position: relative; z-index: 2; text-align: center;">
            <div style="display: inline-flex; align-items: center; gap: 0.6rem; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); padding: 0.5rem 1.2rem; border-radius: 50px; margin-bottom: 1.5rem; border: 1px solid rgba(255,255,255,0.2);">
                <span style="width: 8px; height: 8px; background-color: #e6c888; border-radius: 50%; display: inline-block;"></span>
                <span style="color: #ffffff; font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-family: 'Instrument Sans', sans-serif;">ACADEMIC EXCELLENCE &amp; CHARACTER</span>
            </div>
            <h1 style="font-family: 'Phudu', sans-serif; font-size: clamp(2.8rem, 5.2vw, 4.4rem); font-weight: 700; color: #ffffff; text-transform: uppercase; margin: 0 0 1rem 0; letter-spacing: -0.01em;">EDUCATION MINISTRY</h1>
            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.15rem; color: #e7e2d6; max-width: 680px; margin: 0 auto; line-height: 1.6;">
                Nurturing 20,000+ students across 22 institutions with values of peace, joy, equality, and holistic human excellence.
            </p>
        </div>
    </section>"""

    new_content = """        <!-- Key Stats Bar -->
        <section style="background: #FAF7F0; padding: clamp(2rem, 4vw, 3rem) 0; border-bottom: 1px solid #ede7db;">
            <div style="max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem);">
                <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem;">
                    <div style="background: #ffffff; padding: 1.8rem; border-radius: 16px; border: 1px solid rgba(74,42,24,0.08); text-align: center;">
                        <div style="font-family: 'Phudu', sans-serif; font-size: 2.2rem; font-weight: 700; color: #4A2A18; line-height: 1; margin-bottom: 0.3rem;">20,000+</div>
                        <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: #1c1917; text-transform: uppercase;">Students Educated</div>
                    </div>
                    <div style="background: #ffffff; padding: 1.8rem; border-radius: 16px; border: 1px solid rgba(74,42,24,0.08); text-align: center;">
                        <div style="font-family: 'Phudu', sans-serif; font-size: 2.2rem; font-weight: 700; color: #a8813a; line-height: 1; margin-bottom: 0.3rem;">22</div>
                        <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: #1c1917; text-transform: uppercase;">Total Institutions</div>
                    </div>
                    <div style="background: #ffffff; padding: 1.8rem; border-radius: 16px; border: 1px solid rgba(74,42,24,0.08); text-align: center;">
                        <div style="font-family: 'Phudu', sans-serif; font-size: 2.2rem; font-weight: 700; color: #4A2A18; line-height: 1; margin-bottom: 0.3rem;">3</div>
                        <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: #1c1917; text-transform: uppercase;">States Covered</div>
                    </div>
                    <div style="background: #ffffff; padding: 1.8rem; border-radius: 16px; border: 1px solid rgba(74,42,24,0.08); text-align: center;">
                        <div style="font-family: 'Phudu', sans-serif; font-size: 2.2rem; font-weight: 700; color: #a8813a; line-height: 1; margin-bottom: 0.3rem;">6</div>
                        <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: #1c1917; text-transform: uppercase;">English ICSE/CBSE</div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Main Narrative & Imagery Section -->
        <section style="padding: clamp(3.5rem, 6vw, 5.5rem) 0; background: #FFFFFF; color: #1c1917;">
            <div style="max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem);">
                
                <div style="display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; margin-bottom: clamp(3.5rem, 6vw, 5rem);" class="responsive-ministry-row">
                    <div>
                        <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;">PEACE &amp; JOY TO THE WORLD</span>
                        </div>
                        <h2 style="font-family: 'Phudu', sans-serif; font-size: clamp(2rem, 3.2vw, 2.6rem); font-weight: 700; color: #1c1917; text-transform: uppercase; line-height: 1.2; margin: 0 0 1.5rem 0;">
                            HOLISTIC FORMATION OF THE HUMAN PERSON
                        </h2>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: #57534e; line-height: 1.85; margin-bottom: 1.2rem;">
                            Education is one of the principal ministries of St. Francis Province, Ranchi. Inspired by the vision of St. Francis of Assisi and the educational mission of the Catholic Church, the Province is committed to forming young people who are intellectually competent, morally upright, spiritually grounded, and socially responsible.
                        </p>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: #57534e; line-height: 1.85; margin-bottom: 1.2rem;">
                            Guided by the motto, <em>“Peace and Joy to the World,”</em> our schools promote God’s love among all people and foster values of equality, justice, peace, and human dignity, irrespective of caste, creed, religion, language, or social status.
                        </p>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: #57534e; line-height: 1.85; margin: 0;">
                            By helping young people discover and develop their God-given talents, the institutions prepare them to face life’s challenges with confidence, integrity, and social responsibility.
                        </p>
                    </div>

                    <div style="position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 45px rgba(74,42,24,0.15); border: 2px solid rgba(230,200,136,0.3);">
                        <img loading="lazy" decoding="async" src="assets/images/gallery/WhatsApp Image 2026-08-07 at 8.39.44 AM (1).jpeg" alt="School Students and Education Ministry" style="width: 100%; height: 480px; object-fit: cover; display: block;">
                        <div style="position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(12,11,10,0.9)); padding: 1.5rem; color: #ffffff;">
                            <div style="font-family: 'Phudu', sans-serif; font-size: 1.1rem; font-weight: 700; text-transform: uppercase;">Empowering Future Leaders</div>
                            <div style="font-family: 'Instrument Sans', sans-serif; font-size: 0.85rem; color: #e6c888;">Inclusive quality education for all communities</div>
                        </div>
                    </div>
                </div>

                <!-- 3 Academic Institutional Categories -->
                <div style="margin-bottom: clamp(3.5rem, 6vw, 5rem);">
                    <div style="text-align: center; margin-bottom: 2.8rem;">
                        <h3 style="font-family: 'Phudu', sans-serif; font-size: clamp(1.8rem, 2.8vw, 2.3rem); font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.6rem 0;">
                            OUR EDUCATIONAL FRAMEWORK
                        </h3>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1rem; color: #78716c; max-width: 600px; margin: 0 auto;">
                            Comprehensive network of schools across Jharkhand, Bihar, and West Bengal.
                        </p>
                    </div>

                    <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.8rem;">
                        
                        <!-- Category 1 -->
                        <div style="background: #FAF7F0; padding: 2.2rem 1.8rem; border-radius: 20px; border: 1px solid rgba(74,42,24,0.08);">
                            <div style="width: 48px; height: 48px; border-radius: 12px; background: #4A2A18; display: flex; align-items: center; justify-content: center; color: #e6c888; margin-bottom: 1.4rem;">
                                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/></svg>
                            </div>
                            <h4 style="font-family: 'Phudu', sans-serif; font-size: 1.25rem; font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.8rem 0;">6 English-Medium Schools</h4>
                            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 0.95rem; color: #57534e; line-height: 1.6; margin-bottom: 1rem;">
                                Four affiliated with the CISCE (ICSE/ISC), one with the CBSE board, and one advancing through affiliation, delivering premier national curriculum education.
                            </p>
                            <span style="display: inline-block; background: rgba(74,42,24,0.08); color: #4A2A18; font-size: 0.8rem; font-weight: 700; padding: 0.3rem 0.8rem; border-radius: 20px;">CISCE &amp; CBSE Affiliated</span>
                        </div>

                        <!-- Category 2 -->
                        <div style="background: #FAF7F0; padding: 2.2rem 1.8rem; border-radius: 20px; border: 1px solid rgba(74,42,24,0.08);">
                            <div style="width: 48px; height: 48px; border-radius: 12px; background: #4A2A18; display: flex; align-items: center; justify-content: center; color: #e6c888; margin-bottom: 1.4rem;">
                                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 10v6M2 10l10-5 10 5-10 5z"/><path d="M6 12v5c3 3 9 3 12 0v-5"/></svg>
                            </div>
                            <h4 style="font-family: 'Phudu', sans-serif; font-size: 1.25rem; font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.8rem 0;">5 Hindi High Schools</h4>
                            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 0.95rem; color: #57534e; line-height: 1.6; margin-bottom: 1rem;">
                                Affiliated with respective state education boards, catering to regional students with rigorous secondary education and moral foundation.
                            </p>
                            <span style="display: inline-block; background: rgba(74,42,24,0.08); color: #4A2A18; font-size: 0.8rem; font-weight: 700; padding: 0.3rem 0.8rem; border-radius: 20px;">State Board High Schools</span>
                        </div>

                        <!-- Category 3 -->
                        <div style="background: #FAF7F0; padding: 2.2rem 1.8rem; border-radius: 20px; border: 1px solid rgba(74,42,24,0.08);">
                            <div style="width: 48px; height: 48px; border-radius: 12px; background: #4A2A18; display: flex; align-items: center; justify-content: center; color: #e6c888; margin-bottom: 1.4rem;">
                                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 8v8M8 12h8"/></svg>
                            </div>
                            <h4 style="font-family: 'Phudu', sans-serif; font-size: 1.25rem; font-weight: 700; color: #1c1917; text-transform: uppercase; margin: 0 0 0.8rem 0;">11 Middle Schools</h4>
                            <p style="font-family: 'Instrument Sans', sans-serif; font-size: 0.95rem; color: #57534e; line-height: 1.6; margin-bottom: 1rem;">
                                Rural and semi-urban foundational middle schools offering essential literacy, values, character building, and sports.
                            </p>
                            <span style="display: inline-block; background: rgba(74,42,24,0.08); color: #4A2A18; font-size: 0.8rem; font-weight: 700; padding: 0.3rem 0.8rem; border-radius: 20px;">11 Regional Middle Schools</span>
                        </div>

                    </div>
                </div>

                <!-- Call to Action Banner -->
                <div class="has-vine-watermark" style="position: relative; background: linear-gradient(135deg, #4A2A18, #6b3d28); color: #ffffff; padding: clamp(3rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem); border-radius: 24px; overflow: hidden; box-shadow: 0 15px 35px rgba(74,42,24,0.18);">
                    <img src="assets/images/shapes/vine-corner-watermark.png" class="vine-corner-watermark" alt="" aria-hidden="true" style="opacity: 0.35; filter: brightness(1.6);">
                    <div style="max-width: 700px; position: relative; z-index: 2;">
                        <h3 style="font-family: 'Phudu', sans-serif; font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; color: #ffffff; text-transform: uppercase; margin: 0 0 1rem 0;">
                            PARTNER IN OUR EDUCATIONAL MISSION
                        </h3>
                        <p style="font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: rgba(255,255,255,0.9); line-height: 1.7; margin: 0 0 1.8rem 0;">
                            Support student scholarships, school infrastructure development, or academic initiatives across our educational institutions.
                        </p>
                        <a href="contact.html#enquiry" class="btn-fill-animation" style="display: inline-flex; align-items: center; gap: 0.6rem; background: #e6c888; color: #1c1917; padding: 0.95rem 2rem; border-radius: 8px; font-family: 'Instrument Sans', sans-serif; font-weight: 800; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none; transition: all 0.3s ease;">
                            <span>CONNECT WITH OUR SCHOOLS</span>
                            <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg>
                        </a>
                    </div>
                </div>

            </div>
        </section>"""

    main_regex = re.compile(r'<main id="main-content"[^>]*>.*?</main>', re.DOTALL)
    c = main_regex.sub(f'<main id="main-content" style="padding-top: 0; background-color: #FFFFFF;">\n{new_hero}\n{new_content}\n    </main>', c)
    with open('ministries-education.html', 'w', encoding='utf-8') as f:
        f.write(c)
    print("Redesigned ministries-education.html successfully!")

redesign_pastoral()
redesign_formation()
redesign_education()
