import re

file_path = r'c:\MyCode\MyLaravel\tatabatubelitung\resources\views\home.blade.php'

with open(file_path, 'r', encoding='utf-8') as f:
    content = f.read()

# 1. Update Experiences Accordion wrapper to contain within max-w-7xl
old_exp_target = '        <!-- FULL-WIDTH ACCORDION STRIPS -->\n        <div class="flex h-[520px] sm:h-[580px] md:h-[640px]" x-data="{ active: null }">'
new_exp_target = '        <!-- CONTAINED ACCORDION STRIPS -->\n        <div class="max-w-7xl mx-auto px-6 md:px-16">\n            <div class="flex h-[520px] sm:h-[580px] md:h-[640px] rounded-2xl overflow-hidden shadow-2xl border border-[#c9a96e]/20" x-data="{ active: null }">'

if old_exp_target in content:
    content = content.replace(old_exp_target, new_exp_target)
    print("Found and replaced old_exp_target")
else:
    print("WARNING: old_exp_target not found!")

# Now add closing div for experiences container
old_exp_close = '''                </div>
            </div>

        </div>
    </section>'''

new_exp_close = '''                </div>
            </div>

        </div>
        </div>
    </section>'''

if old_exp_close in content:
    content = content.replace(old_exp_close, new_exp_close)
    print("Found and replaced old_exp_close")
else:
    print("WARNING: old_exp_close not found!")

# 2. Redesign Footer Section
old_footer = '''    <!-- =============================== -->
    <!-- FOOTER                           -->
    <!-- =============================== -->
    <footer style="background-color: #0b1d3a !important; color: #ffffff !important;" class="text-white pt-20 pb-10 px-8 md:px-16">
        <div class="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-4 gap-12 mb-16">
            <div class="md:col-span-1 space-y-4">
                <img src="/assets/images/Logo-RPB.png" alt="Logo RPB" class="h-12 w-auto brightness-0 invert">
                <h3 style="font-family: \'Cormorant Garamond\', serif;" class="text-2xl text-[#c9a96e]">Tatabatu Belitung Resort</h3>
                <p class="text-xs text-slate-200 leading-relaxed font-light">A sanctuary of refined luxury where turquoise waves touch pristine granite coastline in Belitung, Indonesia.</p>
            </div>
            <div class="space-y-3">
                <h4 class="text-[11px] tracking-[0.25em] font-semibold uppercase text-[#c9a96e]">Navigation</h4>
                <ul class="space-y-2 text-xs font-light">
                    <li><a href="#about" class="text-slate-200 hover:text-[#c9a96e] transition-colors">About Us</a></li>
                    <li><a href="#offers" class="text-slate-200 hover:text-[#c9a96e] transition-colors">Special Offers</a></li>
                    <li><a href="{{ route(\'rooms.index\') }}" class="text-slate-200 hover:text-[#c9a96e] transition-colors">Suites & Accommodations</a></li>
                    <li><a href="#dining" class="text-slate-200 hover:text-[#c9a96e] transition-colors">Dining & Culinary</a></li>
                    <li><a href="{{ route(\'wedding.index\') }}" class="text-slate-200 hover:text-[#c9a96e] transition-colors">Weddings & Celebrations</a></li>
                </ul>
            </div>
            <div class="space-y-3">
                <h4 class="text-[11px] tracking-[0.25em] font-semibold uppercase text-[#c9a96e]">Guest Experiences</h4>
                <ul class="space-y-2 text-xs font-light">
                    <li><a href="#destination" class="text-slate-200 hover:text-[#c9a96e] transition-colors">Belitung Destinations</a></li>
                    <li><a href="#wellness" class="text-slate-200 hover:text-[#c9a96e] transition-colors">Wellness & Serenity Spa</a></li>
                    <li><a href="#facilities" class="text-slate-200 hover:text-[#c9a96e] transition-colors">Property Facilities</a></li>
                    <li><a href="#experiences" class="text-slate-200 hover:text-[#c9a96e] transition-colors">Island Excursions</a></li>
                </ul>
            </div>
            <div class="space-y-3">
                <h4 class="text-[11px] tracking-[0.25em] font-semibold uppercase text-[#c9a96e]">Contact Us</h4>
                <p class="text-xs text-slate-200 leading-relaxed font-light">Tanjung Binga, Sijuk,<br>Belitung Regency, Bangka Belitung,<br>Indonesia</p>
                <p class="text-xs text-slate-200 font-light"><span class="text-[#c9a96e] font-semibold">T:</span> +62 (719) 888 999<br><span class="text-[#c9a96e] font-semibold">E:</span> reservations@tatabatubelitung.com</p>
            </div>
        </div>
        <div class="max-w-7xl mx-auto border-t border-white/15 pt-8 flex flex-col md:flex-row items-center justify-between text-[11px] text-slate-300 tracking-wider font-light">
            <p>&copy; {{ date(\'Y\') }} Tatabatu Belitung. All rights reserved.</p>
            <div class="flex space-x-6 mt-4 md:mt-0">
                <a href="#" class="text-slate-300 hover:text-[#c9a96e] transition-colors">Privacy Policy</a>
                <a href="#" class="text-slate-300 hover:text-[#c9a96e] transition-colors">Terms of Service</a>
                <a href="#" class="text-slate-300 hover:text-[#c9a96e] transition-colors">Instagram</a>
                <a href="#" class="text-slate-300 hover:text-[#c9a96e] transition-colors">Facebook</a>
            </div>
        </div>
    </footer>'''

