} catch (e) { }
// ── FOOTER TRIP LINKS ──
try {
var stored3 = JSON.parse(localStorage.getItem('DESTINATIONS_LIST') || 'null');
var allDests2 = (stored3 && stored3.length) ? stored3 : (window.SITE_DEST_DEFAULTS || []);
document.getElementById('footer-trips-links').innerHTML =
allDests2.map(function (dest) { return '
' + dest.name + ''; }).join('') +
'All Upcoming Trips';
} catch (e) { }
})();
/* ── BOOKING TOGGLE ── */
var tripBookOpen = false;
function toggleTripBooking() {
var panel = document.getElementById('trip-booking-panel');
var arrow = document.getElementById('trip-book-arrow');
var btn = document.getElementById('trip-book-toggle');
if (!panel) return;
tripBookOpen = !tripBookOpen;
if (tripBookOpen) {
var iframe = document.getElementById('trip-squadtrip-iframe');
if (iframe) { var ds = iframe.getAttribute('data-src'); if (ds && iframe.src !== ds) iframe.src = ds; }
panel.style.maxHeight = '1500px'; panel.style.opacity = '1';
if (arrow) arrow.style.transform = 'rotate(180deg)';
if (btn) btn.textContent = 'Close Booking Widget';
setTimeout(function () { panel.scrollIntoView({ behavior: 'smooth', block: 'start' }); }, 300);
} else {
panel.style.maxHeight = '0'; panel.style.opacity = '0';
if (arrow) arrow.style.transform = 'rotate(0deg)';
if (btn) btn.textContent = 'Open Booking Widget';
}
}
// Auto-open if URL has #trip-book
if (window.location.hash === '#trip-book') {
setTimeout(function () { toggleTripBooking(); }, 800);
}