new_footer = '''    <!-- =============================== -->
    <!-- FOOTER                           -->
    <!-- =============================== -->
    <footer style="background-color: #071224 !important; color: #ffffff !important;" class="relative text-white pt-24 pb-12 overflow-hidden">
        
        <!-- Decorative Ambient Glow & Top Border Line -->
        <div class="absolute top-0 left-0 right-0 h-[1px] bg-gradient-to-r from-transparent via-[#c9a96e]/60 to-transparent"></div>
        <div class="absolute -top-32 left-1/2 -translate-x-1/2 w-3/4 h-32 bg-[#c9a96e]/10 blur-3xl pointer-events-none rounded-full"></div>

        <div class="max-w-7xl mx-auto px-6 md:px-16 relative z-10">

            <!-- PRE-FOOTER VIP NEWSLETTER / RESERVATION BANNER -->
            <div class="bg-gradient-to-r from-[#0b1d3a] via-[#0f274c] to-[#0b1d3a] border border-[#c9a96e]/30 rounded-3xl p-8 md:p-12 mb-20 shadow-2xl relative overflow-hidden">
                <div class="absolute right-0 top-0 bottom-0 w-1/3 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-[#c9a96e]/15 via-transparent to-transparent pointer-events-none"></div>
                <div class="grid grid-cols-1 lg:grid-cols-12 gap-8 items-center relative z-10">
                    <div class="lg:col-span-7 space-y-3">
                        <span class="text-[#c9a96e] text-[10px] tracking-[0.35em] uppercase font-semibold block">Exclusive Journal</span>
                        <h3 style="font-family: \'Cormorant Garamond\', Georgia, serif;" class="text-3xl md:text-4xl text-white font-light leading-tight">
                            Subscribe to Tatabatu Reflections
                        </h3>
                        <p class="text-slate-300 text-xs md:text-sm font-light leading-relaxed max-w-xl">
                            Receive curated seasonal offers, private island expedition notes, and VIP dining invitations directly in your inbox.
                        </p>
                    </div>
                    <div class="lg:col-span-5">
                        <form onsubmit="event.preventDefault(); alert('Thank you for subscribing to Tatabatu Reflections.');" class="flex flex-col sm:flex-row gap-3">
                            <input type="email" required placeholder="Enter your email address..." class="flex-1 bg-white/10 border border-white/20 rounded-full px-5 py-3.5 text-xs text-white placeholder-slate-400 focus:outline-none focus:border-[#c9a96e] focus:ring-1 focus:ring-[#c9a96e] transition-all">
                            <button type="submit" class="bg-[#c9a96e] hover:bg-[#b8975c] text-[#0b1d3a] font-semibold text-xs tracking-widest uppercase px-7 py-3.5 rounded-full transition-all duration-300 shadow-lg hover:shadow-[#c9a96e]/20 flex-none text-center">
                                Join Journal
                            </button>
                        </form>
                        <p class="text-[10px] text-slate-400 font-light mt-2.5 text-center sm:text-left">By subscribing, you agree to our Privacy Policy. Unsubscribe anytime.</p>
                    </div>
                </div>
            </div>

            <!-- MAIN FOOTER CONTENT GRID -->
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-12 gap-12 pb-16 border-b border-white/10">
                
                <!-- BRAND & PHILOSOPHY (4 cols) -->
                <div class="lg:col-span-4 space-y-6">
                    <div class="flex items-center gap-3">
                        <img src="/assets/images/Logo-RPB.png" alt="Logo Tatabatu Belitung" class="h-12 w-auto brightness-0 invert">
                        <div>
                            <h3 style="font-family: \'Cormorant Garamond\', serif;" class="text-2xl text-[#c9a96e] leading-none tracking-wide">Tatabatu</h3>
                            <span class="text-[9px] tracking-[0.35em] text-white/70 uppercase font-light block mt-1">Belitung Resort</span>
                        </div>
                    </div>
                    <p class="text-xs text-slate-300 leading-relaxed font-light pr-4">
                        A sanctuary of refined luxury nestled along Belitung's pristine granite shores. Unwind amidst turquoise waters, world-class culinary art, and untouched natural serenity.
                    </p>

                    <!-- Social Icons -->
                    <div class="pt-2">
                        <span class="text-[10px] tracking-[0.25em] font-semibold uppercase text-[#c9a96e] block mb-3">Connect With Us</span>
                        <div class="flex items-center space-x-3">
                            <!-- Instagram -->
                            <a href="#" aria-label="Instagram" class="w-9 h-9 rounded-full bg-white/5 border border-white/10 flex items-center justify-center text-slate-300 hover:text-[#c9a96e] hover:border-[#c9a96e] hover:bg-white/10 transition-all duration-300">
                                <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24"><path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"/></svg>
                            </a>
                            <!-- Facebook -->
                            <a href="#" aria-label="Facebook" class="w-9 h-9 rounded-full bg-white/5 border border-white/10 flex items-center justify-center text-slate-300 hover:text-[#c9a96e] hover:border-[#c9a96e] hover:bg-white/10 transition-all duration-300">
                                <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24"><path d="M9 8H6v4h3v12h5V12h3.642L18 8h-4V6.333C14 5.374 14.5 5 15.5 5H18V0h-3.808C10.592 0 9 1.583 9 4.615V8z"/></svg>
                            </a>
                            <!-- TripAdvisor -->
                            <a href="#" aria-label="TripAdvisor" class="w-9 h-9 rounded-full bg-white/5 border border-white/10 flex items-center justify-center text-slate-300 hover:text-[#c9a96e] hover:border-[#c9a96e] hover:bg-white/10 transition-all duration-300">
                                <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24"><path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-3.5 14c-1.38 0-2.5-1.12-2.5-2.5S7.12 11 8.5 11s2.5 1.12 2.5 2.5S9.88 16 8.5 16zm7 0c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></svg>
                            </a>
                            <!-- YouTube -->
                            <a href="#" aria-label="YouTube" class="w-9 h-9 rounded-full bg-white/5 border border-white/10 flex items-center justify-center text-slate-300 hover:text-[#c9a96e] hover:border-[#c9a96e] hover:bg-white/10 transition-all duration-300">
                                <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24"><path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/></svg>
                            </a>
                        </div>
                    </div>
                </div>

                <!-- NAVIGATION (2 cols) -->
                <div class="lg:col-span-2 space-y-4">
                    <h4 class="text-[11px] tracking-[0.25em] font-semibold uppercase text-[#c9a96e]">Explore Resort</h4>
                    <ul class="space-y-2.5 text-xs font-light">
                        <li><a href="#about" class="text-slate-300 hover:text-[#c9a96e] transition-colors flex items-center gap-1.5"><span class="w-1 h-1 rounded-full bg-[#c9a96e]/60"></span> About Our Story</a></li>
                        <li><a href="{{ route(\'rooms.index\') }}" class="text-slate-300 hover:text-[#c9a96e] transition-colors flex items-center gap-1.5"><span class="w-1 h-1 rounded-full bg-[#c9a96e]/60"></span> Ocean Villas &amp; Suites</a></li>
                        <li><a href="#dining" class="text-slate-300 hover:text-[#c9a96e] transition-colors flex items-center gap-1.5"><span class="w-1 h-1 rounded-full bg-[#c9a96e]/60"></span> Dining &amp; Culinary</a></li>
                        <li><a href="#offers" class="text-slate-300 hover:text-[#c9a96e] transition-colors flex items-center gap-1.5"><span class="w-1 h-1 rounded-full bg-[#c9a96e]/60"></span> Special Retreat Offers</a></li>
                        <li><a href="{{ route(\'wedding.index\') }}" class="text-slate-300 hover:text-[#c9a96e] transition-colors flex items-center gap-1.5"><span class="w-1 h-1 rounded-full bg-[#c9a96e]/60"></span> Weddings &amp; Events</a></li>
                    </ul>
                </div>

                <!-- GUEST EXPERIENCES & WELLNESS (3 cols) -->
                <div class="lg:col-span-3 space-y-4">
                    <h4 class="text-[11px] tracking-[0.25em] font-semibold uppercase text-[#c9a96e]">Experiences &amp; Wellness</h4>
                    <ul class="space-y-2.5 text-xs font-light">
                        <li><a href="#wellness" class="text-slate-300 hover:text-[#c9a96e] transition-colors flex items-center gap-1.5"><span class="w-1 h-1 rounded-full bg-[#c9a96e]/60"></span> Serenity Spa &amp; Wellness</a></li>
                        <li><a href="#facilities" class="text-slate-300 hover:text-[#c9a96e] transition-colors flex items-center gap-1.5"><span class="w-1 h-1 rounded-full bg-[#c9a96e]/60"></span> Property Facilities</a></li>
                        <li><a href="#experiences" class="text-slate-300 hover:text-[#c9a96e] transition-colors flex items-center gap-1.5"><span class="w-1 h-1 rounded-full bg-[#c9a96e]/60"></span> Coral Reef Planting Excursion</a></li>
                        <li><a href="#experiences" class="text-slate-300 hover:text-[#c9a96e] transition-colors flex items-center gap-1.5"><span class="w-1 h-1 rounded-full bg-[#c9a96e]/60"></span> Private Kera Island Dining</a></li>
                        <li><a href="#destination" class="text-slate-300 hover:text-[#c9a96e] transition-colors flex items-center gap-1.5"><span class="w-1 h-1 rounded-full bg-[#c9a96e]/60"></span> Belitung Geopark Wonders</a></li>
                    </ul>
                </div>

                <!-- LOCATION & CONCIERGE (3 cols) -->
                <div class="lg:col-span-3 space-y-4">
                    <h4 class="text-[11px] tracking-[0.25em] font-semibold uppercase text-[#c9a96e]">Location &amp; Concierge</h4>
                    <div class="space-y-3 text-xs font-light text-slate-300">
                        <div class="flex items-start gap-2.5">
                            <svg class="w-4 h-4 text-[#c9a96e] flex-none mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"/></svg>
                            <span>Tanjung Binga, Sijuk, Belitung Regency, Bangka Belitung 33414, Indonesia</span>
                        </div>
                        <div class="flex items-center gap-2.5">
                            <svg class="w-4 h-4 text-[#c9a96e] flex-none" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"/></svg>
                            <span>+62 (719) 888 999</span>
                        </div>
                        <div class="flex items-center gap-2.5">
                            <svg class="w-4 h-4 text-[#c9a96e] flex-none" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/></svg>
                            <a href="mailto:reservations@tatabatubelitung.com" class="hover:text-[#c9a96e] transition-colors">reservations@tatabatubelitung.com</a>
                        </div>
                        <div class="pt-2 border-t border-white/10 flex items-center justify-between text-[11px] text-[#c9a96e]">
                            <span>Resort Desk: 24 Hours Daily</span>
                            <span class="px-2 py-0.5 rounded-full bg-[#c9a96e]/15 text-[9px] uppercase tracking-wider">Active</span>
                        </div>
                    </div>
                </div>

            </div>

            <!-- LUXURY ACCREDITATION & SITEMAP BOTTOM BAR -->
            <div class="pt-8 flex flex-col md:flex-row items-center justify-between text-[11px] text-slate-400 font-light gap-4">
                <p>&copy; {{ date(\'Y\') }} Tatabatu Belitung Resort. All rights reserved.</p>
                
                <div class="flex flex-wrap items-center justify-center gap-6 text-slate-400">
                    <a href="#" class="hover:text-[#c9a96e] transition-colors">Privacy Policy</a>
                    <span class="text-white/20">&bull;</span>
                    <a href="#" class="hover:text-[#c9a96e] transition-colors">Terms of Service</a>
                    <span class="text-white/20">&bull;</span>
                    <a href="#" class="hover:text-[#c9a96e] transition-colors">Cookie Preferences</a>
                    <span class="text-white/20">&bull;</span>
                    <a href="#" class="hover:text-[#c9a96e] transition-colors">Site Map</a>
                </div>

                <a href="#home" class="inline-flex items-center gap-2 text-xs text-[#c9a96e] hover:text-white transition-colors uppercase tracking-widest font-semibold group">
                    Back to Top
                    <svg class="w-4 h-4 transform group-hover:-translate-y-1 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 10l7-7m0 0l7 7m-7-7v18"/></svg>
                </a>
            </div>

        </div>
    </footer>'''

if old_footer in content:
    content = content.replace(old_footer, new_footer)
    print("Found and replaced old_footer!")
else:
    print("WARNING: old_footer not found!")

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

print("Finished update_footer.py execution.")
