<!DOCTYPE html>
<html lang="en-GB" class="">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- CSRF Token -->
    <meta name="csrf-token" content="HftsdHfpWPMXYK57oH4NvQwPGfVO0TdHsPDMhITW">
                                    <link rel="icon" type="image/png" href="https://www.xtremerepublic.com/uploads/0000/1/2025/11/22/xtreme-logo-tours-and-travel-2.png" />
            
    <meta name="robots" content="noindex,follow">
<link rel="canonical" href="https://www.xtremerepublic.com/tour/paragliding-experience-1"/>

        <title>Paragliding Experience Kijabe | Nairobi | Book with Xtreme Republic - Xtreme Republic</title>
    <meta name="description" content="Tandem paragliding in Kijabe from KSh 12,000. 15-20 min flight, GoPro video, transfers. Book online with M-Pesa or card."/>
    
    <meta property="og:url" content="https://www.xtremerepublic.com/tour/paragliding-experience-1"/>
    <meta property="og:type" content="product"/>
    <meta property="og:title" content="Paragliding Experience Kijabe | Nairobi | Book with Xtreme Republic"/>
    <meta property="og:description" content="Tandem paragliding in Kijabe from KSh 12,000. 15-20 min flight, GoPro video, transfers. Book online with M-Pesa or card."/>
    <meta property="og:image" content="https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7241.jpg"/>
            <meta property="og:site_name" content="Xtreme Republic" />
            
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:title" content="Paragliding Experience Kijabe | Nairobi | Book with Xtreme Republic">
    <meta name="twitter:description" content="Tandem paragliding in Kijabe from KSh 12,000. 15-20 min flight, GoPro video, transfers. Book online with M-Pesa or card.">
    <meta name="twitter:image" content="https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7241.jpg">
    

        

<script type="application/ld+json">{
    "@context": "https://schema.org",
    "@type": "TravelAgency",
    "name": "Xtreme Republic",
    "url": "https://www.xtremerepublic.com",
    "description": "We are Kenya's most trusted safari and adventure travel specialist. From intimate Masai Mara safaris and Uganda gorilla trekking to Zanzibar beach escapes and corporate expeditions across Africa, we design journeys that feel personal, not packaged. Whether you're seeking luxury wildlife retreats, budget-friendly African adventures, or tailor-made honeymoon packages, we combine deep local expertise with global reach. We work across East Africa, Southern Africa, and beyond—handling everything from hotel bookings to paragliding in Hell's Gate, from Diani beach trips to Maldives honeymoons. We know Africa because we live here. We know travel because we've designed thousands of itineraries for individuals, families, and corporate groups seeking authentic experiences, not tourist trails.",
    "contactPoint": {
        "@type": "ContactPoint",
        "contactType": "customer service",
        "availableLanguage": [
            "English"
        ]
    },
    "sameAs": []
}</script>


<script type="application/ld+json">{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://www.xtremerepublic.com"
        },
        {
            "@type": "ListItem",
            "position": 2,
            "name": "Paragliding Experience Kijabe | Nairobi | Book with Xtreme Republic",
            "item": "https://www.xtremerepublic.com/tour/paragliding-experience-1"
        }
    ]
}</script>
                                <link rel="preload" as="image" href="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/sagestudios-173.jpg" fetchpriority="high">
            
    
    <link href="https://www.xtremerepublic.com/themes/gotrip/css/vendors.css" rel="stylesheet">
    <link href="https://www.xtremerepublic.com/themes/gotrip/css/main.css" rel="stylesheet">
    <link rel="stylesheet" href="https://www.xtremerepublic.com/themes/gotrip/dist/frontend/css/app.css?_v=3.7.0-select2hydrate">

    
    <link href="https://www.xtremerepublic.com/themes/gotrip/assets/css/luxury-bridge.css?_v=3.7.0-select2hydrate" rel="stylesheet">
    <link href="https://www.xtremerepublic.com/themes/gotrip/css/unified-search-luxury.css?_v=3.7.0-select2hydrate" rel="stylesheet">

    
    <style>
    .typewriter-title {
        visibility: hidden;
        display: block;
        max-width: 100%;
        font-size: 25px !important;
        line-height: 1.3;
        letter-spacing: normal;
        word-spacing: normal;
        word-break: normal;
        overflow-wrap: break-word;
        white-space: normal;
        font-kerning: normal;
        font-variant-ligatures: none;
    }
    .typewriter-title .typewriter-text {
        display: inline;
        font-size: 25px !important;
        letter-spacing: normal;
        word-spacing: 0.15em;
        white-space: normal;
    }
    .modern-tour-banner .typewriter-title,
    .location_banner .text-banner .typewriter-title {
        display: block;
        font-size: 25px !important;
        line-height: 1.3 !important;
        white-space: normal;
        word-break: break-word;
        max-width: 100%;
    }
    /* GoTrip utility size classes used on detail pages — when combined
       with .typewriter-title we force the same 25px size so the
       headline and its blinking cursor stay matched. */
    .typewriter-title.text-70,
    .typewriter-title.text-65,
    .typewriter-title.text-60,
    .typewriter-title.text-50,
    .typewriter-title.text-40,
    .typewriter-title.text-30,
    .typewriter-title.text-25 {
        font-size: 25px !important;
    }
    @media (max-width: 767px) {
        .typewriter-title.sm\:text-65,
        .typewriter-title.sm\:text-60,
        .typewriter-title.sm\:text-50,
        .typewriter-title.sm\:text-40,
        .typewriter-title.sm\:text-25 {
            font-size: 25px !important;
        }
    }
    .typewriter-title.typewriter-active,
    .typewriter-title.typewriter-done {
        visibility: visible;
    }
    .typewriter-title .typewriter-text {
        color: inherit;
    }
    /* White typewriter on dark hero banners */
    .modern-tour-banner .typewriter-title,
    .location_banner .text-banner .typewriter-title,
    .bravo_hotel_detail .banner-overlay .typewriter-title,
    .typewriter-title.typewriter-title--white {
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff;
    }
    .typewriter-title::after {
        content: '|';
        display: inline-block;
        margin-left: 3px;
        color: #ffffff;
        font-weight: 300;
        animation: tw-blink 0.55s step-end infinite;
        vertical-align: baseline;
    }
    .typewriter-title.typewriter-done::after {
        display: none;
    }
    @keyframes tw-blink {
        0%, 100% { opacity: 1; }
        50% { opacity: 0; }
    }
    .bravo_hotel_detail .banner-overlay .typewriter-title,
    .bravo_hotel_detail .g-header .typewriter-title,
    .bravo_hotel_detail .hotel-detail-hero__overlay .typewriter-title {
        display: block;
        font-size: 25px !important;
        line-height: 1.3 !important;
        white-space: normal;
        word-break: normal;
        overflow-wrap: break-word;
        letter-spacing: normal;
        word-spacing: 0.1em;
    }
    .bravo_hotel_detail .button.-dark-1,
    .bravo_hotel_detail .hotel-detail-cta {
        background: linear-gradient(135deg, var(--brand-button-bg, #31964a) 0%, var(--brand-button-hover-bg, #247339) 100%) !important;
        color: var(--brand-button-text, #ffffff) !important;
        border: none !important;
    }
    /* "You might also like" — 2 per row mobile, 4 per row desktop */
    .layout-pt-lg .row.y-gap-30 > .col-6,
    .layout-pt-md .row.y-gap-30 > .col-6 {
        padding-left: 8px;
        padding-right: 8px;
    }
    @media (min-width: 992px) {
        .layout-pt-lg .row.y-gap-30 > .col-lg-3,
        .layout-pt-md .row.y-gap-30 > .col-lg-3 {
            flex: 0 0 25%;
            max-width: 25%;
        }
    }
    .layout-pt-lg .row.y-gap-30.pt-40,
    .layout-pt-md .row.y-gap-30.pt-40 {
        padding-top: 24px !important;
        row-gap: 16px !important;
    }
    .layout-pt-lg .col-6 .tourCard__title,
    .layout-pt-md .col-6 .tourCard__title {
        font-size: 14px !important;
        line-height: 1.3 !important;
    }
    .layout-pt-lg .col-6 .tourCard__content,
    .layout-pt-md .col-6 .tourCard__content {
        padding: 8px 10px 10px !important;
    }
    </style>

    
    <link href="https://www.xtremerepublic.com/themes/gotrip/css/luxury-gallery.css" rel="stylesheet" media="print" onload="this.media='all'">
    <link href="https://www.xtremerepublic.com/themes/gotrip/assets/css/modern-luxury-system.css?_v=3.7.0-select2hydrate" rel="stylesheet" media="print" onload="this.media='all'">
    <link href="https://www.xtremerepublic.com/themes/gotrip/assets/css/mobile-enhancements.css?_v=3.7.0-select2hydrate" rel="stylesheet" media="print" onload="this.media='all'">
    <link href="https://www.xtremerepublic.com/themes/gotrip/assets/css/layout-modernizations.css?_v=3.7.0-select2hydrate" rel="stylesheet" media="print" onload="this.media='all'">
    <link href="https://www.xtremerepublic.com/themes/gotrip/assets/css/user-dashboard-luxury.css?_v=3.7.0-select2hydrate" rel="stylesheet" media="print" onload="this.media='all'">
    <link href="https://www.xtremerepublic.com/themes/gotrip/dist/frontend/css/tour-animations.css?_v=3.7.0-select2hydrate" rel="stylesheet" media="print" onload="this.media='all'">
    
    <link href="https://www.xtremerepublic.com/libs/icofont/icofont.min.css" rel="stylesheet" media="print" onload="this.media='all'">
    <link href="https://www.xtremerepublic.com/themes/gotrip/css/icomoon.css" rel="stylesheet" media="print" onload="this.media='all'">
    <link href="https://www.xtremerepublic.com/libs/daterange/daterangepicker.css" rel="stylesheet" media="print" onload="this.media='all'">
    <link href="https://www.xtremerepublic.com/libs/carousel-2/owl.carousel.css" rel="stylesheet" media="print" onload="this.media='all'">
    <link href="https://www.xtremerepublic.com/css/hotel-ui.css" rel="stylesheet" media="print" onload="this.media='all'">
    <link href="https://www.xtremerepublic.com/css/hotel-grid-responsive.css?_v=3.7.0-select2hydrate" rel="stylesheet" media="print" onload="this.media='all'">
    <link href="https://www.xtremerepublic.com/custom-css" rel="stylesheet" media="print" onload="this.media='all'">
            <link rel="stylesheet" href="https://www.xtremerepublic.com/libs/cookie-consent/cookieconsent.css" media="print" onload="this.media='all'">
            
    <noscript>
        <link href="https://www.xtremerepublic.com/themes/gotrip/css/luxury-gallery.css" rel="stylesheet">
        <link href="https://www.xtremerepublic.com/themes/gotrip/assets/css/modern-luxury-system.css?_v=3.7.0-select2hydrate" rel="stylesheet">
        <link href="https://www.xtremerepublic.com/themes/gotrip/assets/css/mobile-enhancements.css?_v=3.7.0-select2hydrate" rel="stylesheet">
        <link href="https://www.xtremerepublic.com/themes/gotrip/assets/css/layout-modernizations.css?_v=3.7.0-select2hydrate" rel="stylesheet">
        <link href="https://www.xtremerepublic.com/themes/gotrip/assets/css/user-dashboard-luxury.css?_v=3.7.0-select2hydrate" rel="stylesheet">
        <link href="https://www.xtremerepublic.com/libs/icofont/icofont.min.css" rel="stylesheet">
        <link href="https://www.xtremerepublic.com/css/hotel-ui.css" rel="stylesheet">
        <link href="https://www.xtremerepublic.com/css/hotel-grid-responsive.css?_v=3.7.0-select2hydrate" rel="stylesheet">
    </noscript>

    
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;700&display=swap" rel="stylesheet" media="print" onload="this.media='all'">
    <noscript><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;700&display=swap" rel="stylesheet"></noscript>

    
    
    <style>
        body,input,textarea,select,button,.form-control,.btn,p,span,div,a,li,td,th,label{font-family:satoshi;font-size:15px;line-height:1.6;font-weight:400;}
        h1,.h1{font-family:,sans-serif;}
        h2,.h2{font-family:,sans-serif;}
        h3,h4,h5,h6,.h3,.h4,.h5,.h6{font-family:,sans-serif;}
        .field-phone{display:block!important;visibility:visible!important;opacity:1!important;position:relative!important;z-index:1!important;}
        #phone-field{display:block!important;visibility:visible!important;background-color:#fff!important;border:1px solid #ddd!important;padding:12px!important;}
        :root{--luxury-charcoal:#2C2C2C;--luxury-charcoal-light:#404040;--luxury-font-body:'Inter','Helvetica Neue',sans-serif;}
        .mobile-nav-bar{position:fixed;bottom:0;left:0;right:0;z-index:1000;background:#fff;border-top:1px solid rgba(var(--brand-primary-rgb, 49,150,74),.2);box-shadow:0 -4px 12px rgba(0,0,0,.08);padding:8px 0 max(8px,env(safe-area-inset-bottom));}
        .mobile-nav-container{display:flex;justify-content:space-around;align-items:center;padding:0 10px;}
        .mobile-nav-item{display:flex;flex-direction:column;align-items:center;text-decoration:none;color:var(--luxury-charcoal-light);padding:6px 10px;border-radius:10px;min-width:56px;}
        .mobile-nav-icon{width:26px;height:26px;display:flex;align-items:center;justify-content:center;margin-bottom:3px;}
        .mobile-nav-icon i{font-size:17px;}
        .mobile-nav-text{font-size:11px;font-weight:500;text-align:center;line-height:1.2;}
        .mobile-nav-item.mobile-nav-home{background:var(--brand-primary,#31964a);color:var(--brand-button-text,#ffffff)!important;transform:scale(1.08);box-shadow:0 6px 20px rgba(var(--brand-primary-rgb, 49,150,74),.4);}
        .mobile-nav-item.mobile-nav-home .mobile-nav-text{color:var(--brand-button-text,#ffffff)!important;}
        @media(max-width:1023px){body,.bravo_wrap{padding-bottom:80px;}}
        @media(max-width:375px){.mobile-nav-item{padding:5px 7px;min-width:48px;}.mobile-nav-icon i{font-size:15px;}.mobile-nav-text{font-size:10px;}}
        @media(max-width:767px){.layout-pt-md,.layout-pt-lg{padding-top:30px!important;}.layout-pb-md,.layout-pb-lg{padding-bottom:30px!important;}.container{padding-left:15px!important;padding-right:15px!important;}}
    </style>

    
    <script>
    var bookingCore = {
        url:'https://www.xtremerepublic.com',
        url_root:'https://www.xtremerepublic.com',
        admin_url:'https://www.xtremerepublic.com/admin',
        booking_decimals:0,
        thousand_separator:',',
        decimal_separator:'.',
        currency_position:'left',
        currency_symbol:'KSh',
        currency_rate:'1',
        date_format:'DD/MM/YYYY',
        map_provider:'osm',
        map_gmap_key:'',
        map_options:{
            map_lat_default:'-1.292066',
            map_lng_default:'36.821945',
            map_clustering: true,
            map_fit_bounds: true,
        },
        routes:{
            login:'https://www.xtremerepublic.com/login',
            register:'https://www.xtremerepublic.com/register',
            checkout:'https://www.xtremerepublic.com/booking/doCheckout'
        },
        currentUser: 0,
        isAdmin : 0,
        rtl: false,
        markAsRead:'https://www.xtremerepublic.com/notify/markAsRead',
        markAllAsRead:'https://www.xtremerepublic.com/notify/markAllAsRead',
        deleteNotification:"https:\/\/www.xtremerepublic.com\/notify\/delete\/__NOTIFICATION_ID__",
        deleteAllNotifications:'https://www.xtremerepublic.com/notify/delete-all',
        loadNotify : 'https://www.xtremerepublic.com/notify/notifications',
        pusher_api_key : 'ea4ca9b16f4bd7433b2a',
        pusher_cluster : 'mt1',
        language: 'en_GB',
        request_quote_text: 'Request for quote',
        module:{}
    };
                            bookingCore.module["hotel"] = "https:\/\/www.xtremerepublic.com\/hotel";
                                bookingCore.module["tour"] = "https:\/\/www.xtremerepublic.com\/tour";
                var i18n = {
        warning:"Warning",
        success:"Success",
        confirm_delete:"Do you want to delete?",
        confirm:"Confirm",
        cancel:"Cancel",
    };
    var daterangepickerLocale = {
        "applyLabel": "Apply",
        "cancelLabel": "Cancel",
        "fromLabel": "From",
        "toLabel": "To",
        "customRangeLabel": "Custom",
        "weekLabel": "W",
        "first_day_of_week": 1,
        "daysOfWeek": [
            "Su",
            "Mo",
            "Tu",
            "We",
            "Th",
            "Fr",
            "Sa"
        ],
        "monthNames": [
            "January",
            "February",
            "March",
            "April",
            "May",
            "June",
            "July",
            "August",
            "September",
            "October",
            "November",
            "December"
        ],
    };
    window.currentUrl = 'https://www.xtremerepublic.com/tour/paragliding-experience-1';
</script>
<script>
(function () {
    window.whenJQueryReady = window.whenJQueryReady || function (fn) {
        (function wait() {
            if (typeof window.jQuery !== 'undefined') {
                fn(window.jQuery);
            } else {
                setTimeout(wait, 50);
            }
        })();
    };

    window.whenJQueryReady(function ($) {
        function notificationDeleteUrl(id) {
            if (!bookingCore.deleteNotification) {
                return '';
            }
            return bookingCore.deleteNotification.replace('__NOTIFICATION_ID__', encodeURIComponent(id));
        }

        $(document).on('click', '.deleteNotification', function (e) {
            e.preventDefault();
            e.stopPropagation();

            var $btn = $(this);
            var id = $btn.data('id');
            if (!id) {
                return;
            }
            if (!window.confirm((window.i18n && i18n.confirm_delete) || 'Do you want to delete?')) {
                return;
            }

            $.post(notificationDeleteUrl(id)).done(function () {
                var $wrapper = $btn.closest('.dropdown-notifications');
                var $item = $btn.closest('li.notification');
                var wasUnread = $item.hasClass('active');
                $item.remove();

                if ($wrapper.length && wasUnread) {
                    var $count = $wrapper.find('.notification-icon, .notif-count');
                    $count.each(function () {
                        var next = Math.max(0, parseInt($(this).text(), 10) - 1);
                        $(this).text(isNaN(next) ? 0 : next);
                    });
                }
            });
        });

        $(document).on('click', '.deleteAllNotifications', function (e) {
            e.preventDefault();
            e.stopPropagation();

            if (!bookingCore.deleteAllNotifications) {
                return;
            }
            if (!window.confirm((window.i18n && i18n.confirm_delete) || 'Do you want to delete?')) {
                return;
            }

            $.post(bookingCore.deleteAllNotifications).done(function () {
                $('.dropdown-notifications').find('li.notification').remove();
                $('.dropdown-notifications').find('.notification-icon, .notif-count').text(0);
                if ($('#bravo_notify').length) {
                    window.location.reload();
                }
            });
        });
    });
})();
</script>
<script>
/**
 * Global CSRF Token Handler - Prevents 419 errors on production
 * Automatically refreshes CSRF token when expired and handles token mismatches
 */
(function() {
    'use strict';
    
    // Wait for jQuery - using named function to avoid arguments.callee (strict mode)
    function initCsrfHandler() {
        if (typeof jQuery === 'undefined') {
            setTimeout(initCsrfHandler, 100);
            return;
        }
    
    var $ = jQuery;
    
    // Set up AJAX defaults with CSRF token
    var csrfToken = $('meta[name="csrf-token"]').attr('content') || '';
    if (csrfToken) {
        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': csrfToken
            }
        });
    }
    
    // Intercept all AJAX errors to handle 419 globally
    $(document).ajaxError(function(event, xhr, settings) {
        // Handle 419 CSRF token mismatch errors
        if (xhr.status === 419) {
            // Check if this is a login request - prevent infinite loops
            var isLoginRequest = settings.url && (
                settings.url.includes('/login') || 
                settings.url.indexOf('/login') !== -1 ||
                (settings.data && typeof settings.data === 'string' && settings.data.includes('email') && settings.data.includes('password'))
            );
            
            if (isLoginRequest) {
                // Prevent infinite reload loops and repeated AJAX attempts
                if (settings._loginReloadAttempted || settings._loginAjaxBlocked) {
                    return false; // Stop the AJAX error handler
                }
                settings._loginReloadAttempted = true;
                settings._loginAjaxBlocked = true;
                
                
                // CRITICAL: Remove gotrip.js AJAX handlers completely
                $('.bravo-theme-gotrip-login-form [type=submit]').off('click');
                $('.bravo-theme-gotrip-login-form').off('submit');
                $(document).off('click', '.bravo-theme-gotrip-login-form [type=submit]');
                
                // Also handle base login form
                $('.bravo-form-login').off('submit').on('submit', function(e) {
                    // Allow normal submission
                    var $form = $(this);
                    var csrfToken = $('meta[name="csrf-token"]').attr('content');
                    if (csrfToken && !$form.find('input[name="_token"]').length) {
                        $form.append('<input type="hidden" name="_token" value="' + csrfToken + '">');
                    }
                });
                
                // Show error message and reload page to get fresh CSRF token
                var errorMsg = $('<div class="alert alert-danger">CSRF token expired. Refreshing page...</div>');
                $('.bravo-form-login, .bravo-theme-gotrip-login-form').first().before(errorMsg);
                
                // Reload page after a short delay to get fresh CSRF token
                setTimeout(function() {
                    window.location.reload();
                }, 1000);
                
                return false; // Stop processing - don't try to retry
            }
            
            
            // Don't retry if we're already trying to refresh token or reloading
            if (settings.url === '/api/csrf-token' || settings._retrying || settings._reloading || settings._noRetry) {
                return;
            }
            
            // Mark as reloading to prevent infinite loops
            settings._reloading = true;
            
            // Reload page once to get fresh CSRF token
            // Don't try to call /api/csrf-token as it doesn't exist
            setTimeout(function() {
                window.location.reload();
            }, 500);
        }
    });
    
    // Refresh CSRF token periodically - DISABLED because /api/csrf-token endpoint doesn't exist
    // If you need this, create the endpoint first at routes/api.php
    // Session lifetime is 120 minutes, so refresh at 25 minutes to stay safe
    /*
    setInterval(function() {
        $.get('/api/csrf-token')
            .done(function(response) {
                if (response && response.csrf_token) {
                    var oldToken = $('meta[name="csrf-token"]').attr('content');
                    if (oldToken !== response.csrf_token) {
                        $('meta[name="csrf-token"]').attr('content', response.csrf_token);
                        $('input[name="_token"]').val(response.csrf_token);
                        $.ajaxSetup({
                            headers: {
                                'X-CSRF-TOKEN': response.csrf_token
                            }
                        });
                    }
                }
            })
            .fail(function() {
                // Silent fail - don't spam console
            });
    }, 25 * 60 * 1000); // 25 minutes
    */
    
    }
    
    // Start the initialization
    initCsrfHandler();
})();

window.whenJQueryReady = window.whenJQueryReady || function (fn) {
    (function wait() {
        if (typeof window.jQuery !== 'undefined') {
            fn(window.jQuery);
        } else {
            setTimeout(wait, 50);
        }
    })();
};
</script>
        <link rel="stylesheet" type="text/css" href="https://www.xtremerepublic.com/libs/ion_rangeslider/css/ion.rangeSlider.min.css"/>
    <link rel="stylesheet" type="text/css" href="https://www.xtremerepublic.com/css/animated-route-map.css?v=1782398843"/>
    <link rel="stylesheet" type="text/css" href="https://www.xtremerepublic.com/themes/gotrip/css/tour-pricing-enhanced.css?v=1782398843"/>
    <link rel="stylesheet" type="text/css" href="https://www.xtremerepublic.com/themes/gotrip/css/premium-stepper.css?v=1782398843"/>
    
    <link rel="stylesheet" type="text/css" href="https://www.xtremerepublic.com/themes/gotrip/css/tour-detail-redesign.css?v=1782398843"/>
    <link rel="stylesheet" type="text/css" href="https://www.xtremerepublic.com/themes/gotrip/module/hotel/css/hotel-detail-page.css?v=3.7.0-select2hydrate"/>
    <link rel="stylesheet" type="text/css" href="https://www.xtremerepublic.com/css/tour-details.css?v=3.7.0-select2hydrate"/>
    <link rel="stylesheet" type="text/css" href="https://www.xtremerepublic.com/themes/gotrip/css/tour-basic-booking-luxury.css?v=1782398843"/>
    
    <link rel="stylesheet" type="text/css" href="https://www.xtremerepublic.com/themes/gotrip/css/tour-detail-luxury.css?v=1782398843"/>
    
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
    
    <style>
        /* Price Summary Layout Fixes - Prevents text cutoff in price displays */
        .price-summary-wrapper,
        .fixed-price-summary-wrapper,
        .basic-price-summary-wrapper,
        .price-summary-box,
        .pricing-summary {
            overflow: visible !important;
            word-wrap: break-word;
            overflow-wrap: break-word;
            width: 100% !important;
            min-width: 300px !important;
        }

        /* Ensure price breakdown container has proper width */
        #price-breakdown-container {
            width: 100% !important;
            overflow: visible !important;
            min-width: 300px !important;
        }

        /* Specific fixes for price summary rows */
        .price-summary-row,
        .fixed-price-summary-wrapper .price-summary-row,
        #price-breakdown-container .price-summary-row {
            display: flex !important;
            justify-content: space-between !important;
            align-items: flex-start !important;
            min-height: 40px !important;
            padding: 8px 0 !important;
            overflow: visible !important;
            width: 100% !important;
        }

        /* Label styling - allows text wrapping */
        .price-summary-label,
        .fixed-price-summary-wrapper .price-summary-label,
        #price-breakdown-container .price-summary-label {
            flex: 1 !important;
            margin-right: 12px !important;
            word-wrap: break-word !important;
            overflow-wrap: break-word !important;
            white-space: normal !important;
            overflow: visible !important;
            text-overflow: clip !important;
            max-width: none !important;
        }

        /* Value styling - prevents wrapping but ensures visibility */
        .price-summary-value,
        .fixed-price-summary-wrapper .price-summary-value,
        #price-breakdown-container .price-summary-value {
            flex-shrink: 0 !important;
            white-space: nowrap !important;
            overflow: visible !important;
            text-overflow: clip !important;
            min-width: fit-content !important;
            max-width: none !important;
            width: auto !important;
            display: inline-block !important;
        }

        /* Flex layout fixes for price rows */
        .price-row,
        .summary-line,
        .breakdown-row,
        .breakdown-item,
        .grand-total-row {
            display: flex !important;
            justify-content: space-between !important;
            align-items: flex-start !important;
            min-height: 30px !important;
            padding: 8px 0 !important;
        }

        /* Label styling - allows text wrapping */
        .price-row .label,
        .summary-line span:first-child,
        .breakdown-row .breakdown-label,
        .breakdown-item .breakdown-label,
        .grand-total-row .grand-total-label {
            flex: 1 !important;
            margin-right: 12px !important;
            word-wrap: break-word !important;
            overflow-wrap: break-word !important;
            white-space: normal !important;
            overflow: visible !important;
            text-overflow: clip !important;
        }

        /* Value styling - prevents wrapping but ensures visibility */
        .price-row .value,
        .summary-line span:last-child,
        .breakdown-row .breakdown-value,
        .breakdown-item .breakdown-amount,
        .grand-total-row .grand-total-value {
            flex-shrink: 0 !important;
            white-space: nowrap !important;
            overflow: visible !important;
            text-overflow: clip !important;
            min-width: fit-content !important;
        }

        /* Additional fixes for price display elements */
        #summary-adults-total,
        #summary-subtotal,
        #summary-total-price,
        #summary-addons-total,
        .price-summary-value {
            min-width: fit-content !important;
            width: auto !important;
            max-width: none !important;
            white-space: nowrap !important;
            overflow: visible !important;
            text-overflow: clip !important;
            display: inline-block !important;
        }

        /* Ensure price containers don't constrain content */
        .fixed-price-summary-wrapper,
        #price-breakdown-container {
            overflow: visible !important;
            width: 100% !important;
            min-width: 320px !important;
            max-width: 100% !important;
            box-sizing: border-box !important;
        }

        /* Ensure the Price Summary section matches the width of other sections */
        .fixed-price-summary-wrapper {
            margin-left: 0 !important;
            margin-right: 0 !important;
        }

        /* Mobile responsive fixes */
        @media (max-width: 768px) {
            .price-row,
            .summary-line,
            .breakdown-row,
            .breakdown-item,
            .price-summary-row {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 4px !important;
            }
            
            .price-row .label,
            .summary-line span:first-child,
            .breakdown-row .breakdown-label,
            .breakdown-item .breakdown-label,
            .price-summary-label {
                margin-right: 0 !important;
                margin-bottom: 4px !important;
            }
        }
    </style>
    
    <script>
        // Force layout fix after page load
        document.addEventListener('DOMContentLoaded', function() {
            setTimeout(function() {
                // Apply layout fixes to any price summary elements that might have been added dynamically
                const priceSummaryElements = document.querySelectorAll(
                    '.price-summary-row, .price-row, .summary-line, .breakdown-row, .breakdown-item, .grand-total-row'
                );
                
                priceSummaryElements.forEach(function(element) {
                    element.style.display = 'flex';
                    element.style.justifyContent = 'space-between';
                    element.style.alignItems = 'flex-start';
                    element.style.minHeight = '30px';
                    element.style.overflow = 'visible';
                    
                    // Fix labels
                    const labels = element.querySelectorAll(
                        '.price-summary-label, .breakdown-label, span:first-child'
                    );
                    labels.forEach(function(label) {
                        label.style.flex = '1';
                        label.style.marginRight = '12px';
                        label.style.wordWrap = 'break-word';
                        label.style.overflowWrap = 'break-word';
                        label.style.whiteSpace = 'normal';
                        label.style.overflow = 'visible';
                        label.style.textOverflow = 'clip';
                    });
                    
                    // Fix values
                    const values = element.querySelectorAll(
                        '.price-summary-value, .breakdown-amount, span:last-child'
                    );
                    values.forEach(function(value) {
                        value.style.flexShrink = '0';
                        value.style.whiteSpace = 'nowrap';
                        value.style.overflow = 'visible';
                        value.style.textOverflow = 'clip';
                        value.style.minWidth = 'fit-content';
                    });
                });
                
                // Additional fix for specific price elements
                const specificPriceElements = document.querySelectorAll(
                    '#summary-adults-total, #summary-subtotal, #summary-total-price, #summary-addons-total'
                );
                specificPriceElements.forEach(function(element) {
                    element.style.minWidth = 'fit-content';
                    element.style.width = 'auto';
                    element.style.maxWidth = 'none';
                    element.style.whiteSpace = 'nowrap';
                    element.style.overflow = 'visible';
                    element.style.textOverflow = 'clip';
                    element.style.display = 'inline-block';
                });
                
                // Call the enhanced pricing fix function if available
                if (window.TourPricingEnhanced && window.TourPricingEnhanced.fixPriceDisplayElements) {
                    window.TourPricingEnhanced.fixPriceDisplayElements();
                }
                
                // Additional price formatting fix
                setTimeout(function() {
                    const priceElements = document.querySelectorAll(
                        '#summary-adults-total, #summary-subtotal, #summary-total-price, .price-summary-value'
                    );
                    
                    priceElements.forEach(function(element) {
                        if (element && element.textContent) {
                            const text = element.textContent.trim();
                            // Check if the text appears to be truncated (ends with incomplete number)
                            if (text.match(/\d+,\d{1,2}$/) && !text.match(/\d+,\d{3}$/)) {
                                // Force a re-render by temporarily changing the content
                                const originalText = text;
                                element.textContent = '';
                                setTimeout(function() {
                                    element.textContent = originalText;
                                }, 10);
                            }
                        }
                    });
                }, 1000);
            }, 500);
        });
    </script>
    <style>
        /* Force table styles for tour content - maximum specificity */
        .bravo_detail_tour .bravo_content .row.x-gap-40.y-gap-40.gotrip-overview .col-12 .content-text table,
        .bravo_detail_tour .bravo_content .content-text table,
        .bravo_content .content-text table,
        .content-text table,
        .gotrip-overview .content-text table,
        .text-dark-1.text-15.mt-20.content-text table,
        .bravo_detail_tour .bravo_content .row.x-gap-40.y-gap-40.gotrip-overview .col-12 .content-text table:not([style*="display: none"]),
        .bravo_detail_tour .bravo_content .content-text table:not([style*="display: none"]),
        .content-text table:not([style*="display: none"]),
        .gotrip-overview .content-text table:not([style*="display: none"]),
        .text-dark-1.text-15.mt-20.content-text table:not([style*="display: none"]) {
            width: 100% !important;
            border-collapse: collapse !important;
            border: 3px solid #000 !important;
            margin: 20px 0 !important;
            font-size: 15px !important;
            display: table !important;
            table-layout: fixed !important;
            visibility: visible !important;
        }
        
        /* Target any table element inside content-text */
        .content-text * table,
        .gotrip-overview * table,
        .text-dark-1.text-15.mt-20 * table {
            width: 100% !important;
            border-collapse: collapse !important;
            border: 3px solid #000 !important;
            margin: 20px 0 !important;
            font-size: 15px !important;
            display: table !important;
            table-layout: fixed !important;
        }
        
        .bravo_detail_tour .bravo_content .row.x-gap-40.y-gap-40.gotrip-overview .col-12 .content-text table th,
        .bravo_detail_tour .bravo_content .content-text table th,
        .bravo_content .content-text table th,
        .content-text table th,
        .gotrip-overview .content-text table th,
        .text-dark-1.text-15.mt-20.content-text table th,
        .bravo_detail_tour .bravo_content .row.x-gap-40.y-gap-40.gotrip-overview .col-12 .content-text table:not([style*="display: none"]) th,
        .bravo_detail_tour .bravo_content .content-text table:not([style*="display: none"]) th,
        .content-text table:not([style*="display: none"]) th,
        .gotrip-overview .content-text table:not([style*="display: none"]) th,
        .text-dark-1.text-15.mt-20.content-text table:not([style*="display: none"]) th {
            background-color: #f8f9fa !important;
            padding: 15px !important;
            border: 2px solid #000 !important;
            text-align: left !important;
            font-weight: bold !important;
            color: #333 !important;
        }
        
        .content-text * table th,
        .gotrip-overview * table th,
        .text-dark-1.text-15.mt-20 * table th {
            background-color: #f8f9fa !important;
            padding: 15px !important;
            border: 2px solid #000 !important;
            text-align: left !important;
            font-weight: bold !important;
            color: #333 !important;
        }
        
        .bravo_detail_tour .bravo_content .row.x-gap-40.y-gap-40.gotrip-overview .col-12 .content-text table td,
        .bravo_detail_tour .bravo_content .content-text table td,
        .bravo_content .content-text table td,
        .content-text table td,
        .gotrip-overview .content-text table td,
        .text-dark-1.text-15.mt-20.content-text table td,
        .bravo_detail_tour .bravo_content .row.x-gap-40.y-gap-40.gotrip-overview .col-12 .content-text table:not([style*="display: none"]) td,
        .bravo_detail_tour .bravo_content .content-text table:not([style*="display: none"]) td,
        .content-text table:not([style*="display: none"]) td,
        .gotrip-overview .content-text table:not([style*="display: none"]) td,
        .text-dark-1.text-15.mt-20.content-text table:not([style*="display: none"]) td {
            padding: 15px !important;
            border: 2px solid #000 !important;
            vertical-align: top !important;
        }
        
        .content-text * table td,
        .gotrip-overview * table td,
        .text-dark-1.text-15.mt-20 * table td {
            padding: 15px !important;
            border: 2px solid #000 !important;
            vertical-align: top !important;
        }
        
        @media (max-width: 768px) {
            .bravo_detail_tour .bravo_content .row.x-gap-40.y-gap-40.gotrip-overview .col-12 .content-text table,
            .bravo_detail_tour .bravo_content .content-text table,
            .bravo_content .content-text table,
            .content-text table,
            .gotrip-overview .content-text table,
            .text-dark-1.text-15.mt-20.content-text table,
            .bravo_detail_tour .bravo_content .row.x-gap-40.y-gap-40.gotrip-overview .col-12 .content-text table:not([style*="display: none"]),
            .bravo_detail_tour .bravo_content .content-text table:not([style*="display: none"]),
            .content-text table:not([style*="display: none"]),
            .gotrip-overview .content-text table:not([style*="display: none"]),
            .text-dark-1.text-15.mt-20.content-text table:not([style*="display: none"]) {
                font-size: 14px !important;
                border: 2px solid #000 !important;
            }
            
            .bravo_detail_tour .bravo_content .row.x-gap-40.y-gap-40.gotrip-overview .col-12 .content-text table th,
            .bravo_detail_tour .bravo_content .content-text table th,
            .bravo_content .content-text table th,
            .content-text table th,
            .gotrip-overview .content-text table th,
            .text-dark-1.text-15.mt-20.content-text table th,
            .bravo_detail_tour .bravo_content .row.x-gap-40.y-gap-40.gotrip-overview .col-12 .content-text table:not([style*="display: none"]) th,
            .bravo_detail_tour .bravo_content .content-text table:not([style*="display: none"]) th,
            .content-text table:not([style*="display: none"]) th,
            .gotrip-overview .content-text table:not([style*="display: none"]) th,
            .text-dark-1.text-15.mt-20.content-text table:not([style*="display: none"]) th {
                padding: 10px !important;
                border: 1px solid #000 !important;
                font-size: 13px !important;
            }
            
            .bravo_detail_tour .bravo_content .row.x-gap-40.y-gap-40.gotrip-overview .col-12 .content-text table td,
            .bravo_detail_tour .bravo_content .content-text table td,
            .bravo_content .content-text table td,
            .content-text table td,
            .gotrip-overview .content-text table td,
            .text-dark-1.text-15.mt-20.content-text table td,
            .bravo_detail_tour .bravo_content .row.x-gap-40.y-gap-40.gotrip-overview .col-12 .content-text table:not([style*="display: none"]) td,
            .bravo_detail_tour .bravo_content .content-text table:not([style*="display: none"]) td,
            .content-text table:not([style*="display: none"]) td,
            .gotrip-overview .content-text table:not([style*="display: none"]) td,
            .text-dark-1.text-15.mt-20.content-text table:not([style*="display: none"]) td {
                padding: 10px !important;
                border: 1px solid #000 !important;
                font-size: 13px !important;
            }
        }
        
        /* Map Controls Styles */
        .map-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px 8px 0 0;
            padding: 15px 20px;
            margin-bottom: 0;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .route-info h6 {
            margin: 0 0 8px 0;
            color: #333;
            font-size: 16px;
            font-weight: 600;
        }
        
        .route-stats {
            display: flex;
            gap: 20px;
        }
        
        .stat-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            color: #666;
        }
        
        .stat-item i {
            color: #007bff;
            font-size: 16px;
        }
        
        .stat-item strong {
            color: #333;
            font-weight: 600;
        }
        
        .map-actions {
            display: flex;
            gap: 8px;
        }
        
        .map-actions .btn {
            padding: 6px 12px;
            font-size: 14px;
            border-radius: 6px;
            min-width: auto;
        }
        
        .map-actions .btn i {
            margin: 0;
        }
        
        .location-map {
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        
        .location-map .map {
            border-radius: 0 0 8px 8px;
        }
        
        @media (max-width: 768px) {
            .map-controls {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
                padding: 12px 15px;
            }
            
            .route-stats {
                flex-direction: column;
                gap: 8px;
            }
            
            .map-actions {
                align-self: stretch;
                justify-content: center;
            }
        }
        
        /* Pulse highlight effect for pricing section on mobile */
        .pulse-highlight {
            animation: pulseHighlight 2s ease-in-out;
            border: 3px solid #3554D1 !important;
            border-radius: 12px;
        }
        
        @keyframes pulseHighlight {
            0%, 100% {
                box-shadow: 0 0 0 0 rgba(53, 84, 209, 0.7);
            }
            50% {
                box-shadow: 0 0 0 20px rgba(53, 84, 209, 0);
            }
        }
    </style>
    <script>
        (function() {
            'use strict';
            
            function forceTableStyles() {
                var contentTextElements = document.querySelectorAll('.content-text, .gotrip-overview, .text-dark-1.text-15.mt-20');
                contentTextElements.forEach(function(element) {
                    var tables = element.querySelectorAll('table');
                    tables.forEach(function(table) {
                        // Force table styles
                        table.style.width = '100%';
                        table.style.borderCollapse = 'collapse';
                        table.style.border = '3px solid #000';
                        table.style.margin = '20px 0';
                        table.style.fontSize = '15px';
                        table.style.display = 'table';
                        table.style.tableLayout = 'fixed';
                        table.style.visibility = 'visible';
                        
                        // Force table header styles
                        var headers = table.querySelectorAll('th');
                        headers.forEach(function(th) {
                            th.style.backgroundColor = '#f8f9fa';
                            th.style.padding = '15px';
                            th.style.border = '2px solid #000';
                            th.style.textAlign = 'left';
                            th.style.fontWeight = 'bold';
                            th.style.color = '#333';
                        });
                        
                        // Force table cell styles
                        var cells = table.querySelectorAll('td');
                        cells.forEach(function(td) {
                            td.style.padding = '15px';
                            td.style.border = '2px solid #000';
                            td.style.verticalAlign = 'top';
                        });
                    });
                });
            }
            
            // Initialize when DOM is ready
            if (document.readyState === 'loading') {
                document.addEventListener('DOMContentLoaded', function() {
                    forceTableStyles();
                    
                    // Observe content changes
                    var observer = new MutationObserver(function(mutations) {
                        forceTableStyles();
                    });
                    
                    var contentElements = document.querySelectorAll('.content-text, .gotrip-overview, .text-dark-1.text-15.mt-20');
                    contentElements.forEach(function(element) {
                        observer.observe(element, {
                            childList: true,
                            subtree: true
                        });
                    });
                });
            } else {
                // DOM already loaded
                forceTableStyles();
                
                // Observe content changes
                var observer = new MutationObserver(function(mutations) {
                    forceTableStyles();
                });
                
                var contentElements = document.querySelectorAll('.content-text, .gotrip-overview, .text-dark-1.text-15.mt-20');
                contentElements.forEach(function(element) {
                    observer.observe(element, {
                        childList: true,
                        subtree: true
                    });
                });
            }
        })();
    </script>

    
    
    <link rel="preconnect" href="https://www.googletagmanager.com" crossorigin>
        <link rel="dns-prefetch" href="https://www.googletagmanager.com">
        <script async src="https://www.googletagmanager.com/gtag/js?id=G-3PQ9G2YKDL"></script>
        <script>
            window.dataLayer = window.dataLayer || [];
            function gtag(){dataLayer.push(arguments);}
            gtag('js', new Date());
            gtag('config', "G-3PQ9G2YKDL");
        </script>
                
        
    </head>
<body class="frontend-page header-normal is_single detail-anim-typewriter detail-anim-speed-normal  ">
            
        
        <div class="bravo_wrap overflow-hidden">
                                 <div class="header-margin"></div>                 <div class="preloader js-preloader ">
            <div class="preloader__wrap">
            <div class="preloader__icon">
                <img class="logo-light" src="https://www.xtremerepublic.com/uploads/0000/1/2025/11/22/xtreme-logo-tours-and-travel-2.png" alt="Xtreme Republic">
            </div>
        </div>
        <div class="preloader__title">Xtreme Republic</div>
</div>
        <header data-add-bg="bg-dark-1" class="header  bg-dark-1 js-header bravo_header style-normal" data-x="header" data-x-toggle="is-menu-opened" style="background-color:#051036 !important;">
            <div data-anim="fade" class="header__container px-30 sm:px-20  is-in-view">
                <div class="row justify-between items-center">
                    <div class="col-auto ">
                                                                            <div class="d-flex items-center gotrip-header-normal">
    <a href="https://www.xtremerepublic.com" class=" header-logo mr-20" data-x="header-logo" data-x-toggle="is-logo-dark">
                    <img class="logo-light" src="https://www.xtremerepublic.com/uploads/0000/1/2025/11/22/xtreme-logo-tours-and-travel-2.png" alt="Xtreme Republic">
                            <img class="logo-dark" src="https://www.xtremerepublic.com/uploads/0000/1/2025/11/22/xtreme-logo-tours-and-travel-2.png" alt="Xtreme Republic">
            </a>
    <div class="header-menu " data-x="mobile-menu" data-x-toggle="is-menu-active">
        <div class="mobile-overlay"></div>
        <div class="header-menu__content">
            <div class="mobile-bg js-mobile-bg"></div>
            <div class="menu js-navList">
                <ul class='menu__nav text-white -is-active'><li class=" depth-0"><a data-barba target="" href="/" >Home</a></li><li class=" depth-0"><a data-barba target="" href="/tour" >Tours</a></li><li class=" depth-0"><a data-barba target="" href="/contact" >Contact</a></li><li class=" depth-0"><a data-barba target="" href="/user-dashboard" >Profile</a></li></ul>            </div>
            <div class="mobile-footer px-20 py-10 border-top-light js-mobile-footer">
                
                                <div class="mt-10 w-100">
                    <select name="package_location_mobile" class="form-select text-12 px-10 py-5 rounded-4 border-1" onchange="window.location.href=this.value;">
                        <option value="https://www.xtremerepublic.com/tour/all" selected>
                            All Packages
                        </option>
                        <option value="https://www.xtremerepublic.com/tour/kenya" >
                            Kenyan Residents Packages
                        </option>
                        <option value="https://www.xtremerepublic.com/tour/international" >
                            Non-Residents Packages
                        </option>
                    </select>
                </div>
            </div>
        </div>
    </div>
</div>
                                            </div>
                        <div class="col-auto">
                <div class="d-flex items-center">
                    <div class="header-menu menu-right">
                        <div class="mobile-overlay"></div>
                        <div class="header-menu__content">
                            <div class="menu js-navList">
                                <ul class="menu__nav text-white -is-active">
                                    <li class="currency-dropdown menu-item-has-children">
                                                        <a href="#" class="is_login">
                    <span class="mr-10">KES</span>
                    <i class="icon icon-chevron-sm-down"></i>
                </a>
                            <ul class="subnav">
                                                <li>
                        <a href="https://www.xtremerepublic.com/tour/paragliding-experience-1?set_lang=es&amp;set_currency=usd" class="is_login dropdown-item">
                            USD
                        </a>
                    </li>
                                                                </ul>
    </li>

                                                                        
                                    <li class="menu-item location-toggle-item" style="display: block !important; visibility: visible !important;">
        <div class="location-toggle-widget" data-location="all" style="display: block !important; visibility: visible !important;">
            <select name="package_location" id="package_location_dropdown_6a3d3f7d06d0d" class="form-select text-12 px-10 py-5 rounded-4 border-1" 
                    style="min-width: 150px !important; border-color: rgba(255,255,255,0.3) !important; cursor: pointer !important; background-color: rgba(255,255,255,0.1) !important; color: white !important; display: block !important; visibility: visible !important; opacity: 1 !important;"
                    onchange="window.location.href=this.value;">
                <option value="https://www.xtremerepublic.com/tour/all" selected style="background-color: #333; color: white;">
                    All Packages
                </option>
                <option value="https://www.xtremerepublic.com/tour/kenya"  style="background-color: #333; color: white;">
                    Kenyan Residents Packages
                </option>
                <option value="https://www.xtremerepublic.com/tour/international"  style="background-color: #333; color: white;">
                    Non-Residents Packages
                </option>
            </select>
        </div>
    </li>
    <style>
        .location-toggle-item {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        .location-toggle-widget {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        .location-toggle-item select {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            width: 100%;
            max-width: 100%;
        }
        .location-toggle-item select option {
            background-color: #333 !important;
            color: white !important;
        }
        .location-toggle-item select:focus {
            background-color: rgba(255,255,255,0.1) !important;
            color: white !important;
            outline: none;
        }
        /* Mobile responsive styles */
        @media (max-width: 768px) {
            .location-toggle-item {
                display: inline-block !important;
                width: auto !important;
                margin: 0 5px !important;
                padding: 0 !important;
            }
            .location-toggle-widget {
                width: auto !important;
                display: block !important;
            }
            .location-toggle-item select {
                min-width: 120px !important;
                width: auto !important;
                font-size: 12px !important;
                padding: 8px 10px !important;
                display: block !important;
                visibility: visible !important;
                opacity: 1 !important;
            }
            /* When in mobile footer with flex container */
            .mobile-footer .location-toggle-item {
                display: inline-block !important;
                width: auto !important;
                margin: 0 5px !important;
            }
            .mobile-footer .location-toggle-widget {
                width: auto !important;
                display: block !important;
            }
            .mobile-footer .location-toggle-item select {
                display: block !important;
                visibility: visible !important;
                opacity: 1 !important;
            }
        }
    </style>

                                                                            <div class="d-flex items-center ml-20 is-menu-opened-hide md:d-none">
                                            
                                                    <a data-bs-toggle="modal" href="#login" class="border-white -outline-white text-white button px-30 fw-400 text-14  h-50">Sign In / Register</a>
                                                </div>
                                                                                        <div class="d-none xl:d-flex x-gap-20 items-center pl-30 text-white" data-x="header-mobile-icons" data-x-toggle="text-white">
                                                <div>
                                                                                                            <a href="https://www.xtremerepublic.com/login" class="d-flex items-center icon-user text-inherit text-22"></a>
                                                                                                    </div>
                                            </div>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="d-none xl:d-flex x-gap-20 items-center pl-30 text-white" data-x="header-mobile-icons" data-x-toggle="text-white">
                            <div>
                                <button type="button"
                                        class="mobile-menu-toggle d-flex items-center text-inherit"
                                        id="mobileMenuToggle"
                                        aria-label="Open menu"
                                        aria-expanded="false"
                                        aria-controls="mobileNavDrawer">
                                    <span class="hamburger-lines" aria-hidden="true">
                                        <span></span>
                                        <span></span>
                                        <span></span>
                                    </span>
                                </button>
                            </div>
                        </div>
                        <!-- Include Enhanced Mobile Menu -->
                        <div class="mobile-nav-drawer" id="mobileNavDrawer" role="dialog" aria-modal="true" aria-label="Mobile menu" aria-hidden="true">

    
    <div class="mnd__header">
        <a href="https://www.xtremerepublic.com" class="mnd__brand" aria-label="Xtreme Republic">
                            <img src="https://www.xtremerepublic.com/uploads/0000/1/2025/11/22/xtreme-logo-tours-and-travel-2.png" alt="Xtreme Republic" class="mnd__logo">
                    </a>
        <button type="button" class="mnd__close" id="mobileNavClose" aria-label="Close menu">
            <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true">
                <line x1="18" y1="6" x2="6" y2="18"></line>
                <line x1="6" y1="6" x2="18" y2="18"></line>
            </svg>
        </button>
    </div>

    
    <div class="mnd__body">

        
        <div class="mnd__user-card">
                            <div class="mnd__cta-row">
                    <a href="https://www.xtremerepublic.com/login" class="mnd__btn mnd__btn--primary" data-bs-toggle="modal" data-bs-target="#login">
                        <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg>
                        Sign In
                    </a>
                    <a href="https://www.xtremerepublic.com/register" class="mnd__btn mnd__btn--ghost">
                        <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><line x1="19" y1="8" x2="19" y2="14"/><line x1="22" y1="11" x2="16" y2="11"/></svg>
                        Register
                    </a>
                </div>
                    </div>

        
        <nav class="mnd__nav" aria-label="Main navigation">
            <div class="mnd__section-title">Browse</div>
            <div class="mnd__menu js-mnd-menu">
                <ul class='menu__nav mnd-primary-menu -is-active'><li class=" depth-0"><a  target="" href="/" >Home</a></li><li class=" depth-0"><a  target="" href="/tour" >Tours</a></li><li class=" depth-0"><a  target="" href="/contact" >Contact</a></li><li class=" depth-0"><a  target="" href="/user-dashboard" >Profile</a></li></ul>            </div>
        </nav>

        
        <div class="mnd__section">
            <div class="mnd__section-title">Package Type</div>
            <div class="mnd__pillgroup" role="group" aria-label="Package type">
                                    <a href="https://www.xtremerepublic.com/tour/all"
                       class="mnd__pill is-active"
                       aria-current="true">
                        All Packages
                    </a>
                                    <a href="https://www.xtremerepublic.com/tour/kenya"
                       class="mnd__pill "
                       aria-current="false">
                        Kenyan Residents
                    </a>
                                    <a href="https://www.xtremerepublic.com/tour/international"
                       class="mnd__pill "
                       aria-current="false">
                        International
                    </a>
                            </div>
        </div>

        
                    <div class="mnd__section">
                <div class="mnd__section-title">Currency</div>
                <div class="mnd__pillgroup mnd__pillgroup--compact" role="group" aria-label="Currency">
                                                                    <a href="https://www.xtremerepublic.com/tour/paragliding-experience-1?set_lang=es&amp;set_currency=usd"
                           class="mnd__pill "
                           aria-current="false">
                            USD
                        </a>
                                                                    <a href="https://www.xtremerepublic.com/tour/paragliding-experience-1?set_lang=es&amp;set_currency=kes"
                           class="mnd__pill is-active"
                           aria-current="true">
                            KES
                        </a>
                                    </div>
            </div>
        
        
        
        
                    <div class="mnd__section">
                <div class="mnd__section-title">Get in touch</div>
                <div class="mnd__contact">
                                                                <a href="https://wa.me/254702716721" target="_blank" rel="noopener" class="mnd__contact-row">
                            <span class="mnd__contact-ico mnd__contact-ico--wa">
                                <svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M.057 24l1.687-6.163a11.867 11.867 0 0 1-1.587-5.946C.16 5.335 5.495 0 12.05 0a11.86 11.86 0 0 1 8.413 3.488 11.82 11.82 0 0 1 3.48 8.414c-.003 6.557-5.338 11.892-11.893 11.892a11.9 11.9 0 0 1-5.688-1.448L.057 24zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884a9.86 9.86 0 0 0 1.51 5.26l-.999 3.648 3.978-.607zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.149-.173.198-.297.297-.495.099-.198.05-.372-.025-.521-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.71.306 1.263.489 1.694.625.712.227 1.36.195 1.872.118.571-.085 1.758-.719 2.006-1.413.247-.694.247-1.289.173-1.413z"/></svg>
                            </span>
                            <span class="mnd__contact-text">
                                <small>WhatsApp</small>
                                <strong>+254702716721</strong>
                            </span>
                        </a>
                                                        </div>
            </div>
        
        
                
        
        
        
        <div class="mnd__footer">
            <span>&copy; 2026 Xtreme Republic</span>
        </div>
    </div>
</div>


<div class="mobile-menu-overlay" id="mobileMenuOverlay" aria-hidden="true"></div>

<style>
/* ==========================================================
   Enhanced Mobile Menu — Luxury, Functional, Accessible
========================================================== */

/* Local variable fallbacks (work even if luxury system not loaded) */
.mobile-nav-drawer,
.mobile-menu-overlay {
    --mnd-bg-1: var(--luxury-charcoal, #051036);
    --mnd-bg-2: var(--luxury-primary-light, #0a1f5c);
    --mnd-accent: var(--luxury-gold, #d4af37);
    --mnd-accent-2: var(--luxury-gold-dark, #b8932f);
    --mnd-text: #ffffff;
    --mnd-text-muted: rgba(255, 255, 255, 0.65);
    --mnd-border: rgba(255, 255, 255, 0.12);
    --mnd-surface: rgba(255, 255, 255, 0.06);
    --mnd-surface-hover: rgba(255, 255, 255, 0.12);
    --mnd-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    --mnd-radius: 14px;
    --mnd-radius-sm: 10px;
    --mnd-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== Drawer ===== */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(86vw, 400px);
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(160deg, var(--mnd-bg-1) 0%, var(--mnd-bg-2) 100%);
    color: var(--mnd-text);
    z-index: 1060;
    box-shadow: var(--mnd-shadow);
    transform: translateX(-105%);
    transition: transform 360ms var(--mnd-ease);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    will-change: transform;
}

.mobile-nav-drawer.is-active {
    transform: translateX(0);
}

/* ===== Header ===== */
.mnd__header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--mnd-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mnd__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    min-height: 44px;
    flex: 1;
    min-width: 0;
}

.mnd__logo {
    max-height: 38px;
    max-width: 180px;
    width: auto;
    height: auto;
    display: block;
}

.mnd__brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mnd__close {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--mnd-border);
    background: var(--mnd-surface);
    color: var(--mnd-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 180ms var(--mnd-ease), transform 180ms var(--mnd-ease);
}

.mnd__close:hover,
.mnd__close:focus-visible {
    background: var(--mnd-surface-hover);
    transform: scale(1.05);
    outline: none;
}

/* ===== Body (scrollable) ===== */
.mnd__body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 18px;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.mnd__body::-webkit-scrollbar { width: 6px; }
.mnd__body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* ===== User Card ===== */
.mnd__user-card {
    background: var(--mnd-surface);
    border: 1px solid var(--mnd-border);
    border-radius: var(--mnd-radius);
    padding: 14px;
    margin-bottom: 18px;
}

.mnd__user-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mnd__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mnd-accent), var(--mnd-accent-2));
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.mnd__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mnd__user-meta { min-width: 0; }
.mnd__user-hi {
    font-size: 0.75rem;
    color: var(--mnd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.mnd__user-name {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mnd__user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.mnd__chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--mnd-text);
    font-size: 0.8125rem;
    text-decoration: none;
    border: 1px solid var(--mnd-border);
    transition: background-color 160ms var(--mnd-ease), border-color 160ms var(--mnd-ease);
    min-height: 32px;
}
.mnd__chip:hover,
.mnd__chip:focus-visible {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--mnd-text);
    text-decoration: none;
    outline: none;
}

/* ===== CTAs (logged out) ===== */
.mnd__cta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mnd__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: var(--mnd-radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 160ms var(--mnd-ease), background-color 160ms var(--mnd-ease), box-shadow 160ms var(--mnd-ease);
}
.mnd__btn:active { transform: translateY(1px); }
.mnd__btn--primary {
    background: linear-gradient(135deg, var(--mnd-accent), var(--mnd-accent-2));
    color: #1a1a1a;
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.25);
}
.mnd__btn--primary:hover,
.mnd__btn--primary:focus-visible {
    color: #1a1a1a;
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.35);
    text-decoration: none;
    outline: none;
}
.mnd__btn--ghost {
    background: var(--mnd-surface);
    color: var(--mnd-text);
    border-color: var(--mnd-border);
}
.mnd__btn--ghost:hover,
.mnd__btn--ghost:focus-visible {
    background: var(--mnd-surface-hover);
    color: var(--mnd-text);
    text-decoration: none;
    outline: none;
}
.mnd__btn--danger {
    background: rgba(220, 53, 69, 0.15);
    color: #ff8a92;
    border-color: rgba(220, 53, 69, 0.4);
}
.mnd__btn--danger:hover,
.mnd__btn--danger:focus-visible {
    background: rgba(220, 53, 69, 0.25);
    color: #ffb3b8;
    outline: none;
}
.w-100 { width: 100%; }

/* ===== Sections ===== */
.mnd__section { margin-top: 22px; }
.mnd__section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--mnd-text-muted);
    margin: 0 0 10px 4px;
}

/* ===== Nav (accordion menu) ===== */
.mnd__nav { margin-top: 6px; }
.mnd__menu .menu__nav,
.mnd__menu .mnd-primary-menu,
.mnd__menu ul.subnav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mnd__menu > .menu__nav > li,
.mnd__menu > .mnd-primary-menu > li {
    border-bottom: 1px solid var(--mnd-border);
}
.mnd__menu > .menu__nav > li:last-child,
.mnd__menu > .mnd-primary-menu > li:last-child {
    border-bottom: none;
}

.mnd__menu li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 12px;
    color: var(--mnd-text);
    text-decoration: none;
    font-size: 0.975rem;
    font-weight: 500;
    border-radius: var(--mnd-radius-sm);
    min-height: 48px;
    transition: background-color 160ms var(--mnd-ease), color 160ms var(--mnd-ease), padding-left 160ms var(--mnd-ease);
}
.mnd__menu li > a:hover,
.mnd__menu li > a:focus-visible {
    background: var(--mnd-surface-hover);
    color: var(--mnd-accent);
    padding-left: 16px;
    text-decoration: none;
    outline: none;
}
.mnd__menu li.active > a {
    color: var(--mnd-accent);
    background: rgba(212, 175, 55, 0.08);
}

/* Submenu chevron + accordion */
.mnd__menu li.menu-item-has-children > a {
    cursor: pointer;
}
.mnd__menu li.menu-item-has-children > a::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 250ms var(--mnd-ease);
    flex-shrink: 0;
    margin-left: auto;
    opacity: 0.7;
}
/* Hide MenuWalker's injected chevron icon - we render our own */
.mnd__menu li.menu-item-has-children > a > i.icon-chevron-sm-down { display: none; }
.mnd__menu li.menu-item-has-children > a > span.mr-10 { margin-right: 0; }

.mnd__menu li.menu-item-has-children.is-open > a::after {
    transform: rotate(225deg);
}

.mnd__menu ul.subnav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 320ms var(--mnd-ease);
    padding-left: 14px;
    border-left: 2px solid rgba(212, 175, 55, 0.25);
    margin: 0 0 6px 12px;
}
.mnd__menu li.menu-item-has-children.is-open > ul.subnav {
    max-height: 2000px;
}
.mnd__menu ul.subnav li > a {
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    padding: 11px 12px;
    min-height: 42px;
}

/* Back button generated by MenuWalker in some configs */
.mnd__menu .subnav__backBtn { display: none; }

/* ===== Pill group ===== */
.mnd__pillgroup {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mnd__pillgroup--compact .mnd__pill {
    flex: 0 1 auto;
    min-width: 64px;
}

.mnd__pill {
    flex: 1 1 calc(50% - 4px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 11px 14px;
    border-radius: var(--mnd-radius-sm);
    background: var(--mnd-surface);
    border: 1px solid var(--mnd-border);
    color: var(--mnd-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 160ms var(--mnd-ease), border-color 160ms var(--mnd-ease), color 160ms var(--mnd-ease);
    min-height: 44px;
    line-height: 1.2;
}
.mnd__pill:hover,
.mnd__pill:focus-visible {
    background: var(--mnd-surface-hover);
    color: var(--mnd-text);
    text-decoration: none;
    outline: none;
}
.mnd__pill.is-active {
    background: linear-gradient(135deg, var(--mnd-accent), var(--mnd-accent-2));
    border-color: var(--mnd-accent);
    color: #1a1a1a;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
}

/* ===== Contact rows ===== */
.mnd__contact { display: flex; flex-direction: column; gap: 8px; }
.mnd__contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--mnd-radius-sm);
    background: var(--mnd-surface);
    border: 1px solid var(--mnd-border);
    color: var(--mnd-text);
    text-decoration: none;
    transition: background-color 160ms var(--mnd-ease), transform 160ms var(--mnd-ease);
    min-height: 56px;
}
.mnd__contact-row:hover,
.mnd__contact-row:focus-visible {
    background: var(--mnd-surface-hover);
    color: var(--mnd-text);
    text-decoration: none;
    transform: translateX(2px);
    outline: none;
}
.mnd__contact-ico {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.12);
    color: var(--mnd-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mnd__contact-ico--wa {
    background: rgba(37, 211, 102, 0.15);
    color: #25d366;
}
.mnd__contact-text { display: flex; flex-direction: column; min-width: 0; }
.mnd__contact-text small {
    font-size: 0.7rem;
    color: var(--mnd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.mnd__contact-text strong {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Social ===== */
.mnd__social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mnd__social-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--mnd-surface);
    border: 1px solid var(--mnd-border);
    color: var(--mnd-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 160ms var(--mnd-ease), color 160ms var(--mnd-ease), transform 160ms var(--mnd-ease);
}
.mnd__social-btn:hover,
.mnd__social-btn:focus-visible {
    background: var(--mnd-surface-hover);
    color: var(--mnd-accent);
    transform: translateY(-2px);
    text-decoration: none;
    outline: none;
}

/* ===== Logout / Footer ===== */
.mnd__section--logout { margin-top: 24px; }

.mnd__footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--mnd-border);
    text-align: center;
    font-size: 0.75rem;
    color: var(--mnd-text-muted);
}

/* ===== Overlay ===== */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 16, 54, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 280ms var(--mnd-ease), visibility 0s linear 280ms;
    z-index: 1055;
}
.mobile-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 280ms var(--mnd-ease), visibility 0s linear 0s;
}

/* ===== Hamburger toggle (animated lines) ===== */
.mobile-menu-toggle {
    background: transparent;
    border: 0;
    padding: 8px;
    cursor: pointer;
    color: inherit;
    line-height: 0;
    border-radius: 8px;
    transition: background-color 160ms ease;
}
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}
.hamburger-lines {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 26px;
    height: 22px;
}
.hamburger-lines span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 240ms var(--mnd-ease), opacity 200ms var(--mnd-ease);
    transform-origin: center;
}
.mobile-menu-toggle.is-active .hamburger-lines span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.is-active .hamburger-lines span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu-toggle.is-active .hamburger-lines span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== Body lock helper ===== */
body.mnd-open { overflow: hidden; touch-action: none; }

/* ===== Small screens ===== */
@media (max-width: 420px) {
    .mobile-nav-drawer { width: 92vw; }
    .mnd__body { padding: 16px; }
    .mnd__cta-row { grid-template-columns: 1fr; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    .mobile-nav-drawer,
    .mobile-menu-overlay,
    .mnd__menu ul.subnav,
    .mnd__menu li.menu-item-has-children > a::after,
    .hamburger-lines span,
    .mnd__btn,
    .mnd__pill,
    .mnd__contact-row,
    .mnd__social-btn,
    .mnd__close {
        transition: none !important;
    }
}
</style>
                    </div>
                </div>
                <div class="d-none xl:d-flex x-gap-20 items-center pl-30" data-x="header-mobile-icons" data-x-toggle="text-white">
                </div>
            </div>
        </header>
                <div class="bravo_detail_tour bravo_detail">
        <div class="blog-breadcrumb py-10 bg-light-2">
        <div class="container">
            <div class="row y-gap-10 items-center justify-between">
                <div class="col-auto">
                    <ol class="pl-0 ul row x-gap-10 y-gap-5 items-center text-14 text-light-1 list-unstyled" itemscope itemtype="https://schema.org/BreadcrumbList">
                        <li class="col-auto" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                            <a href="https://www.xtremerepublic.com" itemprop="item"><span itemprop="name">Home</span></a>
                            <meta itemprop="position" content="1" />
                        </li>
                        <li class="col-auto">
                            <div class="">></div>
                        </li>
                                                                                <li class="col-auto " itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                                                                    <a href="https://www.xtremerepublic.com/tour" itemscope itemtype="https://schema.org/WebPage" itemprop="item" itemid="https://www.xtremerepublic.com/tour"><span itemprop="name">Tour</span></a>
                                                                <meta itemprop="position" content="2" />
                            </li>
                                                                                    <li class="col-auto">
                                    <div class="">></div>
                                </li>
                                                        <li class="col-auto " itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                                                                    <a href="https://www.xtremerepublic.com/location/kenya" itemscope itemtype="https://schema.org/WebPage" itemprop="item" itemid="https://www.xtremerepublic.com/location/kenya"><span itemprop="name">Kenya</span></a>
                                                                <meta itemprop="position" content="3" />
                            </li>
                                                                                    <li class="col-auto">
                                    <div class="">></div>
                                </li>
                                                        <li class="col-auto " itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                                                                    <a href="https://www.xtremerepublic.com/location/nairobi" itemscope itemtype="https://schema.org/WebPage" itemprop="item" itemid="https://www.xtremerepublic.com/location/nairobi"><span itemprop="name">Nairobi</span></a>
                                                                <meta itemprop="position" content="4" />
                            </li>
                                                                                    <li class="col-auto">
                                    <div class="">></div>
                                </li>
                                                        <li class="col-auto active" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                                                                    <span itemprop="name" class="text-dark-1">Naivasha Paragliding Experience</span>
                                                                <meta itemprop="position" content="5" />
                            </li>
                                            </ol>
                </div>
            </div>
        </div>
    </div>
        <link rel="preload" as="image" href="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/sagestudios-173.jpg" fetchpriority="high">
    
    <style>
    .modern-tour-banner {
        margin-bottom: 24px;
        max-height: none;
        z-index: 1;
        position: relative;
        min-height: 70vh;
        background-image: linear-gradient(135deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.55) 100%), url('https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/sagestudios-173.jpg');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        display: flex;
        align-items: flex-end;
        overflow: hidden;
    }
    .banner-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0.65) 100%);
    }
    .banner-content {
        position: relative;
        z-index: 2;
        width: 100%;
        padding: 32px 0 40px;
        color: white;
    }
    .banner-content .typewriter-title {
        color: #fff;
        max-width: 100%;
        line-height: 1.3;
        display: block !important;
        width: 100%;
        white-space: normal !important;
        word-break: normal;
        overflow-wrap: break-word;
        font-size: 25px !important;
        letter-spacing: normal;
        word-spacing: 0.1em;
    }
    .banner-content .typewriter-title .typewriter-text {
        display: inline;
        font-size: 25px !important;
        letter-spacing: normal;
        word-spacing: 0.1em;
    }
    .banner-content .tour-hero-meta {
        font-size: 15px;
        opacity: 0.92;
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }
    @media (max-width: 768px) {
        .modern-tour-banner {
            min-height: 60vh;
            background-attachment: scroll;
        }
        .banner-content {
            padding: 24px 0 28px;
        }
        .banner-content .typewriter-title {
            font-size: 25px !important;
        }
    }
    </style>
    
    <div class="modern-tour-banner">
        <div class="banner-overlay"></div>
        <div class="container">
            <div class="banner-content">
                <h1 class="tour-hero-title fw-600 typewriter-title typewriter-title--white text-white mb-10"
                    data-text="Naivasha Paragliding Experience"
                    data-speed="55"
                    data-delay="350"></h1>
                                    <div class="tour-hero-meta">
                        <i class="icon-location-2 text-16"></i>
                        <span>Nairobi - Kijabe</span>
                    </div>
                            </div>
        </div>
    </div>
        <div class="bravo_content">
                        <section class="pt-20 pb-10">
<style>

/* Modern Tour Details Page Styling - Overrides handled by tour-detail-redesign.css */
:root {
    --tour-main-color: #31964a;
    --tour-main-rgb: 49, 150, 74;
    --main-color: #31964a;
}

/* Luxury Page Enhancements — handled by tour-detail-redesign.css */

/* Section spacing */
.tour-section {
    margin-bottom: 24px;
}

/* Gallery — handled by tour-detail-redesign.css */

/* Section animations — handled by tour-detail-redesign.css (flash bug fixed) */

/* Card styling — handled by tour-detail-redesign.css */

/* Hotel carousel — handled by tour-detail-redesign.css */

/* Hotel slider — handled by tour-detail-redesign.css */

/* Navigation arrows & pagination — handled by tour-detail-redesign.css */

/* Gallery thumbnails — handled by tour-detail-redesign.css */

/* Tour Sidebar Navigation — handled by tour-detail-redesign.css */

/* Layout — handled by tour-detail-redesign.css */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

</style>

<div class="tour-detail-with-sidebar">

<!-- Tour Navigation Sidebar -->
<nav class="tour-sidebar">
    <ul class="tour-sidebar-nav">
        <li class="tour-sidebar-nav-item">
            <a href="#tour-overview" class="tour-sidebar-nav-link active" data-section="tour-overview">
                <span class="tour-sidebar-nav-icon"><i class="fa fa-binoculars" aria-hidden="true"></i><span class="sr-only">Overview</span></span>
                <span class="tour-sidebar-nav-text">Overview</span>
            </a>
        </li>
                <li class="tour-sidebar-nav-item">
            <a href="#tour-gallery" class="tour-sidebar-nav-link" data-section="tour-gallery">
                <span class="tour-sidebar-nav-icon"><i class="fa fa-camera" aria-hidden="true"></i><span class="sr-only">Gallery</span></span>
                <span class="tour-sidebar-nav-text">Gallery</span>
            </a>
        </li>
                                <li class="tour-sidebar-nav-item">
            <a href="#tour-itinerary" class="tour-sidebar-nav-link" data-section="tour-itinerary">
                <span class="tour-sidebar-nav-icon"><i class="fa fa-calendar" aria-hidden="true"></i><span class="sr-only">Itinerary</span></span>
                <span class="tour-sidebar-nav-text">Itinerary</span>
            </a>
        </li>
                        <li class="tour-sidebar-nav-item">
            <a href="#tour-map" class="tour-sidebar-nav-link" data-section="tour-map">
                <span class="tour-sidebar-nav-icon"><i class="fa fa-map-marker" aria-hidden="true"></i><span class="sr-only">Map</span></span>
                <span class="tour-sidebar-nav-text">Map</span>
            </a>
        </li>
                        <li class="tour-sidebar-nav-item">
            <a href="#tour-important-info" class="tour-sidebar-nav-link" data-section="tour-important-info">
                <span class="tour-sidebar-nav-icon"><i class="fa fa-info-circle" aria-hidden="true"></i><span class="sr-only">Important Info</span></span>
                <span class="tour-sidebar-nav-text">Important Info</span>
            </a>
        </li>
                        <li class="tour-sidebar-nav-item">
            <a href="#tour-faqs" class="tour-sidebar-nav-link" data-section="tour-faqs">
                <span class="tour-sidebar-nav-icon"><i class="fa fa-question-circle" aria-hidden="true"></i><span class="sr-only">FAQs</span></span>
                <span class="tour-sidebar-nav-text">FAQs</span>
            </a>
        </li>
                <li class="tour-sidebar-nav-item">
            <a href="#tour-pricing" class="tour-sidebar-nav-link" data-section="tour-pricing">
                <span class="tour-sidebar-nav-icon"><i class="fa fa-tag" aria-hidden="true"></i><span class="sr-only">Pricing</span></span>
                <span class="tour-sidebar-nav-text">Pricing</span>
            </a>
        </li>
        <li class="tour-sidebar-nav-item">
            <a href="#tour-booking" class="tour-sidebar-nav-link" data-section="tour-booking">
                <span class="tour-sidebar-nav-icon"><i class="fa fa-ticket" aria-hidden="true"></i><span class="sr-only">Book Now</span></span>
                <span class="tour-sidebar-nav-text">Book Now</span>
            </a>
        </li>
    </ul>

    
    <div id="sticky-booking-bar" class="sticky-booking-sidebar">
        <p class="sticky-booking-sidebar__tour-title" title="Naivasha Paragliding Experience">
            Naivasha Paragliding Experience
        </p>
        <p class="sticky-booking-sidebar__label">Starting from</p>
        <div class="sticky-booking-sidebar__price-row">
                        <span class="sticky-booking-sidebar__price">$250</span>
        </div>
        <p class="sticky-booking-sidebar__per">per person</p>
        <a href="#tour-booking"
           class="sticky-booking-sidebar__cta"
           onclick="event.preventDefault();document.getElementById('tour-booking')?.scrollIntoView({behavior:'smooth',block:'start'});">
            <i class="fa fa-calendar-check-o" aria-hidden="true"></i>
            Book Now
        </a>
                        <a href="https://wa.me/+254702716721?text=Hello%21+I%27m+interested+in+the+tour%3A+Naivasha+Paragliding+Experience.+Please+share+more+details."
           class="sticky-booking-sidebar__whatsapp"
           target="_blank" rel="noopener noreferrer">
            <i class="fa fa-whatsapp" aria-hidden="true"></i>Ask a Question
        </a>
            </div>
</nav>

<div class="tour-content-area">


<div class="tour-section">
    <div class="bg-white rounded-4 border-light shadow-4 px-30 py-30" id="tour-overview">
        <h3 class="text-22 fw-500">Overview</h3>
        <div class="text-dark-1 text-15 mt-10">
                            <p>Feel the rush of pure freedom as you take flight over one of Kenya&rsquo;s most breathtaking landscapes. Our paragliding adventure at Kenton Hill, Kijabe offers a once-in-a-lifetime opportunity to glide above the escarpment, with stunning panoramic views of Mt. Longonot, Lake Naivasha, and the vast Great Rift Valley stretching below.</p>
<p>Whether you&rsquo;re chasing adrenaline or serenity, this experience delivers both &mdash; all in a smooth, safe, and unforgettable glide lasting 10&ndash;15 minutes.</p>
<h4>What to Expect</h4>
<ul>
<li>Location: Kenton Hill, Kijabe &ndash; a scenic take-off point overlooking the Rift Valley</li>
<li>Flight Duration: 10 to 15 minutes (depending on wind conditions)</li>
</ul>
<p>&nbsp;</p>
<p><strong>Highlights:</strong></p>
<ul>
<li>Bird&rsquo;s-eye view of Mt. Longonot, Lake Naivasha, and the Rift Valley cliffs</li>
<li>Professionally guided tandem flight with certified instructors</li>
<li>Optional GoPro video and photo package to capture your flight</li>
<li>A short briefing and safety orientation before take-off</li>
</ul>
<h4>Perfect For</h4>
<ul>
<li>Adventure lovers</li>
<li>Nature photographers</li>
<li>Couples or groups seeking a unique outdoor experience</li>
<li>First-time flyers (no experience needed)</li>
</ul>
<p><strong>Optional add-ons:</strong></p>
<ul>
<li>
<p>Return transfers from Nairobi or Naivasha</p>
</li>
<li>
<p>Professional photo &amp; video package</p>
</li>
<li>
<p>Champagne picnic at the landing site</p>
</li>
</ul>
                    </div>
        
        <h3 class="text-22 fw-500 mt-40">Tour snapshot</h3>
        <div class="pt-10">
            <div class="d-flex flex-wrap" style="gap: 30px;">
                                <div class="d-flex" style="min-width: 150px;">
                    <i class="icon-clock text-22 text-blue-1 mr-10"></i>
                    <div class="text-15 lh-15">
                        Duration:<br> 1 Day
                    </div>
                </div>
                
                                <div class="d-flex" style="min-width: 150px;">
                    <i class="icon-customer text-22 text-blue-1 mr-10"></i>
                    <div class="text-15 lh-15">
                        Group Size:<br>
                                                    10 persons
                                            </div>
                </div>
                
                                                    <div class="d-flex" style="min-width: 150px;">
                    <i class="icon-location text-22 text-blue-1 mr-10"></i>
                    <div class="text-15 lh-15">
                        Location:<br> Nairobi
                    </div>
                </div>
                
                                                    <div class="d-flex" style="min-width: 150px;">
                    <i class="icon-route text-22 text-blue-1 mr-10"></i>
                    <div class="text-15 lh-15">
                        Tour Type: <br>Adrenaline Activities
                    </div>
                </div>
                            </div>
        </div>
    </div>
</div>


<div class="tour-section no-animate" id="tour-gallery">
    <div class="tour-section-card tour-gallery-card">
        <style>
        /* "Watch Video" button under the gallery — give it the same compact
           pill shape as other detail-page CTAs and a hover lift so it doesn't
           look like a bare anchor. */
        .detail-gallery-video-row {
            display: flex;
            justify-content: flex-start;
            margin-top: 14px;
        }
        .detail-gallery-video-btn {
            display: inline-flex !important;
            align-items: center;
            gap: 8px;
            border: 1px solid #d9d9d9 !important;
            background: #ffffff !important;
            color: #1a1a1a !important;
            font-weight: 600;
            box-shadow: 0 2px 6px rgba(0,0,0,0.04);
            transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
            cursor: pointer;
        }
        .detail-gallery-video-btn i {
            color: #e11d48;
            font-size: 18px;
            line-height: 1;
        }
        .detail-gallery-video-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(0,0,0,0.10);
            background: #fafafa !important;
        }
        .detail-gallery-video-btn:active {
            transform: translateY(0);
        }

        /* Make the video modal sit cleanly over the page; the close button
           is positioned above the iframe so it stays clickable even when the
           video stretches to full width. */
        .detail-video-modal .modal-content { background: transparent; }
        .detail-video-modal .modal-body { background: transparent; }
        .detail-video-modal .bravo_embed_video {
            width: 100%;
            height: 100%;
            display: block;
        }
    </style>

<section class="g-gallery detail-page-gallery">
    <div class="container-fluid px-0">
        <div class="row justify-center">
            <div class="col-12">

                <div id="hotelMainSlider" class="detail-page-gallery__main">
                                        <div class="hslide" style="display:block;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7088.jpg" alt="Photo 1">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7153.jpg" alt="Photo 2">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7179.jpg" alt="Photo 3">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/sagestudios-127.jpg" alt="Photo 4">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/sagestudios-110.jpg" alt="Photo 5">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/dsc-3871.jpg" alt="Photo 6">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/sagestudios-156.jpg" alt="Photo 7">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/dsc-3835.jpg" alt="Photo 8">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7162.jpg" alt="Photo 9">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7185.jpg" alt="Photo 10">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/dsc-3828.jpg" alt="Photo 11">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7040.jpg" alt="Photo 12">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/dsc-3910.jpg" alt="Photo 13">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7171.jpg" alt="Photo 14">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7145.jpg" alt="Photo 15">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7179.jpg" alt="Photo 16">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7227.jpg" alt="Photo 17">
                    </div>
                                        <div class="hslide" style="display:none;">
                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/sagestudios-92.jpg" alt="Photo 18">
                    </div>
                    
                                        <button type="button" onclick="hSlide(-1)" class="detail-page-gallery__nav detail-page-gallery__nav--prev" aria-label="Previous photo">&#8249;</button>
                    <button type="button" onclick="hSlide(1)" class="detail-page-gallery__nav detail-page-gallery__nav--next" aria-label="Next photo">&#8250;</button>
                    <div class="detail-page-gallery__counter">
                        <span id="hSlideCount">1</span> / 18
                    </div>
                                    </div>

                                <div class="detail-page-gallery__thumbs">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7088.jpg" alt=""
                         id="hthumb-0"
                         onclick="hSlideGo(0)"
                         class="detail-page-gallery__thumb is-active">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7153.jpg" alt=""
                         id="hthumb-1"
                         onclick="hSlideGo(1)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7179.jpg" alt=""
                         id="hthumb-2"
                         onclick="hSlideGo(2)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/sagestudios-127.jpg" alt=""
                         id="hthumb-3"
                         onclick="hSlideGo(3)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/sagestudios-110.jpg" alt=""
                         id="hthumb-4"
                         onclick="hSlideGo(4)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/dsc-3871.jpg" alt=""
                         id="hthumb-5"
                         onclick="hSlideGo(5)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/sagestudios-156.jpg" alt=""
                         id="hthumb-6"
                         onclick="hSlideGo(6)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/dsc-3835.jpg" alt=""
                         id="hthumb-7"
                         onclick="hSlideGo(7)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7162.jpg" alt=""
                         id="hthumb-8"
                         onclick="hSlideGo(8)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7185.jpg" alt=""
                         id="hthumb-9"
                         onclick="hSlideGo(9)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/dsc-3828.jpg" alt=""
                         id="hthumb-10"
                         onclick="hSlideGo(10)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7040.jpg" alt=""
                         id="hthumb-11"
                         onclick="hSlideGo(11)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/dsc-3910.jpg" alt=""
                         id="hthumb-12"
                         onclick="hSlideGo(12)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7171.jpg" alt=""
                         id="hthumb-13"
                         onclick="hSlideGo(13)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7145.jpg" alt=""
                         id="hthumb-14"
                         onclick="hSlideGo(14)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7179.jpg" alt=""
                         id="hthumb-15"
                         onclick="hSlideGo(15)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7227.jpg" alt=""
                         id="hthumb-16"
                         onclick="hSlideGo(16)"
                         class="detail-page-gallery__thumb ">
                                        <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/sagestudios-92.jpg" alt=""
                         id="hthumb-17"
                         onclick="hSlideGo(17)"
                         class="detail-page-gallery__thumb ">
                                    </div>
                
                
            </div>
        </div>

            </div>
</section>

<script>
(function(){
    var _hIdx = 0;
    var _hTotal = 18;

    window.hSlideGo = function(idx) {
        idx = ((idx % _hTotal) + _hTotal) % _hTotal;
        document.querySelectorAll('.hslide').forEach(function(s){ s.style.display='none'; });
        var slides = document.querySelectorAll('.hslide');
        if (slides[idx]) slides[idx].style.display = 'block';
        _hIdx = idx;
        var c = document.getElementById('hSlideCount');
        if (c) c.textContent = idx + 1;
        for (var i = 0; i < _hTotal; i++) {
            var th = document.getElementById('hthumb-'+i);
            if (!th) continue;
            th.classList.toggle('is-active', i === idx);
        }
    };

    window.hSlide = function(dir) { hSlideGo(_hIdx + dir); };
})();
</script>
    </div>
</div>




<div class="tour-section">
    <div class="bg-white rounded-4 border-light shadow-4 px-30 py-30" id="tour-itinerary">
        <h3 class="text-22 fw-500 mb-10">Itinerary</h3>
        <style>
/* ── Luxury Itinerary Timeline ── */

/* Timeline wrapper — vertical gold line */
.lux-itinerary {
    position: relative;
    padding-left: 0;
}

.lux-itinerary::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: linear-gradient(to bottom,
        rgba(var(--brand-primary-rgb, 49,150,74),0.8) 0%,
        rgba(var(--brand-primary-rgb, 49,150,74),0.3) 80%,
        transparent 100%);
    z-index: 0;
}

/* Each day row */
.lux-day {
    position: relative;
    display: flex;
    gap: 18px;
    margin-bottom: 12px;
    align-items: flex-start;
}

/* Day number badge — gold circle */
.lux-day-badge {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary, #31964a) 0%, var(--brand-primary-light, #5fb673) 100%);
    color: var(--brand-heading, #0a0f1e);
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(var(--brand-primary-rgb, 49,150,74),0.40);
    position: relative;
    z-index: 1;
    border: 2px solid #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Card body */
.lux-day-card {
    flex: 1;
    background: #FFFFFF;
    border: 1px solid rgba(var(--brand-primary-rgb, 49,150,74),0.18);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(13,27,42,0.06);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.lux-day-card:hover {
    box-shadow: 0 6px 24px rgba(13,27,42,0.10);
    border-color: rgba(var(--brand-primary-rgb, 49,150,74),0.40);
}

.lux-day:hover .lux-day-badge {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(var(--brand-primary-rgb, 49,150,74),0.55);
}

/* Card header — gold left accent bar */
.lux-day-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 18px 12px;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
    gap: 12px;
}

.lux-day-header:hover {
    background: rgba(var(--brand-primary-rgb, 49,150,74),0.04);
    border-left-color: rgba(var(--brand-primary-rgb, 49,150,74),0.50);
}

.lux-day-card.is-open .lux-day-header {
    background: linear-gradient(135deg, rgba(var(--brand-primary-rgb, 49,150,74),0.07) 0%, rgba(var(--brand-primary-rgb, 49,150,74),0.03) 100%);
    border-left-color: var(--brand-primary, #31964a);
}

.lux-day-titles {
    flex: 1;
    min-width: 0;
}

.lux-day-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-heading, #0a0f1e);
    line-height: 1.35;
    margin: 0 0 3px;
}

.lux-day-subtitle {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.4;
    margin: 0;
}

/* Toggle chevron */
.lux-day-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(var(--brand-primary-rgb, 49,150,74),0.10);
    border: 1px solid rgba(var(--brand-primary-rgb, 49,150,74),0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary, #31964a);
    font-size: 11px;
    transition: transform 0.25s ease, background 0.2s ease;
    cursor: pointer;
}

.lux-day-card.is-open .lux-day-toggle {
    transform: rotate(180deg);
    background: rgba(var(--brand-primary-rgb, 49,150,74),0.18);
}

/* Expand/collapse content */
.lux-day-content {
    display: none;
    padding: 0 18px 16px;
    border-top: 1px solid rgba(var(--brand-primary-rgb, 49,150,74),0.12);
    background: #FAFAF8;
}

.lux-day-card.is-open .lux-day-content {
    display: block;
}

.lux-day-content img {
    max-width: 220px;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(13,27,42,0.12);
    margin-top: 14px;
    margin-bottom: 10px;
}

.lux-day-content .lux-rich-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.65;
    margin-top: 10px;
}

/* "See details" link */
.lux-see-details {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-primary, #31964a);
    text-decoration: none;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-top: 8px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s ease;
}

.lux-see-details:hover { color: var(--brand-primary-dark, #247339); }

.lux-itinerary-expand-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--brand-primary, #31964a) 0%, var(--brand-primary-dark, #247339) 100%);
    color: #fff;
}
.lux-itinerary-expand-btn i {
    font-size: 11px;
    margin-right: 6px;
}

/* Active (first) item open by default */
.lux-day-card.is-open .lux-day-content { display: block; }

/* Mobile */
@media (max-width: 767px) {
    .lux-itinerary::before { left: 15px; }
    .lux-day { gap: 12px; }
    .lux-day-badge { width: 32px; height: 32px; font-size: 11px; }
    .lux-day-header { padding: 12px 14px 10px; }
    .lux-day-title { font-size: 14px; }
    .lux-day-content { padding: 0 14px 14px; }
    .lux-day-content img { max-width: 160px; height: 100px; }
}
</style>

<div class="lux-itinerary">
                <button id="expand-all-itinerary" type="button" class="lux-itinerary-expand-btn mb-3">
            <i class="fa fa-chevron-down" aria-hidden="true"></i>
            Expand All Days
        </button>
                        <div class="lux-day">
            
            <div class="lux-day-badge">1</div>

            
            <div class="lux-day-card is-open">
                
                <div class="lux-day-header" onclick="luxToggleDay(this)">
                    <div class="lux-day-titles">
                        <p class="lux-day-title">0900 Hrs</p>
                                                    <p class="lux-day-subtitle">Pickup at the Landing Area</p>
                                            </div>
                    <div class="lux-day-toggle">
                        <i class="fa fa-chevron-down" aria-hidden="true"></i>
                    </div>
                </div>

                
                                <div class="lux-day-content">
                                            <img src=""
                             alt="0900 Hrs"
                             loading="lazy">
                                                        </div>
                            </div>
        </div>
                        <div class="lux-day">
            
            <div class="lux-day-badge">2</div>

            
            <div class="lux-day-card ">
                
                <div class="lux-day-header" onclick="luxToggleDay(this)">
                    <div class="lux-day-titles">
                        <p class="lux-day-title">0945 Hrs</p>
                                                    <p class="lux-day-subtitle">Safety Briefing &amp; Harnessing</p>
                                            </div>
                    <div class="lux-day-toggle">
                        <i class="fa fa-chevron-down" aria-hidden="true"></i>
                    </div>
                </div>

                
                                <div class="lux-day-content">
                                            <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/sagestudios-127.jpg"
                             alt="0945 Hrs"
                             loading="lazy">
                                                        </div>
                            </div>
        </div>
                        <div class="lux-day">
            
            <div class="lux-day-badge">3</div>

            
            <div class="lux-day-card ">
                
                <div class="lux-day-header" onclick="luxToggleDay(this)">
                    <div class="lux-day-titles">
                        <p class="lux-day-title">1000 Hrs</p>
                                                    <p class="lux-day-subtitle">Parawaiting</p>
                                            </div>
                    <div class="lux-day-toggle">
                        <i class="fa fa-chevron-down" aria-hidden="true"></i>
                    </div>
                </div>

                
                                <div class="lux-day-content">
                                            <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7040.jpg"
                             alt="1000 Hrs"
                             loading="lazy">
                                                                <div class="lux-rich-text">Waiting for the best flying wind conditions</div>
                                    </div>
                            </div>
        </div>
                        <div class="lux-day">
            
            <div class="lux-day-badge">4</div>

            
            <div class="lux-day-card ">
                
                <div class="lux-day-header" onclick="luxToggleDay(this)">
                    <div class="lux-day-titles">
                        <p class="lux-day-title">1000 Hrs</p>
                                                    <p class="lux-day-subtitle">Tandem Paragliding</p>
                                            </div>
                    <div class="lux-day-toggle">
                        <i class="fa fa-chevron-down" aria-hidden="true"></i>
                    </div>
                </div>

                
                                <div class="lux-day-content">
                                            <img src="https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7179.jpg"
                             alt="1000 Hrs"
                             loading="lazy">
                                                        </div>
                            </div>
        </div>
            </div>

<script>
document.getElementById('expand-all-itinerary')?.addEventListener('click', function() {
  const expanded = this.dataset.expanded === 'true';
  document.querySelectorAll('.lux-day-card').forEach(card => {
    if (!expanded) { card.classList.add('is-open'); } else { card.classList.remove('is-open'); }
  });
  this.dataset.expanded = !expanded;
  if (!expanded) {
    this.innerHTML = '<i class="fa fa-chevron-up" aria-hidden="true"></i> Collapse All Days';
  } else {
    this.innerHTML = '<i class="fa fa-chevron-down" aria-hidden="true"></i> Expand All Days';
  }
});
</script>

<script>
function luxToggleDay(header) {
    var card = header.closest('.lux-day-card');
    card.classList.toggle('is-open');
}
</script>
    </div>
</div>


<div class="tour-section">
    <div class="bg-white rounded-4 border-light shadow-4 px-30 py-30" id="tour-map">
        <h3 class="text-22 fw-500 mb-10">Map</h3>
        <div class="g-location">
            <div class="location-map">
                <div class="map-controls">
                    <div class="route-info">
                        <h6>Tour Route</h6>
                                                <div class="route-stats">
                            <div class="stat-item">
                                <i class="fa fa-map-marker-alt"></i>
                                <span>Stops: <strong>2</strong></span>
                            </div>
                            <div class="stat-item">
                                <i class="fa fa-route"></i>
                                <span>Route: <strong>Active</strong></span>
                            </div>
                        </div>
                    </div>
                    <div class="map-actions">
                        <button type="button" class="btn btn-sm btn-outline-primary" onclick="fitRouteBounds()" title="Fit Route to Map">
                            <i class="fa fa-expand-arrows-alt"></i>
                        </button>
                        <button type="button" class="btn btn-sm btn-outline-secondary" onclick="toggleRouteVisibility()" title="Toggle Route">
                            <i class="fa fa-eye"></i>
                        </button>
                    </div>
                </div>
                <div id="map_content" class="map rounded-4" style="min-height: 400px"></div>
            </div>
        </div>
    </div>
</div>


<div class="tour-section">
    <div class="bg-white rounded-4 border-light shadow-4 px-30 py-30" id="tour-important-info">
        <h3 class="text-22 fw-500 mb-20">Important Information</h3>
        <div class="col-lg-4 col-md-6">
                <div class="fw-500 mb-10">Tour Type</div>
                                <ul class="list-disc">
                                                                    <li>
                                                                                                                    Adrenaline
                        </li>
                                    </ul>
            </div>
            
                    <div class="mt-30 tour-ie-section-wrap">
                <style>
/* ── Luxury Include / Exclude ── */

.lux-ie-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(13,27,42,0.08);
    border: 1px solid rgba(var(--brand-primary-rgb, 49,150,74),0.15);
}

.lux-ie-wrap--single {
    grid-template-columns: 1fr;
}

.lux-included {
    background: linear-gradient(160deg, var(--brand-primary-soft, #e8f5ec) 0%, var(--brand-primary-light, #b7e3c4) 100%);
    padding: 24px;
    border-right: 1px solid rgba(var(--brand-primary-rgb, 49,150,74),0.20);
}

.lux-excluded {
    background: linear-gradient(160deg, var(--brand-heading, #0a0f1e) 0%, var(--brand-primary-dark, #247339) 100%);
    padding: 24px;
}

.lux-ie-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
}

.lux-included .lux-ie-header {
    border-bottom: 2px solid rgba(var(--brand-primary-rgb, 49,150,74),0.40);
}

.lux-excluded .lux-ie-header {
    border-bottom: 2px solid rgba(255,255,255,0.15);
}

.lux-ie-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.lux-included .lux-ie-badge {
    background: linear-gradient(135deg, var(--brand-primary, #31964a) 0%, var(--brand-primary-light, #5fb673) 100%);
    color: var(--brand-heading, #0a0f1e);
    box-shadow: 0 2px 8px rgba(var(--brand-primary-rgb, 49,150,74),0.35);
}

.lux-excluded .lux-ie-badge {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
}

.lux-ie-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.lux-included .lux-ie-title { color: var(--brand-heading, #0a0f1e); }
.lux-excluded .lux-ie-title { color: #FFFFFF; }

.lux-ie-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lux-ie-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    transition: background 0.18s ease;
}

.lux-included .lux-ie-item:hover {
    background: rgba(var(--brand-primary-rgb, 49,150,74),0.12);
}

.lux-excluded .lux-ie-item:hover {
    background: rgba(255,255,255,0.06);
}

.lux-ie-dot {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    margin-top: 1px;
}

.lux-included .lux-ie-dot {
    background: linear-gradient(135deg, var(--brand-primary, #31964a) 0%, var(--brand-primary-light, #5fb673) 100%);
    color: var(--brand-heading, #0a0f1e);
}

.lux-excluded .lux-ie-dot {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.30);
}

.lux-included .lux-ie-item span { color: #1E2A38; }
.lux-excluded .lux-ie-item span { color: rgba(255,255,255,0.88); }

@media (max-width: 767px) {
    .lux-ie-wrap {
        grid-template-columns: 1fr;
    }
    .lux-included {
        border-right: none;
        border-bottom: 1px solid rgba(var(--brand-primary-rgb, 49,150,74),0.20);
    }
    .lux-included,
    .lux-excluded {
        padding: 18px;
    }
}
</style>

<div class="include-exclude-container">
    <div class="lux-ie-wrap lux-ie-wrap--single">

                <div class="lux-included">
            <div class="lux-ie-header">
                <div class="lux-ie-badge">✓</div>
                <h5 class="lux-ie-title">Included</h5>
            </div>
            <ul class="lux-ie-list">
                                <li class="lux-ie-item">
                    <div class="lux-ie-dot">✓</div>
                    <span>Takeoff fees</span>
                </li>
                                <li class="lux-ie-item">
                    <div class="lux-ie-dot">✓</div>
                    <span>Landing fees</span>
                </li>
                                <li class="lux-ie-item">
                    <div class="lux-ie-dot">✓</div>
                    <span>Tandem Paragliding</span>
                </li>
                                <li class="lux-ie-item">
                    <div class="lux-ie-dot">✓</div>
                    <span>Uphill Bike Transfers</span>
                </li>
                                <li class="lux-ie-item">
                    <div class="lux-ie-dot">✓</div>
                    <span>GoPro Footage</span>
                </li>
                                <li class="lux-ie-item">
                    <div class="lux-ie-dot">✓</div>
                    <span>Transport from Nairobi Hotel and Back</span>
                </li>
                            </ul>
        </div>
        
                <div class="lux-excluded">
            <div class="lux-ie-header">
                <div class="lux-ie-badge">✕</div>
                <h5 class="lux-ie-title">Not Included</h5>
            </div>
            <ul class="lux-ie-list">
                                <li class="lux-ie-item">
                    <div class="lux-ie-dot">✕</div>
                    <span>Transfer/Transport</span>
                </li>
                                <li class="lux-ie-item">
                    <div class="lux-ie-dot">✕</div>
                    <span>Videography and photography</span>
                </li>
                                <li class="lux-ie-item">
                    <div class="lux-ie-dot">✕</div>
                    <span>Meals</span>
                </li>
                            </ul>
        </div>
        
    </div>
</div>
            </div>
            </div>
</div>


<div class="tour-section">
    <div class="bg-white rounded-4 border-light shadow-4 px-30 py-30" id="tour-faqs">
        <h3 class="text-22 fw-500 mb-20">FAQs about Naivasha Paragliding Experience</h3>
        <div class="bravo-faq-lists">
        <div class="accordion -simple row y-gap-10 js-accordion" id="faq-accordion">
                            <div class="col-12">
                    <div class="accordion__item px-20 py-10 border-light rounded-4">
                        <div class="accordion__button d-flex items-center">
                            <div class="accordion__icon size-40 flex-center bg-light-2 rounded-full mr-20">
                                <i class="icon-plus"></i>
                                <i class="icon-minus"></i>
                            </div>

                            <div class="button text-dark-1">Do I need any prior paragliding experience to join this tour?</div>
                        </div>

                        <div class="accordion__content">
                            <div class="pt-10 pl-60">
                                                                    <p class="text-15">No, this is a tandem flight, so no prior experience is needed. A certified pilot will guide you throughout, making it suitable even for first-time flyers.</p>
                                                            </div>
                        </div>
                    </div>
                </div>
                            <div class="col-12">
                    <div class="accordion__item px-20 py-10 border-light rounded-4">
                        <div class="accordion__button d-flex items-center">
                            <div class="accordion__icon size-40 flex-center bg-light-2 rounded-full mr-20">
                                <i class="icon-plus"></i>
                                <i class="icon-minus"></i>
                            </div>

                            <div class="button text-dark-1">How long does the paragliding flight last?</div>
                        </div>

                        <div class="accordion__content">
                            <div class="pt-10 pl-60">
                                                                    <p class="text-15">The flight typically lasts 10–15 minutes, depending on wind conditions.</p>
                                                            </div>
                        </div>
                    </div>
                </div>
                            <div class="col-12">
                    <div class="accordion__item px-20 py-10 border-light rounded-4">
                        <div class="accordion__button d-flex items-center">
                            <div class="accordion__icon size-40 flex-center bg-light-2 rounded-full mr-20">
                                <i class="icon-plus"></i>
                                <i class="icon-minus"></i>
                            </div>

                            <div class="button text-dark-1">Where will the take-off and landing happen?</div>
                        </div>

                        <div class="accordion__content">
                            <div class="pt-10 pl-60">
                                                                    <p class="text-15">Take-off is from Kenton Hill, Kijabe, which overlooks the Rift Valley. The exact landing site depends on wind direction, but you’ll experience scenic views of Mt. Longonot, Lake Naivasha, and the Rift Valley cliffs. However, if the weather is not good we might have to change takeoff location to Maiella, Katelembu, Eburru</p>
                                                            </div>
                        </div>
                    </div>
                </div>
                            <div class="col-12">
                    <div class="accordion__item px-20 py-10 border-light rounded-4">
                        <div class="accordion__button d-flex items-center">
                            <div class="accordion__icon size-40 flex-center bg-light-2 rounded-full mr-20">
                                <i class="icon-plus"></i>
                                <i class="icon-minus"></i>
                            </div>

                            <div class="button text-dark-1">Is safety equipment provided, and who will be flying with me?</div>
                        </div>

                        <div class="accordion__content">
                            <div class="pt-10 pl-60">
                                                                    <p class="text-15">Yes. All safety gear is provided, and you will be flying in tandem with a licensed, professional pilot. There is also a safety briefing before the flight.</p>
                                                            </div>
                        </div>
                    </div>
                </div>
                            <div class="col-12">
                    <div class="accordion__item px-20 py-10 border-light rounded-4">
                        <div class="accordion__button d-flex items-center">
                            <div class="accordion__icon size-40 flex-center bg-light-2 rounded-full mr-20">
                                <i class="icon-plus"></i>
                                <i class="icon-minus"></i>
                            </div>

                            <div class="button text-dark-1">What additional services do you offer?</div>
                        </div>

                        <div class="accordion__content">
                            <div class="pt-10 pl-60">
                                                                    <p class="text-15">Return transfers from Nairobi or Naivasha can be arranged.

Optional champagne picnic at the landing site. 

You can customize your experience with add-ons like videography, photography, and transport.</p>
                                                            </div>
                        </div>
                    </div>
                </div>
                            <div class="col-12">
                    <div class="accordion__item px-20 py-10 border-light rounded-4">
                        <div class="accordion__button d-flex items-center">
                            <div class="accordion__icon size-40 flex-center bg-light-2 rounded-full mr-20">
                                <i class="icon-plus"></i>
                                <i class="icon-minus"></i>
                            </div>

                            <div class="button text-dark-1">Can Pets paraglide</div>
                        </div>

                        <div class="accordion__content">
                            <div class="pt-10 pl-60">
                                                                    <p class="text-15">Yes, some pets can paraglide, contact us to share the pics of the pets and get guidelines on harness and safety</p>
                                                            </div>
                        </div>
                    </div>
                </div>
                            <div class="col-12">
                    <div class="accordion__item px-20 py-10 border-light rounded-4">
                        <div class="accordion__button d-flex items-center">
                            <div class="accordion__icon size-40 flex-center bg-light-2 rounded-full mr-20">
                                <i class="icon-plus"></i>
                                <i class="icon-minus"></i>
                            </div>

                            <div class="button text-dark-1">Are there any weight or age limits?</div>
                        </div>

                        <div class="accordion__content">
                            <div class="pt-10 pl-60">
                                                                    <p class="text-15">Yes. The typical weight range for tandem flights is 30–110 kg, and minors must be accompanied by a parent or guardian. (Exact limits may vary based on wind conditions.)</p>
                                                            </div>
                        </div>
                    </div>
                </div>
                            <div class="col-12">
                    <div class="accordion__item px-20 py-10 border-light rounded-4">
                        <div class="accordion__button d-flex items-center">
                            <div class="accordion__icon size-40 flex-center bg-light-2 rounded-full mr-20">
                                <i class="icon-plus"></i>
                                <i class="icon-minus"></i>
                            </div>

                            <div class="button text-dark-1">What should I wear for the paragliding experience?</div>
                        </div>

                        <div class="accordion__content">
                            <div class="pt-10 pl-60">
                                                                    <p class="text-15">Wear comfortable outdoor clothing, closed shoes, and a light jacket. The wind can be cooler at higher altitude.</p>
                                                            </div>
                        </div>
                    </div>
                </div>
                            <div class="col-12">
                    <div class="accordion__item px-20 py-10 border-light rounded-4">
                        <div class="accordion__button d-flex items-center">
                            <div class="accordion__icon size-40 flex-center bg-light-2 rounded-full mr-20">
                                <i class="icon-plus"></i>
                                <i class="icon-minus"></i>
                            </div>

                            <div class="button text-dark-1">Can the activity be cancelled due to weather?</div>
                        </div>

                        <div class="accordion__content">
                            <div class="pt-10 pl-60">
                                                                    <p class="text-15">Yes. Paragliding is highly weather-dependent. If wind or weather conditions are unsafe, the flight may be delayed or rescheduled for your safety.</p>
                                                            </div>
                        </div>
                    </div>
                </div>
                            <div class="col-12">
                    <div class="accordion__item px-20 py-10 border-light rounded-4">
                        <div class="accordion__button d-flex items-center">
                            <div class="accordion__icon size-40 flex-center bg-light-2 rounded-full mr-20">
                                <i class="icon-plus"></i>
                                <i class="icon-minus"></i>
                            </div>

                            <div class="button text-dark-1">How early should I arrive before my flight time?</div>
                        </div>

                        <div class="accordion__content">
                            <div class="pt-10 pl-60">
                                                                    <p class="text-15">It’s recommended to arrive 20–30 minutes early for briefing, gearing up, and preparation before take-off.</p>
                                                            </div>
                        </div>
                    </div>
                </div>
                    </div>
    </div>

    <script>
    (function () {
        function initFaqAccordion() {
            var accordion = document.getElementById('faq-accordion');
            if (!accordion) return;

            // Hide all content panels initially
            accordion.querySelectorAll('.accordion__content').forEach(function (el) {
                el.style.display = 'none';
            });

            accordion.querySelectorAll('.accordion__button').forEach(function (btn) {
                // Remove any existing listener by cloning
                var newBtn = btn.cloneNode(true);
                btn.parentNode.replaceChild(newBtn, btn);

                newBtn.style.cursor = 'pointer';
                newBtn.addEventListener('click', function (e) {
                    e.stopPropagation();
                    var item    = newBtn.closest('.accordion__item');
                    var content = item.querySelector('.accordion__content');
                    var isOpen  = item.classList.contains('is-active');

                    // Close all
                    accordion.querySelectorAll('.accordion__item').forEach(function (i) {
                        i.classList.remove('is-active');
                        i.querySelector('.accordion__content').style.display = 'none';
                    });

                    // Open clicked if it was closed
                    if (!isOpen) {
                        item.classList.add('is-active');
                        content.style.display = 'block';
                    }
                });
            });
        }

        // Run immediately and also after DOM ready (handles both inline and deferred cases)
        if (document.readyState === 'loading') {
            document.addEventListener('DOMContentLoaded', initFaqAccordion);
        } else {
            initFaqAccordion();
        }
        // Fallback: re-run after a short delay in case Vue/JS re-renders the page
        setTimeout(initFaqAccordion, 800);
    })();
    </script>

<style>
/* Mobile FAQ Clickability Fixes */
@media (max-width: 768px) {
    .bravo-faq-lists {
        padding: 0 10px;
    }
    .bravo-faq-lists .accordion__item {
        padding: 8px 15px !important;
        margin-bottom: 8px;
        position: relative;
    }
    .bravo-faq-lists .accordion__button {
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 10px;
        cursor: pointer !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        position: relative;
        z-index: 1;
        pointer-events: auto !important;
        min-height: 44px; /* Minimum touch target size */
        padding: 8px 0;
    }
    .bravo-faq-lists .accordion__button:hover,
    .bravo-faq-lists .accordion__button:active {
        opacity: 0.8;
    }
    .bravo-faq-lists .accordion__icon {
        min-width: 32px !important;
        width: 32px !important;
        height: 32px !important;
        margin-right: 12px !important;
        flex-shrink: 0;
        pointer-events: none;
        touch-action: none;
    }
    .bravo-faq-lists .accordion__button .button {
        font-size: 14px !important;
        line-height: 1.4;
        word-wrap: break-word;
        flex: 1;
        padding-right: 5px;
        pointer-events: none;
        touch-action: none;
    }
    .bravo-faq-lists .accordion__content {
        margin-top: 5px;
    }
    .bravo-faq-lists .accordion__content > div {
        padding-left: 0 !important;
        padding-top: 8px !important;
    }
    .bravo-faq-lists .accordion__content p {
        font-size: 13px !important;
        line-height: 1.5;
        word-wrap: break-word;
    }
    
    /* Ensure entire button area is clickable */
    .bravo-faq-lists .accordion__item.is-active .accordion__button {
        opacity: 1;
    }
}
@media (max-width: 480px) {
    .bravo-faq-lists .accordion__item {
        padding: 6px 12px !important;
    }
    .bravo-faq-lists .accordion__button {
        min-height: 48px; /* Larger touch target on small screens */
    }
    .bravo-faq-lists .accordion__icon {
        min-width: 28px !important;
        width: 28px !important;
        height: 28px !important;
        margin-right: 10px !important;
    }
    .bravo-faq-lists .accordion__button .button {
        font-size: 13px !important;
    }
}

/* Ensure accordion works on all devices */
.bravo-faq-lists .accordion__button {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

/* Additional spacing reduction */
.bravo-faq-lists .col-12 {
    margin-bottom: 5px !important;
}
.bravo-faq-lists .accordion {
    gap: 5px !important;
}
.bravo-faq-lists .accordion__item {
    margin-bottom: 5px !important;
}
</style>    </div>
</div>


<div class="tour-section">
    <div class="mb-15" id="tour-pricing">
        <script>
// Initialize mobile counters for occupancy tiers
(function() {
    function initMobileCounters() {
        document.querySelectorAll('.occupancy-cards-mobile .js-counter, .accommodation-cards-mobile .js-counter, .vehicle-cards-mobile .js-counter').forEach(counter => {
            const input = counter.querySelector('.js-count');
            const downBtn = counter.querySelector('.js-down');
            const upBtn = counter.querySelector('.js-up');
            
            if (!input || !downBtn || !upBtn) return;
            
            // Remove existing listeners
            const newDownBtn = downBtn.cloneNode(true);
            const newUpBtn = upBtn.cloneNode(true);
            downBtn.parentNode.replaceChild(newDownBtn, downBtn);
            upBtn.parentNode.replaceChild(newUpBtn, upBtn);
            
            newDownBtn.addEventListener('click', function(e) {
                e.preventDefault();
                e.stopPropagation();
                let val = parseInt(input.value) || 0;
                let min = parseInt(input.getAttribute('min')) || 0;
                if (val > min) {
                    input.value = val - 1;
                    input.dispatchEvent(new Event('change', { bubbles: true }));
                }
            });
            
            newUpBtn.addEventListener('click', function(e) {
                e.preventDefault();
                e.stopPropagation();
                let val = parseInt(input.value) || 0;
                let max = parseInt(input.getAttribute('max')) || 50;
                if (val < max) {
                    input.value = val + 1;
                    input.dispatchEvent(new Event('change', { bubbles: true }));
                }
            });
        });
        
    }

    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', initMobileCounters);
    } else {
        initMobileCounters();
    }
    
    // Re-initialize when accordion opens
    document.addEventListener('click', function(e) {
        if (e.target.closest('.setting-title')) {
            setTimeout(initMobileCounters, 300);
        }
    });
})();
</script>





<script>
// Initialize structure-specific controls (residency, occupancy, vehicle, room selectors)
(function() {
    function initStructureSpecificControls() {
        try {
            
            // 1. RESIDENCY TOGGLE BUTTONS
            document.querySelectorAll('.residency-btn').forEach(button => {
                const newButton = button.cloneNode(true);
                button.parentNode.replaceChild(newButton, button);
                
                newButton.addEventListener('click', function(e) {
                    e.preventDefault();
                    e.stopPropagation();
                    
                    const structureId = this.getAttribute('data-structure-id');
                    const residency = this.getAttribute('data-residency');
                    
                    // Update active state
                    document.querySelectorAll(`.residency-btn[data-structure-id="${structureId}"]`).forEach(btn => {
                        btn.classList.remove('active');
                    });
                    this.classList.add('active');
                    
                    
                    // Store residency selection
                    if (!window.pricingSelections) window.pricingSelections = {};
                    if (!window.pricingSelections[structureId]) window.pricingSelections[structureId] = {};
                    window.pricingSelections[structureId].residency = residency;
                });
            });
            
            // 2. OCCUPANCY TOGGLE BUTTONS (for accommodation)
            document.querySelectorAll('.occupancy-btn').forEach(button => {
                const newButton = button.cloneNode(true);
                button.parentNode.replaceChild(newButton, button);
                
                newButton.addEventListener('click', function(e) {
                    e.preventDefault();
                    e.stopPropagation();
                    
                    const structureId = this.getAttribute('data-structure-id');
                    const occupancy = this.getAttribute('data-occupancy');
                    
                    // Update active state
                    document.querySelectorAll(`.occupancy-btn[data-structure-id="${structureId}"]`).forEach(btn => {
                        btn.classList.remove('active');
                    });
                    this.classList.add('active');
                    
                    
                    // Store occupancy selection
                    if (!window.pricingSelections) window.pricingSelections = {};
                    if (!window.pricingSelections[structureId]) window.pricingSelections[structureId] = {};
                    window.pricingSelections[structureId].occupancy = occupancy;
                });
            });
            
            // 3. VEHICLE SELECTOR
            document.querySelectorAll('[class*="vehicle-selector-"]').forEach(selector => {
                selector.addEventListener('change', function(e) {
                    const structureId = this.getAttribute('data-structure-id');
                    const selectedOption = this.options[this.selectedIndex];
                    
                    if (selectedOption.value) {
                        const pricingModel = selectedOption.getAttribute('data-pricing-model');
                        const maxPassengers = selectedOption.getAttribute('data-max-passengers');
                        
                        // Show counter container
                        const counterContainer = document.querySelector(`.vehicle-counter-container-${structureId}`);
                        if (counterContainer) {
                            counterContainer.style.display = 'block';
                            
                            // Update labels based on pricing model
                            const label = document.querySelector(`.counter-label-${structureId}`);
                            const subtitle = document.querySelector(`.counter-subtitle-${structureId}`);
                            
                            if (pricingModel === 'per_vehicle') {
                                if (label) label.textContent = 'Vehicles';
                                if (subtitle) subtitle.textContent = 'Number of vehicles';
                            } else {
                                if (label) label.textContent = 'Passengers';
                                if (subtitle) subtitle.textContent = `Max ${maxPassengers} passengers`;
                            }
                        }
                        
                        // Store vehicle selection
                        if (!window.pricingSelections) window.pricingSelections = {};
                        if (!window.pricingSelections[structureId]) window.pricingSelections[structureId] = {};
                        window.pricingSelections[structureId].vehicleId = selectedOption.value;
                        window.pricingSelections[structureId].pricingModel = pricingModel;
                        window.pricingSelections[structureId].maxPassengers = maxPassengers;
                        
                    }
                });
            });
            
            // 4. ROOM SELECTOR
            document.querySelectorAll('[class*="room-selector-"]').forEach(selector => {
                selector.addEventListener('change', function(e) {
                    const structureId = this.getAttribute('data-structure-id');
                    const selectedOption = this.options[this.selectedIndex];
                    
                    if (selectedOption.value) {
                        // Store room selection
                        if (!window.pricingSelections) window.pricingSelections = {};
                        if (!window.pricingSelections[structureId]) window.pricingSelections[structureId] = {};
                        window.pricingSelections[structureId].roomId = selectedOption.value;
                        
                    }
                });
            });
            
            // 5. SEASON SELECTOR
            document.querySelectorAll('[class*="season-selector-"]').forEach(selector => {
                selector.addEventListener('change', function(e) {
                    const structureId = this.getAttribute('data-structure-id');
                    const selectedOption = this.options[this.selectedIndex];
                    
                    if (selectedOption.value) {
                        // Store season selection
                        if (!window.pricingSelections) window.pricingSelections = {};
                        if (!window.pricingSelections[structureId]) window.pricingSelections[structureId] = {};
                        window.pricingSelections[structureId].seasonIndex = selectedOption.value;
                        
                    }
                });
            });
            
        } catch (error) {
        }
    }
    
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', initStructureSpecificControls);
    } else {
        initStructureSpecificControls();
    }
    
    // Re-initialize when accordion opens
    document.addEventListener('click', function(e) {
        if (e.target.closest('.setting-title')) {
            setTimeout(initStructureSpecificControls, 300);
        }
    });
})();
</script>



<script>
// GLOBAL: Update total guests function (used by all counter types)
window.updateTotalGuests = function(structureId, directValues) {
    try {
        
        const totalEl = document.querySelector(`.total-guests-${structureId}`);
        if (!totalEl) {
            return;
        }
        
        // Get all counter types for this structure
        const adultsEl = document.querySelector(`.guest-selection-section [data-guest-type="adults"][data-structure-id="${structureId}"]`);
        const childrenEl = document.querySelector(`.guest-selection-section [data-guest-type="children"][data-structure-id="${structureId}"]`);
        const nightsEl = document.querySelector(`.guest-selection-section [data-guest-type="nights"][data-structure-id="${structureId}"]`);
        const vehiclesEl = document.querySelector(`.guest-selection-section [data-guest-type="vehicles"][data-structure-id="${structureId}"]`);
        
        
        // Use direct values if provided, otherwise read from DOM
        let adults = 0, children = 0, nights = 0, vehicles = 0;
        
        if (directValues) {
            adults = directValues.adults || 0;
            children = directValues.children || 0;
            nights = directValues.nights || 0;
            vehicles = directValues.vehicles || 0;
        } else {
            adults = adultsEl ? (parseInt(adultsEl.textContent) || 0) : 0;
            children = childrenEl ? (parseInt(childrenEl.textContent) || 0) : 0;
            nights = nightsEl ? (parseInt(nightsEl.textContent) || 0) : 0;
            vehicles = vehiclesEl ? (parseInt(vehiclesEl.textContent) || 0) : 0;
        }
        
        // For accommodation and vehicle structures, total is different
        if (vehiclesEl) {
            // Vehicle-based: show vehicle/passenger count
            totalEl.textContent = vehicles;
        } else if (nightsEl) {
            // Accommodation-based: show guest count (adults + children)
            const total = adults + children;
            totalEl.textContent = total;
            
            // Update price preview for accommodation
            if (window.updatePricePreview) {
                window.updatePricePreview(structureId, adults, children);
            }
        } else {
            // Standard structures: adults + children
            const total = adults + children;
            totalEl.textContent = total;
            
            // Update price preview
            if (window.updatePricePreview) {
                window.updatePricePreview(structureId, adults, children);
            }
        }
    } catch (error) {
    }
};
</script>



<script>
// Initialize guest counters for all pricing structures
(function() {
    function initGuestCounters() {
        try {
            
            // Find all plus/minus buttons
            const plusButtons = document.querySelectorAll('.guest-selection-section .counter-btn-plus');
            const minusButtons = document.querySelectorAll('.guest-selection-section .counter-btn-minus');
            
            
            if (plusButtons.length === 0 && minusButtons.length === 0) {
                return;
            }
            
            // Handle plus buttons
            plusButtons.forEach(button => {
                button.addEventListener('click', function(e) {
                    e.preventDefault();
                    e.stopPropagation();
                    
                    const structureId = this.getAttribute('data-structure-id');
                    const guestType = this.getAttribute('data-guest-type');
                    
                    
                    const countDisplay = document.querySelector(`.js-count[data-guest-type="${guestType}"][data-structure-id="${structureId}"]`);
                    if (!countDisplay) {
                        return;
                    }
                    
                    let currentValue = parseInt(countDisplay.textContent) || 0;
                    const maxGuests = guestType === 'adults' ? 20 : (guestType === 'children' ? 10 : 20);
                    
                    if (currentValue < maxGuests) {
                        currentValue++;
                        countDisplay.textContent = currentValue;
                        
                        // Pass direct values to avoid timing issues
                        const adultsEl = document.querySelector(`.js-count[data-guest-type="adults"][data-structure-id="${structureId}"]`);
                        const childrenEl = document.querySelector(`.js-count[data-guest-type="children"][data-structure-id="${structureId}"]`);
                        
                        const directValues = {
                            adults: adultsEl ? parseInt(adultsEl.textContent) || 0 : 0,
                            children: childrenEl ? parseInt(childrenEl.textContent) || 0 : 0
                        };
                        
                        window.updateTotalGuests(structureId, directValues);
                    }
                });
            });
            
            // Handle minus buttons
            minusButtons.forEach(button => {
                button.addEventListener('click', function(e) {
                    e.preventDefault();
                    e.stopPropagation();
                    
                    const structureId = this.getAttribute('data-structure-id');
                    const guestType = this.getAttribute('data-guest-type');
                    
                    
                    const countDisplay = document.querySelector(`.js-count[data-guest-type="${guestType}"][data-structure-id="${structureId}"]`);
                    if (!countDisplay) {
                        return;
                    }
                    
                    let currentValue = parseInt(countDisplay.textContent) || 0;
                    const minValue = 0;
                    
                    if (currentValue > minValue) {
                        currentValue--;
                        countDisplay.textContent = currentValue;
                        
                        // Pass direct values to avoid timing issues
                        const adultsEl = document.querySelector(`.js-count[data-guest-type="adults"][data-structure-id="${structureId}"]`);
                        const childrenEl = document.querySelector(`.js-count[data-guest-type="children"][data-structure-id="${structureId}"]`);
                        
                        const directValues = {
                            adults: adultsEl ? parseInt(adultsEl.textContent) || 0 : 0,
                            children: childrenEl ? parseInt(childrenEl.textContent) || 0 : 0
                        };
                        
                        window.updateTotalGuests(structureId, directValues);
                    }
                });
            });
            
            // Initialize totals - only for guest selection sections
            const uniqueStructureIds = new Set();
            document.querySelectorAll('.guest-selection-section .js-count[data-structure-id]').forEach(el => {
                const structureId = el.getAttribute('data-structure-id');
                if (structureId) {
                    uniqueStructureIds.add(structureId);
                }
            });
            
            uniqueStructureIds.forEach(structureId => {
                const adultsEl = document.querySelector(`.js-count[data-guest-type="adults"][data-structure-id="${structureId}"]`);
                const childrenEl = document.querySelector(`.js-count[data-guest-type="children"][data-structure-id="${structureId}"]`);
                
                const directValues = {
                    adults: adultsEl ? parseInt(adultsEl.textContent) || 0 : 0,
                    children: childrenEl ? parseInt(childrenEl.textContent) || 0 : 0
                };
                
                window.updateTotalGuests(structureId, directValues);
            });
            
        } catch (error) {
        }
    }
    
    // Debounce timer for price preview
    window.pricePreviewTimers = window.pricePreviewTimers || {};
    
    window.updatePricePreview = function(structureId, adults, children) {
        try {
            const previewEl = document.querySelector(`.price-summary-preview[data-structure-id="${structureId}"]`);
            const adultsPreviewEl = document.querySelector(`.preview-adults-${structureId}`);
            const childrenPreviewEl = document.querySelector(`.preview-children-${structureId}`);
            const totalPreviewEl = document.querySelector(`.preview-total-${structureId}`);
            const currencyPreviewEl = document.querySelector(`.preview-currency-${structureId}`);
            
            if (!previewEl) return;
            
            const totalGuests = adults + children;
            
            // Update guest counts in preview immediately
            if (adultsPreviewEl) adultsPreviewEl.textContent = adults;
            if (childrenPreviewEl) childrenPreviewEl.textContent = children;
            
            // Show/hide preview based on guest count
            if (totalGuests > 0) {
                previewEl.style.display = 'block';
                
                // Try to calculate price locally for fixed_price structures
                const selectBtn = document.querySelector(`.select-package-btn[data-structure-id="${structureId}"]`);
                if (selectBtn) {
                    const structureKey = selectBtn.getAttribute('data-structure-key');
                    const basePrice = parseFloat(selectBtn.getAttribute('data-base-price')) || 0;
                    const childPrice = parseFloat(selectBtn.getAttribute('data-child-price')) || 0;
                    const currency = selectBtn.getAttribute('data-currency') || 'KES';
                    
                    if (structureKey === 'fixed_price' && basePrice > 0) {
                        // Calculate locally for fixed price
                        const total = (adults * basePrice) + (children * childPrice);
                        if (totalPreviewEl) {
                            totalPreviewEl.textContent = currency + ' ' + total.toLocaleString();
                        }
                        if (currencyPreviewEl) {
                            currencyPreviewEl.textContent = currency;
                        }
                        return; // Skip API call
                    }
                }
                
                // For other structures, use API (with debounce)
                // Clear existing timer
                if (window.pricePreviewTimers[structureId]) {
                    clearTimeout(window.pricePreviewTimers[structureId]);
                }
                
                // Debounce price calculation (wait 500ms after last change)
                window.pricePreviewTimers[structureId] = setTimeout(function() {
                    // Get tour ID from the pricing section
                    let tourId = document.getElementById('enhanced-pricing-options')?.getAttribute('data-tour-id');
                    if (!tourId) {
                        // Try to get from URL
                        const urlMatch = window.location.pathname.match(/\/tour\/(\d+)/);
                        if (urlMatch) {
                            tourId = urlMatch[1];
                        }
                    }
                    
                    if (tourId && window.calculatePricePreview) {
                        window.calculatePricePreview(tourId, structureId, adults, children, totalPreviewEl, currencyPreviewEl);
                    } else {
                        if (totalPreviewEl) totalPreviewEl.textContent = '-';
                    }
                }, 500);
            } else {
                previewEl.style.display = 'none';
                if (totalPreviewEl) totalPreviewEl.textContent = '-';
                // Clear timer if no guests
                if (window.pricePreviewTimers[structureId]) {
                    clearTimeout(window.pricePreviewTimers[structureId]);
                }
            }
        } catch (error) {
        }
    };
    
    // Make calculatePricePreview global
    window.calculatePricePreview = function(tourId, structureId, adults, children, totalEl, currencyEl) {
        if (!tourId || !structureId || !totalEl) return;
        
        // Show loading state
        totalEl.textContent = '...';
        if (currencyEl) currencyEl.textContent = '';
        
        // Get base URL
        const baseUrl = (typeof bookingCore !== 'undefined' && bookingCore.url) ? bookingCore.url : '';
        const apiUrl = baseUrl + '/api/tour/' + tourId + '/calculate-price';
        
        // Prepare request data
        const requestData = {
            structure_id: structureId,
            guests: adults + children,
            adults: adults,
            children: children,
            _token: document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') || ''
        };
        
        // Make API call
        if (typeof jQuery !== 'undefined' && jQuery.ajax) {
            jQuery.ajax({
                url: apiUrl,
                method: 'POST',
                data: requestData,
                dataType: 'json',
                success: function(response) {
                    if (response.status && response.data && response.data.total) {
                        const total = parseFloat(response.data.total) || 0;
                        const currency = response.data.currency || 'KES';
                        
                        // Format number
                        const formatted = new Intl.NumberFormat('en-US', {
                            minimumFractionDigits: 0,
                            maximumFractionDigits: 2
                        }).format(total);
                        
                        totalEl.textContent = formatted;
                        if (currencyEl) {
                            const symbol = 'KES';
                            currencyEl.textContent = symbol;
                        }
                    } else {
                        totalEl.textContent = '-';
                    }
                },
                error: function(xhr) {
                    totalEl.textContent = '-';
                }
            });
        } else {
            // Fallback: use fetch if jQuery not available
            fetch(apiUrl, {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                    'X-CSRF-TOKEN': requestData._token
                },
                body: JSON.stringify(requestData)
            })
            .then(response => response.json())
            .then(data => {
                if (data.status && data.data && data.data.total) {
                    const total = parseFloat(data.data.total) || 0;
                    const currency = data.data.currency || 'KES';
                    const formatted = new Intl.NumberFormat('en-US', {
                        minimumFractionDigits: 0,
                        maximumFractionDigits: 2
                    }).format(total);
                    totalEl.textContent = formatted;
                    if (currencyEl) {
                        const symbol = 'KES';
                        currencyEl.textContent = symbol;
                    }
                } else {
                    totalEl.textContent = '-';
                }
            })
            .catch(error => {
                totalEl.textContent = '-';
            });
        }
    };
    
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', initGuestCounters);
    } else {
        setTimeout(initGuestCounters, 100);
    }
})();
</script>

<script>
/**
 * Occupancy Tiers Interactive Booking System
 */
(function() {
    'use strict';

    // ── Money helper ──────────────────────────────────────────────────────
    // Translates per-line amounts (which the data layer stores in their
    // *native* currency — KES for residents, USD for non-residents) into the
    // visitor's chosen display currency.
    //
    // Most enhanced-pricing tours ship without the `_basic_price_display`
    // widget (it's the legacy path), so we can't rely on window.AppCurrency
    // existing. We embed the FX rates from the admin's active-currency list
    // directly here and fall back to a sane default rate when the rate isn't
    // configured — anything is better than the old behavior of showing two
    // currencies side-by-side as "KES X + USD Y".
        const TOUR_CURRENCY     = "USD";
    const PLATFORM_CURRENCY = "KES";
    const FX_RATES          = {"USD":129.43999999999999772626324556767940521240234375,"KES":1};

    let __displayCurrency = PLATFORM_CURRENCY;

    function getDisplayCurrency() {
        const activeBtn = document.querySelector('.currency-toggle-btn.active');
        if (activeBtn && activeBtn.dataset.currency) {
            return activeBtn.dataset.currency.toUpperCase();
        }
        return __displayCurrency || PLATFORM_CURRENCY;
    }

    /**
     * Checkout currency from guest mix:
     *  residents only → resident currency (KES)
     *  non-residents only → non-resident currency (USD)
     *  mixed → resident currency (KES), non-res lines converted at checkout
     */
    function resolveBookingDisplayCurrency(guestCounts, resCcy, nrCcy) {
        const res = (
            (guestCounts.resident_adults ?? guestCounts.residentAdults ?? 0) +
            (guestCounts.resident_children ?? guestCounts.residentChildren ?? 0)
        );
        const nr = (
            (guestCounts.nonresident_adults ?? guestCounts.nonresidentAdults ?? guestCounts.non_resident_adults ?? guestCounts.nonResidentAdults ?? 0) +
            (guestCounts.nonresident_children ?? guestCounts.nonresidentChildren ?? guestCounts.non_resident_children ?? guestCounts.nonResidentChildren ?? 0)
        );
        const residentCurrency = String(resCcy || 'KES').toUpperCase();
        const nonResidentCurrency = String(nrCcy || 'USD').toUpperCase();
        if (res > 0 && nr > 0) return residentCurrency;
        if (nr > 0 && res === 0) return nonResidentCurrency;
        return residentCurrency;
    }

    function getOccupancyGuestCounts(structureId) {
        return {
            residentAdults: getCounterValue(structureId, 'resident_adults'),
            residentChildren: getCounterValue(structureId, 'resident_children'),
            nonresidentAdults: getCounterValue(structureId, 'nonresident_adults'),
            nonresidentChildren: getCounterValue(structureId, 'nonresident_children'),
        };
    }

    function rateOf(code) {
        const r = parseFloat(FX_RATES[(code || '').toUpperCase()]);
        return r > 0 ? r : 0;
    }

    function convertAmount(amount, fromCurrency, toCurrency) {
        const from = (fromCurrency || PLATFORM_CURRENCY).toUpperCase();
        const to   = (toCurrency   || getDisplayCurrency()).toUpperCase();
        const n    = parseFloat(amount) || 0;
        if (!n || from === to) return n;

        // Prefer the shared AppCurrency helper when available, so we agree
        // with whatever the legacy `_basic_price_display` widget would do.
        if (window.AppCurrency && typeof window.AppCurrency.convert === 'function') {
            const shared = window.AppCurrency.convert(n, from, to);
            if (isFinite(shared) && shared > 0) return shared;
        }

        // Standard "rate-vs-main-currency" math:
        //   amount_in_target = amount_in_source * rate[source] / rate[target]
        const rFrom = rateOf(from);
        const rTo   = rateOf(to);
        if (rFrom > 0 && rTo > 0) return n * rFrom / rTo;
        return n; // unknown rates — fail safe
    }

    function formatMoney(amount, currency) {
        const code = (currency || getDisplayCurrency()).toUpperCase();
        if (window.AppCurrency && typeof window.AppCurrency.format === 'function') {
            return window.AppCurrency.format(amount, code);
        }
        const symbols = { USD: '$', KES: 'KSh', EUR: '€', GBP: '£' };
        const sym = symbols[code] || code;
        return sym + ' ' + Math.round(parseFloat(amount) || 0).toLocaleString();
    }

    // Convert + format in one step (line-items + totals)
    function formatConverted(amount, fromCurrency, toCurrency) {
        const display = (toCurrency || getDisplayCurrency()).toUpperCase();
        return formatMoney(convertAmount(amount, fromCurrency, display), display);
    }

    // Re-render everything when the visitor toggles the currency selector
    document.addEventListener('currencyChanged', function (ev) {
        __displayCurrency = ((ev.detail && ev.detail.to) || PLATFORM_CURRENCY).toUpperCase();
        // Re-pricing path: the structure-id is encoded on the visible pricing
        // summary section; iterate any present summaries and trigger updates.
        document.querySelectorAll('[id^="pricing-summary-"]').forEach(node => {
            const m = node.id.match(/^pricing-summary-(\d+)$/);
            if (m && typeof updatePricing === 'function') {
                try { updatePricing(m[1]); } catch (e) { /* no-op */ }
            }
        });
        // Re-render extra-service cards (their prices are converted at render time)
        document.querySelectorAll('[id^="extra-services-list-"]').forEach(node => {
            const m = node.id.match(/^extra-services-list-(\d+)$/);
            if (!m) return;
            const sid = m[1];
            const data = (window.extraServicesByStructure && window.extraServicesByStructure[sid])
                || window.extraServicesData;
            if (data && typeof renderExtraServices === 'function') {
                try { renderExtraServices(sid, data); } catch (e) { /* no-op */ }
            }
        });
    });

    // Store occupancy tiers data - get the current structure data
    window.occupancyTiersData = null;
    
    // Find the occupancy tiers structure from the current pricing structures
        
    function initOccupancyTiersBooking() {
        
        const occupancyStructures = document.querySelectorAll('[data-structure-key="occupancy_tiers"]');
        
        // Also look for booking sections directly
        const bookingSections = document.querySelectorAll('.occupancy-tiers-booking-section');
        
        occupancyStructures.forEach(structure => {
            const structureId = structure.getAttribute('data-structure-id');
            initStructureBooking(structureId);
        });
        
        // If no structures found by data attribute, try to find by booking section
        if (occupancyStructures.length === 0 && bookingSections.length > 0) {
            bookingSections.forEach(section => {
                const structureId = section.id.replace('occupancy-tiers-booking-section-', '');
                if (structureId) {
                    initStructureBooking(structureId);
                }
            });
        }
        
        // Listen for structure selection events
        document.addEventListener('structureSelected', function(event) {
            if (event.detail && event.detail.structureKey === 'occupancy_tiers') {
                setTimeout(() => {
                    initStructureBooking(event.detail.structureId);
                }, 100);
            }
        });
        
        // Also listen for clicks on occupancy tiers panels
        document.addEventListener('click', function(event) {
            // Check if click is on interactive elements that should not trigger reinitialization
            const interactiveElements = [
                '.service-checkbox',
                '.extra-service-item', 
                '.guest-counter',
                '.counter-btn',
                '.calendar-input-wrapper',
                '.occupancy-date-input',
                '.fixed-date-picker',
                '.select-occupancy-package-btn',
                '.extra-services-list',
                '.booking-step',
                '[data-no-auto-select]'
            ];
            
            const isInteractiveClick = interactiveElements.some(selector => 
                event.target.closest(selector)
            );
            
            if (isInteractiveClick) {
                return;
            }
            
            const panel = event.target.closest('[data-structure-key="occupancy_tiers"]');
            if (panel && panel.classList.contains('active')) {
                const structureId = panel.getAttribute('data-structure-id');
                
                // Additional check: Don't reinitialize if user is actively using the form
                const dateInput = document.getElementById(`occupancy-date-picker-${structureId}`);
                const hasSelectedDate = dateInput && dateInput.value;
                const hasSelectedGuests = getCounterValue(structureId, 'resident_adults') + 
                                         getCounterValue(structureId, 'resident_children') + 
                                         getCounterValue(structureId, 'nonresident_adults') + 
                                         getCounterValue(structureId, 'nonresident_children') > 0;
                
                if (hasSelectedDate || hasSelectedGuests) {
                    return;
                }
                
                setTimeout(() => {
                    initStructureBooking(structureId);
                }, 100);
            }
        });
        
        // Debug: Log the occupancy tiers data
        if (window.occupancyTiersData) {
            
            if (window.occupancyTiersData.seasonal_pricing) {
            }
        } else {
        }
    }
    
    function initStructureBooking(structureId) {
        
        // Prevent multiple initializations of the same structure
        if (window.initializedStructures && window.initializedStructures.has(structureId)) {
            return;
        }
        
        // Track initialized structures
        if (!window.initializedStructures) {
            window.initializedStructures = new Set();
        }
        window.initializedStructures.add(structureId);
        
        // Allow initialization scripts to run
        if (typeof window.allowInitializationScripts === 'function') {
            window.allowInitializationScripts();
        }
        
        // Check if structure is already initialized and working
        const existingDateInput = document.getElementById(`occupancy-date-picker-${structureId}`);
        const existingButton = document.querySelector(`.select-occupancy-package-btn[data-booking-structure-id="${structureId}"]`);
        
        if (existingDateInput && existingButton && existingDateInput.value) {
            return;
        }
        
        // Initialize date picker — skip: flatpickr is already initialized
        // by _occupancy_tiers_date_picker.blade.php include
        // initDatePicker(structureId);
        
        // Initialize guest counters
        initGuestCounters(structureId);
        
        // Initialize extra services
        initExtraServices(structureId);
        
        // Initialize package selection button
        initPackageButton(structureId);
        
    }
    
    function initDatePicker(structureId) {
        const dateInput = document.getElementById(`occupancy-date-picker-${structureId}`);
        if (!dateInput) return;
        
        // Check if date picker is already initialized and working
        if (dateInput.hasAttribute('data-daterangepicker-initialized')) {
            return;
        }
        
        // Mark as initialized to prevent double initialization
        dateInput.setAttribute('data-daterangepicker-initialized', 'true');
        
        // Use the same simple approach as fixed pricing
        function initOccupancyDatePicker() {
            if (typeof $ === 'undefined' || typeof $.fn === 'undefined' || typeof $.fn.daterangepicker === 'undefined') {
                setTimeout(initOccupancyDatePicker, 100);
                return;
            }
            
            // Set minimum date to tomorrow to prevent past bookings
            const minDate = moment().add(1, 'day');
            const maxDate = moment().add(2, 'years');
            
            $(dateInput).daterangepicker({
                singleDatePicker: true,
                autoApply: true,
                autoUpdateInput: true, // Ensure input is updated immediately
                minDate: minDate,
                maxDate: maxDate,
                locale: { 
                    format: 'YYYY-MM-DD', 
                    firstDay: 1 
                },
                // Add date validation
                isInvalidDate: function(date) {
                    // Prevent past dates (extra safety)
                    return date.isBefore(moment(), 'day');
                }
            }, function(start) {
                // Single callback like fixed pricing - this ensures single click works
                const selectedDate = start.format('YYYY-MM-DD');
                
                // Double-check date is not in the past
                if (start.isBefore(moment(), 'day')) {
                    dateInput.value = '';
                    alert('Please select a future date for your tour.');
                    return;
                }
                
                dateInput.value = selectedDate;
                
                // Auto-calculate end date based on tour duration
                const tourDuration = 24; // Duration in hours
                const durationDays = Math.ceil(tourDuration / 24); // Convert to days, round up
                const endDate = moment(start).add(durationDays - 1, 'days'); // Subtract 1 because start date counts as day 1
                
                // Update end date input if it exists
                const endDateInput = document.querySelector(`[data-structure-id="${structureId}"] .tour-end-date`);
                if (endDateInput) {
                    endDateInput.value = endDate.format('YYYY-MM-DD');
                }
                
                // Add occupancy-specific logic
                updateSeasonInfo(structureId, selectedDate);
                updatePricing(structureId);
                updatePackageButtonState(structureId);
            });
            
            // Remove any existing click handlers that might interfere
            $(dateInput).off('click.daterangepicker');
            
            // Add single, clean click handler
            $(dateInput).on('click.occupancy', function(e) {
                e.stopPropagation();
                
                // Get the daterangepicker instance
                const daterangepicker = $(this).data('daterangepicker');
                if (daterangepicker) {
                    // If not showing, show it immediately
                    if (!daterangepicker.isShowing) {
                        daterangepicker.show();
                    }
                }
            });
            
            // Ensure the daterangepicker opens on focus as well
            $(dateInput).on('focus.occupancy', function(e) {
                const daterangepicker = $(this).data('daterangepicker');
                if (daterangepicker && !daterangepicker.isShowing) {
                    daterangepicker.show();
                }
            });
            
            // Add validation on manual input
            $(dateInput).on('change.occupancy', function(e) {
                const inputValue = $(this).val();
                if (inputValue) {
                    const inputDate = moment(inputValue, 'YYYY-MM-DD');
                    if (inputDate.isValid() && inputDate.isBefore(moment(), 'day')) {
                        $(this).val('');
                        alert('Please select a future date for your tour.');
                    }
                }
            });
        }
        
        initOccupancyDatePicker();
    }
    
    function initGuestCounters(structureId) {
        
        // Target only counters within this specific structure to avoid conflicts
        const structureContainer = document.querySelector(`[data-structure-id="${structureId}"]`);
        if (!structureContainer) {
            return;
        }
        
        const counters = structureContainer.querySelectorAll('.guest-counter');
        
        counters.forEach((counter, index) => {
            const type = counter.getAttribute('data-type');
            const minusBtn = counter.querySelector('.minus');
            const plusBtn = counter.querySelector('.plus');
            const valueSpan = counter.querySelector('.counter-value');
            
            
            if (!minusBtn || !plusBtn || !valueSpan) {
                return;
            }
            
            // Remove any existing event listeners to prevent duplicates
            const newMinusBtn = minusBtn.cloneNode(true);
            const newPlusBtn = plusBtn.cloneNode(true);
            minusBtn.parentNode.replaceChild(newMinusBtn, minusBtn);
            plusBtn.parentNode.replaceChild(newPlusBtn, plusBtn);
            
            // Add fresh event listeners
            newMinusBtn.addEventListener('click', function(e) {
                e.preventDefault();
                e.stopPropagation();
                
                const currentValue = parseInt(valueSpan.textContent) || 0;
                if (currentValue > 0) {
                    const newValue = currentValue - 1;
                    valueSpan.textContent = newValue;
                    updateGuestTotals(structureId);
                }
            });
            
            newPlusBtn.addEventListener('click', function(e) {
                e.preventDefault();
                e.stopPropagation();
                
                const currentValue = parseInt(valueSpan.textContent) || 0;
                if (currentValue < 50) {
                    const newValue = currentValue + 1;
                    valueSpan.textContent = newValue;
                    updateGuestTotals(structureId);
                }
            });
        });
    }
    
    function updateGuestTotals(structureId) {
        const residentAdults = getCounterValue(structureId, 'resident_adults');
        const residentChildren = getCounterValue(structureId, 'resident_children');
        const nonresidentAdults = getCounterValue(structureId, 'nonresident_adults');
        const nonresidentChildren = getCounterValue(structureId, 'nonresident_children');
        
        const totalGuests = residentAdults + residentChildren + nonresidentAdults + nonresidentChildren;
        
        
        // Update total display
        const totalInfo = document.getElementById(`total-guests-info-${structureId}`);
        const totalCountSpan = totalInfo?.querySelector('.total-count');
        const tierTextSpan = totalInfo?.querySelector('.tier-text');
        
        if (totalInfo && totalCountSpan) {
            if (totalGuests > 0) {
                totalInfo.style.display = 'block';
                totalCountSpan.textContent = totalGuests;
                
                // Determine pricing tier
                const tier = determinePricingTier(structureId, totalGuests);
                if (tier && tierTextSpan) {
                    tierTextSpan.innerHTML = `<i class="fa fa-layer-group mr-5"></i>Tier ${tier.index + 1}: ${tier.minPax} - ${tier.maxPax}`;
                }
            } else {
                totalInfo.style.display = 'none';
            }
        }
        
        // Update pricing
        updatePricing(structureId);
        
        // Update extra services pricing if any are selected
        updatePricingWithExtras(structureId);
        
        // Update package button state
        updatePackageButtonState(structureId);
    }
    
    function getCounterValue(structureId, type) {
        const counter = document.querySelector(`.occupancy-tiers-booking-section .guest-counter[data-type="${type}"] .counter-value`);
        const value = parseInt(counter?.textContent) || 0;
        return value;
    }
    
    function determinePricingTier(structureId, totalGuests) {
        if (!window.occupancyTiersData || !window.occupancyTiersData.occupancy_pricing) {
            return null;
        }
        
        const tiers = window.occupancyTiersData.occupancy_pricing;
        
        for (let i = 0; i < tiers.length; i++) {
            const tier = tiers[i];
            const minPax = parseInt(tier.min_pax) || 1;
            const maxPax = parseInt(tier.max_pax) || 999;
            
            if (totalGuests >= minPax && totalGuests <= maxPax) {
                return {
                    index: i,
                    tier: tier,
                    minPax: minPax,
                    maxPax: maxPax
                };
            }
        }
        
        return null;
    }
    
    function initExtraServices(structureId) {
        
        // Check if extra services container exists
        const container = document.getElementById(`extra-services-list-${structureId}`);
        if (!container) {
            return;
        }
        
        
        // Check if extra services are already rendered and preserve their state
        const existingList = document.getElementById(`extra-services-list-${structureId}`);
        let existingSelections = [];
        
        if (existingList && existingList.children.length > 0) {
            
            // Save current selections
            const checkboxes = existingList.querySelectorAll('.service-checkbox:checked');
            checkboxes.forEach(checkbox => {
                const serviceItem = checkbox.closest('.extra-service-item');
                const serviceIndex = parseInt(serviceItem.getAttribute('data-service-index'));
                existingSelections.push(serviceIndex);
            });
            
        }
        
        // Get extra services data from the structure
        const extraServicesData = getExtraServicesData(structureId);
        
        if (!extraServicesData || extraServicesData.length === 0) {
            hideExtraServicesSection(structureId);
            return;
        }
        
        showExtraServicesSection(structureId);
        renderExtraServices(structureId, extraServicesData);
        
        // Restore previous selections after rendering
        if (existingSelections.length > 0) {
            setTimeout(() => {
                existingSelections.forEach(serviceIndex => {
                    const checkbox = document.querySelector(`#extra-service-${structureId}-${serviceIndex}`);
                    const serviceItem = checkbox?.closest('.extra-service-item');
                    
                    if (checkbox && serviceItem) {
                        checkbox.checked = true;
                        updateExtraServiceSelection(structureId, serviceItem, true);
                    }
                });
            }, 50);
        }
    }
    
    function getExtraServicesData(structureId) {
        
        // Get extra services from the occupancy tiers data
        if (!window.occupancyTiersData || !window.occupancyTiersData.extra_services) {
            return [];
        }
        
        const services = window.occupancyTiersData.extra_services || [];
        return services;
    }
    
    function showExtraServicesSection(structureId) {
        const section = document.getElementById(`extra-services-${structureId}`);
        const noExtrasMessage = section?.querySelector('.no-extras-message');
        
        if (section) {
            section.style.display = 'block';
        }
        if (noExtrasMessage) {
            noExtrasMessage.style.display = 'none';
        }
    }
    
    function hideExtraServicesSection(structureId) {
        const section = document.getElementById(`extra-services-${structureId}`);
        const noExtrasMessage = section?.querySelector('.no-extras-message');
        
        if (section) {
            section.style.display = 'block'; // Still show section but with no extras message
        }
        if (noExtrasMessage) {
            noExtrasMessage.style.display = 'block';
        }
    }
    
    function renderExtraServices(structureId, extraServices) {
        const listContainer = document.getElementById(`extra-services-list-${structureId}`);
        if (!listContainer) return;
        
        let html = '';
        
        extraServices.forEach((service, index) => {
            const serviceId = `extra-service-${structureId}-${index}`;
            const serviceName = service.name || 'Extra Service';
            const price = parseFloat(service.price || 0);
            const serviceType = service.type || 'one_time';
            
            // Handle per_person flag - backend stores as "on" when checked, or boolean
            const perPerson = service.per_person === true || service.per_person === 'on' || service.per_person === '1';
            
            // Determine currency - use tour's currency if not specified
            const currency = service.currency || 'USD';
            // Convert into the visitor's display currency so admins can keep
            // entering USD for non-resident extras and KES for resident ones
            // without the customer seeing a mixed-currency catalog.
            const displayCurrency = getDisplayCurrency();
            const priceDisplay = formatConverted(price, currency);

            // Format type label
            let typeLabel = '';
            switch(serviceType) {
                case 'one_time':
                    typeLabel = perPerson ? 'Per person' : 'One-time fee';
                    break;
                case 'per_hour':
                    typeLabel = perPerson ? 'Per person/hour' : 'Per hour';
                    break;
                case 'per_day':
                    typeLabel = perPerson ? 'Per person/day' : 'Per day';
                    break;
                default:
                    typeLabel = perPerson ? 'Per person' : 'One-time fee';
            }
            
            // Determine icon based on service name
            let icon = 'fa-star';
            const lowerName = serviceName.toLowerCase();
            if (lowerName.includes('transport') || lowerName.includes('transfer')) {
                icon = 'fa-car';
            } else if (lowerName.includes('meal') || lowerName.includes('food') || lowerName.includes('lunch') || lowerName.includes('dinner')) {
                icon = 'fa-utensils';
            } else if (lowerName.includes('guide')) {
                icon = 'fa-user-tie';
            } else if (lowerName.includes('photo') || lowerName.includes('camera')) {
                icon = 'fa-camera';
            } else if (lowerName.includes('insurance')) {
                icon = 'fa-shield-alt';
            } else if (lowerName.includes('equipment') || lowerName.includes('gear')) {
                icon = 'fa-tools';
            }
            
            html += `
                <div class="extra-service-item mb-15" data-service-index="${index}" data-no-auto-select="true" style="background: #ffffff; border: 2px solid #e5e7eb; border-radius: 12px; padding: 16px; cursor: pointer; transition: all 0.3s ease;">
                    <div class="d-flex align-items-start justify-content-between">
                        <div class="service-info flex-grow-1">
                            <div class="d-flex align-items-center mb-8">
                                <input type="checkbox" 
                                       id="${serviceId}" 
                                       class="service-checkbox mr-10" 
                                       data-no-auto-select="true"
                                       style="width: 18px; height: 18px; accent-color: var(--main-color, var(--brand-primary, #31964a));">
                                <div class="service-icon mr-10" style="width: 32px; height: 32px; border-radius: 8px; background: rgba(var(--main-color-rgb, 102, 126, 234), 0.1); display: flex; align-items: center; justify-content: center; color: var(--main-color, var(--brand-primary, #31964a));">
                                    <i class="fa ${icon}" style="font-size: 14px;"></i>
                                </div>
                                <span class="service-name text-16 fw-600 mb-0" style="color: #1a202c; cursor: pointer;">
                                    ${serviceName}
                                </span>
                            </div>
                            <div class="service-type text-13" style="margin-left: 28px; color: #64748b;">
                                <i class="fa fa-info-circle mr-5"></i>
                                ${typeLabel}
                            </div>
                        </div>
                        <div class="service-price text-right">
                            <div class="price-amount text-18 fw-700" style="color: var(--main-color, var(--brand-primary, #31964a));">
                                ${priceDisplay}
                            </div>
                            <div class="price-type text-12" style="color: #64748b;">
                                ${typeLabel}
                            </div>
                        </div>
                    </div>
                </div>
            `;
        });
        
        listContainer.innerHTML = html;
        
        // Add click handlers for service selection with MAXIMUM event blocking
        const serviceItems = listContainer.querySelectorAll('.extra-service-item');
        serviceItems.forEach(item => {
            const checkbox = item.querySelector('.service-checkbox');
            
            // NUCLEAR OPTION: Block ALL events on this element from external scripts
            const blockAllEvents = function(e) {
                e.preventDefault();
                e.stopPropagation();
                e.stopImmediatePropagation();
                return false;
            };
            
            // Block ALL possible events that external scripts might listen to
            const eventsToBlock = ['click', 'mousedown', 'mouseup', 'touchstart', 'touchend', 'change', 'input'];
            eventsToBlock.forEach(eventType => {
                // Capture phase - blocks events before they reach external listeners
                item.addEventListener(eventType, blockAllEvents, true);
                checkbox.addEventListener(eventType, blockAllEvents, true);
            });
            
            // Our own handlers - added AFTER the blocking handlers
            const handleServiceToggle = function(e) {
                
                // Toggle checkbox if not clicked directly
                if (e.target.type !== 'checkbox') {
                    checkbox.checked = !checkbox.checked;
                }
                
                updateExtraServiceSelection(structureId, item, checkbox.checked);
                return false;
            };
            
            // Mark elements as protected
            item.setAttribute('data-protected-handler', 'true');
            checkbox.setAttribute('data-protected-handler', 'true');
            
            // Add our handlers with highest priority
            item.addEventListener('click', handleServiceToggle, false);
            checkbox.addEventListener('change', handleServiceToggle, false);
            
            // Mobile-specific protection
            item.addEventListener('touchstart', function(e) {
                return false;
            }, true);
            
            // Additional protection: Override any existing event handlers
            setTimeout(() => {
                // Remove any event listeners that might have been added by external scripts
                const newItem = item.cloneNode(true);
                const newCheckbox = newItem.querySelector('.service-checkbox');
                
                // Re-add our protected handlers to the cloned element
                const protectedHandler = function(e) {
                    
                    // Handle checkbox toggle properly
                    let newState;
                    if (e.target.type === 'checkbox') {
                        // Direct checkbox click - use the checkbox's new state
                        newState = e.target.checked;
                    } else {
                        // Click on the item - toggle the checkbox
                        newState = !newCheckbox.checked;
                        newCheckbox.checked = newState;
                    }
                    
                    updateExtraServiceSelection(structureId, newItem, newState);
                    return false;
                };
                
                // Mark cloned elements as protected
                newItem.setAttribute('data-protected-handler', 'true');
                newCheckbox.setAttribute('data-protected-handler', 'true');
                
                newItem.addEventListener('click', protectedHandler, true);
                newCheckbox.addEventListener('change', protectedHandler, true);
                
                // Replace the original element
                item.parentNode.replaceChild(newItem, item);
            }, 100);
        });
    }
    
    function updateExtraServiceSelection(structureId, serviceItem, isSelected) {
        const serviceIndex = parseInt(serviceItem.getAttribute('data-service-index'));
        
        // Update visual state
        if (isSelected) {
            serviceItem.style.borderColor = 'var(--main-color, var(--brand-primary, #31964a))';
            serviceItem.style.backgroundColor = 'rgba(var(--main-color-rgb, 102, 126, 234), 0.05)';
            serviceItem.classList.add('selected');
        } else {
            serviceItem.style.borderColor = '#e5e7eb';
            serviceItem.style.backgroundColor = '#ffffff';
            serviceItem.classList.remove('selected');
        }
        
        // Update pricing calculation
        updatePricingWithExtras(structureId);
        
    }
    
    function getSelectedExtraServices(structureId) {
        const listContainer = document.getElementById(`extra-services-list-${structureId}`);
        if (!listContainer) return [];
        
        const selectedServices = [];
        const checkboxes = listContainer.querySelectorAll('.service-checkbox:checked');
        
        checkboxes.forEach(checkbox => {
            const serviceItem = checkbox.closest('.extra-service-item');
            const serviceIndex = parseInt(serviceItem.getAttribute('data-service-index'));
            const extraServicesData = getExtraServicesData(structureId);
            
            if (extraServicesData[serviceIndex]) {
                selectedServices.push({
                    index: serviceIndex,
                    ...extraServicesData[serviceIndex]
                });
            }
        });
        
        return selectedServices;
    }
    
    function calculateExtraServicesTotal(structureId) {
        const selectedServices = getSelectedExtraServices(structureId);
        if (selectedServices.length === 0) return { kesTotal: 0, usdTotal: 0, breakdown: [] };
        
        const totalGuests = getCounterValue(structureId, 'resident_adults') + 
                           getCounterValue(structureId, 'resident_children') + 
                           getCounterValue(structureId, 'nonresident_adults') + 
                           getCounterValue(structureId, 'nonresident_children');
        
        let kesTotal = 0;
        let usdTotal = 0;
        const breakdown = [];
        
        selectedServices.forEach(service => {
            const price = parseFloat(service.price || 0);
            const serviceType = service.type || 'one_time';
            
            // Handle per_person flag - backend stores as "on" when checked, or boolean
            const isPerPerson = service.per_person === true || service.per_person === 'on' || service.per_person === '1';
            
            // Determine currency - use tour's currency if not specified
            const currency = service.currency || 'USD';
            
            let serviceTotal = isPerPerson ? price * totalGuests : price;
            
            if (currency.toUpperCase() === 'USD') {
                usdTotal += serviceTotal;
            } else {
                kesTotal += serviceTotal;
            }
            
            breakdown.push({
                name: service.name,
                price: price,
                currency: currency,
                isPerPerson: isPerPerson,
                total: serviceTotal,
                guests: isPerPerson ? totalGuests : 1,
                type: serviceType
            });
        });
        
        return { kesTotal, usdTotal, breakdown };
    }
    
    function updatePricingWithExtras(structureId) {
        // This function updates pricing including extra services
        updatePricing(structureId);
    }
    
    function updateSeasonInfo(structureId, selectedDate) {
        const seasonInfo = document.getElementById(`selected-season-${structureId}`);
        if (!seasonInfo) return;
        
        // Determine season based on date
        const season = determineSeasonForDate(selectedDate);
        
        if (season) {
            seasonInfo.style.display = 'block';
            seasonInfo.querySelector('.season-name').textContent = season.name;
            // Build date display — show all ranges if available
            const ranges = season.date_ranges || [{ start_date: season.start_date, end_date: season.end_date }];
            const rangeHtml = ranges.filter(r => r.start_date && r.end_date).map(r =>
                `<div style="margin-bottom: 2px;"><i class="fa fa-calendar-alt mr-4" style="font-size:10px;"></i>${r.start_date} &rarr; ${r.end_date}</div>`
            ).join('');
            seasonInfo.querySelector('.season-dates').innerHTML = rangeHtml || season.start_date;
            
            // Update mobile cards to show the correct season
            updateMobileCardsForSeason(structureId, season);
        } else {
            seasonInfo.style.display = 'none';
        }
    }
    
    function updateMobileCardsForSeason(structureId, season) {
        
        // Find all mobile pricing cards
        const mobileCards = document.querySelectorAll('.occupancy-cards-mobile .mobile-pricing-card');
        
        mobileCards.forEach(card => {
            const tierIndex = card.getAttribute('data-tier-index');
            const seasonInfo = card.querySelector('.season-info');
            
            if (seasonInfo) {
                // Update season name
                const seasonNameEl = seasonInfo.querySelector('.season-name');
                if (seasonNameEl) {
                    seasonNameEl.innerHTML = `<i class="fa fa-calendar mr-6"></i>${season.name}`;
                }
                
                // Update season dates with vertical format
                const seasonDatesEl = seasonInfo.querySelector('.season-dates');
                if (seasonDatesEl) {
                    const ranges = season.date_ranges || [{ start_date: season.start_date, end_date: season.end_date }];
                    seasonDatesEl.innerHTML = ranges.filter(r => r.start_date && r.end_date).map(r =>
                        `<div style="margin-bottom:2px;"><i class="fa fa-calendar-alt mr-4" style="font-size:10px;"></i>${r.start_date} &rarr; ${r.end_date}</div>`
                    ).join('') || season.start_date;
                }
                
                // Update pricing if season has specific pricing
                updateMobileCardPricing(card, tierIndex, season);
            }
        });
    }
    
    function updateMobileCardPricing(card, tierIndex, season) {
        if (!window.occupancyTiersData || !window.occupancyTiersData.occupancy_pricing) return;
        
        const tiers = window.occupancyTiersData.occupancy_pricing;
        if (!tiers[tierIndex]) return;
        
        const tier = tiers[tierIndex];
        
        // Get base prices
        let residentAdult = parseFloat(tier.resident_adult_price || tier.price_per_person || 0);
        let residentChild = parseFloat(tier.resident_child_price || 0);
        let nonResidentAdult = parseFloat(tier.non_resident_adult_price || 0);
        let nonResidentChild = parseFloat(tier.non_resident_child_price || 0);
        
        // Apply season multiplier or specific season pricing
        if (season && season.price_multiplier) {
            const multiplier = parseFloat(season.price_multiplier);
            residentAdult *= multiplier;
            residentChild *= multiplier;
            nonResidentAdult *= multiplier;
            nonResidentChild *= multiplier;
        }
        
        // Check for tier-specific season pricing
        if (tier.seasons && Array.isArray(tier.seasons)) {
            for (const tierSeason of tier.seasons) {
                if (tierSeason.name === season.name || 
                    (tierSeason.start_date === season.start_date && tierSeason.end_date === season.end_date)) {
                    residentAdult = parseFloat(tierSeason.resident_adult_price || residentAdult);
                    residentChild = parseFloat(tierSeason.resident_child_price || residentChild);
                    nonResidentAdult = parseFloat(tierSeason.non_resident_adult_price || nonResidentAdult);
                    nonResidentChild = parseFloat(tierSeason.non_resident_child_price || nonResidentChild);
                    break;
                }
            }
        }
        
        // Update pricing displays in the card
        const pricingRows = card.querySelectorAll('.pricing-row');
        pricingRows.forEach(row => {
            const label = row.querySelector('span:first-child')?.textContent?.toLowerCase();
            const priceSpan = row.querySelector('span:last-child');
            
            if (!priceSpan) return;
            
            if (label?.includes('adult')) {
                if (label.includes('resident') && !label.includes('non')) {
                    priceSpan.textContent = `KES ${Math.round(residentAdult).toLocaleString()}`;
                } else if (label.includes('non')) {
                    priceSpan.textContent = `USD ${Math.round(nonResidentAdult).toLocaleString()}`;
                }
            } else if (label?.includes('child')) {
                if (label.includes('resident') && !label.includes('non')) {
                    priceSpan.textContent = `KES ${Math.round(residentChild).toLocaleString()}`;
                } else if (label.includes('non')) {
                    priceSpan.textContent = `USD ${Math.round(nonResidentChild).toLocaleString()}`;
                }
            }
        });
        
    }
    
    function determineSeasonForDate(selectedDate) {
        
        if (!window.occupancyTiersData) {
            return { name: 'Default Season', start_date: 'Year Round', end_date: 'Year Round' };
        }
        
        // PRIMARY: Check tier-level seasons (these have actual per-season prices)
        // Use the first tier's seasons as the season calendar (all tiers share same season dates)
        const tiers = window.occupancyTiersData.occupancy_pricing;
        if (tiers && tiers.length > 0 && Array.isArray(tiers[0].seasons) && tiers[0].seasons.length > 0) {
            const tierSeasons = tiers[0].seasons;
            const date = new Date(selectedDate);
            const selVal = date.getMonth() * 100 + date.getDate();
            
            for (const s of tierSeasons) {
                if (!s.start_date || !s.end_date) continue;
                const start = new Date(s.start_date);
                const end = new Date(s.end_date);
                const startVal = start.getMonth() * 100 + start.getDate();
                const endVal = end.getMonth() * 100 + end.getDate();
                
                let matches = false;
                if (endVal < startVal) {
                    matches = selVal >= startVal || selVal <= endVal;
                } else {
                    matches = selVal >= startVal && selVal <= endVal;
                }
                
                if (matches) {
                    return { name: s.name, start_date: s.start_date, end_date: s.end_date, ...s };
                }
            }
        }
        
        // FALLBACK: Check top-level seasonal_pricing (multiplier-based)
        let seasons = null;
        if (window.occupancyTiersData.seasonal_pricing && Array.isArray(window.occupancyTiersData.seasonal_pricing)) {
            seasons = window.occupancyTiersData.seasonal_pricing;
        }
        
        if (seasons && seasons.length > 0) {
            const date = new Date(selectedDate);
            const selVal = date.getMonth() * 100 + date.getDate();
            
            for (const season of seasons) {
                const dateRanges = season.date_ranges || (season.start_date ? [season] : []);
                for (const range of dateRanges) {
                    if (!range.start_date || !range.end_date) continue;
                    const start = new Date(range.start_date);
                    const end = new Date(range.end_date);
                    const startVal = start.getMonth() * 100 + start.getDate();
                    const endVal = end.getMonth() * 100 + end.getDate();
                    
                    let matches = false;
                    if (endVal < startVal) {
                        matches = selVal >= startVal || selVal <= endVal;
                    } else {
                        matches = selVal >= startVal && selVal <= endVal;
                    }
                    
                    if (matches) {
                        return { name: season.name || 'Season', start_date: range.start_date, end_date: range.end_date, date_ranges: season.date_ranges || null, price_multiplier: season.price_multiplier };
                    }
                }
            }
        }
        
        return { name: 'Default Season', start_date: 'Year Round', end_date: 'Year Round' };
    }
    
    function updatePricing(structureId) {
        const dateInput = document.getElementById(`occupancy-date-picker-${structureId}`);
        const selectedDate = dateInput?.value;
        
        if (!selectedDate) return;
        
        const residentAdults = getCounterValue(structureId, 'resident_adults');
        const residentChildren = getCounterValue(structureId, 'resident_children');
        const nonresidentAdults = getCounterValue(structureId, 'nonresident_adults');
        const nonresidentChildren = getCounterValue(structureId, 'nonresident_children');
        
        const totalGuests = residentAdults + residentChildren + nonresidentAdults + nonresidentChildren;
        
        if (totalGuests === 0) {
            hidePricingSummary(structureId);
            return;
        }
        
        const tier = determinePricingTier(structureId, totalGuests);
        if (!tier) {
            hidePricingSummary(structureId);
            return;
        }
        
        const season = determineSeasonForDate(selectedDate);
        const pricing = calculatePricing(tier, season, {
            residentAdults,
            residentChildren,
            nonresidentAdults,
            nonresidentChildren
        }, structureId);
        
        showPricingSummary(structureId, pricing);
    }
    
    function getSeasonPricesForTierAndDate(tierData, selectedDate) {
        if (!selectedDate || !tierData || !Array.isArray(tierData.seasons) || tierData.seasons.length === 0) {
            return { found: false };
        }
        
        const date = new Date(selectedDate);
        const selMonth = date.getMonth(); // 0-11
        const selDay = date.getDate();
        const selVal = selMonth * 100 + selDay;
        
        // First try: match by date (legacy start_date/end_date on tier season)
        for (const s of tierData.seasons) {
            if (!s.start_date || !s.end_date) continue;
            const start = new Date(s.start_date);
            const end = new Date(s.end_date);
            const startVal = start.getMonth() * 100 + start.getDate();
            const endVal = end.getMonth() * 100 + end.getDate();
            
            let matches = false;
            if (endVal < startVal) {
                // Cross-year season (e.g. Dec 15 - Jan 15)
                matches = selVal >= startVal || selVal <= endVal;
            } else {
                matches = selVal >= startVal && selVal <= endVal;
            }
            
            if (matches) {
                return {
                    found: true,
                    season_name: s.name,
                    resident_adult_price: s.resident_adult_price,
                    resident_child_price: s.resident_child_price,
                    nonresident_adult_price: s.nonresident_adult_price,
                    nonresident_child_price: s.nonresident_child_price
                };
            }
        }

        // Second try: match by season name from structure-level seasonal_pricing (date_ranges format)
        const detectedSeason = determineSeasonForDate(selectedDate);
        if (detectedSeason && detectedSeason.name && detectedSeason.name !== 'Default Season') {
            for (const s of tierData.seasons) {
                const sName = (s.season_name || s.name || '').toLowerCase().trim();
                const dName = detectedSeason.name.toLowerCase().trim();
                if (sName && sName === dName) {
                    return {
                        found: true,
                        season_name: s.name,
                        resident_adult_price: s.resident_adult_price,
                        resident_child_price: s.resident_child_price,
                        nonresident_adult_price: s.nonresident_adult_price,
                        nonresident_child_price: s.nonresident_child_price
                    };
                }
            }
        }
        
        return { found: false };
    }
    
    function calculatePricing(tier, season, guests, structureId = null) {
        const tierData = tier.tier;
        const dateInput = structureId ? document.getElementById(`occupancy-date-picker-${structureId}`) : null;
        const selectedDate = dateInput ? dateInput.value : null;

        // Resolve prices: look in tierData.seasons[] matched by season name first,
        // then fall back to tierData base prices, then apply multiplier
        let residentAdultPrice = 0, residentChildPrice = 0;
        let nonresidentAdultPrice = 0, nonresidentChildPrice = 0;
        let foundSeasonPrices = false;

        // Try to match by season name in tier.seasons[]
        if (season && season.name && season.name !== 'Default Season' &&
            Array.isArray(tierData.seasons) && tierData.seasons.length > 0) {
            const sn = season.name.toLowerCase().trim();
            for (const ts of tierData.seasons) {
                const tsn = (ts.season_name || ts.name || '').toLowerCase().trim();
                if (tsn && tsn === sn) {
                    residentAdultPrice    = parseFloat(ts.resident_adult_price     || 0);
                    residentChildPrice    = parseFloat(ts.resident_child_price     || 0);
                    nonresidentAdultPrice = parseFloat(ts.non_resident_adult_price || ts.nonresident_adult_price || 0);
                    nonresidentChildPrice = parseFloat(ts.non_resident_child_price || ts.nonresident_child_price || 0);
                    foundSeasonPrices = true;
                    break;
                }
            }
        }

        // Fall back to tier base prices + multiplier
        if (!foundSeasonPrices) {
            residentAdultPrice    = parseFloat(tierData.resident_adult_price     || tierData.price_per_person || 0);
            residentChildPrice    = parseFloat(tierData.resident_child_price     || 0);
            nonresidentAdultPrice = parseFloat(tierData.non_resident_adult_price || tierData.nonresident_adult_price || 0);
            nonresidentChildPrice = parseFloat(tierData.non_resident_child_price || tierData.nonresident_child_price || 0);
            if (season && season.price_multiplier) {
                const m = parseFloat(season.price_multiplier);
                residentAdultPrice    *= m;
                residentChildPrice    *= m;
                nonresidentAdultPrice *= m;
                nonresidentChildPrice *= m;
            }
        }
        
        // Calculate base totals
        const residentAdultTotal = guests.residentAdults * residentAdultPrice;
        const residentChildTotal = guests.residentChildren * residentChildPrice;
        const nonresidentAdultTotal = guests.nonresidentAdults * nonresidentAdultPrice;
        const nonresidentChildTotal = guests.nonresidentChildren * nonresidentChildPrice;

        const resCcy = String(tierData.resident_currency || 'KES').toUpperCase();
        const nrCcy  = String(tierData.non_resident_currency || tierData.nonresident_currency || 'USD').toUpperCase();
        const displayCurrency = resolveBookingDisplayCurrency(guests, resCcy, nrCcy);

        let kesTotal = residentAdultTotal + residentChildTotal;
        let usdTotal = nonresidentAdultTotal + nonresidentChildTotal;

        // Base breakdown — each line keeps its native currency
        const breakdown = [
            { label: `${guests.residentAdults} Resident Adults`, amount: residentAdultTotal, currency: resCcy, type: 'base' },
            { label: `${guests.residentChildren} Resident Children`, amount: residentChildTotal, currency: resCcy, type: 'base' },
            { label: `${guests.nonresidentAdults} Non-Resident Adults`, amount: nonresidentAdultTotal, currency: nrCcy, type: 'base' },
            { label: `${guests.nonresidentChildren} Non-Resident Children`, amount: nonresidentChildTotal, currency: nrCcy, type: 'base' }
        ].filter(item => item.amount > 0);
        
        // Add extra services if structureId is provided
        if (structureId) {
            const extraServices = calculateExtraServicesTotal(structureId);
            
            if (extraServices.kesTotal > 0 || extraServices.usdTotal > 0) {
                kesTotal += extraServices.kesTotal;
                usdTotal += extraServices.usdTotal;
                
                // Add extra services to breakdown
                extraServices.breakdown.forEach(service => {
                    const serviceType = service.type || 'one_time';
                    let label = service.name;
                    
                    if (service.isPerPerson) {
                        label += ` (${service.guests}x ${formatConverted(service.price, service.currency, displayCurrency)})`;
                    } else {
                        switch(serviceType) {
                            case 'per_hour':
                                label += ' (per hour)';
                                break;
                            case 'per_day':
                                label += ' (per day)';
                                break;
                            default:
                                label += ' (one-time)';
                        }
                    }
                    
                    breakdown.push({
                        label: label,
                        amount: service.total,
                        currency: service.currency,
                        type: 'extra'
                    });
                });
            }
        }
        
        return {
            breakdown,
            kesTotal,
            usdTotal,
            displayCurrency,
            resCcy,
            nrCcy,
            tier: tier.index + 1,
            season: season.name
        };
    }
    
    function showPricingSummary(structureId, pricing) {
        const summarySection = document.getElementById(`pricing-summary-${structureId}`);
        const breakdownDiv = document.getElementById(`pricing-breakdown-${structureId}`);
        const totalAmountSpan = document.getElementById(`total-amount-${structureId}`);
        
        if (!summarySection || !breakdownDiv || !totalAmountSpan) return;
        
        // Show summary section
        summarySection.style.display = 'block';
        
        // Build breakdown HTML with sections
        let breakdownHTML = '';
        
        // Display currency follows residency rules (non-res only → USD, etc.)
        // — never the site-wide currency toggle for occupancy-tier summaries.
        const guestCounts = getOccupancyGuestCounts(structureId);
        const displayCurrency = (
            pricing.displayCurrency ||
            resolveBookingDisplayCurrency(guestCounts, pricing.resCcy || 'KES', pricing.nrCcy || 'USD')
        ).toUpperCase();
        let displayTotal = 0;

        // Renders the value cell for a single line item. When the line is
        // already in the display currency we show just the formatted amount;
        // otherwise we surface both the native amount AND the converted one
        // ("USD 160 ≈ KES 21,120") so the customer can trace where the FX
        // came from, instead of seeing only the final converted total.
        function renderValueCell(item, accentColor) {
            const nativeCode = (item.currency || displayCurrency).toUpperCase();
            const converted  = convertAmount(item.amount, nativeCode, displayCurrency);
            const sameCcy    = nativeCode === displayCurrency;
            const colorStyle = accentColor ? ` style="color: ${accentColor};"` : '';

            if (sameCcy) {
                return `<span class="text-14 fw-600"${colorStyle}>${formatMoney(converted, displayCurrency)}</span>`;
            }
            return `
                <div class="pricing-line-value" style="text-align: right;">
                    <span class="text-14 fw-600"${colorStyle}>${formatMoney(converted, displayCurrency)}</span>
                    <div class="text-12" style="color: #94a3b8; font-weight: 500; margin-top: 2px;">
                        ${formatMoney(item.amount, nativeCode)}
                        <span style="margin: 0 4px;">≈</span>
                        ${formatMoney(converted, displayCurrency)}
                    </div>
                </div>
            `;
        }

        // Base pricing section
        const baseItems = pricing.breakdown.filter(item => item.type === 'base' && item.amount > 0);
        if (baseItems.length > 0) {
            breakdownHTML += `
                <div class="pricing-section-header mb-8" style="font-weight: 600; color: #374151; font-size: 14px; border-bottom: 1px solid #e5e7eb; padding-bottom: 4px;">
                    <i class="fa fa-users mr-5"></i>Base Pricing
                </div>
            `;
            baseItems.forEach(item => {
                displayTotal += convertAmount(item.amount, item.currency, displayCurrency);
                breakdownHTML += `
                    <div class="pricing-line mb-8" style="display: flex; justify-content: space-between; align-items: flex-start;">
                        <span class="text-14">${item.label}</span>
                        ${renderValueCell(item)}
                    </div>
                `;
            });
        }

        // Extra services section
        const extraItems = pricing.breakdown.filter(item => item.type === 'extra' && item.amount > 0);
        if (extraItems.length > 0) {
            const accent = 'var(--main-color, var(--brand-primary, #31964a))';
            breakdownHTML += `
                <div class="pricing-section-header mb-8 mt-15" style="font-weight: 600; color: #374151; font-size: 14px; border-bottom: 1px solid #e5e7eb; padding-bottom: 4px;">
                    <i class="fa fa-plus-circle mr-5" style="color: ${accent};"></i>Extra Services
                </div>
            `;
            extraItems.forEach(item => {
                displayTotal += convertAmount(item.amount, item.currency, displayCurrency);
                breakdownHTML += `
                    <div class="pricing-line mb-8" style="display: flex; justify-content: space-between; align-items: flex-start;">
                        <span class="text-14" style="color: ${accent};">${item.label}</span>
                        ${renderValueCell(item, accent)}
                    </div>
                `;
            });
        }

        // If any line was in a non-display currency, surface the FX rate that
        // was used so customers don't have to reverse-engineer the math.
        const mixedCurrencies = pricing.breakdown.some(i => i.amount > 0
            && (i.currency || displayCurrency).toUpperCase() !== displayCurrency);
        if (mixedCurrencies) {
            // Pick the first non-display currency present in the breakdown to
            // show as the headline rate (most tours have at most one foreign
            // currency mixed in — USD against KES).
            const sampleItem = pricing.breakdown.find(i => i.amount > 0
                && (i.currency || displayCurrency).toUpperCase() !== displayCurrency);
            const sampleCcy  = (sampleItem.currency || '').toUpperCase();
            const oneUnit    = convertAmount(1, sampleCcy, displayCurrency);
            breakdownHTML += `
                <div class="fx-rate-note mt-15" style="padding: 8px 12px; background: #f8fafc; border-left: 3px solid #94a3b8; border-radius: 6px; font-size: 12px; color: #64748b;">
                    <i class="fa fa-info-circle mr-5"></i>
                    Exchange rate: 1 ${sampleCcy} = ${formatMoney(oneUnit, displayCurrency)}
                </div>
            `;
        }

        breakdownDiv.innerHTML = breakdownHTML;

        // Single, properly-converted grand total — no more "KES X + USD Y"
        totalAmountSpan.textContent = formatMoney(displayTotal, displayCurrency);
    }
    
    function hidePricingSummary(structureId) {
        const summarySection = document.getElementById(`pricing-summary-${structureId}`);
        if (summarySection) {
            summarySection.style.display = 'none';
        }
    }
    
    function initPackageButton(structureId) {
        const button = document.querySelector(`.select-occupancy-package-btn[data-booking-structure-id="${structureId}"]`);
        if (!button) {
            return;
        }
        
        
        // Add click handler with event capture to ensure it runs first
        button.addEventListener('click', function(e) {
            e.preventDefault();
            e.stopPropagation();
            e.stopImmediatePropagation();
            
            
            if (button.disabled) {
                return false;
            }
            
            
            // Set legitimate booking flag BEFORE calling proceedToBooking
            window.legitimateBookingInProgress = true;
            
            // Also call temporarilyAllowExternalScripts for extra safety
            if (typeof window.temporarilyAllowExternalScripts === 'function') {
                window.temporarilyAllowExternalScripts();
            }
            
            // Proceed to booking
            proceedToBooking(structureId);
            return false;
        }, true); // Use capture phase to run before other handlers
    }
    
    function updatePackageButtonState(structureId) {
        const button = document.querySelector(`.select-occupancy-package-btn[data-booking-structure-id="${structureId}"]`);
        const requirementsDiv = button?.parentElement.querySelector('.package-requirements');
        
        if (!button) {
            return;
        }
        
        const dateInput = document.getElementById(`occupancy-date-picker-${structureId}`);
        const selectedDate = dateInput?.value;
        const totalGuests = getCounterValue(structureId, 'resident_adults') + 
                           getCounterValue(structureId, 'resident_children') + 
                           getCounterValue(structureId, 'nonresident_adults') + 
                           getCounterValue(structureId, 'nonresident_children');
        
        
        if (selectedDate && totalGuests > 0) {
            button.disabled = false;
            button.style.background = 'var(--main-color, var(--brand-primary, #31964a))';
            button.style.cursor = 'pointer';
            if (requirementsDiv) {
                requirementsDiv.textContent = 'Ready to proceed to booking';
                requirementsDiv.style.color = '#22c55e';
            }
        } else {
            button.disabled = true;
            button.style.background = '#9ca3af';
            button.style.cursor = 'not-allowed';
            if (requirementsDiv) {
                requirementsDiv.textContent = 'Please select date and guests to continue';
                requirementsDiv.style.color = '#64748b';
            }
        }
    }
    
    function proceedToBooking(structureId) {
        
        // Temporarily allow external scripts for legitimate booking process
        if (typeof window.temporarilyAllowExternalScripts === 'function') {
            window.temporarilyAllowExternalScripts();
        }
        
        // Set a flag to indicate this is a legitimate booking process
        window.legitimateBookingInProgress = true;
        setTimeout(() => {
            window.legitimateBookingInProgress = false;
        }, 3000);
        
        const dateInput = document.getElementById(`occupancy-date-picker-${structureId}`);
        const selectedDate = dateInput?.value;
        
        if (!selectedDate) {
            alert('Please select a travel date first');
            return;
        }
        
        const guestCounts = {
            resident_adults: getCounterValue(structureId, 'resident_adults'),
            resident_children: getCounterValue(structureId, 'resident_children'),
            nonresident_adults: getCounterValue(structureId, 'nonresident_adults'),
            nonresident_children: getCounterValue(structureId, 'nonresident_children')
        };
        
        const totalGuests = Object.values(guestCounts).reduce((sum, count) => sum + count, 0);
        
        if (totalGuests === 0) {
            alert('Please select at least one guest');
            return;
        }
        
        const tier = determinePricingTier(structureId, totalGuests);
        const selectedExtras = getSelectedExtraServices(structureId);
        
        
        // Find Vue instance - try multiple methods
        let vm = null;
        
        // Method 1: Check window variables
        if (window.vueInstance) {
            vm = window.vueInstance;
        } else if (window.tourBookApp) {
            vm = window.tourBookApp;
        } else {
            // Method 2: Check DOM element
            const bookingElement = document.getElementById('bravo_tour_book_app');
            if (bookingElement && bookingElement.__vue__) {
                vm = bookingElement.__vue__;
            }
        }
        
        if (!vm) {
            alert('Booking form not ready. Please refresh the page.');
            return;
        }
        
        
        // Calculate pricing — resolve from tier.seasons[] by season name.
        // Hoist per-type prices so we can also build a Vue
        // `price_breakdown_display` after this block.
        let raPrice = 0, rcPrice = 0, nraPrice = 0, nrcPrice = 0;
        let raCurrency = 'KES', rcCurrency = 'KES', nraCurrency = 'USD', nrcCurrency = 'USD';
        if (tier && window.occupancyTiersData) {
            const tierData = window.occupancyTiersData.occupancy_pricing[tier.index];
            if (tierData) {
                const detectedSeason = determineSeasonForDate(selectedDate);
                const sn = detectedSeason && detectedSeason.name !== 'Default Season'
                    ? detectedSeason.name.toLowerCase().trim() : null;

                let foundSeason = false;

                if (sn && Array.isArray(tierData.seasons)) {
                    for (const ts of tierData.seasons) {
                        const tsn = (ts.season_name || ts.name || '').toLowerCase().trim();
                        if (tsn && tsn === sn) {
                            raPrice  = parseFloat(ts.resident_adult_price     || 0);
                            rcPrice  = parseFloat(ts.resident_child_price     || 0);
                            nraPrice = parseFloat(ts.non_resident_adult_price || ts.nonresident_adult_price || 0);
                            nrcPrice = parseFloat(ts.non_resident_child_price || ts.nonresident_child_price || 0);
                            raCurrency  = ts.resident_adult_currency     || ts.resident_currency     || raCurrency;
                            rcCurrency  = ts.resident_child_currency     || ts.resident_currency     || rcCurrency;
                            nraCurrency = ts.non_resident_adult_currency || ts.nonresident_adult_currency || ts.non_resident_currency || ts.nonresident_currency || nraCurrency;
                            nrcCurrency = ts.non_resident_child_currency || ts.nonresident_child_currency || ts.non_resident_currency || ts.nonresident_currency || nrcCurrency;
                            foundSeason = true;
                            break;
                        }
                    }
                }
                if (!foundSeason) {
                    raPrice  = parseFloat(tierData.resident_adult_price     || tierData.price_per_person || 0);
                    rcPrice  = parseFloat(tierData.resident_child_price     || 0);
                    nraPrice = parseFloat(tierData.non_resident_adult_price || tierData.nonresident_adult_price || 0);
                    nrcPrice = parseFloat(tierData.non_resident_child_price || tierData.nonresident_child_price || 0);
                    raCurrency  = tierData.resident_adult_currency     || tierData.resident_currency     || raCurrency;
                    rcCurrency  = tierData.resident_child_currency     || tierData.resident_currency     || rcCurrency;
                    nraCurrency = tierData.non_resident_adult_currency || tierData.nonresident_adult_currency || tierData.non_resident_currency || tierData.nonresident_currency || nraCurrency;
                    nrcCurrency = tierData.non_resident_child_currency || tierData.nonresident_child_currency || tierData.non_resident_currency || tierData.nonresident_currency || nrcCurrency;
                }
            }
        }

        // Booking currency: residents only → KES, non-residents only → USD,
        // mixed → KES with non-res lines converted.
        const BOOKING_CCY = resolveBookingDisplayCurrency(guestCounts, raCurrency, nraCurrency);
        const toBookingCcy = (amt, ccy) => convertAmount(amt, ccy || BOOKING_CCY, BOOKING_CCY);

        const raSubtotal_native  = guestCounts.resident_adults     * raPrice;
        const rcSubtotal_native  = guestCounts.resident_children   * rcPrice;
        const nraSubtotal_native = guestCounts.nonresident_adults  * nraPrice;
        const nrcSubtotal_native = guestCounts.nonresident_children * nrcPrice;

        let totalPrice = toBookingCcy(raSubtotal_native, raCurrency)
            + toBookingCcy(rcSubtotal_native, rcCurrency)
            + toBookingCcy(nraSubtotal_native, nraCurrency)
            + toBookingCcy(nrcSubtotal_native, nrcCurrency);

        // Add extra services to total. Each service may be priced in a
        // different currency (a $50 USD upgrade vs a KSh 2,000 KES upgrade)
        // so we MUST convert each line to BASE_CCY before summing —
        // otherwise raw "50" gets added to a KES total as if it were KES,
        // dropping the visitor's bill by ~6,550 KES per $50 USD extra.
        // We also snapshot the converted line for the visible breakdown.
        let extraServicesTotal = 0;
        const extraServiceLines = [];
        if (selectedExtras.length > 0) {
            selectedExtras.forEach(service => {
                const rawPrice = parseFloat(service.price) || 0;
                if (rawPrice <= 0) return;
                const isPerPerson = service.per_person === true
                    || service.per_person === 'on'
                    || service.per_person === '1'
                    || service.per_person === 1;
                const qty = isPerPerson ? totalGuests : 1;
                const unitPriceNative = rawPrice;
                const lineNative = unitPriceNative * qty;
                const serviceCurrency = (service.currency || BOOKING_CCY).toUpperCase();
                const lineBooking = toBookingCcy(lineNative, serviceCurrency);
                extraServicesTotal += lineBooking;
                extraServiceLines.push({
                    type: 'extra_service',
                    name: service.name || 'Extra service',
                    quantity: qty,
                    per_person: isPerPerson ? 1 : 0,
                    unit_price: lineNative / Math.max(1, qty),
                    total: lineNative,
                    currency: serviceCurrency,
                    total_in_booking_currency: lineBooking,
                });
            });
            totalPrice += extraServicesTotal;
        }
        
        // Set structure info
        vm.$set(vm, 'selectedPackage', {
            id: structureId,
            name: 'Group Size Pricing - Bigger Groups Save More',
            type: 'occupancy_tiers'
        });
        vm.$set(vm, 'selected_structure_id', parseInt(structureId));
        vm.$set(vm, 'isPreFilled', true);
        
        // Set date
        vm.$set(vm, 'start_date', selectedDate);
        vm.$set(vm, 'start_date_html', moment(selectedDate).format('MMM DD, YYYY'));
        
        // Set guest counts.
        //
        // The Vue booking sidebar (tour-form-book.blade.php) reads guest
        // counts under TWO naming conventions:
        //   - `nonresident_adults`   (no underscore between non+resident)
        //     used by the visible v-if="..." templates that render each
        //     line in the "Guests" summary box.
        //   - `non_resident_adults`  (underscore separated)
        //     used by the backend submission payload + some computed
        //     properties.
        // The older `_occupancy_tiers_booking_combined.blade.php` widget
        // sets BOTH, but this enhanced-pricing widget historically only
        // set the underscored form, which silently dropped non-resident
        // guests from the booking summary AND from `subtotal` — the
        // customer would book with non-residents on the tour page and
        // see only the resident portion charged at checkout.
        vm.$set(vm, 'resident_adults', guestCounts.resident_adults);
        vm.$set(vm, 'resident_children', guestCounts.resident_children);
        vm.$set(vm, 'nonresident_adults', guestCounts.nonresident_adults);
        vm.$set(vm, 'nonresident_children', guestCounts.nonresident_children);
        vm.$set(vm, 'non_resident_adults', guestCounts.nonresident_adults);
        vm.$set(vm, 'non_resident_children', guestCounts.nonresident_children);
        vm.$set(vm, 'adults', totalGuests);
        vm.$set(vm, 'guests', totalGuests);

        // Set `guest_breakdown` so that any subsequent call to
        // `recalculateStructurePrice()` (triggered by watchers on
        // start_date / guests) sends the full per-residency breakdown to
        // the /calculate-price API. Otherwise the API would assume all
        // guests are residents and recompute a wrong total that would
        // then overwrite our `frontend_subtotal`.
        vm.$set(vm, 'guest_breakdown', {
            resident_adults: guestCounts.resident_adults,
            resident_children: guestCounts.resident_children,
            non_resident_adults: guestCounts.nonresident_adults,
            non_resident_children: guestCounts.nonresident_children
        });

        // Build a Vue-friendly price breakdown for the booking sidebar's
        // "Price Breakdown" section. Each line is presented in the visitor's
        // platform currency so the per-line totals add up cleanly to the
        // grand total (no mixed-currency arithmetic in the user's head).
        const breakdownItems = [];
        const pushLine = (name, qty, unitPrice, lineCurrency) => {
            if (!qty || qty <= 0) return;
            const unit = parseFloat(unitPrice) || 0;
            const totalNative = unit * qty;
            if (totalNative <= 0) return;
            breakdownItems.push({
                type: 'person_type',
                name: name,
                quantity: qty,
                unit_price: unit,
                total: totalNative,
                currency: String(lineCurrency || BOOKING_CCY).toUpperCase(),
            });
        };
        pushLine('Resident Adults',       guestCounts.resident_adults,      raPrice,  raCurrency);
        pushLine('Resident Children',     guestCounts.resident_children,    rcPrice,  rcCurrency);
        pushLine('Non-Resident Adults',   guestCounts.nonresident_adults,   nraPrice, nraCurrency);
        pushLine('Non-Resident Children', guestCounts.nonresident_children, nrcPrice, nrcCurrency);

        // Extras as their own visible lines so the sidebar's Price Breakdown
        // matches what the visitor checked on the pricing card and the
        // line totals add up to the Subtotal. The booking sidebar template
        // (`tour-form-book.blade.php`) already renders `type === 'extra_service'`
        // — including per-person hint when qty > 1.
        extraServiceLines.forEach(line => breakdownItems.push(line));

        vm.$set(vm, 'price_breakdown_display', breakdownItems);
        vm.$set(vm, 'priceBreakdown', []);

        // Set currency on Vue so "Subtotal" and "Total Amount" labels render
        // in the same currency the customer saw on the pricing card.
        vm.$set(vm, 'currency', BOOKING_CCY);
        vm.$set(vm, 'total_price_currency', BOOKING_CCY);

        // Set pricing
        vm.$set(vm, 'calculated_price', {
            total: totalPrice,
            total_guests: totalGuests,
            base_price: totalPrice - extraServicesTotal,
            extra_services_total: extraServicesTotal,
            currency: BOOKING_CCY
        });
        
        // Set tier info
        if (tier) {
            vm.$set(vm, 'occupancy_tier_index', tier.index);
        }
        
        // Set extra services in the format expected by the booking system.
        // We also carry `currency` and a `price_base` (already converted to
        // PLATFORM_CURRENCY) so any downstream consumer that does NOT trust
        // `frontend_subtotal` (e.g. a backend recompute) still sums in the
        // right currency rather than treating "$50" as "50 KES".
        if (selectedExtras.length > 0) {
            vm.$set(vm, 'selected_extra_services', selectedExtras);

            const extraPriceFormat = selectedExtras.map((service) => {
                const rawPrice = parseFloat(service.price) || 0;
                const serviceCurrency = (service.currency || BOOKING_CCY).toUpperCase();
                const isPerPerson = service.per_person === true
                    || service.per_person === 'on'
                    || service.per_person === '1'
                    || service.per_person === 1;
                return {
                    index: service.index,
                    name: service.name,
                    price: rawPrice,
                    price_base: toBookingCcy(rawPrice, serviceCurrency),
                    currency: serviceCurrency,
                    base_currency: BOOKING_CCY,
                    type: service.type || 'one_time',
                    per_person: isPerPerson ? 1 : 0,
                    enable: 1
                };
            });

            vm.$set(vm, 'extra_price', extraPriceFormat);
        } else {
            vm.$set(vm, 'extra_price', []);
        }
        
        // Set frontend_subtotal so proceedToCheckout uses this value directly
        vm.$set(vm, 'frontend_subtotal', totalPrice);
        vm.$set(vm, '_effective_subtotal', totalPrice);
        if (typeof vm._packageSelectionTick !== 'undefined') {
            vm._packageSelectionTick = (parseInt(vm._packageSelectionTick, 10) || 0) + 1;
        }
        
        // Force Vue update
        vm.$forceUpdate();
        
        
        // Scroll to booking form
        setTimeout(() => {
            const bookingForm = document.querySelector('.bravo_single_book_wrap, #bravo_tour_book_app');
            if (bookingForm) {
                bookingForm.scrollIntoView({ behavior: 'smooth', block: 'start' });
            }
        }, 100);
        
        // Trigger selection event for other components
        setTimeout(() => {
            if (window.TourPricingDateIntegration && typeof window.TourPricingDateIntegration.onStructureSelected === 'function') {
                window.TourPricingDateIntegration.onStructureSelected(structureId, 'Group Size Pricing - Bigger Groups Save More', 'occupancy_tiers');
            } else {
            }
        }, 100); // Small delay to ensure all Vue updates are complete
    }
    
    // Initialize when DOM is ready
    
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', function() {
            initOccupancyTiersBooking();
        });
    } else {
        initOccupancyTiersBooking();
    }
})();

// Global protection against external scripts interfering with extra services - REMOVED ALL BLOCKING
(function() {
})();

// Pricing Accordion Toggle Function
function togglePricingAccordion(index) {
    const content = document.getElementById('content-' + index);
    const chevron = document.getElementById('chevron-' + index);
    
    if (content.style.display === 'none' || content.style.display === '') {
        // Open accordion
        content.style.display = 'block';
        content.classList.add('open');
        chevron.classList.add('rotated');
        
        // Close other accordions
        const allContents = document.querySelectorAll('.pricing-accordion-content');
        const allChevrons = document.querySelectorAll('.accordion-chevron');
        
        allContents.forEach((otherContent, otherIndex) => {
            if (otherContent.id !== 'content-' + index) {
                otherContent.style.display = 'none';
                otherContent.classList.remove('open');
            }
        });
        
        allChevrons.forEach((otherChevron, otherIndex) => {
            if (otherChevron.id !== 'chevron-' + index) {
                otherChevron.classList.remove('rotated');
            }
        });
        
    } else {
        // Close accordion
        content.style.display = 'none';
        content.classList.remove('open');
        chevron.classList.remove('rotated');
    }
}

// Initialize first accordion as open (optional)
document.addEventListener('DOMContentLoaded', function() {
    // Uncomment the line below if you want the first accordion to be open by default
    // togglePricingAccordion(0);
});
</script>
    </div>
</div>


<div class="tour-section">
    <div class="bg-white rounded-4 border-light shadow-4 px-30 py-30" id="tour-booking">
                <style>
/* ── Uniform 14px across entire booking form — scoped to exclude modals ── */
.bravo_single_book_wrap:not(#enquiry_form_modal):not(#enquiry_form_modal *),
.bravo_single_book_wrap *:not(#enquiry_form_modal):not(#enquiry_form_modal *) {
    font-size: 14px !important;
}

/* Modern Booking Form Styles - Optimized Spacing */
:root {
    --main-color: #31964a;
    --main-color-dark: #31964a;
    --main-color-light: #31964a;
    --form-spacing-xs: 4px;
    --form-spacing-sm: 8px;
    --form-spacing-md: 16px;
    --form-spacing-lg: 24px;
    --form-border-radius: 8px;
    --form-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

@supports (color: color-mix(in srgb, red, blue)) {
    :root {
        --main-color-dark: color-mix(in srgb, #31964a 80%, black);
        --main-color-light: color-mix(in srgb, #31964a 20%, white);
    }
}

/* Modern Booking Form Container - NO STYLING */
.bravo_single_book_wrap {
    --main-color-dark: #31964a;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure booking form matches package options width - NO CARD STYLING */
.bravo_single_book {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    box-sizing: border-box;
}

#bravo_tour_book_app {
    width: 100% !important;
    max-width: 100% !important;
}

/* Optimized Booking Form Tabs */
.nav-enquiry {
    display: flex;
    gap: 0;
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.enquiry-item {
    flex: 1;
    text-align: center;
    padding: var(--form-spacing-md) var(--form-spacing-sm);
    cursor: pointer;
    background: transparent;
    color: #000000;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    border-bottom: 3px solid transparent;
    position: relative;
}

.enquiry-item:hover {
    background: #f1f5f9;
    color: #374151;
}

.enquiry-item.active {
    background: white;
    color: var(--main-color);
    border-bottom-color: var(--main-color);
    font-weight: 600;
}

.enquiry-item span {
    display: inline-block;
}

/* Form Content Styling - padding now handled by container */

/* Form Groups */
.form-group {
    margin-bottom: var(--form-spacing-md);
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Form Labels */
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: var(--form-spacing-sm);
}

/* Form Inputs */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="tel"],
select {
    width: 100%;
    padding: var(--form-spacing-md);
    border: 2px solid #e5e7eb;
    border-radius: var(--form-border-radius);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(var(--main-color), 0.1);
}

/* Number Inputs */
.number-input-group {
    display: flex;
    align-items: center;
    gap: var(--form-spacing-sm);
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: var(--form-border-radius);
    padding: var(--form-spacing-sm);
}

.number-input-group button {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--main-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.number-input-group button:hover {
    background: var(--main-color-dark);
    transform: scale(1.05);
}

.number-input-group input {
    flex: 1;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 16px;
    padding: var(--form-spacing-sm);
}

/* Price Summary */
.price-summary {
    background: #f8fafc;
    border-radius: var(--form-border-radius);
    padding: var(--form-spacing-md);
    margin: var(--form-spacing-md) 0;
    border: 1px solid #e5e7eb;
}

.price-summary-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: var(--form-spacing-sm);
}

.price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--form-spacing-xs) 0;
    font-size: 14px;
    color: #000000;
}

.price-total {
    border-top: 1px solid #e5e7eb;
    padding-top: var(--form-spacing-sm);
    margin-top: var(--form-spacing-sm);
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

/* Booking Button */
.btn-book,
.booking-button {
    width: 100%;
    padding: var(--form-spacing-md) var(--form-spacing-lg);
    background: var(--main-color);
    color: white;
    border: none;
    border-radius: var(--form-border-radius);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--form-spacing-sm);
    text-decoration: none;
}

.btn-book:hover,
.booking-button:hover {
    background: var(--main-color-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--main-color), 0.3);
    color: white;
    text-decoration: none;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .bravo_single_book {
        padding: var(--form-spacing-md);
    }
    
    .enquiry-item {
        padding: var(--form-spacing-sm);
        font-size: 13px;
    }
    
    .number-input-group button {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* Normal positioning - form stays in its place, doesn't follow scroll - NO STYLING */
.bravo_single_book_wrap {
    position: relative !important;
    z-index: 10 !important;
}

.bravo_single_book {
    position: relative !important;
}

.booking-summary-header {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #111827;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.summary-icon {
    font-size: 24px;
    color: #16a34a;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.summary-info { flex: 1; }
.summary-info h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}
.summary-info p {
    margin: 0;
    font-size: 14px;
    color: #000000;
}
.btn-edit-selections {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-edit-selections:hover {
    background: #e5e7eb;
}

/* Success Banner for Pre-filled Form */
.prefill-success-banner {
    background: #f0fdf4;
    color: #111827;
    border: 1px solid #d1fae5;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.prefill-success-banner i {
    font-size: 20px;
    color: #16a34a;
}

.prefill-success-banner .message {
    flex: 1;
}

.prefill-success-banner .message strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.prefill-success-banner .message p {
    margin: 0;
    font-size: 13px;
    color: #374151;
}

.booking-summary-header {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.selections-detail-box h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #111827;
}

.combined-booking-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}
.combined-booking-box h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #111827;
}
.section-divider {
    margin: 16px 0 12px 0;
    padding: 8px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.section-divider span {
    font-size: 12px;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.selection-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}
.selection-row:last-child { border-bottom: none; }
.selection-row .label { font-size: 14px; color: #374151; display: flex; align-items: center; gap: 8px; }
.selection-row .value { font-size: 14px; font-weight: 600; color: #111827; }

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}
.price-row .label { color: #374151; }
.price-row .amount { font-weight: 600; color: #111827; }
.price-row.subtotal {
    border-top: 1px solid #e5e7eb;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 15px;
    font-weight: 600;
}

.grand-total-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.total-row .label { font-size: 15px; font-weight: 600; color: #111827; }
.total-row .amount { font-size: 18px; font-weight: 700; color: #111827; }

.no-selection-prompt {
    text-align: center;
    padding: 60px 30px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.prompt-icon {
    font-size: 32px;
    color: var(--main-color);
    margin-bottom: 20px;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.no-selection-prompt h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #111827;
}
.no-selection-prompt p { margin-bottom: 25px; color: #000000; }

/* Date Selection Prompt (intermediate state) */
.date-selection-prompt {
    text-align: center;
    padding: 40px 30px;
    background: #fffbeb;
    border: 1px solid var(--brand-primary-light, #b7e3c4);
    border-radius: 12px;
}
.date-selection-prompt .prompt-icon {
    font-size: 32px;
    color: var(--brand-primary, #31964a);
    margin-bottom: 20px;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.date-selection-prompt h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #111827;
}
.date-selection-prompt p {
    margin-bottom: 15px;
    color: #374151;
}

/* Mobile Responsive - Improved */
@media (max-width: 991px) {
    .bravo_single_book_wrap {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
        position: relative !important;
        margin-top: 30px !important;
    }

    .bravo_single_book {
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px 15px !important;
    }

    /* Ensure Vue app renders properly */
    #bravo_tour_book_app {
        width: 100% !important;
    }

    .booking-summary-header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .summary-icon {
        font-size: 28px;
    }

    .btn-edit-selections {
        width: 100%;
        margin-top: 15px;
    }

    .total-row .amount {
        font-size: 18px;
    }

    /* Form fields on mobile */
    .form-group label {
        font-size: 14px !important;
    }

    .form-control {
        font-size: 16px !important;
        padding: 12px 15px !important;
    }

    /* Tabs on mobile */
    .nav-enquiry {
        flex-direction: column;
        gap: 5px;
    }

    .enquiry-item {
        padding: 12px 15px;
        font-size: 14px;
    }

    /* Combined booking box on mobile */
    .combined-booking-box {
        padding: 15px;
    }

    .selection-row {
        padding: 8px 0;
        font-size: 13px;
    }

    .price-row {
        padding: 6px 0;
        font-size: 13px;
    }

    /* Grand total on mobile */
    .grand-total-box {
        padding: 15px;
    }

    .total-row .label {
        font-size: 15px;
    }

    .total-row .amount {
        font-size: 20px;
    }

    /* Prompts on mobile */
    .no-selection-prompt,
    .date-selection-prompt {
        padding: 40px 20px;
    }

    .prompt-icon {
        font-size: 28px;
    }

    .no-selection-prompt h4,
    .date-selection-prompt h4 {
        font-size: 16px;
    }

    .no-selection-prompt p,
    .date-selection-prompt p {
        font-size: 14px;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    .bravo_single_book {
        padding: 15px 10px !important;
    }

    .booking-summary-header {
        padding: 12px;
    }

    .summary-info h4 {
        font-size: 16px;
    }

    .summary-info p {
        font-size: 13px;
    }

    .combined-booking-box h5 {
        font-size: 15px;
    }

    .grand-total-box {
        padding: 12px;
    }

    .total-row .amount {
        font-size: 18px;
    }
}
</style>

<div class="bravo_single_book_wrap" data-offset="120" style="width:100%;">
    <div class="w-full d-flex flex-column" style="width:100%">
                
        
                    <div class="tour-basic-booking-luxury w-full">
            <div class="unified-booking-container tour-basic-booking-luxury__form mb-20 w-full">
                <div class="tour-basic-booking-luxury__form-head">
                    <div class="basic-price-display"
     data-tour-id="2327"
     data-tour-currency="USD"
     data-main-currency="KES"
     data-currency-rates='{"USD":129.43999999999999772626324556767940521240234375,"KES":1}'>

    
            <div class="basic-currency-switcher">
            <div class="currency-label">
                <i class="fa fa-globe"></i>
                <span>Currency</span>
            </div>
            <div class="currency-toggle-group">
                                                        <button type="button"
                            class="currency-toggle-btn active"
                            data-currency="USD"
                            data-rate="129.44"
                            onclick="switchCurrency('USD', 129.44)">
                        USD
                    </button>
                                                        <button type="button"
                            class="currency-toggle-btn "
                            data-currency="KES"
                            data-rate="1"
                            onclick="switchCurrency('KES', 1)">
                        KES
                    </button>
                            </div>
        </div>
    
    <p class="basic-price-text">
                <span class="price-from">from</span>
        <span class="price-amount" data-base-price="250">$250</span>
        <span class="price-per">per person</span>
    </p>

</div>

<style>
.basic-price-display {
    margin-bottom: 0;
}

.basic-currency-switcher {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.currency-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4a5568;
    margin-bottom: 6px;
}

.currency-label i {
    color: var(--main-color, #3554D1);
}

.currency-toggle-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.currency-toggle-btn {
    padding: 6px 14px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    transition: all 0.2s;
}

.currency-toggle-btn:hover {
    border-color: var(--main-color, #3554D1);
    color: var(--main-color, #3554D1);
}

.currency-toggle-btn.active {
    background: var(--main-color, #3554D1);
    color: white;
    border-color: var(--main-color, #3554D1);
}

.basic-price-text {
    font-size: 14px;
    color: #4a5568;
    margin: 0;
    line-height: 1.5;
}

.price-save {
    color: #4a5568;
    margin-right: 6px;
}

.price-original {
    text-decoration: line-through;
    color: #9ca3af;
    margin-right: 6px;
}

.price-from {
    color: #718096;
    margin-right: 4px;
}

.price-amount {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 4px;
}

.price-per {
    color: #718096;
    margin-left: 4px;
}
</style>

<script>
/*
 * Site-wide currency conversion model (mirrors \App\Currency::convert in PHP):
 *
 *   rate[X] = "1 unit of X equals N units of the site main currency"
 *
 * With site main = KES and USD rate = 132, 1 USD = 132 KES. To convert
 * between two arbitrary currencies:
 *
 *   amount_in_target = amount_in_source * rate[source] / rate[target]
 *
 * Tour-detail pages can carry many price-bearing widgets that all need to
 * stay in sync when the visitor flips the currency toggle, so we publish a
 * small window.AppCurrency helper here (idempotent — first widget wins) and
 * fire a 'currencyChanged' event that other widgets can subscribe to.
 */
(function () {
    if (window.AppCurrency && window.AppCurrency.__installed) return;

    const SYMBOLS = { 'USD': '$', 'KES': 'KSh', 'EUR': '€', 'GBP': '£' };

    function readRates() {
        const wrapper = document.querySelector('.basic-price-display[data-currency-rates]');
        if (!wrapper) return {};
        try { return JSON.parse(wrapper.dataset.currencyRates || '{}'); }
        catch (e) { return {}; }
    }

    function rateOf(rates, code) {
        const c = (code || '').toUpperCase();
        const v = parseFloat(rates[c]);
        return v > 0 ? v : 0;
    }

    const api = {
        __installed: true,

        convert(amount, fromCurrency, toCurrency) {
            const n = parseFloat(amount);
            if (!isFinite(n)) return 0;
            const from = (fromCurrency || '').toUpperCase();
            const to   = (toCurrency   || '').toUpperCase();
            if (!from || !to || from === to) return n;

            const rates = readRates();
            const rFrom = rateOf(rates, from);
            const rTo   = rateOf(rates, to);
            if (rFrom <= 0 || rTo <= 0) return n; // unknown — fail safe
            return n * rFrom / rTo;
        },

        format(amount, currencyCode) {
            const code = (currencyCode || '').toUpperCase();
            const symbol = SYMBOLS[code] || code;
            const num = new Intl.NumberFormat('en-US', {
                minimumFractionDigits: 0,
                maximumFractionDigits: 2
            }).format(parseFloat(amount) || 0);
            return symbol + ' ' + num;
        },

        convertAndFormat(amount, fromCurrency, toCurrency) {
            return api.format(api.convert(amount, fromCurrency, toCurrency), toCurrency);
        },
    };

    window.AppCurrency = api;
})();

// Tour-pricing currency toggle. Called from the per-button onclick handlers
// rendered above. Updates the headline price, fires a 'currencyChanged'
// event so other widgets (guest selector, booking summary) can re-render,
// and persists the visitor's choice via /currency/set.
function switchCurrency(currencyCode /*, legacyRate */) {
    const target  = (currencyCode || '').toUpperCase();
    const wrapper = document.querySelector('.basic-price-display');
    if (!wrapper) return;

    const tourCurrency = (wrapper.dataset.tourCurrency || 'KES').toUpperCase();

    document.querySelectorAll('.currency-toggle-btn').forEach(btn => {
        btn.classList.remove('active');
        if ((btn.dataset.currency || '').toUpperCase() === target) {
            btn.classList.add('active');
        }
    });

    const basePriceElement     = wrapper.querySelector('[data-base-price]');
    const originalPriceElement = wrapper.querySelector('[data-original-price]');
    if (basePriceElement) {
        const basePrice = parseFloat(basePriceElement.dataset.basePrice) || 0;
        basePriceElement.textContent = window.AppCurrency.convertAndFormat(basePrice, tourCurrency, target);
    }
    if (originalPriceElement) {
        const originalPrice = parseFloat(originalPriceElement.dataset.originalPrice) || 0;
        originalPriceElement.textContent = window.AppCurrency.convertAndFormat(originalPrice, tourCurrency, target);
    }

    // Tell other widgets on the page (guest selector, booking summary,
    // extras list, ...) to re-render their numbers in the new currency.
    document.dispatchEvent(new CustomEvent('currencyChanged', {
        detail: { from: tourCurrency, to: target },
    }));

    // Persist for the rest of the visitor's session.
    try {
        fetch('/currency/set', {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
                'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').content
            },
            body: JSON.stringify({ currency: target })
        });
    } catch (e) { /* non-fatal */ }
}
</script>
                </div>
                <div class="basic-date-selection-wrapper" data-tour-id="2327">
    <style>
        /* Luxury Date Selection Styles - Using Theme Main Color */
        .basic-date-selection-wrapper {
            margin-bottom: 12px;
            background: #ffffff;
            border-radius: 16px;
            padding: 16px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
            border: 1px solid #f0f0f0;
        }
        
        .date-selection-header {
            margin-bottom: 10px;
            padding-bottom: 0;
            border-bottom: none;
        }
        
        .date-selection-header h4 {
            font-size: 14px;
            font-weight: 700;
            color: #1a202c;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .date-selection-header h4 i {
            font-size: 20px;
            color: var(--main-color, var(--main-color, var(--brand-primary, #31964a)));
        }
        
        .date-selection-header p {
            font-size: 13px;
            color: #718096;
            margin: 0;
            padding-left: 30px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .date-selection-header p i {
            color: var(--main-color, var(--main-color, var(--brand-primary, #31964a)));
        }
        
        /* Fixed Date Display — compact inline bar (not a hero block) */
        .fixed-date-display {
            display: flex;
            align-items: center;
            gap: 12px;
            background: rgba(var(--brand-primary-rgb, 49, 150, 74), 0.08);
            border: 1px solid rgba(var(--brand-primary-rgb, 49, 150, 74), 0.2);
            border-left: 3px solid var(--main-color, var(--brand-primary, #31964a));
            border-radius: 8px;
            padding: 10px 14px;
            color: #1a202c;
            box-shadow: none;
            position: relative;
            overflow: hidden;
            text-align: left;
        }
        
        .fixed-date-display::before,
        .fixed-date-display::after {
            display: none;
        }
        
        .fixed-date-display .date-icon {
            flex-shrink: 0;
            width: 32px;
            height: 32px;
            margin-bottom: 0;
            border-radius: 8px;
            background: var(--main-color, var(--brand-primary, #31964a));
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            opacity: 1;
            filter: none;
        }
        
        .fixed-date-display .date-body {
            flex: 1;
            min-width: 0;
        }
        
        .fixed-date-display .date-label {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #718096;
            margin-bottom: 2px;
            font-weight: 600;
        }
        
        .fixed-date-display .date-value {
            font-size: 14px;
            font-weight: 700;
            margin-bottom: 0;
            color: #1a202c;
            text-shadow: none;
            line-height: 1.25;
        }
        
        .fixed-date-display .date-day {
            font-size: 12px;
            color: #718096;
            font-weight: 500;
            margin-top: 1px;
        }
        
        /* Multiple Dates List */
        .multiple-dates-list {
            display: grid;
            gap: 14px;
        }
        
        .date-card {
            background: #ffffff;
            border: 1px solid #f0f0f0;
            border-radius: 8px;
            padding: 8px 10px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }
        
        .date-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 5px;
            height: 100%;
            background: var(--main-color, var(--main-color, var(--brand-primary, #31964a)));
            transform: scaleY(0);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            transform-origin: bottom;
        }
        
        .date-card::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 03%, transparent) 0%, rgba(var(--brand-primary-rgb, 49,150,74), 0.03) 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .date-card:hover {
            border-color: var(--main-color, var(--brand-primary, #31964a));
            box-shadow: 0 8px 24px color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 15%, transparent);
            transform: translateY(-3px);
        }
        
        .date-card:hover::before {
            transform: scaleY(1);
            transform-origin: top;
        }
        
        .date-card:hover::after {
            opacity: 1;
        }
        
        .date-card.selected {
            border-color: var(--main-color, var(--brand-primary, #31964a));
            background: linear-gradient(135deg, color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 08%, transparent) 0%, rgba(var(--brand-primary-rgb, 49,150,74), 0.08) 100%);
            box-shadow: 0 6px 20px color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 2%, transparent);
            transform: translateY(-2px);
        }
        
        .date-card.selected::before {
            transform: scaleY(1);
        }
        
        .date-card.selected::after {
            opacity: 1;
        }
        
        .date-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            position: relative;
            z-index: 1;
        }
        
        .date-card-date {
            font-size: 12px;
            font-weight: 600;
            color: #1a202c;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .date-card-date::before {
            content: '\f073';
            font-family: 'Font Awesome 5 Free';
            font-weight: 400;
            font-size: 11px;
            color: var(--main-color, var(--brand-primary, #31964a));
            opacity: 0.7;
        }
        
        .date-card-badge {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            padding: 3px 8px;
            border-radius: 10px;
            font-size: 9px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
        }
        
        .badge-available {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
        }
        
        .badge-limited {
            background: linear-gradient(135deg, var(--brand-primary, #31964a) 0%, var(--brand-primary-dark, #247339) 100%);
            color: white;
        }
        
        .date-card-day {
            font-size: 11px;
            color: #718096;
            margin-bottom: 6px;
            font-weight: 500;
            position: relative;
            z-index: 1;
        }
        
        .date-card-price {
            font-size: 11px;
            font-weight: 500;
            background: var(--main-color, var(--main-color, var(--brand-primary, #31964a)));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            position: relative;
            z-index: 1;
        }
        
        .date-card-price span {
            font-size: 9px;
            font-weight: 400;
            color: #718096;
            -webkit-text-fill-color: #718096;
        }
        
        /* Open Calendar */
        .open-calendar-wrapper {
            background: #ffffff;
            border: 2px solid #f0f0f0;
            border-radius: 14px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
            transition: all 0.3s ease;
        }
        
        .open-calendar-wrapper:hover {
            border-color: var(--main-color, var(--brand-primary, #31964a));
            box-shadow: 0 4px 16px color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 12%, transparent);
        }
        
        .calendar-input-wrapper {
            position: relative;
        }
        
        .calendar-input {
            width: 100%;
            padding: 16px 18px;
            padding-left: 50px;
            border: 2px solid #e8e8e8;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 600;
            color: #1a202c;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            background: #fafafa;
        }
        
        .calendar-input:hover {
            border-color: var(--main-color, var(--brand-primary, #31964a));
            background: #ffffff;
            box-shadow: 0 4px 12px color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 12%, transparent);
            transform: translateY(-1px);
        }
        
        .calendar-input:focus {
            outline: none;
            border-color: var(--main-color, var(--brand-primary, #31964a));
            background: #ffffff;
            box-shadow: 0 0 0 4px color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 1%, transparent);
        }
        
        .calendar-input-icon {
            position: absolute;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 20px;
            background: var(--main-color, var(--main-color, var(--brand-primary, #31964a)));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            pointer-events: none;
        }
        
        .calendar-info {
            margin-top: 14px;
            padding: 14px 16px;
            background: linear-gradient(135deg, color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 06%, transparent) 0%, rgba(var(--brand-primary-rgb, 49,150,74), 0.06) 100%);
            border-radius: 10px;
            font-size: 13px;
            color: #4a5568;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 8px;
            border-left: 3px solid var(--main-color, var(--brand-primary, #31964a));
        }
        
        .calendar-info i {
            color: var(--main-color, var(--brand-primary, #31964a));
            font-size: 14px;
        }
        
        /* No Date Selection Info */
        .no-date-selection-info {
            padding: 16px 18px;
            background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
            border-left: 4px solid #10b981;
            border-radius: 10px;
            font-size: 14px;
            color: #065f46;
            display: flex;
            align-items: center;
            gap: 12px;
            font-weight: 500;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
        }
        
        .no-date-selection-info i {
            font-size: 14px;
            color: #10b981;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .basic-date-selection-wrapper {
                padding: 20px;
                border-radius: 14px;
            }
            
            .date-selection-header h4 {
                font-size: 14px;
            }
            
            .fixed-date-display {
                padding: 8px;
            }
            
            .fixed-date-display .date-value {
                font-size: 12px;
            }
            
            .date-card {
                padding: 6px 8px;
            }
            
            .date-card-date {
                font-size: 14px;
            }
            
            .calendar-input {
                padding: 14px 16px;
                padding-left: 46px;
            }
        }
    </style>
    
            <div class="date-selection-header">
            <h4>
                <i class="fa fa-calendar" style="color: var(--main-color, var(--brand-primary, #31964a)); margin-right: 8px;"></i>
                Select Your Travel Date
            </h4>
                            <p>
                    <i class="fa fa-info-circle"></i>
                    Book at least 3 days in advance
                </p>
                    </div>
        
            
        <div class="open-calendar-wrapper">
            <div class="calendar-input-wrapper">
                <i class="fa fa-calendar calendar-input-icon"></i>
                <input type="text" 
                       class="calendar-input tour-date-picker" 
                       placeholder="Click to select your travel date"
                       readonly>
            </div>
            
                            
                <div class="calendar-info">
                    <i class="fa fa-calendar-check"></i>
                    Open booking - Select any date from Jun 28, 2026 onwards
                </div>
                    </div>
        
        <input type="hidden" name="start_date" value="" class="tour-start-date">
        
    </div>

<script>
// Phase 1.2: Date Selection JavaScript
(function() {
    'use strict';
    
    // Select tour date from multiple dates list
    window.selectTourDate = function(element) {
        // Remove selected class from all date cards
        document.querySelectorAll('.date-card').forEach(card => {
            card.classList.remove('selected');
        });
        
        // Add selected class to clicked card
        element.classList.add('selected');
        
        // Get date value
        const selectedDate = element.getAttribute('data-date');
        const selectedPrice = element.getAttribute('data-price');
        
        // Update hidden input
        const hiddenInput = document.querySelector('.tour-start-date');
        if (hiddenInput) {
            hiddenInput.value = selectedDate;
            
            // Trigger change event for Vue reactivity
            const event = new Event('change', { bubbles: true });
            hiddenInput.dispatchEvent(event);
        }
        
        // Update Vue instance if available
        if (window.vueInstance && window.vueInstance.start_date !== undefined) {
            window.vueInstance.start_date = selectedDate;
            
            // Update price if available
            if (selectedPrice && window.vueInstance.price !== undefined) {
                window.vueInstance.price = parseFloat(selectedPrice);
            }
        }
        
    };
    
    // Initialize date picker for open calendar
    document.addEventListener('DOMContentLoaded', function() {
        const datePicker = document.querySelector('.tour-date-picker');
        
        if (datePicker && typeof $ !== 'undefined' && $.fn.daterangepicker) {
            const wrapper = datePicker.closest('.basic-date-selection-wrapper');
            const tourId = wrapper ? wrapper.getAttribute('data-tour-id') : null;
            
            // Get tour data from PHP
                            const startDate = '2026-06-28';
                const endDate = '2028-06-25';
                const minDaysAdvance = 3;
                
                // Calculate minimum selectable date
                const today = moment();
                const minDate = today.clone().add(minDaysAdvance, 'days');
                const maxDate = moment(endDate);
                
                // Initialize daterangepicker
                $(datePicker).daterangepicker({
                    singleDatePicker: true,
                    autoApply: true,
                    minDate: minDate,
                    maxDate: maxDate,
                    startDate: minDate,
                    locale: {
                        format: 'MMM DD, YYYY',
                        firstDay: 1
                    },
                    isInvalidDate: function(date) {
                        // Disable dates before minDate
                        if (date.isBefore(minDate, 'day')) {
                            return true;
                        }
                        // Disable dates after maxDate
                        if (date.isAfter(maxDate, 'day')) {
                            return true;
                        }
                        return false;
                    }
                }, function(start, end, label) {
                    // Callback when date is selected
                    const selectedDate = start.format('YYYY-MM-DD');
                    
                    // Update hidden input
                    const hiddenInput = document.querySelector('.tour-start-date');
                    if (hiddenInput) {
                        hiddenInput.value = selectedDate;
                        
                        // Trigger change event
                        const event = new Event('change', { bubbles: true });
                        hiddenInput.dispatchEvent(event);
                    }
                    
                    // Update Vue instance
                    if (window.vueInstance && window.vueInstance.start_date !== undefined) {
                        window.vueInstance.start_date = selectedDate;
                    }
                    
                });
                
                // Add custom styling to daterangepicker
                $(datePicker).on('show.daterangepicker', function(ev, picker) {
                    // Add luxury styling class
                    picker.container.addClass('luxury-date-picker');
                });
                    }
    });
})();
</script>


<style>
.luxury-date-picker.daterangepicker {
    border: 2px solid #e8e8e8;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    padding: 8px;
}

.luxury-date-picker .calendar-table {
    border: none;
    padding: 4px;
}

.luxury-date-picker .calendar-table thead tr th {
    color: var(--main-color, var(--brand-primary, #31964a));
    font-weight: 700;
    font-size: 13px;
    padding: 12px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.luxury-date-picker .calendar-table tbody tr td {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.luxury-date-picker .calendar-table tbody tr td.available:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 15%, transparent) 0%, rgba(var(--brand-primary-rgb, 49,150,74), 0.15) 100%);
    color: var(--main-color, var(--brand-primary, #31964a));
    transform: scale(1.1);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 2%, transparent);
}

.luxury-date-picker .calendar-table tbody tr td.active {
    background: var(--main-color, var(--main-color, var(--brand-primary, #31964a)));
    color: white;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 4%, transparent);
    transform: scale(1.05);
}

.luxury-date-picker .calendar-table tbody tr td.off {
    color: #cbd5e0;
    background: #f7fafc;
}

.luxury-date-picker .calendar-table tbody tr td.disabled {
    color: #e2e8f0;
    text-decoration: line-through;
    opacity: 0.5;
}

.luxury-date-picker .drp-calendar.left,
.luxury-date-picker .drp-calendar.right {
    padding: 12px;
}

.luxury-date-picker .month {
    color: #1a202c;
    font-weight: 700;
    font-size: 14px;
}

.luxury-date-picker .drp-buttons {
    border-top: 2px solid #f0f0f0;
    padding: 12px;
}
</style>
                
                
                <div class="basic-guest-selection-wrapper" data-tour-id="2327">
    <style>
        /* ── Uniform 14px ── */
        .basic-guest-selection-wrapper,
        .basic-guest-selection-wrapper * { font-size: 14px !important; }

        /* Luxury Guest Selection Styles */
        .basic-guest-selection-wrapper {
            margin-bottom: 12px;
            background: #ffffff;
            border-radius: 16px;
            padding: 16px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
            border: 1px solid #f0f0f0;
        }
        
        .guest-selection-header {
            margin-bottom: 10px;
            padding-bottom: 0;
            border-bottom: none;
        }
        
        .guest-selection-header h4 {
            font-size: 14px;
            font-weight: 700;
            color: #1a202c;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .guest-selection-header h4 i {
            font-size: 20px;
            background: var(--main-color, var(--main-color, var(--brand-primary, #31964a)));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .guest-selection-header p {
            font-size: 13px;
            color: #718096;
            margin: 0;
            padding-left: 30px;
        }
        
        /* Guest Type Row */
        .guest-type-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid #f0f0f0;
            transition: all 0.3s ease;
        }
        
        .guest-type-row:last-child {
            border-bottom: none;
        }
        
        .guest-type-row:hover {
            background: linear-gradient(135deg, color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 02%, transparent) 0%, rgba(var(--brand-primary-rgb, 49,150,74), 0.02) 100%);
            padding-left: 12px;
            padding-right: 12px;
            margin-left: -12px;
            margin-right: -12px;
            border-radius: 12px;
        }
        
        .guest-type-info {
            flex: 1;
        }
        
        .guest-type-label {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 4px;
        }
        
        .guest-type-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: linear-gradient(135deg, color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 1%, transparent) 0%, rgba(var(--brand-primary-rgb, 49,150,74), 0.1) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: var(--main-color, var(--brand-primary, #31964a));
        }
        
        .guest-type-name {
            font-size: 14px;
            font-weight: 600;
            color: #1a202c;
        }
        
        .guest-type-details {
            font-size: 13px;
            color: #718096;
            margin-left: 46px;
        }
        
        .guest-type-age {
            display: inline-block;
            margin-right: 12px;
        }
        
        .guest-type-price {
            display: inline-block;
            font-weight: 600;
            background: var(--main-color, var(--main-color, var(--brand-primary, #31964a)));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        /* Counter Controls */
        .guest-counter {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .counter-btn {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            border: 2px solid #e8e8e8;
            background: #ffffff;
            color: var(--main-color, var(--brand-primary, #31964a));
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .counter-btn:hover:not(:disabled) {
            border-color: var(--main-color, var(--brand-primary, #31964a));
            background: var(--main-color, var(--main-color, var(--brand-primary, #31964a)));
            color: white;
            transform: scale(1.1);
            box-shadow: 0 4px 12px color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 3%, transparent);
        }
        
        .counter-btn:active:not(:disabled) {
            transform: scale(0.95);
        }
        
        .counter-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            border-color: #e8e8e8;
            color: #cbd5e0;
        }
        
        .counter-value {
            min-width: 40px;
            text-align: center;
            font-size: 14px;
            font-weight: 700;
            color: #1a202c;
        }
        
        /* Price Summary */
        .price-summary {
            margin-top: 24px;
            padding: 20px;
            background: linear-gradient(135deg, color-mix(in srgb, var(--main-color, var(--brand-primary, #31964a)) 05%, transparent) 0%, rgba(var(--brand-primary-rgb, 49,150,74), 0.05) 100%);
            border-radius: 14px;
            border: 2px solid #f0f0f0;
        }
        
        .price-breakdown {
            margin-bottom: 16px;
        }
        
        .price-breakdown-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            font-size: 14px;
            color: #4a5568;
        }
        
        .price-breakdown-label {
            font-weight: 500;
        }
        
        .price-breakdown-value {
            font-weight: 600;
            color: #1a202c;
        }
        
        .price-total {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 16px;
            border-top: 2px solid #e8e8e8;
        }
        
        .price-total-label {
            font-size: 14px;
            font-weight: 700;
            color: #1a202c;
        }
        
        .price-total-value {
            font-size: 16px;
            font-weight: 700;
            background: var(--main-color, var(--main-color, var(--brand-primary, #31964a)));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        /* Capacity Warning */
        .capacity-warning {
            margin-top: 12px;
            padding: 12px 16px;
            background: linear-gradient(135deg, var(--brand-primary-soft, #e8f5ec) 0%, var(--brand-primary-light, #b7e3c4) 100%);
            border-left: 4px solid var(--brand-primary, #31964a);
            border-radius: 10px;
            font-size: 13px;
            color: var(--brand-primary-dark, #247339);
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 500;
        }
        
        .capacity-warning i {
            color: var(--brand-primary, #31964a);
            font-size: 14px;
        }
        
        /* Responsive — keep one compact row per guest type on mobile */
        @media (max-width: 768px) {
            .basic-guest-selection-wrapper {
                padding: 0;
                margin-bottom: 0;
                box-shadow: none;
                border: none;
                border-radius: 0;
            }

            .guest-selection-header {
                margin-bottom: 10px;
                padding-bottom: 8px;
            }

            .guest-selection-header h4 {
                font-size: 13px;
            }

            .guest-selection-header p {
                padding-left: 0;
                font-size: 12px;
            }

            .guest-type-row {
                flex-direction: row;
                align-items: center;
                gap: 8px;
                padding: 8px 0;
            }

            .guest-type-row:hover {
                padding-left: 0;
                padding-right: 0;
                margin-left: 0;
                margin-right: 0;
            }

            .guest-type-info {
                display: flex;
                flex-direction: row;
                align-items: center;
                flex-wrap: wrap;
                gap: 4px 8px;
                min-width: 0;
            }

            .guest-type-label {
                margin-bottom: 0;
                gap: 8px;
            }

            .guest-type-icon {
                width: 28px;
                height: 28px;
                font-size: 12px;
                border-radius: 8px;
            }

            .guest-type-name {
                font-size: 13px;
            }

            .guest-type-details {
                margin-left: 0;
                padding-left: 0;
                font-size: 12px;
                flex: 1 1 auto;
                min-width: 0;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .guest-counter {
                width: auto;
                flex-shrink: 0;
                gap: 6px;
            }

            .counter-btn {
                width: 32px;
                height: 32px;
                border-radius: 8px;
                font-size: 12px;
            }

            .counter-value {
                min-width: 24px;
                font-size: 13px;
            }

            .price-summary {
                margin-top: 10px;
                padding: 10px 12px;
            }

            .price-total-value {
                font-size: 15px;
            }
        }
    </style>
    
    <div class="guest-selection-header">
        <h4>
            <i class="fa fa-users"></i>
                            Number of Guests
                    </h4>
            </div>
    
            
        <div class="guest-type-row">
            <div class="guest-type-info">
                <div class="guest-type-label">
                    <div class="guest-type-icon">
                        <i class="fa fa-users"></i>
                    </div>
                    <span class="guest-type-name">Guests</span>
                </div>
                <div class="guest-type-details">
                    <span class="guest-type-price"
                          data-tour-price="250"
                          data-suffix=" per person">$250 per person</span>
                </div>
            </div>
            <div class="guest-counter">
                <button type="button" class="counter-btn" onclick="adjustGuestCount('guests', -1)" data-guest-type="guests">
                    <i class="fa fa-minus"></i>
                </button>
                <span class="counter-value" id="guests-count">1</span>
                <button type="button" class="counter-btn" onclick="adjustGuestCount('guests', 1)" data-guest-type="guests">
                    <i class="fa fa-plus"></i>
                </button>
            </div>
        </div>
        
        <input type="hidden" name="guests" value="1" id="guests-input">
        
        
    
    <div class="capacity-warning" id="capacity-warning" style="display: none;">
        <i class="fa fa-exclamation-triangle"></i>
        <span>Maximum capacity reached</span>
    </div>
</div>

<script>
// Phase 1.3: Guest Selection JavaScript
(function() {
    'use strict';
    
    const useSimpleGuestCount = true;
    const maxGuests = 999;
    
            // Simple guest count mode
        let guestCount = 1;
        const pricePerPerson = 250;
        
        window.adjustGuestCount = function(type, delta) {
            let newCount = guestCount + delta;
            
            // Minimum 1 guest
            if (newCount < 1) return;
            
            // Check max capacity
            if (maxGuests > 0 && newCount > maxGuests) {
                showCapacityWarning();
                return;
            }
            
            guestCount = newCount;
            
            // Update UI
            document.getElementById('guests-count').textContent = guestCount;
            document.getElementById('guests-input').value = guestCount;
            
            // Update button states
            const minusBtn = document.querySelector('[data-guest-type="guests"]');
            if (minusBtn) {
                minusBtn.disabled = guestCount <= 1;
            }
            
            const plusBtns = document.querySelectorAll('[data-guest-type="guests"] .fa-plus');
            plusBtns.forEach(btn => {
                btn.parentElement.disabled = maxGuests > 0 && guestCount >= maxGuests;
            });
            
            // Update Vue instance
            if (window.vueInstance && window.vueInstance.guests !== undefined) {
                window.vueInstance.guests = guestCount;
            }
            
            // Dispatch custom event for other components (like extra services)
            const event = new CustomEvent('guestCountChanged', {
                detail: {
                    total: guestCount
                }
            });
            document.dispatchEvent(event);
            
        };
        
        // Dispatch initial event on load for simple mode
        document.addEventListener('DOMContentLoaded', function() {
            setTimeout(function() {
                const event = new CustomEvent('guestCountChanged', {
                    detail: {
                        total: guestCount
                    },
                    bubbles: true
                });
                document.dispatchEvent(event);
            }, 200);
        });
        
        
    // Money formatter for the guest-selection widget.
    //
    // Prices on this widget are stored in the tour's currency (admin Pricing
    // tab). We display them either in that currency or in whatever currency
    // the visitor picked via the toggle in _basic_price_display — driven by
    // a 'currencyChanged' event on document. Conversion goes through the
    // shared window.AppCurrency helper so the math matches the server.
    const TOUR_CURRENCY = "USD";
    let DISPLAY_CURRENCY = TOUR_CURRENCY;

    function formatMoney(amountInTourCurrency) {
        if (window.AppCurrency) {
            return window.AppCurrency.convertAndFormat(amountInTourCurrency, TOUR_CURRENCY, DISPLAY_CURRENCY);
        }
        const symbolMap = { 'USD': '$', 'KES': 'KSh', 'EUR': '€', 'GBP': '£' };
        const symbol = symbolMap[TOUR_CURRENCY] || TOUR_CURRENCY;
        return symbol + ' ' + (parseFloat(amountInTourCurrency) || 0).toLocaleString('en-US', {
            minimumFractionDigits: 0,
            maximumFractionDigits: 2
        });
    }

    // When the headline price toggle flips, re-render every price-bearing
    // span in this widget so the displayed numbers and labels match.
    document.addEventListener('currencyChanged', function (ev) {
        DISPLAY_CURRENCY = (ev.detail && ev.detail.to) || TOUR_CURRENCY;

        // Per-person "per person" labels under each row.
        document.querySelectorAll('.basic-guest-selection-wrapper .guest-type-price').forEach((el) => {
            const tourPrice = parseFloat(el.dataset.tourPrice);
            if (!isFinite(tourPrice)) return;
            const suffix = el.dataset.suffix || '';
            if (tourPrice > 0) {
                el.textContent = formatMoney(tourPrice) + suffix;
            }
        });

        // Breakdown rows (count × price).
        document.querySelectorAll('.basic-guest-selection-wrapper .price-breakdown-value').forEach((el) => {
            const baseAmt = parseFloat(el.dataset.tourAmount);
            if (!isFinite(baseAmt)) return;
            el.textContent = formatMoney(baseAmt);
        });

        // Trigger a recomputation so live breakdown amounts update too.
        if (typeof updatePersonTypeBreakdown === 'function') updatePersonTypeBreakdown();
    });
    
    function showCapacityWarning() {
        const warning = document.getElementById('capacity-warning');
        if (warning) {
            warning.style.display = 'flex';
            setTimeout(() => {
                warning.style.display = 'none';
            }, 3000);
        }
    }
    
})();
</script>
                
                
                
                
                                
                
                <div class="basic-price-summary-wrapper" id="price-summary-wrapper">
    <style>
        .basic-price-summary-wrapper {
            background: #ffffff;
            border-radius: 16px;
            padding: 16px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            border: 2px solid #f0f0f0;
            position: sticky;
            top: 20px;
        }
        
        .price-summary-header {
            margin-bottom: 12px;
            padding-bottom: 0;
            border-bottom: none;
        }
        
        .price-summary-header h4 {
            font-size: 14px;
            font-weight: 700;
            color: #1a202c;
            margin-bottom: 0;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .breakdown-section {
            margin-bottom: 16px;
            padding-bottom: 16px;
            border-bottom: 1px solid #f0f0f0;
        }
        
        .breakdown-section-title {
            font-size: 14px;
            font-weight: 600;
            color: #4a5568;
            margin-bottom: 10px;
        }
        
        .breakdown-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            padding: 8px 0;
            font-size: 14px;
            min-height: 30px;
        }
        
        .breakdown-label {
            color: #718096;
            flex: 1;
            margin-right: 12px;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }
        
        .breakdown-value {
            color: #1a202c;
            font-weight: 600;
            flex-shrink: 0;
            white-space: nowrap;
        }
        
        .grand-total {
            padding: 20px;
            background: linear-gradient(135deg, rgba(var(--brand-primary-rgb, 49,150,74), 0.08) 0%, rgba(var(--brand-primary-rgb, 49,150,74), 0.08) 100%);
            border-radius: 12px;
            margin-bottom: 20px;
        }
        
        .grand-total-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            min-height: 30px;
        }
        
        .grand-total-label {
            font-size: 14px;
            font-weight: 700;
            color: #1a202c;
            flex: 1;
            margin-right: 12px;
            word-wrap: break-word;
        }
        
        .grand-total-value {
            font-size: 16px;
            font-weight: 700;
            color: var(--brand-primary, #31964a);
            flex-shrink: 0;
            white-space: nowrap;
        }
        
        .book-now-button {
            width: 100%;
            padding: 18px 24px;
            background: var(--brand-primary, #31964a);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        .book-now-button:hover:not(:disabled) {
            box-shadow: 0 6px 20px rgba(var(--brand-primary-rgb, 49,150,74), 0.35);
            transform: translateY(-1px);
        }
        .book-now-button:active:not(:disabled) {
            transform: translateY(0) scale(0.98);
        }
        .book-now-button.is-loading,
        .book-now-button:disabled {
            opacity: 0.88;
            cursor: wait;
            pointer-events: none;
            transform: none;
            box-shadow: none;
        }
        .book-now-button .fa-spinner {
            animation: book-now-spin 0.8s linear infinite;
        }
        @keyframes book-now-spin {
            to { transform: rotate(360deg); }
        }
        
        .empty-breakdown {
            text-align: center;
            padding: 20px;
            color: #9ca3af;
            font-size: 14px;
        }

        /* ---------- Booking Toast Notifications ---------- */
        .bk-toast-container {
            position: fixed;
            top: 24px;
            right: 24px;
            z-index: 99999;
            display: flex;
            flex-direction: column;
            gap: 12px;
            max-width: calc(100vw - 48px);
            width: 380px;
            pointer-events: none;
        }
        @media (max-width: 480px) {
            .bk-toast-container {
                top: 12px;
                right: 12px;
                left: 12px;
                width: auto;
                max-width: none;
            }
        }
        .bk-toast {
            pointer-events: auto;
            background: #ffffff;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.06);
            border-left: 4px solid #6b7280;
            padding: 14px 16px 14px 16px;
            display: flex;
            align-items: flex-start;
            gap: 12px;
            position: relative;
            overflow: hidden;
            transform: translateX(120%);
            opacity: 0;
            transition: transform 0.35s cubic-bezier(0.21, 1.02, 0.73, 1), opacity 0.25s ease;
        }
        .bk-toast.is-visible {
            transform: translateX(0);
            opacity: 1;
        }
        .bk-toast.is-leaving {
            transform: translateX(120%);
            opacity: 0;
        }
        .bk-toast--success { border-left-color: #16a34a; }
        .bk-toast--error   { border-left-color: #dc2626; }
        .bk-toast--warning { border-left-color: #f59e0b; }
        .bk-toast--info    { border-left-color: #2563eb; }
        .bk-toast__icon {
            flex-shrink: 0;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            color: #fff;
            margin-top: 1px;
        }
        .bk-toast--success .bk-toast__icon { background: #16a34a; }
        .bk-toast--error   .bk-toast__icon { background: #dc2626; }
        .bk-toast--warning .bk-toast__icon { background: #f59e0b; }
        .bk-toast--info    .bk-toast__icon { background: #2563eb; }
        .bk-toast__body {
            flex: 1;
            min-width: 0;
        }
        .bk-toast__title {
            font-size: 14px;
            font-weight: 700;
            color: #111827;
            margin: 0 0 4px 0;
            line-height: 1.3;
        }
        .bk-toast__message {
            font-size: 13px;
            color: #4b5563;
            line-height: 1.45;
            margin: 0;
            word-wrap: break-word;
        }
        .bk-toast__errors {
            margin: 6px 0 0 0;
            padding: 0 0 0 16px;
            font-size: 13px;
            color: #4b5563;
            line-height: 1.45;
        }
        .bk-toast__errors li { margin: 2px 0; }
        .bk-toast__close {
            background: transparent;
            border: 0;
            cursor: pointer;
            color: #9ca3af;
            font-size: 14px;
            line-height: 1;
            padding: 4px;
            margin: -4px -4px 0 0;
            border-radius: 4px;
            transition: color 0.15s ease, background-color 0.15s ease;
        }
        .bk-toast__close:hover {
            color: #111827;
            background: #f3f4f6;
        }
        .bk-toast__progress {
            position: absolute;
            left: 0;
            bottom: 0;
            height: 3px;
            width: 100%;
            background: currentColor;
            opacity: 0.25;
            transform-origin: left center;
            animation: bk-toast-progress linear forwards;
        }
        .bk-toast--success .bk-toast__progress { color: #16a34a; }
        .bk-toast--error   .bk-toast__progress { color: #dc2626; }
        .bk-toast--warning .bk-toast__progress { color: #f59e0b; }
        .bk-toast--info    .bk-toast__progress { color: #2563eb; }
        @keyframes bk-toast-progress {
            from { transform: scaleX(1); }
            to   { transform: scaleX(0); }
        }
    </style>
    
    <div class="price-summary-header">
        <h4>
            <i class="fa fa-receipt"></i>
            Booking Summary
        </h4>
    </div>
    
    <div class="price-breakdown-container">
        <div class="breakdown-section">
            <div class="breakdown-section-title">Tour Price</div>
            <div id="base-price-breakdown">
                <div class="empty-breakdown">Select guests to see pricing</div>
            </div>
        </div>
        
        <div class="breakdown-section" id="extra-services-section" style="display: none;">
            <div class="breakdown-section-title">Extra Services</div>
            <div id="extra-services-breakdown"></div>
        </div>
    </div>
    
    <div class="grand-total">
        <div class="grand-total-row">
            <span class="grand-total-label">Total Price</span>
            
            <span class="grand-total-value"
                  id="grand-total-value"
                  data-tour-amount="0">Request for quote</span>
        </div>
    </div>
    
    <button type="button" class="book-now-button" id="basic-book-now-btn" aria-live="polite">
        <i class="fa fa-check-circle" aria-hidden="true"></i>
        <span class="book-now-button__label">Book Now</span>
    </button>
</div>

<script>
(function() {
    'use strict';

    // ---------- Toast notification helper ----------
    // Lightweight, dependency-free replacement for window.alert(). Renders a
    // styled toast in the top-right corner and gracefully formats validation
    // error bags like { "start_date": ["The start date field is required."] }
    // into a tidy bullet list instead of raw JSON.
    function getToastContainer() {
        let container = document.querySelector('.bk-toast-container');
        if (!container) {
            container = document.createElement('div');
            container.className = 'bk-toast-container';
            container.setAttribute('role', 'region');
            container.setAttribute('aria-live', 'polite');
            container.setAttribute('aria-label', 'Notifications');
            document.body.appendChild(container);
        }
        return container;
    }

    function humanizeFieldName(name) {
        if (!name) return '';
        return String(name)
            .replace(/[_\-\.]+/g, ' ')
            .replace(/\b\w/g, function (c) { return c.toUpperCase(); });
    }

    // Flatten a Laravel-style error bag into an array of readable strings.
    // Accepts strings, arrays, or objects of arrays/strings (possibly nested
    // using dotted keys like "person_types.0.number").
    function flattenErrors(errors) {
        const out = [];
        if (!errors) return out;
        if (typeof errors === 'string') { out.push(errors); return out; }
        if (Array.isArray(errors)) {
            errors.forEach(function (e) {
                if (typeof e === 'string') out.push(e);
                else out.push.apply(out, flattenErrors(e));
            });
            return out;
        }
        if (typeof errors === 'object') {
            Object.keys(errors).forEach(function (key) {
                const value = errors[key];
                const messages = flattenErrors(value);
                // If the inner messages already mention the field name we
                // don't want to prefix it again. Laravel validation messages
                // generally include the field, so we leave them as-is.
                messages.forEach(function (m) { out.push(m); });
            });
            return out;
        }
        return out;
    }

    function showToast(opts) {
        opts = opts || {};
        const type = ['success', 'error', 'warning', 'info'].indexOf(opts.type) >= 0 ? opts.type : 'info';
        const duration = typeof opts.duration === 'number' ? opts.duration : (type === 'error' ? 7000 : 4500);
        const titles = {
            success: 'Success',
            error:   'Something went wrong',
            warning: 'Heads up',
            info:    'Notice'
        };
        const icons = {
            success: 'fa-check',
            error:   'fa-exclamation',
            warning: 'fa-exclamation-triangle',
            info:    'fa-info'
        };
        const title = opts.title || titles[type];
        const message = opts.message || '';
        const errorList = Array.isArray(opts.errors) ? opts.errors : [];

        const container = getToastContainer();
        const toast = document.createElement('div');
        toast.className = 'bk-toast bk-toast--' + type;
        toast.setAttribute('role', type === 'error' ? 'alert' : 'status');

        const iconEl = document.createElement('div');
        iconEl.className = 'bk-toast__icon';
        iconEl.innerHTML = '<i class="fa ' + icons[type] + '" aria-hidden="true"></i>';

        const body = document.createElement('div');
        body.className = 'bk-toast__body';

        const titleEl = document.createElement('p');
        titleEl.className = 'bk-toast__title';
        titleEl.textContent = title;
        body.appendChild(titleEl);

        if (message) {
            const msgEl = document.createElement('p');
            msgEl.className = 'bk-toast__message';
            msgEl.textContent = message;
            body.appendChild(msgEl);
        }

        if (errorList.length === 1 && !message) {
            const msgEl = document.createElement('p');
            msgEl.className = 'bk-toast__message';
            msgEl.textContent = errorList[0];
            body.appendChild(msgEl);
        } else if (errorList.length > 0) {
            const ul = document.createElement('ul');
            ul.className = 'bk-toast__errors';
            errorList.forEach(function (msg) {
                const li = document.createElement('li');
                li.textContent = msg;
                ul.appendChild(li);
            });
            body.appendChild(ul);
        }

        const closeBtn = document.createElement('button');
        closeBtn.type = 'button';
        closeBtn.className = 'bk-toast__close';
        closeBtn.setAttribute('aria-label', 'Dismiss notification');
        closeBtn.innerHTML = '<i class="fa fa-times" aria-hidden="true"></i>';

        const progress = document.createElement('div');
        progress.className = 'bk-toast__progress';
        progress.style.animationDuration = duration + 'ms';

        toast.appendChild(iconEl);
        toast.appendChild(body);
        toast.appendChild(closeBtn);
        toast.appendChild(progress);
        container.appendChild(toast);

        // Animate in on the next frame.
        requestAnimationFrame(function () {
            toast.classList.add('is-visible');
        });

        let hideTimer = null;
        function dismiss() {
            if (toast.classList.contains('is-leaving')) return;
            toast.classList.remove('is-visible');
            toast.classList.add('is-leaving');
            window.clearTimeout(hideTimer);
            setTimeout(function () {
                if (toast.parentNode) toast.parentNode.removeChild(toast);
                if (container.children.length === 0 && container.parentNode) {
                    container.parentNode.removeChild(container);
                }
            }, 350);
        }

        closeBtn.addEventListener('click', dismiss);
        toast.addEventListener('mouseenter', function () {
            window.clearTimeout(hideTimer);
            progress.style.animationPlayState = 'paused';
        });
        toast.addEventListener('mouseleave', function () {
            progress.style.animationPlayState = 'running';
            hideTimer = window.setTimeout(dismiss, 1500);
        });

        if (duration > 0) {
            hideTimer = window.setTimeout(dismiss, duration);
        }

        return { dismiss: dismiss };
    }

    // Public helper used throughout the booking flow.
    function notify(type, message, opts) {
        opts = opts || {};
        return showToast({
            type: type,
            title: opts.title,
            message: message,
            errors: opts.errors,
            duration: opts.duration
        });
    }

    // Tiny HTML escaper for snippets we interpolate into innerHTML. We
    // build markup as strings (intentionally — it's the simplest path
    // for this small widget) so any user-supplied person-type label has
    // to be escaped before insertion.
    function escapeHtml(s) {
        return String(s == null ? '' : s)
            .replace(/&/g, '&amp;')
            .replace(/</g, '&lt;')
            .replace(/>/g, '&gt;')
            .replace(/"/g, '&quot;')
            .replace(/'/g, '&#39;');
    }

    // The guest-selection widget caches its latest snapshot here every time
    // it dispatches `guestCountChanged`. updateSummary() prefers this
    // structured payload over walking the DOM, because the DOM-walk path
    // turned out to be brittle: it relied on the forEach array index
    // mapping 1:1 to breakdown row IDs, which residency-split slots
    // ("0_r" / "0_n") broke. The widget's event detail contains everything
    // we need (name, count, price, index, variant) as a single source of
    // truth, so we just iterate it.
    let __lastGuestSnapshot = null;
    document.addEventListener('guestCountChanged', function (ev) {
        if (ev && ev.detail) __lastGuestSnapshot = ev.detail;
    });

    // updateSummary always works in the TOUR'S currency internally and uses
    // formatMoney() (which knows how to convert to the visitor's chosen
    // display currency) for the final rendering. That way the math stays
    // correct regardless of the active display currency, and toggling
    // currencies never accumulates compounding conversions.
    function updateSummary() {
        let tourTotal = 0;
        const personTypeInputs = document.querySelectorAll('[id^="person-type-"][id$="-input"]');

        // Preferred path: structured snapshot from the guest-selection widget.
        // `personTypesData` is an array of { name, count, price, index,
        // variant } and contains every slot that has been rendered (incl.
        // count = 0). We render lines only for slots whose count > 0.
        const snapshot = __lastGuestSnapshot;
        const hasStructured = snapshot && Array.isArray(snapshot.personTypesData);

        if (personTypeInputs.length > 0) {
            let html = '';

            if (hasStructured) {
                snapshot.personTypesData.forEach((row) => {
                    const count = parseInt(row.count, 10) || 0;
                    const price = parseFloat(row.price) || 0;
                    if (count <= 0) return;
                    const lineTotal = count * price;
                    tourTotal += lineTotal;
                    const label = `${count} &times; ${escapeHtml(row.name || '')}`;
                    html += `<div class="breakdown-row"><span class="breakdown-label">${label}</span><span class="breakdown-value">${formatMoney(lineTotal)}</span></div>`;
                });
            } else {
                // Fallback: walk the DOM, anchored by SLOT ID parsed from
                // each input's own id ("person-type-{slot}-input"). The
                // legacy code keyed by forEach array index, which broke
                // residency-split slots — so we never use that path again.
                personTypeInputs.forEach((input) => {
                    const count = parseInt(input.value) || 0;
                    if (count <= 0) return;

                    const idMatch = (input.id || '').match(/^person-type-(.+)-input$/);
                    if (!idMatch) return;
                    const slotId = idMatch[1];

                    const row = document.getElementById(`person-type-${slotId}-breakdown`);
                    if (!row) return;

                    const label = row.querySelector('.price-breakdown-label')?.textContent || '';
                    const priceEl = row.querySelector('.price-breakdown-value');
                    let tourAmount = priceEl ? parseFloat(priceEl.dataset.tourAmount) : NaN;
                    if (!isFinite(tourAmount)) {
                        const priceText = priceEl?.textContent || '0';
                        tourAmount = parseFloat(priceText.replace(/[^0-9.]/g, '')) || 0;
                    }
                    tourTotal += tourAmount;
                    const displayText = priceEl ? priceEl.textContent : formatMoney(tourAmount);
                    html += `<div class="breakdown-row"><span class="breakdown-label">${label}</span><span class="breakdown-value">${displayText}</span></div>`;
                });
            }

            const baseEl = document.getElementById('base-price-breakdown');
            if (baseEl) {
                baseEl.innerHTML = html || '<div class="empty-breakdown">Select guests to see pricing</div>';
            }
        } else {
            const guestsInput = document.getElementById('guests-input');
            const count = guestsInput ? parseInt(guestsInput.value) || 1 : 1;
            const price = 250; // already in tour currency
            tourTotal = count * price;
            const formatted = formatMoney(price);
            document.getElementById('base-price-breakdown').innerHTML = `<div class="breakdown-row"><span class="breakdown-label">${count} Guest(s) × ${formatted}</span><span class="breakdown-value">${formatMoney(tourTotal)}</span></div>`;
        }

        // Calculate services (service prices live in the tour's currency as
        // well — they're rendered server-side by `formatInSpecificCurrency`).
        let servicesTotal = 0;
        let servicesHtml = '';
        const selected = document.querySelectorAll('.service-card.selected');

        if (selected.length > 0) {
            const guestCount = getGuestCount();
            selected.forEach(card => {
                const name = card.dataset.serviceName;
                const price = parseFloat(card.dataset.servicePrice) || 0;
                const perPerson = card.dataset.perPerson === '1';
                const total = perPerson ? price * guestCount : price;
                servicesTotal += total;
                servicesHtml += `<div class="breakdown-row"><span class="breakdown-label">${name}</span><span class="breakdown-value">${formatMoney(total)}</span></div>`;
            });
            document.getElementById('extra-services-breakdown').innerHTML = servicesHtml;
            document.getElementById('extra-services-section').style.display = 'block';
        } else {
            document.getElementById('extra-services-section').style.display = 'none';
        }

        // Render the grand total in the visitor's chosen currency. formatMoney
        // converts from TOUR_CURRENCY -> DISPLAY_CURRENCY when needed.
        const grandTotalEl = document.getElementById('grand-total-value');
        if (grandTotalEl) {
            grandTotalEl.dataset.tourAmount = tourTotal + servicesTotal;
            grandTotalEl.textContent = formatMoney(tourTotal + servicesTotal);
        }
    }
    
    function getGuestCount() {
        const input = document.getElementById('guests-input');
        if (input) return parseInt(input.value) || 1;
        let total = 0;
        document.querySelectorAll('[id^="person-type-"][id$="-input"]').forEach(i => total += parseInt(i.value) || 0);
        return total || 1;
    }
    
    // Money formatter for the booking summary.
    //
    // Line totals from the guest-selection widget arrive in the tour's
    // currency (admin Pricing tab). We render them either as-is or after
    // converting into the currency the visitor selected via the headline
    // toggle, using the shared window.AppCurrency helper to keep the math
    // identical to the server's \App\Currency::convert().
    const TOUR_CURRENCY = "USD";
    let DISPLAY_CURRENCY = TOUR_CURRENCY;

    function formatMoney(amount) {
        if (window.AppCurrency) {
            return window.AppCurrency.convertAndFormat(amount, TOUR_CURRENCY, DISPLAY_CURRENCY);
        }
        const symbolMap = { 'USD': '$', 'KES': 'KSh', 'EUR': '€', 'GBP': '£' };
        const symbol = symbolMap[TOUR_CURRENCY] || TOUR_CURRENCY;
        return symbol + ' ' + (parseFloat(amount) || 0).toLocaleString('en-US', {minimumFractionDigits: 0, maximumFractionDigits: 2});
    }

    document.addEventListener('currencyChanged', function (ev) {
        DISPLAY_CURRENCY = (ev.detail && ev.detail.to) || TOUR_CURRENCY;
        // Re-run the full summary calculation in the new currency. The
        // breakdown rows read text out of the guest-selection widget — which
        // also reacts to this event — so by the time we run, those numbers
        // are already in DISPLAY_CURRENCY, and parseFloat() picks them up.
        if (typeof updateSummary === 'function') updateSummary();
    });
    
    let bookingInProgress = false;

    function setBookNowLoading(loading) {
        const btn = document.getElementById('basic-book-now-btn');
        if (!btn) return;
        const label = btn.querySelector('.book-now-button__label');
        if (loading) {
            btn.disabled = true;
            btn.classList.add('is-loading');
            btn.setAttribute('aria-busy', 'true');
            const iconOn = btn.querySelector('i');
            if (iconOn) {
                iconOn.classList.remove('fa-check-circle');
                iconOn.classList.add('fa-spinner');
            }
            if (label) label.textContent = 'Processing...';
        } else {
            btn.disabled = false;
            btn.classList.remove('is-loading');
            btn.removeAttribute('aria-busy');
            const icon = btn.querySelector('i');
            if (icon) {
                icon.classList.remove('fa-spinner');
                icon.classList.add('fa-check-circle');
            }
            if (label) label.textContent = 'Book Now';
        }
    }

    window.submitBooking = function() {
        if (bookingInProgress) {
            return;
        }

        // Get CSRF token
        const csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') || 'HftsdHfpWPMXYK57oH4NvQwPGfVO0TdHsPDMhITW';
        
        // Collect booking data
        const formData = {
            service_id: 2327,
            service_type: 'tour',
            _token: csrfToken
        };
        
        // Get date - check multiple sources
        let startDate = null;
        
        // 1. Try to get from date picker input
        const dateInput = document.querySelector('.tour-start-date');
        
        if (dateInput && dateInput.value) {
            startDate = dateInput.value;
        }
        
        // 2. For fixed date tours, get from the fixed date display
        if (!startDate) {
            const fixedDateCard = document.querySelector('[data-fixed-date]');
            if (fixedDateCard) {
                startDate = fixedDateCard.dataset.fixedDate;
            }
        }
        
        // 3. For multiple dates, get from selected date card
        if (!startDate) {
            const selectedDateCard = document.querySelector('.date-card.selected');
            if (selectedDateCard) {
                startDate = selectedDateCard.dataset.date;
            }
        }
        
        // 4. Check if tour has a fixed date in meta - ALWAYS check this for fixed date tours
                
        // 5. Last resort - check if enable_fixed_date is set
                
        if (startDate) {
            formData.start_date = startDate;
        } else {
                                    // Tour doesn't require date selection - proceed without date
        }
        
        // Get guests.
        //
        // We READ THE INPUT'S `name` ATTRIBUTE — never parse the `id` — for
        // two reasons:
        //   1. The basic guest selection widget assigns slot IDs like
        //      "person-type-0_r-input" / "person-type-0_n-input" when a
        //      person type is split into resident + non-resident counters.
        //      The old `/person-type-(\d+)-input/` regex would NOT match
        //      those, so non-resident counts silently dropped to 0 on
        //      submit and the booking total came out wrong.
        //   2. The blade already renders the canonical Laravel name shape
        //      `person_types[<index>][<key>]` — where <key> is `number`
        //      for residents (and legacy single-price types) and
        //      `nonresident_number` for non-residents — which is exactly
        //      what we want to post.
        const personTypeInputs = document.querySelectorAll('[id^="person-type-"][id$="-input"]');
        if (personTypeInputs.length > 0) {
            formData.person_types = {};
            let guestTotal = 0;
            personTypeInputs.forEach((input) => {
                const count = parseInt(input.value, 10) || 0;
                if (count <= 0) return;

                // Parse Laravel-style array name e.g.
                // "person_types[0][number]" or "person_types[3][nonresident_number]".
                const nameAttr = input.getAttribute('name') || '';
                const m = nameAttr.match(/^person_types\[(\d+)\]\[([a-zA-Z_]+)\]$/);
                let idx, key;
                if (m) {
                    idx = m[1];
                    key = m[2]; // 'number' | 'nonresident_number'
                } else {
                    // Fallback for unusual themes / older renders.
                    const idMatch = (input.id || '').match(/person-type-(\d+)(?:_([a-z]))?-input/);
                    idx = idMatch ? idMatch[1] : String(guestTotal);
                    const variantHint = idMatch && idMatch[2];
                    key = variantHint === 'n' ? 'nonresident_number' : 'number';
                }

                if (!formData.person_types[idx]) {
                    formData.person_types[idx] = {};
                }
                formData.person_types[idx][key] = count;
                guestTotal += count;
            });
            formData.guests = guestTotal;
            if (guestTotal < 1) {
                notify('warning', 'Please select at least one guest to continue.', {
                    title: 'No guests selected'
                });
                return;
            }
        } else {
            // Simple mode
            const guestsInput = document.getElementById('guests-input');
            formData.guests = guestsInput ? parseInt(guestsInput.value) || 1 : 1;
        }
        
        // Get extra services
        const selectedServices = document.querySelectorAll('.service-card.selected');
        if (selectedServices.length > 0) {
            formData.extra_price = [];
            selectedServices.forEach(card => {
                formData.extra_price.push({
                    name: card.dataset.serviceName,
                    price: parseFloat(card.dataset.servicePrice) || 0,
                    type: card.dataset.serviceType || 'one_time',
                    per_person: card.dataset.perPerson === '1' ? 1 : 0,
                    enable: 1
                });
            });
        }

        // Pickup Point — only collected when the admin has enabled it on
        // this tour (see _pickup_point.blade.php). The hidden/visible
        // [name=pickup_point] input is present in both fixed and customer
        // modes; backend Tour::addToCart() will overwrite the fixed-mode
        // value with the canonical address from tour meta.
        const pickupInput = document.querySelector('.tour-pickup-point-block [name="pickup_point"]');
        if (pickupInput) {
            const pickupValue = (pickupInput.value || '').trim();
            const pickupMode = document.querySelector('.tour-pickup-point-block')?.dataset.pickupMode || '';
            if (pickupMode === 'customer' && !pickupValue) {
                notify('warning', 'Please enter your preferred pickup point before booking.', {
                    title: 'Pickup point required'
                });
                pickupInput.focus();
                return;
            }
            formData.pickup_point = pickupValue;
            formData.pickup_point_mode_hint = pickupMode;
        }

        // Get total price
        const totalText = document.getElementById('grand-total-value')?.textContent || '0';
        formData.total_price = parseFloat(totalText.replace(/[^0-9.]/g, '')) || 0;

        bookingInProgress = true;
        setBookNowLoading(true);

        function resolveBookingUrl() {
            var base = (typeof bookingCore !== 'undefined' && bookingCore.url) ? String(bookingCore.url).trim().replace(/\/$/, '') : '';
            if (base.indexOf('http://') === 0 || base.indexOf('https://') === 0) {
                return base + '/booking/addToCart';
            }
            var origin = window.location.origin;
            return origin + (base ? base : '') + '/booking/addToCart';
        }

        const bookingUrl = resolveBookingUrl();
        const controller = new AbortController();
        const requestTimeout = setTimeout(function () { controller.abort(); }, 60000);

        fetch(bookingUrl, {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
                'X-CSRF-TOKEN': csrfToken,
                'X-Requested-With': 'XMLHttpRequest',
                'Accept': 'application/json'
            },
            body: JSON.stringify(formData),
            credentials: 'same-origin',
            redirect: 'manual',
            signal: controller.signal
        })
        .then(function (response) {
            clearTimeout(requestTimeout);
            const contentType = response.headers.get('content-type') || '';
            if (response.type === 'opaqueredirect' || response.status === 301 || response.status === 302) {
                throw new Error('Unexpected redirect from booking server');
            }
            if (!contentType.includes('application/json')) {
                return response.text().then(function (text) {
                    throw new Error('Invalid server response (' + response.status + ')');
                });
            }
            return response.json();
        })
        .then(function (data) {
            if (data && data.require_login) {
                if (data.login_url) {
                    window.location.href = data.login_url;
                    return;
                }
                notify('info', data.message || 'Please log in to continue.', {
                    title: 'Login required'
                });
                bookingInProgress = false;
                setBookNowLoading(false);
                return;
            }

            if (data && (data.status === 1 || data.status === true || data.url)) {
                if (data.url) {
                    window.location.href = data.url;
                    return;
                }
                if (data.booking_code) {
                    window.location.href = 'https://www.xtremerepublic.com/booking/checkout/' + data.booking_code;
                    return;
                }
            }

            // Build a tidy error toast: a short headline (the server's
            // `message`, or a generic fallback) plus an optional bulleted
            // list of validation errors. Replaces the old raw JSON dump.
            var headline = (data && data.message) ? data.message : 'We could n0t complete your booking. Please review the details below and try again.';
            var errorList = (data && data.errors) ? flattenErrors(data.errors) : [];
            notify('error', headline, {
                title: 'Booking failed',
                errors: errorList
            });
            bookingInProgress = false;
            setBookNowLoading(false);
        })
        .catch(function (error) {
            clearTimeout(requestTimeout);
            var isTimeout = error && error.name === 'AbortError';
            notify('error',
                isTimeout
                    ? 'The request took too long to complete. Please check your connection and try again.'
                    : 'An unexpected error occurred. Please try again in a moment.',
                {
                    title: isTimeout ? 'Request timed out' : 'Connection error'
                }
            );
            bookingInProgress = false;
            setBookNowLoading(false);
        });
    };

    document.getElementById('basic-book-now-btn')?.addEventListener('click', function(e) {
        e.preventDefault();
        window.submitBooking();
    });
    
    document.addEventListener('guestCountChanged', updateSummary);
    document.addEventListener('extraServicesChanged', updateSummary);
    document.addEventListener('change', function(e) {
        if (e.target.matches('[id^="person-type-"]') || e.target.id === 'guests-input') updateSummary();
    });
    
    setTimeout(updateSummary, 500);
})();
</script>
            </div>
            </div>
            <link rel="stylesheet" href="https://www.xtremerepublic.com/themes/gotrip/css/tour-basic-booking-luxury.css?v=1782398844">
        
        </div>
    </div>
</div>
    <div id="enquiry-overlay"
     onclick="if(event.target===this)window._closeEnquiryModal()"
     role="dialog"
     aria-modal="true"
     aria-labelledby="enquiry-popup-title"
     style="display:none;">

    
    <div id="enquiry-popup"
         onclick="event.stopPropagation()"
         style="position:relative;background:#fff;border-radius:12px;max-width:900px;width:100%;margin:0 auto;box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow:hidden;">

        
        <div style="display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid #e5e7eb;background:var(--brand-heading, #0a0f1e);">
            <h5 id="enquiry-popup-title" style="margin:0;font-size:18px;font-weight:700;color:var(--brand-primary, #31964a);">
                <i class="fa fa-paper-plane" style="margin-right:8px;"></i>
                Request a Quote / Custom Enquiry
            </h5>
            <button onclick="window._closeEnquiryModal()"
                    type="button"
                    aria-label="Close"
                    style="background:none;border:none;cursor:pointer;color:#fff;font-size:28px;line-height:1;padding:0 4px;opacity:0.8;transition:opacity 0.2s;"
                    onmouseover="this.style.opacity='1'"
                    onmouseout="this.style.opacity='0.8'">
                &times;
            </button>
        </div>

        
        <div style="padding:24px;">
            <form id="enquiry_form" novalidate>
                <input type="hidden" name="_token" value="HftsdHfpWPMXYK57oH4NvQwPGfVO0TdHsPDMhITW" autocomplete="off">                                    <input type="hidden" name="service_id" value="2327">
                                <input type="hidden" name="service_type" value="tour">

                <div style="display:grid;grid-template-columns:1fr 1fr;gap:24px;">

                    
                    <div>
                        <h6 style="font-size:14px;font-weight:700;color:var(--brand-heading, #0a0f1e);border-bottom:2px solid #E4E8ED;padding-bottom:8px;margin-bottom:16px;text-transform:uppercase;letter-spacing:0.05em;">
                            Personal Information
                        </h6>

                        <div style="margin-bottom:14px;">
                            <label style="display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:5px;">Full Name *</label>
                            <input type="text" name="enquiry_name" required
                                   value=""
                                   placeholder="Your full name"
                                   style="width:100%;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;box-sizing:border-box;"
                                   onfocus="this.style.borderColor='var(--brand-primary, #31964a)'" onblur="this.style.borderColor='#d1d5db'">
                        </div>

                        <div style="margin-bottom:14px;">
                            <label style="display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:5px;">Email Address *</label>
                            <input type="email" name="enquiry_email" required
                                   value=""
                                   placeholder="your@email.com"
                                   style="width:100%;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;box-sizing:border-box;"
                                   onfocus="this.style.borderColor='var(--brand-primary, #31964a)'" onblur="this.style.borderColor='#d1d5db'">
                        </div>

                        <div style="margin-bottom:14px;">
                            <label style="display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:5px;">Phone Number *</label>
                            <input type="tel" name="enquiry_phone" required
                                   value=""
                                   placeholder="+254 7XX XXX XXX"
                                   style="width:100%;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;box-sizing:border-box;"
                                   onfocus="this.style.borderColor='var(--brand-primary, #31964a)'" onblur="this.style.borderColor='#d1d5db'">
                        </div>

                        <div style="margin-bottom:14px;">
                            <label style="display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:5px;">Country</label>
                            <select name="enquiry_country"
                                    style="width:100%;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;background:#fff;box-sizing:border-box;"
                                    onfocus="this.style.borderColor='var(--brand-primary, #31964a)'" onblur="this.style.borderColor='#d1d5db'">
                                <option value="">Select your country</option>
                                <option value="KE">Kenya</option>
                                <option value="TZ">Tanzania</option>
                                <option value="UG">Uganda</option>
                                <option value="RW">Rwanda</option>
                                <option value="ET">Ethiopia</option>
                                <option value="ZA">South Africa</option>
                                <option value="NG">Nigeria</option>
                                <option value="GH">Ghana</option>
                                <option value="US">United States</option>
                                <option value="GB">United Kingdom</option>
                                <option value="DE">Germany</option>
                                <option value="FR">France</option>
                                <option value="AU">Australia</option>
                                <option value="CA">Canada</option>
                                <option value="IN">India</option>
                                <option value="CN">China</option>
                                <option value="JP">Japan</option>
                                <option value="AE">United Arab Emirates</option>
                                <option value="SA">Saudi Arabia</option>
                                <option value="other">Other</option>
                            </select>
                        </div>
                    </div>

                    
                    <div>
                        <h6 style="font-size:14px;font-weight:700;color:var(--brand-heading, #0a0f1e);border-bottom:2px solid #E4E8ED;padding-bottom:8px;margin-bottom:16px;text-transform:uppercase;letter-spacing:0.05em;">
                            Trip Details
                        </h6>

                        <div style="margin-bottom:14px;">
                            <label style="display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:5px;">Number of Days</label>
                            <input type="number" name="enquiry_days" id="eq_days" min="1" max="365"
                                   placeholder="e.g. 7"
                                   style="width:100%;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;box-sizing:border-box;"
                                   onfocus="this.style.borderColor='var(--brand-primary, #31964a)'" onblur="this.style.borderColor='#d1d5db'"
                                   oninput="_eqCalcEndDate()">
                        </div>

                        <div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px;">
                            <div>
                                <label style="display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:5px;">Start Date</label>
                                <input type="date" name="enquiry_start_date" id="eq_start"
                                       style="width:100%;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;box-sizing:border-box;"
                                       onfocus="this.style.borderColor='var(--brand-primary, #31964a)'" onblur="this.style.borderColor='#d1d5db'"
                                       oninput="_eqCalcEndDate()">
                            </div>
                            <div>
                                <label style="display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:5px;">
                                    End Date
                                    <span id="eq_end_hint" style="font-weight:400;color:#9ca3af;font-size:11px;margin-left:4px;">(auto-filled)</span>
                                </label>
                                <input type="date" name="enquiry_end_date" id="eq_end"
                                       style="width:100%;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;box-sizing:border-box;background:#f9fafb;"
                                       onfocus="this.style.borderColor='var(--brand-primary, #31964a)'" onblur="this.style.borderColor='#d1d5db'">
                            </div>
                        </div>

                        <script>
                        function _eqCalcEndDate() {
                            var days  = parseInt(document.getElementById('eq_days')?.value, 10);
                            var start = document.getElementById('eq_start')?.value;
                            var endEl = document.getElementById('eq_end');
                            if (!endEl) return;
                            if (start && days >= 1) {
                                var d = new Date(start);
                                d.setDate(d.getDate() + days - 1);
                                // Format as YYYY-MM-DD for the date input
                                var y = d.getFullYear();
                                var m = String(d.getMonth() + 1).padStart(2, '0');
                                var day = String(d.getDate()).padStart(2, '0');
                                endEl.value = y + '-' + m + '-' + day;
                                endEl.style.background = '#f0fdf4';
                                endEl.style.borderColor = '#86efac';
                            } else {
                                endEl.value = '';
                                endEl.style.background = '#f9fafb';
                                endEl.style.borderColor = '#d1d5db';
                            }
                        }
                        </script>

                        <div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px;">
                            <div>
                                <label style="display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:5px;">Adults *</label>
                                <input type="number" name="enquiry_adults" min="1" max="50" value="1" required
                                       style="width:100%;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;box-sizing:border-box;"
                                       onfocus="this.style.borderColor='var(--brand-primary, #31964a)'" onblur="this.style.borderColor='#d1d5db'">
                            </div>
                            <div>
                                <label style="display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:5px;">Kids (4–12 yrs)</label>
                                <input type="number" name="enquiry_kids_4_12" min="0" max="20" value="0"
                                       style="width:100%;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;box-sizing:border-box;"
                                       onfocus="this.style.borderColor='var(--brand-primary, #31964a)'" onblur="this.style.borderColor='#d1d5db'">
                            </div>
                        </div>

                        <div style="margin-bottom:14px;">
                            <label style="display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:5px;">Special Requests / Notes</label>
                            <textarea name="enquiry_note" rows="4"
                                      placeholder="Tell us about your dream trip, special requirements, budget range..."
                                      style="width:100%;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;resize:vertical;box-sizing:border-box;font-family:inherit;"
                                      onfocus="this.style.borderColor='var(--brand-primary, #31964a)'" onblur="this.style.borderColor='#d1d5db'"></textarea>
                        </div>
                    </div>
                </div>

                
                
                <div id="enquiry-message-box" style="display:none;margin-top:14px;"></div>

            </form>
        </div>

        
        <div style="display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid #e5e7eb;background:#f9fafb;">
            <button type="button"
                    onclick="window._closeEnquiryModal()"
                    style="padding:10px 24px;border:1.5px solid #d1d5db;border-radius:8px;background:#fff;color:#374151;font-size:14px;font-weight:600;cursor:pointer;">
                Cancel
            </button>
            <button type="button"
                    id="btn-submit-enquiry"
                    style="padding:10px 28px;border:none;border-radius:8px;background:var(--brand-primary, #31964a);color:var(--brand-heading, #0a0f1e);font-size:14px;font-weight:700;cursor:pointer;display:flex;align-items:center;gap:8px;">
                <i class="fa fa-paper-plane"></i>
                Send Quote Request
            </button>
        </div>

    </div>
</div>

<style>
#enquiry-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100001 !important;
    background: rgba(0, 0, 0, 0.55) !important;
    overflow-y: auto !important;
    padding: 20px 16px !important;
    display: none;
    align-items: flex-start;
    justify-content: center;
    pointer-events: auto !important;
    isolation: isolate;
}
#enquiry-overlay.is-open {
    display: flex !important;
}
#enquiry-popup {
    position: relative !important;
    z-index: 2 !important;
    pointer-events: auto !important;
    flex-shrink: 0;
    margin-top: 24px;
}
#enquiry-popup,
#enquiry-popup * {
    pointer-events: auto !important;
}
/* Mobile: stack columns */
@media (max-width: 640px) {
    #enquiry-popup > div:nth-child(2) > form > div:first-of-type {
        grid-template-columns: 1fr !important;
    }
}
/* Smooth open animation */
@keyframes enquiryFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
#enquiry-popup {
    animation: enquiryFadeIn 0.22s ease-out;
}
</style>

<script>
// ── Global open / close — portal to body to escape transformed ancestors ─────
window._openEnquiryModal = function() {
    var overlay = document.getElementById('enquiry-overlay');
    if (!overlay) return;

    if (overlay.parentNode !== document.body) {
        document.body.appendChild(overlay);
    }

    document.querySelectorAll('.modal-backdrop').forEach(function(el) {
        el.remove();
    });
    document.body.classList.remove('modal-open');

    overlay.classList.add('is-open');
    overlay.style.display = 'flex';
    document.body.style.overflow = 'hidden';

    var mb = document.getElementById('enquiry-message-box');
    if (mb) { mb.style.display = 'none'; mb.innerHTML = ''; }

    var firstInput = overlay.querySelector('input:not([type="hidden"]), select, textarea');
    if (firstInput) {
        setTimeout(function() { firstInput.focus(); }, 100);
    }
};

window._closeEnquiryModal = function() {
    var overlay = document.getElementById('enquiry-overlay');
    if (!overlay) return;
    overlay.classList.remove('is-open');
    overlay.style.display = 'none';
    document.body.style.overflow = '';
    document.querySelectorAll('.modal-backdrop').forEach(function(el) {
        el.remove();
    });
    document.body.classList.remove('modal-open');
};

// Close on Escape key
document.addEventListener('keydown', function(e) {
    if (e.key === 'Escape') window._closeEnquiryModal();
});

// ── Form submission — wait for jQuery (same polling pattern as rest of page) ─
(function initEnquirySubmit() {
    if (typeof jQuery === 'undefined') { setTimeout(initEnquirySubmit, 50); return; }
    var $ = jQuery;

    $(document).on('click', '#btn-submit-enquiry', function(e) {
        e.preventDefault();
        var $btn = $(this);
        var $msg = $('#enquiry-message-box');
        var $fe  = $('#enquiry_form');

        // Basic validation
        var name  = $fe.find('[name="enquiry_name"]').val().trim();
        var email = $fe.find('[name="enquiry_email"]').val().trim();
        var phone = $fe.find('[name="enquiry_phone"]').val().trim();

        if (!name || !email || !phone) {
            $msg.html('<div style="padding:12px 16px;background:#fef2f2;border:1px solid #fca5a5;border-radius:8px;color:#991b1b;font-size:13px;"><i class="fa fa-exclamation-circle" style="margin-right:6px;"></i>Please fill in Name, Email and Phone.</div>').show();
            return;
        }

        // Loading state
        $btn.prop('disabled', true).html('<i class="fa fa-spinner fa-spin" style="margin-right:6px;"></i>Sending...');
        $msg.hide();

        var data = {
            service_id:         $fe.find('[name="service_id"]').val(),
            service_type:       $fe.find('[name="service_type"]').val(),
            enquiry_name:       name,
            enquiry_email:      email,
            enquiry_phone:      phone,
            enquiry_adults:     $fe.find('[name="enquiry_adults"]').val() || 1,
            enquiry_kids_4_12:  $fe.find('[name="enquiry_kids_4_12"]').val() || 0,
            enquiry_days:       $fe.find('[name="enquiry_days"]').val(),
            enquiry_start_date: $fe.find('[name="enquiry_start_date"]').val(),
            enquiry_end_date:   $fe.find('[name="enquiry_end_date"]').val(),
            enquiry_country:    $fe.find('[name="enquiry_country"]').val(),
            enquiry_note:       $fe.find('[name="enquiry_note"]').val(),
            _token: $('meta[name="csrf-token"]').attr('content') || $fe.find('[name="_token"]').val()
        };

        if ($fe.find('#g-recaptcha-response').length) {
            data['g-recaptcha-response'] = $fe.find('#g-recaptcha-response').val();
        }

        $.ajax({
            url: 'https://www.xtremerepublic.com/booking/addEnquiry',
            type: 'POST',
            data: data,
            dataType: 'json',
            success: function(r) {
                if (r.status === 1 || r.status === true) {
                    $msg.html('<div style="padding:12px 16px;background:#f0fdf4;border:1px solid #86efac;border-radius:8px;color:#166534;font-size:13px;"><i class="fa fa-check-circle" style="margin-right:6px;"></i>' + (r.message || 'Thank you! We will get back to you within 24 hours.') + '</div>').show();
                    // Reset form fields (keep service_id/type)
                    var sid = $fe.find('[name="service_id"]').val();
                    var stype = $fe.find('[name="service_type"]').val();
                    $fe[0].reset();
                    $fe.find('[name="service_id"]').val(sid);
                    $fe.find('[name="service_type"]').val(stype);
                    $fe.find('[name="enquiry_adults"]').val(1);
                    $fe.find('[name="enquiry_kids_4_12"]').val(0);
                    setTimeout(window._closeEnquiryModal, 3000);
                } else {
                    var msg = r.message || 'An error occurred. Please try again.';
                    $msg.html('<div style="padding:12px 16px;background:#fef2f2;border:1px solid #fca5a5;border-radius:8px;color:#991b1b;font-size:13px;"><i class="fa fa-exclamation-circle" style="margin-right:6px;"></i>' + msg + '</div>').show();
                }
            },
            error: function(xhr) {
                var msg = (xhr.responseJSON && xhr.responseJSON.message) ? xhr.responseJSON.message : 'An error occurred. Please try again.';
                $msg.html('<div style="padding:12px 16px;background:#fef2f2;border:1px solid #fca5a5;border-radius:8px;color:#991b1b;font-size:13px;"><i class="fa fa-exclamation-circle" style="margin-right:6px;"></i>' + msg + '</div>').show();
            },
            complete: function() {
                $btn.prop('disabled', false).html('<i class="fa fa-paper-plane" style="margin-right:6px;"></i>Send Quote Request');
            }
        });
    });
})();
</script>



<style>
/* Luxury counters styling */
.lux-counters {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}
.lux-counter-item {
    margin-bottom: 20px;
}
.lux-counter-item:last-child {
    margin-bottom: 0;
}
.lux-label-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.lux-label {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    letter-spacing: -0.01em;
}
.lux-sublabel {
    font-size: 12px;
    color: #718096;
    font-weight: 400;
}
.lux-counter {
    display: flex;
    align-items: center;
    background: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.lux-counter:focus-within {
    background: #ffffff;
    border-color: var(--main-color, #3554D1);
    box-shadow: 0 0 0 4px rgba(53, 84, 209, 0.08);
}
.lux-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #1a202c;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
.lux-btn:hover {
    border-color: var(--main-color, #3554D1);
    color: var(--main-color, #3554D1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(53, 84, 209, 0.1);
}
.lux-btn:active {
    transform: scale(0.95);
}
.lux-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.lux-input {
    flex: 1;
    width: 100%;
    text-align: center;
    border: none !important;
    outline: none !important;
    font-weight: 700;
    font-size: 18px;
    background: transparent;
    color: #1a202c;
    font-family: inherit;
}
/* Hide spin buttons */
.lux-input::-webkit-outer-spin-button,
.lux-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.lux-input[type=number] {
    -moz-appearance: textfield;
}
.lux-tip {
    margin-top: 16px;
    padding: 12px;
    background: #fffaf0;
    border-radius: 12px;
    border: 1px solid #feebc8;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.lux-tip i {
    color: #dd6b20;
    margin-top: 2px;
}
.lux-tip-text {
    font-size: 12px;
    color: #7b341e;
    line-height: 1.5;
}
</style>
    </div>
</div>


</div> <!-- End tour-content-area -->

</div> <!-- End tour-detail-with-sidebar -->

<script>

// Tour Sidebar Navigation
document.addEventListener('DOMContentLoaded', function() {
    const sidebarLinks = document.querySelectorAll('.tour-sidebar-nav-link');
    const sections = document.querySelectorAll('[id^="tour-"]');
    
    // Smooth scrolling for sidebar links
    sidebarLinks.forEach(link => {
        link.addEventListener('click', function(e) {
            e.preventDefault();
            const targetId = this.getAttribute('href').substring(1);
            const targetSection = document.getElementById(targetId);
            
            if (targetSection) {
                targetSection.scrollIntoView({
                    behavior: 'smooth',
                    block: 'start'
                });
                
                // Update active link
                sidebarLinks.forEach(l => l.classList.remove('active'));
                this.classList.add('active');
            }
        });
    });
    
    // Update active link on scroll — RAF throttled
    let ticking = false;
    
    function updateActiveSection() {
        let current = '';
        let closestDistance = Infinity;
        
        sections.forEach(section => {
            const rect = section.getBoundingClientRect();
            const sectionTop = rect.top;
            const sectionBottom = rect.bottom;
            const sectionHeight = rect.height;
            
            if (sectionTop <= window.innerHeight / 2 && sectionBottom >= window.innerHeight / 2) {
                current = section.getAttribute('id');
            } else if (sectionTop <= 100 && sectionTop >= -sectionHeight) {
                const distance = Math.abs(sectionTop);
                if (distance < closestDistance) {
                    closestDistance = distance;
                    current = section.getAttribute('id');
                }
            }
        });
        
        sidebarLinks.forEach(link => {
            link.classList.remove('active');
            if (link.getAttribute('href') === '#' + current) {
                link.classList.add('active');
            }
        });
        
        ticking = false;
    }
    
    window.addEventListener('scroll', function() {
        if (!ticking) {
            requestAnimationFrame(updateActiveSection);
            ticking = true;
        }
    }, { passive: true });

    // Initialize Hotel Carousel
    initializeHotelCarousel();
    
    // Initialize Gallery
    initializeGallery();
    
    // Initialize Luxury Scroll Animations
    initializeLuxuryAnimations();
});

// Scroll Animations — Fixed IntersectionObserver (no flash/jump)
function initializeLuxuryAnimations() {
    // Respect prefers-reduced-motion
    const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
    if (prefersReduced) {
        // Make all sections immediately visible
        document.querySelectorAll('.tour-section').forEach(s => {
            s.classList.add('no-animate');
        });
        return;
    }

    const observerOptions = {
        threshold: 0.08,
        rootMargin: '0px 0px -40px 0px'
    };

    const observer = new IntersectionObserver((entries) => {
        entries.forEach(entry => {
            if (entry.isIntersecting) {
                entry.target.classList.add('is-visible');
                observer.unobserve(entry.target); // Only animate once
            }
        });
    }, observerOptions);

    // Sections already in viewport on load get no-animate (above the fold)
    document.querySelectorAll('.tour-section').forEach((section, index) => {
        const rect = section.getBoundingClientRect();
        if (rect.top < window.innerHeight) {
            // Above the fold — show immediately, no animation
            section.classList.add('no-animate');
        } else {
            // Below the fold — observe for scroll-in animation
            observer.observe(section);
        }
    });

    // JS hover effects REMOVED — CSS :hover handles this cleanly
    // (Removing the JS hover that was conflicting with CSS hover)

}

// Simple Hotel Carousel - Basic Working Version
function initializeHotelCarousel() {
    const carousel = document.querySelector('.js-tour-hotels-slider');
    if (!carousel) {
        return;
    }

    const slides = carousel.querySelectorAll('.swiper-slide');
    const wrapper = carousel.querySelector('.swiper-wrapper');
    const prevBtn = document.querySelector('.js-tour-hotels-prev');
    const nextBtn = document.querySelector('.js-tour-hotels-next');
    const pagination = document.querySelector('.js-tour-hotels-pag');
    
    
    if (slides.length <= 1) {
        if (prevBtn) prevBtn.style.display = 'none';
        if (nextBtn) nextBtn.style.display = 'none';
        if (pagination) pagination.style.display = 'none';
        return;
    }

    let currentIndex = 0;
    let slidesToShow = 1; // Start with 1 for mobile
    let slideWidth = 100; // Percentage width per slide
    
    // Simple function to get slides to show
    function updateSlidesToShow() {
        const width = window.innerWidth;
        if (width >= 1200) {
            slidesToShow = 4;
            slideWidth = 25;
        } else if (width >= 992) {
            slidesToShow = 3;
            slideWidth = 33.333;
        } else if (width >= 768) {
            slidesToShow = 2;
            slideWidth = 50;
        } else {
            slidesToShow = 1;
            slideWidth = 90; // 90% width on mobile
        }
        
    }
    
    // Update slide positions
    function updateSlides() {
        if (!wrapper) return;
        
        const maxIndex = Math.max(0, slides.length - slidesToShow);
        currentIndex = Math.min(currentIndex, maxIndex);
        
        const translateX = -currentIndex * slideWidth;
        wrapper.style.transform = `translateX(${translateX}%)`;
        
        
        // Update pagination
        updatePagination();
        
        // Update buttons
        if (prevBtn) {
            prevBtn.style.opacity = currentIndex === 0 ? '0.5' : '1';
        }
        if (nextBtn) {
            nextBtn.style.opacity = currentIndex >= maxIndex ? '0.5' : '1';
        }
    }
    
    // Create pagination
    function createPagination() {
        if (!pagination) return;
        
        pagination.innerHTML = '';
        const maxIndex = Math.max(0, slides.length - slidesToShow);
        
        for (let i = 0; i <= maxIndex; i++) {
            const dot = document.createElement('span');
            dot.className = 'swiper-pagination-bullet';
            dot.addEventListener('click', () => {
                currentIndex = i;
                updateSlides();
            });
            pagination.appendChild(dot);
        }
        
    }
    
    // Update pagination
    function updatePagination() {
        if (!pagination) return;
        
        const dots = pagination.querySelectorAll('.swiper-pagination-bullet');
        dots.forEach((dot, index) => {
            if (index === currentIndex) {
                dot.classList.add('swiper-pagination-bullet-active');
            } else {
                dot.classList.remove('swiper-pagination-bullet-active');
            }
        });
    }
    
    // Next slide
    function nextSlide() {
        const maxIndex = Math.max(0, slides.length - slidesToShow);
        if (currentIndex < maxIndex) {
            currentIndex++;
            updateSlides();
        }
    }
    
    // Previous slide
    function prevSlide() {
        if (currentIndex > 0) {
            currentIndex--;
            updateSlides();
        }
    }
    
    // Event listeners
    if (nextBtn) {
        nextBtn.addEventListener('click', (e) => {
            e.preventDefault();
            nextSlide();
        });
    }
    
    if (prevBtn) {
        prevBtn.addEventListener('click', (e) => {
            e.preventDefault();
            prevSlide();
        });
    }
    
    // Simple touch support
    let startX = 0;
    let endX = 0;
    
    carousel.addEventListener('touchstart', (e) => {
        startX = e.touches[0].clientX;
    });
    
    carousel.addEventListener('touchend', (e) => {
        endX = e.changedTouches[0].clientX;
        const diff = startX - endX;
        
        if (Math.abs(diff) > 50) {
            if (diff > 0) {
                nextSlide();
            } else {
                prevSlide();
            }
        }
    });
    
    // Resize handler
    window.addEventListener('resize', () => {
        updateSlidesToShow();
        createPagination();
        updateSlides();
    });
    
    // Initialize
    updateSlidesToShow();
    createPagination();
    updateSlides();
    
}

// Gallery Initialization
function initializeGallery() {
    const mainImage = document.getElementById('luxury-main-image');
    const thumbnails = document.querySelectorAll('.luxury-thumbnail-item');
    const prevBtn = document.getElementById('gallery-prev');
    const nextBtn = document.getElementById('gallery-next');
    const currentCounter = document.getElementById('current-image');
    const scrollLeft = document.getElementById('scroll-left');
    const scrollRight = document.getElementById('scroll-right');
    const thumbnailsContainer = document.getElementById('thumbnails-scroll');

    if (!mainImage || thumbnails.length === 0) return;

    let currentImageIndex = 0;

    function updateMainImage(index) {
        const thumbnail = thumbnails[index];
        if (thumbnail) {
            const newImageSrc = thumbnail.getAttribute('data-image');
            mainImage.src = newImageSrc;
            
            // Update active thumbnail
            thumbnails.forEach(thumb => thumb.classList.remove('active'));
            thumbnail.classList.add('active');
            
            // Update counter
            if (currentCounter) {
                currentCounter.textContent = index + 1;
            }
            
            currentImageIndex = index;
        }
    }

    function nextImage() {
        const nextIndex = (currentImageIndex + 1) % thumbnails.length;
        updateMainImage(nextIndex);
    }

    function prevImage() {
        const prevIndex = (currentImageIndex - 1 + thumbnails.length) % thumbnails.length;
        updateMainImage(prevIndex);
    }

    // Thumbnail click events
    thumbnails.forEach((thumbnail, index) => {
        thumbnail.addEventListener('click', () => updateMainImage(index));
    });

    // Navigation button events
    if (nextBtn) nextBtn.addEventListener('click', nextImage);
    if (prevBtn) prevBtn.addEventListener('click', prevImage);

    // Thumbnail scroll events
    if (scrollLeft && thumbnailsContainer) {
        scrollLeft.addEventListener('click', () => {
            thumbnailsContainer.scrollBy({ left: -200, behavior: 'smooth' });
        });
    }

    if (scrollRight && thumbnailsContainer) {
        scrollRight.addEventListener('click', () => {
            thumbnailsContainer.scrollBy({ left: 200, behavior: 'smooth' });
        });
    }
}
</script>

</section>
            <section>
                <div class="container">
                                    </div>
            </section>
            <div class="container">
                <div class="mt-50 border-top-light"></div>
            </div>
            <section class="layout-pt-lg layout-pb-lg">
        <div class="container">
            <div class="row justify-between items-end">
                <div class="col-auto">
                    <div class="sectionTitle -md">
                        <h2 class="sectionTitle__title">You might also like</h2>
                        <p class=" sectionTitle__text mt-5 sm:mt-0"></p>
                    </div>
                </div>
                <div class="col-auto">
                    <a href="https://www.xtremerepublic.com/tour?location_id=67" class="button h-50 px-24 -blue-1 bg-blue-1-05 text-blue-1">
                        See All <div class="icon-arrow-top-right ml-15"></div>
                    </a>
                </div>
            </div>
            <div class="row y-gap-30 pt-40 sm:pt-20">
                                    <div class="col-6 col-lg-3">
                        <div class="tourCard -type-1 rounded-4 ">

    
    <div class="tourCard__image">
        <div class="cardImage ratio ratio-1:1">
            <a  href="https://www.xtremerepublic.com/tour/range">
                <div class="cardImage__content">
                                                                        <img class='img-responsive rounded-4 col-12 js-lazy lazy'  data-src=https://www.xtremerepublic.com/uploads/0000/6/2025/11/11/peterkingsphotography-127.JPG  alt='Shooting Range Experience'>
                                                            </div>
            </a>

            
            <div class="service-wishlist " data-id="219" data-type="tour">
                <div class="cardImage__wishlist">
                    <button class="button -blue-1 bg-white size-30 rounded-full shadow-2">
                        <i class="icon-heart text-12"></i>
                    </button>
                </div>
            </div>

            
            <div class="cardImage__leftBadge">
                                            </div>
        </div>
    </div>

    
    <div class="tourCard__content px-10 pt-10 pb-10">

        
        <div class="d-flex items-center justify-between mb-5">
            <div class="d-flex items-center text-14 text-light-1">
                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mr-5" style="flex-shrink:0"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
                8 Hours
            </div>
                    </div>

        
        <h3 class="tourCard__title text-dark-1 text-16 fw-500 lh-14 mt-5">
            <a  href="https://www.xtremerepublic.com/tour/range">
                Shooting Range Experience
            </a>
        </h3>

        
                                <div class="d-flex items-center text-13 text-light-1 mt-5">
                <i class="icon-pin text-14 mr-5"></i>
                Nairobi
            </div>
        
        
                            <div class="d-flex items-center text-13 text-light-1 mt-5">
                <i class="icon-calendar text-14 mr-5"></i>
                Next: Jun 27, 2026
            </div>
        
        <div class="border-top-light mt-10"></div>

        
        <div class="d-flex items-center justify-between pt-10">
            <div>
                                <div class="text-dark-1 fw-600 text-16 lh-14">
                    <span class="text-13 fw-400 text-light-1">From </span>KSh6,350
                </div>
            </div>
            <a                href="https://www.xtremerepublic.com/tour/range"
               class="button -sm -blue-1 bg-blue-1-05 text-blue-1 rounded-4 px-15 py-8 text-13 fw-500">
                View
            </a>
        </div>

    </div>
</div>
                    </div>
                                    <div class="col-6 col-lg-3">
                        <div class="tourCard -type-1 rounded-4 ">

    
    <div class="tourCard__image">
        <div class="cardImage ratio ratio-1:1">
            <a  href="https://www.xtremerepublic.com/tour/paragliding-experience">
                <div class="cardImage__content">
                                                                        <img class='img-responsive rounded-4 col-12 js-lazy lazy'  data-src=https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7241.jpg  alt='Paragliding Experience'>
                                                            </div>
            </a>

            
            <div class="service-wishlist " data-id="233" data-type="tour">
                <div class="cardImage__wishlist">
                    <button class="button -blue-1 bg-white size-30 rounded-full shadow-2">
                        <i class="icon-heart text-12"></i>
                    </button>
                </div>
            </div>

            
            <div class="cardImage__leftBadge">
                                            </div>
        </div>
    </div>

    
    <div class="tourCard__content px-10 pt-10 pb-10">

        
        <div class="d-flex items-center justify-between mb-5">
            <div class="d-flex items-center text-14 text-light-1">
                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mr-5" style="flex-shrink:0"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
                1 Day
            </div>
                    </div>

        
        <h3 class="tourCard__title text-dark-1 text-16 fw-500 lh-14 mt-5">
            <a  href="https://www.xtremerepublic.com/tour/paragliding-experience">
                Paragliding Experience
            </a>
        </h3>

        
                                <div class="d-flex items-center text-13 text-light-1 mt-5">
                <i class="icon-pin text-14 mr-5"></i>
                Nairobi
            </div>
        
        
                            <div class="d-flex items-center text-13 text-light-1 mt-5">
                <i class="icon-calendar text-14 mr-5"></i>
                Next: Jun 28, 2026
            </div>
        
        <div class="border-top-light mt-10"></div>

        
        <div class="d-flex items-center justify-between pt-10">
            <div>
                                <div class="text-dark-1 fw-600 text-16 lh-14">
                    <span class="text-13 fw-400 text-light-1">From </span>KSh21,000
                </div>
            </div>
            <a                href="https://www.xtremerepublic.com/tour/paragliding-experience"
               class="button -sm -blue-1 bg-blue-1-05 text-blue-1 rounded-4 px-15 py-8 text-13 fw-500">
                View
            </a>
        </div>

    </div>
</div>
                    </div>
                                    <div class="col-6 col-lg-3">
                        <div class="tourCard -type-1 rounded-4 ">

    
    <div class="tourCard__image">
        <div class="cardImage ratio ratio-1:1">
            <a  href="https://www.xtremerepublic.com/tour/explore-nairobi-national-park-giraffe-centre">
                <div class="cardImage__content">
                                                                        <img class='img-responsive rounded-4 col-12 js-lazy lazy'  data-src=https://www.xtremerepublic.com/uploads/0000/1/2026/05/25/nnp-8.jpg  alt='Nairobi National Park &amp; Giraffe Centre'>
                                                            </div>
            </a>

            
            <div class="service-wishlist " data-id="256" data-type="tour">
                <div class="cardImage__wishlist">
                    <button class="button -blue-1 bg-white size-30 rounded-full shadow-2">
                        <i class="icon-heart text-12"></i>
                    </button>
                </div>
            </div>

            
            <div class="cardImage__leftBadge">
                                            </div>
        </div>
    </div>

    
    <div class="tourCard__content px-10 pt-10 pb-10">

        
        <div class="d-flex items-center justify-between mb-5">
            <div class="d-flex items-center text-14 text-light-1">
                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mr-5" style="flex-shrink:0"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
                6 Hours
            </div>
                    </div>

        
        <h3 class="tourCard__title text-dark-1 text-16 fw-500 lh-14 mt-5">
            <a  href="https://www.xtremerepublic.com/tour/explore-nairobi-national-park-giraffe-centre">
                Nairobi National Park &amp; Giraffe Centre
            </a>
        </h3>

        
                                <div class="d-flex items-center text-13 text-light-1 mt-5">
                <i class="icon-pin text-14 mr-5"></i>
                Nairobi
            </div>
        
        
                            <div class="d-flex items-center text-13 text-light-1 mt-5">
                <i class="icon-calendar text-14 mr-5"></i>
                Next: Jun 27, 2026
            </div>
        
        <div class="border-top-light mt-10"></div>

        
        <div class="d-flex items-center justify-between pt-10">
            <div>
                                <div class="text-dark-1 fw-600 text-16 lh-14">
                    <span class="text-13 fw-400 text-light-1">From </span>KSh3,000
                </div>
            </div>
            <a                href="https://www.xtremerepublic.com/tour/explore-nairobi-national-park-giraffe-centre"
               class="button -sm -blue-1 bg-blue-1-05 text-blue-1 rounded-4 px-15 py-8 text-13 fw-500">
                View
            </a>
        </div>

    </div>
</div>
                    </div>
                                    <div class="col-6 col-lg-3">
                        <div class="tourCard -type-1 rounded-4 ">

    
    <div class="tourCard__image">
        <div class="cardImage ratio ratio-1:1">
            <a  href="https://www.xtremerepublic.com/tour/explore-nairobi-national-park-giraffe-centre-1">
                <div class="cardImage__content">
                                                                        <img class='img-responsive rounded-4 col-12 js-lazy lazy'  data-src=https://www.xtremerepublic.com/uploads/0000/1/2026/05/25/nnp-8.jpg  alt='Nairobi National Park &amp; Giraffe Centre, Kenya'>
                                                            </div>
            </a>

            
            <div class="service-wishlist " data-id="2328" data-type="tour">
                <div class="cardImage__wishlist">
                    <button class="button -blue-1 bg-white size-30 rounded-full shadow-2">
                        <i class="icon-heart text-12"></i>
                    </button>
                </div>
            </div>

            
            <div class="cardImage__leftBadge">
                                            </div>
        </div>
    </div>

    
    <div class="tourCard__content px-10 pt-10 pb-10">

        
        <div class="d-flex items-center justify-between mb-5">
            <div class="d-flex items-center text-14 text-light-1">
                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mr-5" style="flex-shrink:0"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
                6 Hours
            </div>
                    </div>

        
        <h3 class="tourCard__title text-dark-1 text-16 fw-500 lh-14 mt-5">
            <a  href="https://www.xtremerepublic.com/tour/explore-nairobi-national-park-giraffe-centre-1">
                Nairobi National Park &amp; Giraffe Centre, Kenya
            </a>
        </h3>

        
                                <div class="d-flex items-center text-13 text-light-1 mt-5">
                <i class="icon-pin text-14 mr-5"></i>
                Nairobi
            </div>
        
        
                            <div class="d-flex items-center text-13 text-light-1 mt-5">
                <i class="icon-calendar text-14 mr-5"></i>
                Next: Jun 27, 2026
            </div>
        
        <div class="border-top-light mt-10"></div>

        
        <div class="d-flex items-center justify-between pt-10">
            <div>
                                <div class="text-dark-1 fw-600 text-16 lh-14">
                    <span class="text-13 fw-400 text-light-1">From </span>$30
                </div>
            </div>
            <a                href="https://www.xtremerepublic.com/tour/explore-nairobi-national-park-giraffe-centre-1"
               class="button -sm -blue-1 bg-blue-1-05 text-blue-1 rounded-4 px-15 py-8 text-13 fw-500">
                View
            </a>
        </div>

    </div>
</div>
                    </div>
                            </div>
        </div>
    </section>
        </div>
                <div class="bravo-more-book-mobile">
            <div class="container">
                <div class="left">
                    <div class="g-price">
                        <div class="prefix">
                            <span class="fr_text">from</span>
                        </div>
                        <div class="price">
                            <span class="onsale"></span>
                            <span class="text-price">$250</span>
                        </div>
                    </div>
                                    </div>
                <div class="right">
                                            <a href="#bravo_tour_book_app" class="rounded-4 bg-blue-1 text-white cursor-pointer btn-primary gotrip-detail-book-mobile">
                            Book Now
                        </a>
                                    </div>
            </div>
        </div>
            </div>
        <section class="layout-pt-md layout-pb-md mailchimp bg-dark-2 ">
    <div class="container">
        <div class="row y-gap-30 justify-between items-center">
            <div class="col-auto">
                <div class="row y-gap-20  flex-wrap items-center">
                    <div class="col-auto">
                        <div class="icon-newsletter text-60 sm:text-40 text-white"></div>
                    </div>

                    <div class="col-auto">
                        <h4 class="text-26 text-white fw-600">Your Travel Journey Starts Here</h4>
                        <div class="text-white">Sign up and we&#039;ll send the best deals to you</div>
                    </div>
                </div>
            </div>

            <div class="col-auto">
                <form action="https://www.xtremerepublic.com/newsletter/subscribe" class="subcribe-form bravo-subscribe-form bravo-form single-field -w-410 d-flex x-gap-10 y-gap-20">
                    <input type="hidden" name="_token" value="HftsdHfpWPMXYK57oH4NvQwPGfVO0TdHsPDMhITW" autocomplete="off">                    <div>
                        <input class="bg-white h-60 email-input" type="text" name="email" placeholder="Your Email">
                    </div>
                    <div>
                        <button class="button -md h-60 bg-blue-1 text-white">
                            Subscribe <i class="fa fa-spinner fa-pulse fa-fw" style="display:none;"></i>
                        </button>
                    </div>
                    <div class="form-mess"></div>
                </form>
            </div>
        </div>
    </div>
</section>

<div class="footer -type-1 normal" style="background-color:#051036 !important;">
    <div class="container">
         <div class="footer_one pt-60 pb-60">
    <div class="row y-gap-40 justify-between xl:justify-start">
                                                <div class="col-xl-2 col-lg-3 col-sm-6">
                    <h5 class="text-16 fw-500 mb-30">Contact Us</h5>
                    <div class="mt-30">
     <div class="text-14 mt-30"> Customer Care</div>
     <a href="tel:+254702716721" class="text-18 fw-500 text-blue-1 mt-5">+(254) 702 716 721</a>
</div>

<div class="mt-35">
   <div class="text-14 mt-30">Email</div>
    <a href="mailto:contact@xtremerepublic.com" class="text-18 fw-500 text-blue-1 mt-5">contact@xtremerepublic.com</a>
</div>
                </div>
                            <div class="col-xl-2 col-lg-3 col-sm-6">
                    <h5 class="text-16 fw-500 mb-30">Company</h5>
                    <div class="d-flex y-gap-10 flex-column">
                <a href="/page/about-us">About Us</a>
                <a href="/page/careers">Careers</a>
                <a href="/news">Blog</a>
              </div>
                </div>
                            <div class="col-xl-2 col-lg-3 col-sm-6">
                    <h5 class="text-16 fw-500 mb-30">Support</h5>
                    <div class="d-flex y-gap-10 flex-column">
                <a href="/contact">Contact</a>
              
                <a href="/page/privacy-policy">Privacy Policy</a>
                <a href="/page/terms-conditions-xtreme-republic">Terms and Conditions</a>
              </div>
                </div>
                        </div>
</div>
        
        
        
                <section class="footer_middle_area py-16  border-top-light ">
            <div class="row y-gap-10 justify-between items-center">

                
                                <div class="col-auto">
                                            <strong style="color:#fff;font-size:13px;">Xtreme Republic Tours</strong>
                                                                <span style="font-size:12px;color:#aaa;margin-left:8px;">
                            Nairobi, Kenya                             &nbsp;|&nbsp;                             +254 702 716 721                             &nbsp;|&nbsp;                                                             <a href="mailto:contact@xtremerepublic.com" style="color:var(--brand-primary, #31964a);text-decoration:none;">contact@xtremerepublic.com</a>
                                                    </span>
                                    </div>
                
                
                                <div class="col-auto">
                    <div class="footer-trust-badges" style="display:flex;gap:14px;align-items:center;flex-wrap:wrap;">
                                                                        <img src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22774%22%20height%3D%22600%22%20fill%3D%22none%22%20viewBox%3D%220%200%20774%20600%22%3E%3Cpath%20fill%3D%22%23F53%22%20d%3D%22M0%2098.915c0-11.55%209.66-21.001%2021.526-21.001s21.526%209.45%2021.526%2021c0%2011.552-9.66%2021.002-21.526%2021.002S0%20110.466%200%2098.915Zm0%20413.721c0-11.551%209.66-21.001%2021.526-21.001s21.526%209.45%2021.526%2021.001c0%2011.55-9.66%2021.001-21.526%2021.001S0%20524.186%200%20512.636ZM3.99%2064.263c-2.52%200-3.78-1.365-3.15-3.675C9.24%2028.666%2032.867%200%2084.634%200c51.768%200%2075.394%2027.826%2083.69%2060.063.63%202.31-.63%203.675-3.15%203.675h-41.898c-1.575%200-2.52-.63-3.255-2.31-5.67-13.966-17.326-21.526-35.492-21.526-18.166%200-30.241%208.085-35.492%2022.051-.63%201.68-1.575%202.31-3.255%202.31H3.885h.105Zm0%20413.721c-2.52%200-3.78-1.365-3.15-3.675%208.4-31.922%2032.027-60.588%2083.794-60.588%2051.768%200%2075.394%2027.826%2083.69%2060.063.63%202.31-.63%203.675-3.15%203.675h-41.898c-1.575%200-2.52-.63-3.255-2.31-5.67-13.966-17.326-21.526-35.492-21.526-18.166%200-30.241%208.085-35.492%2022.051-.63%201.68-1.575%202.31-3.255%202.31H3.885h.105Zm171.684-267.553c2.205%200%203.465%202.1%202.31%203.885l-64.893%20107.105v64.893c0%201.576-1.05%202.626-2.625%202.626H70.038c-1.575%200-2.625-1.05-2.625-2.626v-64.893L2.52%20214.316c-1.05-1.785.105-3.885%202.31-3.885h44.942c1.575%200%202.836.735%203.36%201.785l36.962%2064.263%2036.963-64.263c.63-1.155%201.785-1.785%203.36-1.785h45.257Zm-91.67-24.151c-44.102%200-68.463-21.526-80.014-48.513-1.155-2.625%200-4.2%202.31-4.2h45.047c1.366%200%202.1.315%203.046%201.26%207.35%207.77%2018.376%2011.551%2030.451%2011.551%2019.426%200%2033.077-9.976%2038.012-29.612H87.154c-1.575%200-2.625-1.05-2.625-2.625V84.739c0-1.575%201.05-2.625%202.625-2.625h82.115c1.575%200%202.625%201.05%202.625%202.625v95.345c0%201.575-1.05%202.625-2.625%202.625h-30.242c-1.575%200-2.625-1.05-2.625-2.625v-15.75c-9.24%2013.44-25.411%2022.051-52.503%2022.051l.105-.105Zm0%20413.72c-44.102%200-68.463-21.526-80.014-48.512-1.155-2.626%200-4.201%202.31-4.201h45.047c1.366%200%202.1.315%203.046%201.26%207.35%207.771%2018.376%2011.551%2030.451%2011.551%2019.426%200%2033.077-9.975%2038.012-29.611H87.154c-1.575%200-2.625-1.05-2.625-2.626V498.46c0-1.575%201.05-2.625%202.625-2.625h82.115c1.575%200%202.625%201.05%202.625%202.625v95.24c0%201.575-1.05%202.625-2.625%202.625h-30.242c-1.575%200-2.625-1.05-2.625-2.625v-15.751C127.162%20591.39%20110.991%20600%2083.899%20600h.105Zm85.055-300.525c0-55.548%2038.327-93.139%2095.029-93.139%2056.703%200%2095.03%2037.591%2095.03%2093.139%200%2055.548-38.327%2093.14-95.03%2093.14-56.702%200-95.029-37.697-95.029-93.14Zm184.074%20120.966v109.731c0%2046.412-28.352%2069.828-78.754%2069.828-50.403%200-78.754-23.311-78.754-69.828V420.441c0-1.575%201.05-2.625%202.625-2.625h40.427c1.575%200%202.625%201.05%202.625%202.625v106.79c0%2021.841%2011.026%2032.762%2033.077%2032.762s33.077-10.71%2033.077-32.762v-106.79c0-1.575%201.05-2.625%202.625-2.625h40.427c1.575%200%202.625%201.05%202.625%202.625Zm-37.802-273.538v33.076c0%201.575-1.05%202.625-2.625%202.625H199.825c-1.575%200-2.625-1.05-2.625-2.625V6.72c0-1.575%201.05-2.625%202.625-2.625h111.831c1.575%200%202.625%201.05%202.625%202.625v33.077c0%201.575-1.05%202.625-2.625%202.625h-68.779v30.662h54.813c1.575%200%202.625%201.05%202.625%202.625v33.077c0%201.575-1.05%202.625-2.625%202.625h-54.813v32.762h69.829c1.575%200%202.625%201.05%202.625%202.625v.105Zm-4.515%20152.572c0-31.606-19.111-53.237-46.728-53.237-27.616%200-46.727%2021.631-46.727%2053.237%200%2031.607%2019.111%2053.238%2046.727%2053.238%2027.617%200%2046.728-21.631%2046.728-53.238ZM479.139%206.72v33.077c0%201.575-1.05%202.625-2.625%202.625H333.182c-1.575%200-2.625-1.05-2.625-2.625V6.72c0-1.575%201.05-2.625%202.625-2.625h143.332c1.575%200%202.625%201.05%202.625%202.625Zm-51.453%2060.378V179.98c0%201.575-1.05%202.625-2.625%202.625h-40.427c-1.575%200-2.625-1.05-2.625-2.625V67.099c0-1.576%201.05-2.626%202.625-2.626h40.427c1.575%200%202.625%201.05%202.625%202.625Zm111.831%20145.958v109.73c0%2046.413-28.351%2069.829-78.754%2069.829-50.402%200-78.754-23.311-78.754-69.829v-109.73c0-1.575%201.05-2.625%202.625-2.625h40.427c1.575%200%202.625%201.05%202.625%202.625v106.895c0%2021.841%2011.026%2032.762%2033.077%2032.762s33.077-10.711%2033.077-32.762V213.056c0-1.575%201.05-2.625%202.625-2.625h40.427c1.575%200%202.625%201.05%202.625%202.625ZM427.686%20420.441V593.7c0%201.575-1.05%202.625-2.625%202.625h-40.427c-1.575%200-2.625-1.05-2.625-2.625V420.441c0-1.575%201.05-2.625%202.625-2.625h40.427c1.575%200%202.625%201.05%202.625%202.625Zm105.531%20137.557h.525c30.661%200%2046.412-17.326%2046.412-51.138%200-33.811-17.326-50.612-51.663-50.612h-24.676v137.557c0%201.575-1.05%202.625-2.625%202.625h-40.427c-1.575%200-2.625-1.05-2.625-2.625V420.546c0-1.575%201.05-2.625%202.625-2.625h69.303c63.004%200%2098.18%2031.712%2098.18%2089.044%200%2057.333-35.911%2089.465-93.979%2089.465h-1.05c-1.575%200-2.626-1.05-2.626-2.625v-33.077c0-1.575%201.051-2.625%202.626-2.625v-.105Zm199.509-174.834c1.891%202.625.841%205.776-2.31%205.776h-45.677c-2.1%200-2.94-.525-3.675-1.891l-38.327-61.743c-1.575-2.625-1.89-3.36-1.89-5.25V289.08c0-1.575%201.05-2.625%202.625-2.625h6.3c12.811%200%2022.051-6.511%2022.051-19.741%200-13.231-8.19-20.161-22.051-20.161h-35.701v139.656c0%201.576-1.05%202.626-2.625%202.626h-40.427c-1.576%200-2.626-1.05-2.626-2.626V212.951c0-1.575%201.05-2.625%202.626-2.625h81.694c40.427%200%2065.103%2019.426%2065.103%2053.552%200%2034.127-10.606%2041.267-31.712%2048.618l46.727%2070.563-.105.105Zm36.752%20177.459V593.7c0%201.575-1.05%202.625-2.625%202.625h-112.88c-1.575%200-2.626-1.05-2.626-2.625V420.441c0-1.575%201.051-2.625%202.626-2.625h111.83c1.575%200%202.625%201.05%202.625%202.625v33.077c0%201.575-1.05%202.625-2.625%202.625h-68.778v30.661h54.812c1.575%200%202.626%201.05%202.626%202.626v33.076c0%201.575-1.051%202.625-2.626%202.625h-54.812v32.762h69.828c1.575%200%202.625%201.05%202.625%202.625v.105Z%22%2F%3E%3C%2Fsvg%3E"
                         alt="Getyourguide"
                         loading="lazy"
                         style="height:40px;width:auto;max-width:180px;display:block;object-fit:contain;filter:brightness(0) invert(1);opacity:0.85;">
                                                                                                    <img src="https://www.xtremerepublic.com/uploads/0000/1/2026/06/21/logo-tra.png"
                         alt="TRA Kenya"
                         loading="lazy"
                         style="height:40px;width:auto;max-width:180px;display:block;object-fit:contain;opacity:0.90;">
                                                                                                    <a href="Kayak"
                       target="_blank"
                       rel="noopener noreferrer"
                       aria-label="Partner"
                       class="footer-org-badge"
                       style="display:inline-flex;align-items:center;line-height:0;transition:opacity 0.2s;"
                       onmouseover="this.style.opacity='1'"
                       onmouseout="this.style.opacity='0.9'">
                        <img src="https://www.kayak.com/"
                             alt="Partner"
                             loading="lazy"
                             style="height:40px;width:auto;max-width:180px;display:block;object-fit:contain;filter:brightness(0) invert(1);opacity:0.85;">
                    </a>
                                        </div>
                </div>
                
            </div>
        </section>
        
        
                <section class="footer_middle_area py-14  border-top-light ">
            <div class="row items-center justify-between y-gap-10">
                <div class="col-auto">
                    <span style="font-size:11px;color:#888;text-transform:uppercase;letter-spacing:0.06em;font-weight:600;">We Accept</span>
                </div>
                <div class="col-auto">
                    <div style="display:flex;gap:10px;align-items:center;flex-wrap:wrap;">

                        
                        <img src="https://cdnjs.cloudflare.com/ajax/libs/simple-icons/9.9.0/visa.svg"
                             alt="Visa"
                             loading="lazy"
                             style="height:22px;width:auto;object-fit:contain;filter:brightness(0) invert(1);opacity:0.75;transition:opacity 0.2s;"
                             onmouseover="this.style.opacity='1'" onmouseout="this.style.opacity='0.75'">

                        
                        <img src="https://cdnjs.cloudflare.com/ajax/libs/simple-icons/9.9.0/mastercard.svg"
                             alt="Mastercard"
                             loading="lazy"
                             style="height:26px;width:auto;object-fit:contain;filter:brightness(0) invert(1);opacity:0.80;transition:opacity 0.2s;"
                             onmouseover="this.style.opacity='1'" onmouseout="this.style.opacity='0.80'">

                        
                        <img src="https://cdnjs.cloudflare.com/ajax/libs/simple-icons/9.9.0/paypal.svg"
                             alt="PayPal"
                             loading="lazy"
                             style="height:22px;width:auto;object-fit:contain;filter:brightness(0) invert(1);opacity:0.75;transition:opacity 0.2s;"
                             onmouseover="this.style.opacity='1'" onmouseout="this.style.opacity='0.75'">

                        
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 40"
                             role="img" aria-label="M-Pesa"
                             style="height:22px;width:auto;opacity:0.75;transition:opacity 0.2s;cursor:default;"
                             onmouseover="this.style.opacity='1'" onmouseout="this.style.opacity='0.75'">
                            <rect width="120" height="40" rx="4" fill="none"/>
                            <text x="4" y="28" font-family="Arial,sans-serif" font-size="22" font-weight="900" fill="#ffffff" letter-spacing="-0.5">M-PESA</text>
                        </svg>

                    </div>
                </div>
            </div>
        </section>
        
        <section class="footer_middle_area py-20  border-top-light ">
            <div class="row justify-between items-center y-gap-10">
                <div class="col-auto">
                    <p>Copyright &copy; 2026 by Xtreme Republic</p>
                </div>
                <div class="col-auto">
                    
                                                                                                                                                                                                                                                                                                                            </div>
                <div class="col-auto">
                    <div class="row y-gap-10 items-center">
                        <div class="col-auto">
                            <div class="d-flex items-center">
                                <div class="menu-footer footer-switchers">
                                    <div class="mobile-overlay"></div>
                                    <div class="header-menu__content">
                                        <div class="menu js-navList">
                                            <ul class="menu__nav -is-active">
                                                <li class="currency-dropdown menu-item-has-children">
                                                        <a href="#" class="is_login">
                    <span class="mr-10">KES</span>
                    <i class="icon icon-chevron-sm-down"></i>
                </a>
                            <ul class="subnav">
                                                <li>
                        <a href="https://www.xtremerepublic.com/tour/paragliding-experience-1?set_lang=es&amp;set_currency=usd" class="is_login dropdown-item">
                            USD
                        </a>
                    </li>
                                                                </ul>
    </li>

                                                                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-auto">
                            <p>Xtreme Republic</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
</div>

<style>
/* ── Footer currency & language switchers ── */
/* Open upward so the list doesn't overflow below the page */
.footer-switchers .menu-item-has-children {
    position: relative;
}
.footer-switchers .menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #ccc;
    cursor: pointer;
    white-space: nowrap;
    padding: 4px 0;
}
.footer-switchers .menu-item-has-children > a:hover {
    color: #fff;
}
/* Hide the sub-list by default */
.footer-switchers .menu-item-has-children .subnav {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px); /* open upward */
    left: 0;
    min-width: 120px;
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 6px 0;
    list-style: none;
    margin: 0;
    z-index: 9999;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
}
/* Show on hover */
.footer-switchers .menu-item-has-children:hover .subnav {
    display: block;
}
.footer-switchers .menu-item-has-children .subnav li a {
    display: block;
    padding: 7px 16px;
    font-size: 13px;
    color: #ccc;
    text-decoration: none;
    white-space: nowrap;
}
.footer-switchers .menu-item-has-children .subnav li a:hover {
    background: #2a2a2a;
    color: var(--brand-primary, #31964a);
}
</style>
<div class="modal fade login gotrip-login-modal" id="login" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content relative">
            <div class="modal-header border-dashed">
                <h4 class="modal-title">Log In</h4>
                <span class="c-pointer" data-bs-dismiss="modal" aria-label="Close">
                    <i class="input-icon field-icon fa">
                        <img src="https://www.xtremerepublic.com/images/ico_close.svg" alt="close">
                    </i>
                </span>
            </div>
            <div class="modal-body relative">
                <form class="bravo-theme-gotrip-login-form y-gap-20" method="POST" action="https://www.xtremerepublic.com/login">
        <input type="hidden" name="redirect" value="">
    <input type="hidden" name="_token" value="HftsdHfpWPMXYK57oH4NvQwPGfVO0TdHsPDMhITW" autocomplete="off">    <div class="col-12">
        <h4 class="form-title text-22 fw-500">Welcome back</h4>
                    <p class="mt-10">Don&#039;t have an account yet? <a data-bs-toggle="modal" href="#register" class="text-blue-1">Sign up for free</a></p>
            </div>
    <div class="col-12">
        <div class="form-input">
            <input type="text" name="email" autocomplete="off">
            <label class="lh-1 text-14 text-light-1">Email or Phone Number</label>
        </div>
    </div>
    <div class="col-12">
        <div class="form-input">
            <input type="password" name="password" autocomplete="off">
            <label class="lh-1 text-14 text-light-1">Password</label>
        </div>
    </div>
        <div class="col-12 d-flex justify-content-between">
        <div class="d-flex ">
            <div class="form-checkbox" style="margin-top: 3px">
                <input type="checkbox" name="remember" id="remember-me-gotrip-modal" value="1">
                <div class="form-checkbox__mark">
                    <div class="form-checkbox__icon icon-check"></div>
                </div>
            </div>
            <div class="text-15 lh-15 text-light-1 ml-10">Remember me</div>
        </div>
        <a href="https://www.xtremerepublic.com/forgot-password">Forgot Password?</a>
    </div>
        <div class="error message-error invalid-feedback"></div>
    <div class="col-12">
        <button class="button py-20 -dark-1 bg-blue-1 text-white w-100 form-submit" type="submit" id="gotrip-login-submit-modal">
            Sign In
            <div class="icon-arrow-top-right ml-15"></div>
            <span class="spinner-grow spinner-grow-sm icon-loading ml-15 d-none" role="status" aria-hidden="true"></span>
        </button>
    </div>

            <div class="advanced y-gap-20">
            <div class="col-12">
                <div class="text-center">or sign in with</div>
                                                    <a href="https://www.xtremerepublic.com/social-login/google" class="button col-12 -outline-red-1 text-red-1 py-15 rounded-8 mt-15 cursor-pointer" data-channel="google">
                        <i class="fa fa-google text-15 mr-10"></i>
                        Google
                    </a>
                                            </div>
        </div>
        <div class="col-12">
        <div class="text-center px-30">By creating an account, you agree to our Terms of Service and Privacy Statement.</div>
    </div>
</form>
            </div>
        </div>
    </div>
</div>
<div class="modal fade login gotrip-register-modal" id="register" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content relative">
            <div class="modal-header">
                <h4 class="modal-title">Sign Up</h4>
                <span class="c-pointer" data-bs-dismiss="modal" aria-label="Close">
                    <i class="input-icon field-icon fa">
                        <img src="https://www.xtremerepublic.com/images/ico_close.svg" alt="close">
                    </i>
                </span>
            </div>
            <div class="modal-body">
                <form action="#" class="form bravo-form-register" method="post">
    <input type="hidden" name="_token" value="HftsdHfpWPMXYK57oH4NvQwPGfVO0TdHsPDMhITW" autocomplete="off">    <div class="row y-gap-20">
        <div class="col-12">
            <h1 class="text-22 fw-500">Sign in or create an account</h1>
            <p class="mt-10">Already have an account? <a data-bs-toggle="modal" href="#login" class="text-blue-1">Log in</a></p>
        </div>
        
                
        <div class="col-12">
            <div class="form-input">
                <input type="text" name="first_name" autocomplete="off">
                <label class="lh-1 text-14 text-light-1">First Name</label>
            </div>
            <span class="invalid-feedback error error-first_name"></span>
        </div>
        <div class="col-12">
            <div class="form-input">
                <input type="text" name="last_name" autocomplete="off">
                <label class="lh-1 text-14 text-light-1">Last Name</label>
            </div>
            <span class="invalid-feedback error error-last_name"></span>
        </div>
        <div class="col-12">
            <div class="form-input">
                <input type="text" name="phone" autocomplete="off">
                <label class="lh-1 text-14 text-light-1">Phone</label>
            </div>
            <span class="invalid-feedback error error-phone"></span>
        </div>
        <div class="col-12">
            <div class="form-input">
                <input type="email" name="email" autocomplete="off">
                <label class="lh-1 text-14 text-light-1">Email address</label>
            </div>
            <span class="invalid-feedback error error-email"></span>
        </div>
        <div class="col-12">
            <div class="form-input">
                <select name="country" class="form-control">
                    <option value="">-- Select Country --</option>
                                            <option value="AF">Afghanistan</option>
                                            <option value="AX">Aland Islands</option>
                                            <option value="AL">Albania</option>
                                            <option value="DZ">Algeria</option>
                                            <option value="AS">American Samoa</option>
                                            <option value="AD">Andorra</option>
                                            <option value="AO">Angola</option>
                                            <option value="AI">Anguilla</option>
                                            <option value="AQ">Antarctica</option>
                                            <option value="AG">Antigua And Barbuda</option>
                                            <option value="AR">Argentina</option>
                                            <option value="AM">Armenia</option>
                                            <option value="AW">Aruba</option>
                                            <option value="AU">Australia</option>
                                            <option value="AT">Austria</option>
                                            <option value="AZ">Azerbaijan</option>
                                            <option value="BS">Bahamas</option>
                                            <option value="BH">Bahrain</option>
                                            <option value="BD">Bangladesh</option>
                                            <option value="BB">Barbados</option>
                                            <option value="BY">Belarus</option>
                                            <option value="BE">Belgium</option>
                                            <option value="BZ">Belize</option>
                                            <option value="BJ">Benin</option>
                                            <option value="BM">Bermuda</option>
                                            <option value="BT">Bhutan</option>
                                            <option value="BO">Bolivia</option>
                                            <option value="BA">Bosnia And Herzegovina</option>
                                            <option value="BW">Botswana</option>
                                            <option value="BV">Bouvet Island</option>
                                            <option value="BR">Brazil</option>
                                            <option value="IO">British Indian Ocean Territory</option>
                                            <option value="BN">Brunei Darussalam</option>
                                            <option value="BG">Bulgaria</option>
                                            <option value="BF">Burkina Faso</option>
                                            <option value="BI">Burundi</option>
                                            <option value="KH">Cambodia</option>
                                            <option value="CM">Cameroon</option>
                                            <option value="CA">Canada</option>
                                            <option value="CV">Cape Verde</option>
                                            <option value="KY">Cayman Islands</option>
                                            <option value="CF">Central African Republic</option>
                                            <option value="TD">Chad</option>
                                            <option value="CL">Chile</option>
                                            <option value="CN">China</option>
                                            <option value="CX">Christmas Island</option>
                                            <option value="CC">Cocos (Keeling) Islands</option>
                                            <option value="CO">Colombia</option>
                                            <option value="KM">Comoros</option>
                                            <option value="CG">Congo</option>
                                            <option value="CD">Congo, Democratic Republic</option>
                                            <option value="CK">Cook Islands</option>
                                            <option value="CR">Costa Rica</option>
                                            <option value="CI">Cote D&#039;Ivoire</option>
                                            <option value="HR">Croatia</option>
                                            <option value="CU">Cuba</option>
                                            <option value="CY">Cyprus</option>
                                            <option value="CZ">Czech Republic</option>
                                            <option value="DK">Denmark</option>
                                            <option value="DJ">Djibouti</option>
                                            <option value="DM">Dominica</option>
                                            <option value="DO">Dominican Republic</option>
                                            <option value="EC">Ecuador</option>
                                            <option value="EG">Egypt</option>
                                            <option value="SV">El Salvador</option>
                                            <option value="GQ">Equatorial Guinea</option>
                                            <option value="ER">Eritrea</option>
                                            <option value="EE">Estonia</option>
                                            <option value="ET">Ethiopia</option>
                                            <option value="FK">Falkland Islands (Malvinas)</option>
                                            <option value="FO">Faroe Islands</option>
                                            <option value="FJ">Fiji</option>
                                            <option value="FI">Finland</option>
                                            <option value="FR">France</option>
                                            <option value="GF">French Guiana</option>
                                            <option value="PF">French Polynesia</option>
                                            <option value="TF">French Southern Territories</option>
                                            <option value="GA">Gabon</option>
                                            <option value="GM">Gambia</option>
                                            <option value="GE">Georgia</option>
                                            <option value="DE">Germany</option>
                                            <option value="GH">Ghana</option>
                                            <option value="GI">Gibraltar</option>
                                            <option value="GR">Greece</option>
                                            <option value="GL">Greenland</option>
                                            <option value="GD">Grenada</option>
                                            <option value="GP">Guadeloupe</option>
                                            <option value="GU">Guam</option>
                                            <option value="GT">Guatemala</option>
                                            <option value="GG">Guernsey</option>
                                            <option value="GN">Guinea</option>
                                            <option value="GW">Guinea-Bissau</option>
                                            <option value="GY">Guyana</option>
                                            <option value="HT">Haiti</option>
                                            <option value="HM">Heard Island &amp; Mcdonald Islands</option>
                                            <option value="VA">Holy See (Vatican City State)</option>
                                            <option value="HN">Honduras</option>
                                            <option value="HK">Hong Kong</option>
                                            <option value="HU">Hungary</option>
                                            <option value="IS">Iceland</option>
                                            <option value="IN">India</option>
                                            <option value="ID">Indonesia</option>
                                            <option value="IR">Iran, Islamic Republic Of</option>
                                            <option value="IQ">Iraq</option>
                                            <option value="IE">Ireland</option>
                                            <option value="IM">Isle Of Man</option>
                                            <option value="IL">Israel</option>
                                            <option value="IT">Italy</option>
                                            <option value="JM">Jamaica</option>
                                            <option value="JP">Japan</option>
                                            <option value="JE">Jersey</option>
                                            <option value="JO">Jordan</option>
                                            <option value="KZ">Kazakhstan</option>
                                            <option value="KE">Kenya</option>
                                            <option value="KI">Kiribati</option>
                                            <option value="KR">Korea</option>
                                            <option value="KW">Kuwait</option>
                                            <option value="KG">Kyrgyzstan</option>
                                            <option value="LA">Lao People&#039;s Democratic Republic</option>
                                            <option value="LV">Latvia</option>
                                            <option value="LB">Lebanon</option>
                                            <option value="LS">Lesotho</option>
                                            <option value="LR">Liberia</option>
                                            <option value="LY">Libyan Arab Jamahiriya</option>
                                            <option value="LI">Liechtenstein</option>
                                            <option value="LT">Lithuania</option>
                                            <option value="LU">Luxembourg</option>
                                            <option value="MO">Macao</option>
                                            <option value="MK">Macedonia</option>
                                            <option value="MG">Madagascar</option>
                                            <option value="MW">Malawi</option>
                                            <option value="MY">Malaysia</option>
                                            <option value="MV">Maldives</option>
                                            <option value="ML">Mali</option>
                                            <option value="MT">Malta</option>
                                            <option value="MH">Marshall Islands</option>
                                            <option value="MQ">Martinique</option>
                                            <option value="MR">Mauritania</option>
                                            <option value="MU">Mauritius</option>
                                            <option value="YT">Mayotte</option>
                                            <option value="MX">Mexico</option>
                                            <option value="FM">Micronesia, Federated States Of</option>
                                            <option value="MD">Moldova</option>
                                            <option value="MC">Monaco</option>
                                            <option value="MN">Mongolia</option>
                                            <option value="ME">Montenegro</option>
                                            <option value="MS">Montserrat</option>
                                            <option value="MA">Morocco</option>
                                            <option value="MZ">Mozambique</option>
                                            <option value="MM">Myanmar</option>
                                            <option value="NA">Namibia</option>
                                            <option value="NR">Nauru</option>
                                            <option value="NP">Nepal</option>
                                            <option value="NL">Netherlands</option>
                                            <option value="AN">Netherlands Antilles</option>
                                            <option value="NC">New Caledonia</option>
                                            <option value="NZ">New Zealand</option>
                                            <option value="NI">Nicaragua</option>
                                            <option value="NE">Niger</option>
                                            <option value="NG">Nigeria</option>
                                            <option value="NU">Niue</option>
                                            <option value="NF">Norfolk Island</option>
                                            <option value="MP">Northern Mariana Islands</option>
                                            <option value="NO">Norway</option>
                                            <option value="OM">Oman</option>
                                            <option value="PK">Pakistan</option>
                                            <option value="PW">Palau</option>
                                            <option value="PS">Palestinian Territory, Occupied</option>
                                            <option value="PA">Panama</option>
                                            <option value="PG">Papua New Guinea</option>
                                            <option value="PY">Paraguay</option>
                                            <option value="PE">Peru</option>
                                            <option value="PH">Philippines</option>
                                            <option value="PN">Pitcairn</option>
                                            <option value="PL">Poland</option>
                                            <option value="PT">Portugal</option>
                                            <option value="PR">Puerto Rico</option>
                                            <option value="QA">Qatar</option>
                                            <option value="RE">Reunion</option>
                                            <option value="RO">Romania</option>
                                            <option value="RU">Russian Federation</option>
                                            <option value="RW">Rwanda</option>
                                            <option value="BL">Saint Barthelemy</option>
                                            <option value="SH">Saint Helena</option>
                                            <option value="KN">Saint Kitts And Nevis</option>
                                            <option value="LC">Saint Lucia</option>
                                            <option value="MF">Saint Martin</option>
                                            <option value="PM">Saint Pierre And Miquelon</option>
                                            <option value="VC">Saint Vincent And Grenadines</option>
                                            <option value="WS">Samoa</option>
                                            <option value="SM">San Marino</option>
                                            <option value="ST">Sao Tome And Principe</option>
                                            <option value="SA">Saudi Arabia</option>
                                            <option value="SN">Senegal</option>
                                            <option value="RS">Serbia</option>
                                            <option value="SC">Seychelles</option>
                                            <option value="SL">Sierra Leone</option>
                                            <option value="SG">Singapore</option>
                                            <option value="SK">Slovakia</option>
                                            <option value="SI">Slovenia</option>
                                            <option value="SB">Solomon Islands</option>
                                            <option value="SO">Somalia</option>
                                            <option value="ZA">South Africa</option>
                                            <option value="GS">South Georgia And Sandwich Isl.</option>
                                            <option value="ES">Spain</option>
                                            <option value="LK">Sri Lanka</option>
                                            <option value="SD">Sudan</option>
                                            <option value="SR">Suriname</option>
                                            <option value="SJ">Svalbard And Jan Mayen</option>
                                            <option value="SZ">Swaziland</option>
                                            <option value="SE">Sweden</option>
                                            <option value="CH">Switzerland</option>
                                            <option value="SY">Syrian Arab Republic</option>
                                            <option value="TW">Taiwan</option>
                                            <option value="TJ">Tajikistan</option>
                                            <option value="TZ">Tanzania</option>
                                            <option value="TH">Thailand</option>
                                            <option value="TL">Timor-Leste</option>
                                            <option value="TG">Togo</option>
                                            <option value="TK">Tokelau</option>
                                            <option value="TO">Tonga</option>
                                            <option value="TT">Trinidad And Tobago</option>
                                            <option value="TN">Tunisia</option>
                                            <option value="TR">Turkey</option>
                                            <option value="TM">Turkmenistan</option>
                                            <option value="TC">Turks And Caicos Islands</option>
                                            <option value="TV">Tuvalu</option>
                                            <option value="UG">Uganda</option>
                                            <option value="UA">Ukraine</option>
                                            <option value="AE">United Arab Emirates</option>
                                            <option value="GB">United Kingdom</option>
                                            <option value="US">United States</option>
                                            <option value="UM">United States Outlying Islands</option>
                                            <option value="UY">Uruguay</option>
                                            <option value="UZ">Uzbekistan</option>
                                            <option value="VU">Vanuatu</option>
                                            <option value="VE">Venezuela</option>
                                            <option value="VN">Viet Nam</option>
                                            <option value="VG">Virgin Islands, British</option>
                                            <option value="VI">Virgin Islands, U.S.</option>
                                            <option value="WF">Wallis And Futuna</option>
                                            <option value="EH">Western Sahara</option>
                                            <option value="YE">Yemen</option>
                                            <option value="ZM">Zambia</option>
                                            <option value="ZW">Zimbabwe</option>
                                    </select>
                <label class="lh-1 text-14 text-light-1">Country <span class="required">*</span></label>
            </div>
            <span class="invalid-feedback error error-country"></span>
        </div>
        <div class="col-12">
            <div class="form-input">
                <input type="password" name="password" autocomplete="off">
                <label class="lh-1 text-14 text-light-1">Password</label>
            </div>
            <span class="invalid-feedback error error-password"></span>
        </div>
        <div class="col-12">
            <div class="d-flex">
                <div class="form-checkbox" style="margin-top: 3px">
                    <input type="checkbox" name="term" id="register-term">
                    <div class="form-checkbox__mark">
                        <div class="form-checkbox__icon icon-check"></div>
                    </div>
                </div>
                <label class="text-15 lh-15 text-light-1 ml-10" for="register-term">I have read and accept the Terms and Privacy Policy?</label>
            </div>
            <span class="invalid-feedback error error-term"></span>
        </div>
                <div class="error message-error invalid-feedback"></div>

        <div class="col-12">
            <button type="submit" class="button py-20 -dark-1 bg-blue-1 text-white w-100">
                Sign Up <div class="icon-arrow-top-right ml-15"></div>
            </button>
        </div>
    </div>
            <div class="row y-gap-20 pt-30">
            <div class="col-12">
                <div class="text-center">or sign in with</div>
            </div>
                                        <a href="https://www.xtremerepublic.com/social-login/google" class="button col-12 -outline-red-1 text-red-1 py-15 rounded-8 mt-15">
                    <i class="fa fa-google text-15 mr-10"></i> Login with Google
                </a>
                                </div>
    </form>
            </div>
        </div>
    </div>
</div>
<!-- Custom script for all pages -->
<script src="https://www.xtremerepublic.com/libs/lodash.min.js"></script>
<script src="https://www.xtremerepublic.com/libs/jquery-3.6.3.min.js"></script>
<script src="https://www.xtremerepublic.com/libs/vue/vue.min.js"></script>
<script type="text/javascript" src="https://www.xtremerepublic.com/themes/gotrip/libs/bs/js/bootstrap.bundle.min.js"></script>
<script src="https://www.xtremerepublic.com/libs/bootbox/bootbox.min.js"></script>
<script type="text/javascript" src="https://www.xtremerepublic.com/themes/gotrip/js/vendors.js"></script>
<script type="text/javascript" src="https://www.xtremerepublic.com/themes/gotrip/js/main.js?_ver=3.7.0-select2hydrate"></script>
<script type="text/javascript" src="https://www.xtremerepublic.com/themes/gotrip/js/luxury-gallery.js?_ver=3.7.0-select2hydrate"></script>


<script src="https://www.xtremerepublic.com/libs/carousel-2/owl.carousel.min.js"></script>
<script type="text/javascript" src="https://www.xtremerepublic.com/libs/daterange/moment.min.js"></script>
<script type="text/javascript" src="https://www.xtremerepublic.com/libs/daterange/daterangepicker.min.js"></script>
<script src="https://www.xtremerepublic.com/libs/select2/js/select2.min.js"></script>
<script defer src="https://www.xtremerepublic.com/libs/cookie-consent/cookieconsent.js"></script>
<script>
    window.addEventListener('load', function () {

        // obtain plugin
        var cc = initCookieConsent();

        // run plugin with your configuration
        cc.run({
            current_lang: 'en_GB',
            autoclear_cookies: true,                   // default: false
            page_scripts: true,                        // default: false

            onFirstAction: function (user_preferences, cookie) {
                // callback triggered only once on the first accept/reject action
            },

            onAccept: function (cookie) {
                // callback triggered on the first accept/reject action, and after each page load
            },

            onChange: function (cookie, changed_categories) {
                // callback triggered when user changes preferences after consent has already been given
            },

            languages: {
                'en_GB': {
                    consent_modal: {
                        title: 'We use cookies!',
                        description: '',
                        primary_btn: {
                            text: 'Accept all',
                            role: 'Accept all', // 'accept_selected' or 'accept_all'
                        },
                        secondary_btn: {
                            text: 'Settings',
                            role: 'Settings', // 'settings' or 'accept_necessary'
                        }
                    },
                    settings_modal: {
                        title: 'Cookie preferences',
                        save_settings_btn: 'Save settings',
                        accept_all_btn: 'Accept All',
                        reject_all_btn: 'Reject All',
                        close_btn_label: 'Close',
                        blocks: [{"title":"Cookie usage","description":"We use cookies to ensure the basic functionality of the website and to enhance your online experience. You can choose for each category to opt-in\/out whenever you want. For more details relative to cookies and other sensitive data, please read the full <a href=\"https:\/\/www.xtremerepublic.com\/page\/privacy-policy\" class=\"cc-link\">privacy policy<\/a>."},{"title":"Strictly necessary cookies","description":"These cookies are essential for the proper functioning of the website. Without these cookies, the website would not work properly.","toggle":{"value":"necessary","enabled":true,"readonly":true}},{"title":"Performance and analytics cookies","description":"These cookies allow the website to remember the choices you have made in the past and to measure performance to help us improve the site.","toggle":{"value":"analytics","enabled":false,"readonly":false}},{"title":"Advertisement and targeting cookies","description":"These cookies collect information about how you use the website, which pages you visited and which links you clicked on. All of the data is anonymized and cannot be used to identify you.","toggle":{"value":"targeting","enabled":false,"readonly":false}},{"title":"More information","description":"For any queries in relation to our policy on cookies and your choices, please <a class=\"cc-link\" href=\"https:\/\/www.xtremerepublic.com\/contact\">contact us<\/a>."}]
                    }
                }
            }
        });
    });
</script>



<script src="https://www.xtremerepublic.com/themes/gotrip/dist/frontend/js/gotrip.js?_ver=3.7.0-select2hydrate"></script>
<script>
// Override gotrip.js login AJAX - run once after gotrip.js loads synchronously
(function() {
    if (typeof jQuery === 'undefined') return;
    var $ = jQuery;
    $('.bravo-theme-gotrip-login-form [type=submit]').off('click');
    $(document).off('click', '.bravo-theme-gotrip-login-form [type=submit]');
    $('.bravo-theme-gotrip-login-form').off('submit').on('submit', function() {
        var $form = $(this), $btn = $form.find('[type=submit]');
        var csrfToken = $('meta[name="csrf-token"]').attr('content');
        if (csrfToken && !$form.find('input[name="_token"]').length) {
            $form.append('<input type="hidden" name="_token" value="' + csrfToken + '">');
        }
        $btn.prop('disabled', true);
        $btn.find('.icon-arrow-top-right').hide();
        $btn.find('.icon-loading').removeClass('d-none');
    });
})();
</script>


<script>
// Add Vue methods BEFORE Vue initializes
(function() {
    if (typeof Vue !== 'undefined' && Vue.prototype) {
        if (!Vue.prototype.$formatNumber) {
            Vue.prototype.$formatNumber = function(num) {
                if (!num) return '0';
                return new Intl.NumberFormat('en-US', {
                    minimumFractionDigits: 0,
                    maximumFractionDigits: 2
                }).format(num);
            };
        }
    }

    if (typeof Vue !== 'undefined' && Vue.filter) {
        Vue.filter('capitalize', function(value) {
            if (!value) return '';
            value = value.toString();
            return value.charAt(0).toUpperCase() + value.slice(1);
        });
    }

            
            })();
</script>
<script>
// Initialize Vue methods for simplified booking form - ONLY for enhanced pricing tours
(function() {
    // Check if this is an enhanced pricing tour (has Vue app)
    var vueAppElement = document.getElementById('bravo_tour_book_app');
    if (!vueAppElement) {
        return; // Exit early for basic pricing tours
    }
    
    // Wait for Vue app to be ready
    function initBookingFormMethods() {
        var vueApp = document.getElementById('bravo_tour_book_app');
        if (!vueApp) {
            return; // Stop trying if element doesn't exist
        }
        
        if (!vueApp.__vue__) {
            setTimeout(initBookingFormMethods, 100);
            return;
        }

        var vm = vueApp.__vue__;

        // Fallback when cached single-tour.js predates checkoutTotal computed (prevents render crash)
        function resolveCheckoutTotal(instance) {
            void instance._packageSelectionTick;
            // Prefer the canonical computed subtotal (= total_price) since it's
            // what the UI displays and reflects live watcher updates (e.g. when
            // guest count changes after the pricing widget pre-filled the form).
            // _effective_subtotal / frontend_subtotal can be stale in that case.
            var sub = parseFloat(instance.subtotal) || 0;
            if (sub > 0) return sub;
            var explicit = parseFloat(instance._effective_subtotal) || 0;
            if (explicit > 0) return explicit;
            var frontend = parseFloat(instance.frontend_subtotal) || 0;
            if (frontend > 0) return frontend;
            var calculated = instance.calculated_price && (instance.calculated_price.total || instance.calculated_price.base_total);
            calculated = parseFloat(calculated) || 0;
            if (calculated > 0) return calculated;
            var pkg = instance.selectedPackage;
            if (pkg && pkg.pricing) {
                var pkgSub = parseFloat(pkg.pricing.subtotal || 0);
                if (pkgSub > 0) return pkgSub;
            }
            if (pkg) {
                var pkgPrice = parseFloat(pkg.price || 0);
                if (pkgPrice > 0) return pkgPrice;
            }
            return 0;
        }

        if (!vm.$options.computed || typeof vm.$options.computed.checkoutTotal !== 'function') {
            Object.defineProperty(vm, 'checkoutTotal', {
                configurable: true,
                enumerable: true,
                get: function () { return resolveCheckoutTotal(vm); }
            });
            Object.defineProperty(vm, 'effective_subtotal', {
                configurable: true,
                enumerable: true,
                get: function () { return resolveCheckoutTotal(vm); }
            });
            Object.defineProperty(vm, 'canProceedToCheckout', {
                configurable: true,
                enumerable: true,
                get: function () {
                    if (resolveCheckoutTotal(vm) > 0) return true;
                    if (vm.edit_booking_mode && vm.editing_booking_code) {
                        var hasStructure = vm.selected_structure_id || (vm.selectedPackage && vm.selectedPackage.id);
                        if (!hasStructure) return false;
                        var editTotal = (window.tourEditBooking && parseFloat(window.tourEditBooking.booking_total)) || 0;
                        return editTotal > 0 || !!vm.start_date;
                    }
                    return false;
                }
            });
            Object.defineProperty(vm, 'proceedButtonStyle', {
                configurable: true,
                enumerable: true,
                get: function () {
                    var can = vm.canProceedToCheckout;
                    return can ? {} : { opacity: 0.4, cursor: 'not-allowed' };
                }
            });
        }

        // Add missing data properties
        if (!vm.priceBreakdown) vm.priceBreakdown = [];
        // Note: subtotal is a computed property, don't set it directly
        // It will automatically update when total_price changes

        // Add method to update extra items total (legacy support)
        vm.updateExtraItemsTotal = function() {
            // Extra services are now handled in pricing structures
            // This method is kept for compatibility but does nothing
        };

    }

    function bindCheckoutFallback() {
        var app = document.getElementById('bravo_tour_book_app');
        var btn = document.getElementById('proceed-checkout-btn');
        if (!app || !app.__vue__ || !btn || btn.__nativeCheckoutBound) return;

        var checkoutVm = app.__vue__;
        btn.__nativeCheckoutBound = true;
        btn.addEventListener('click', function (e) {
            e.preventDefault();
            e.stopPropagation();
            if (typeof checkoutVm.canProceedToCheckout !== 'undefined' && !checkoutVm.canProceedToCheckout) {
                return;
            }
            if (btn.disabled && !(checkoutVm.edit_booking_mode && checkoutVm.editing_booking_code)) {
                return;
            }
            if (typeof checkoutVm.proceedToCheckout === 'function') {
                checkoutVm.proceedToCheckout();
            }
        }, true);
    }

    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', function() {
            initBookingFormMethods();
            bindCheckoutFallback();
        });
    } else {
        initBookingFormMethods();
        bindCheckoutFallback();
    }
})();
</script>
    <script src="https://www.xtremerepublic.com/js/tour-enquiry-modal.js?v=3.7.0-select2hydrate"></script>
    <script src='https://www.xtremerepublic.com/libs/leaflet1.4.0/leaflet.js'></script><link rel='stylesheet' href='https://www.xtremerepublic.com/libs/leaflet1.4.0/leaflet.css'><script src='https://www.xtremerepublic.com/module/core/js/map-engine.js?_ver=3.4.2'></script>
    
    <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
    <script src="https://www.xtremerepublic.com/js/animated-route-map.js?v=1782398844"></script>
    <script src="https://www.xtremerepublic.com/js/tour-pricing-date-integration.js?v=1782398844"></script>
    <script src="https://www.xtremerepublic.com/js/fix-fixed-date-booking.js?v=1782398844"></script>
    <script src="https://www.xtremerepublic.com/themes/gotrip/js/tour-pricing-enhanced.js?v=1782398844"></script>
    <script src="https://www.xtremerepublic.com/themes/gotrip/js/unified-pricing-handler.js?v=1782398844"></script>
    <script src="https://www.xtremerepublic.com/themes/gotrip/js/group-joining-pricing.js?v=1782398844"></script>
    <script src="https://www.xtremerepublic.com/themes/gotrip/js/premium-stepper.js?v=1782398844"></script>
    <!-- Tour Data for Enhanced Booking Handler -->
    <script>
        // Global tour data for enhanced booking functionality
        window.tourId = 2327;
        window.tourDuration = 24;
        window.tourMaxPeople = 10;
        window.tourMinPeople = 1;
        
        // Seasonal pricing data for all structures
        window.seasonalPricing = {};
                                                
    </script>
    
    <!-- Fixed Date Tour Data -->
    <script>
        
    // Set fixed date tour data
    window.tourIsFixedDate = false;
    window.tourFixedDates = [];
    </script>
    
    <!-- Initialize Pricing-Date Integration -->
    <script>
    // Wait for jQuery to be available
    (function checkJQuery() {
        if (typeof jQuery !== 'undefined') {
            jQuery(document).ready(function($) {
                // Initialize the pricing-date integration
                if (window.TourPricingDateIntegration && typeof window.TourPricingDateIntegration.init === 'function') {
                    window.TourPricingDateIntegration.init(2327);
                }
            });
        } else {
            // jQuery not loaded yet, try again in 50ms
            setTimeout(checkJQuery, 50);
        }
    })();
    </script>
    
    <!-- Leaflet Loading Fallback -->
    <script>
    (function() {
        'use strict';
        
        // Ensure Leaflet is loaded with fallback mechanism
        window.ensureLeafletLoaded = function(callback) {
            if (typeof L !== 'undefined' && typeof L.map !== 'undefined') {
                callback();
                return;
            }
            
            
            // Try to load Leaflet from CDN if local version fails
            var leafletJsLoaded = false;
            var leafletCssLoaded = false;
            
            // Named function to avoid any potential arguments.callee issues
            function checkBothLoaded() {
                if (leafletJsLoaded && leafletCssLoaded) {
                    callback();
                }
            }
            
            // Load Leaflet CSS
            var leafletCss = document.createElement('link');
            leafletCss.rel = 'stylesheet';
            leafletCss.href = 'https://unpkg.com/leaflet@1.4.0/dist/leaflet.css';
            leafletCss.onload = function() {
                leafletCssLoaded = true;
                checkBothLoaded();
            };
            leafletCss.onerror = function() {
            };
            document.head.appendChild(leafletCss);
            
            // Load Leaflet JS
            var leafletJs = document.createElement('script');
            leafletJs.type = 'text/javascript';
            leafletJs.src = 'https://unpkg.com/leaflet@1.4.0/dist/leaflet.js';
            leafletJs.onload = function() {
                leafletJsLoaded = true;
                checkBothLoaded();
            };
            leafletJs.onerror = function() {
            };
            document.head.appendChild(leafletJs);
        };
    })();
    </script>
    
    <script>
        // Wait for jQuery to be available
        (function() {
            function initMapScript() {
                if (typeof jQuery === 'undefined' || typeof $ === 'undefined') {
                    setTimeout(initMapScript, 50);
                    return;
                }
                
                jQuery(function ($) {
                    // Delay map initialization to ensure containers are loaded
                    setTimeout(function() {
                                
                // Ensure Leaflet is loaded before initializing maps
                ensureLeafletLoaded(function() {
                
                // Get tour route locations
                var tourLocations = [];
                                                    tourLocations.push({
                        lat: -0.8972315786912123,
                        lng: 36.51647894485638,
                        name: "Kenton Hill"
                    });
                                    tourLocations.push({
                        lat: -1.3056292531147642,
                        lng: 36.81775208817034,
                        name: "Nairobi"
                    });
                                
                // Check if tour-detail.blade.php is handling map initialization
                // If drawRouteOnMap exists, let it handle the routes
                var tourDetailHandlesMap = typeof drawRouteOnMap !== 'undefined';
                var mapAlreadyInitialized = false;
                
                // Check if map containers already have Leaflet instances or are in mapInstances
                if (typeof L !== 'undefined') {
                    var desktopMapEl = document.getElementById('map_content');
                    var mobileMapEl = document.getElementById('map_content_mobile');
                    if (desktopMapEl && desktopMapEl._leaflet_id) {
                        mapAlreadyInitialized = true;
                    }
                    if (mobileMapEl && mobileMapEl._leaflet_id) {
                        mapAlreadyInitialized = true;
                    }
                }
                
                // Also check mapInstances
                if (typeof mapInstances !== 'undefined') {
                    if (mapInstances['map_content'] || mapInstances['map_content_mobile']) {
                        mapAlreadyInitialized = true;
                    }
                }
                
                if (tourDetailHandlesMap || mapAlreadyInitialized) {
                    // Don't initialize maps here, exit early
                    return;
                } else {
                }
                
                // Initialize desktop map only if tour-detail isn't handling it
                if ($('#map_content').length) {
                    new BravoMapEngine('map_content', {
                        disableScripts: true,
                        fitBounds: true,
                        center: [-1.3056292531147642, 36.81775208817034],
                        zoom:2,
                        ready: function (engineMap) {
                            // Store map engine reference
                            storeMapEngine('map_content', engineMap);
                            
                            // Add main tour marker
                            engineMap.addMarker([-1.3056292531147642, 36.81775208817034], {
                                icon_options: {
                                    iconUrl:"https://www.xtremerepublic.com/images/icons/png/pin.png"
                                }
                            });
                            
                            // Add animated route if locations exist
                            if (tourLocations.length > 1) {
                                var routeCoordinates = tourLocations.map(function(loc) {
                                    return [loc.lat, loc.lng];
                                });
                                var routePointNames = tourLocations.map(function(loc) {
                                    return loc.name || '';
                                });
                                
                                // Function to initialize animated route
                                function initAnimatedRoute() {
                                    var leafletMap = engineMap.map;
                                    
                                    // Create animated route (SafariBookings style)
                                    if (typeof AnimatedRouteMap !== 'undefined' && leafletMap && typeof L !== 'undefined') {
                                        try {
                                            var animatedRoute = new AnimatedRouteMap(leafletMap, routeCoordinates, {
                                                duration: Math.max(4000, routeCoordinates.length * 600),
                                                color: '#007bff',
                                                weight: 4,
                                                opacity: 0.8,
                                                showMarker: true,
                                                autoPlay: true,
                                                pointNames: routePointNames,
                                                labelProximityMeters: 800
                                            });
                                            
                                            // Store route for scroll-triggered animation
                                            window.desktopAnimatedRoute = animatedRoute;
                                        } catch(e) {
                                            // Fallback to static
                                            var polyline = engineMap.addPolyline(routeCoordinates, {
                                                color: '#007bff',
                                                weight: 4,
                                                opacity: 0.8
                                            });
                                            storeRouteData('map_content', routeCoordinates, polyline);
                                        }
                                    } else {
                                        // Fallback to static polyline if animation not available
                                var polyline = engineMap.addPolyline(routeCoordinates, {
                                    color: '#007bff',
                                    weight: 4,
                                    opacity: 0.8
                                });
                                storeRouteData('map_content', routeCoordinates, polyline);
                                    }
                                }
                                
                                // Wait for map to be fully ready
                                var attempts = 0;
                                var maxAttempts = 10;
                                function tryInitRoute() {
                                    attempts++;
                                    if (typeof AnimatedRouteMap !== 'undefined' && engineMap && engineMap.map) {
                                        initAnimatedRoute();
                                    } else if (attempts < maxAttempts) {
                                        setTimeout(tryInitRoute, 200);
                                    } else {
                                        initAnimatedRoute(); // Try anyway
                                    }
                                }
                                setTimeout(tryInitRoute, 500);
                                
                                // Add markers for each route location
                                tourLocations.forEach(function(location, index) {
                                    engineMap.addMarker([location.lat, location.lng], {
                                        icon_options: {
                                            iconUrl: "https://www.xtremerepublic.com/images/icons/png/route-pin.png",
                                            iconSize: [25, 41],
                                            iconAnchor: [12, 41]
                                        },
                                        title: location.name + ' (Stop ' + (index + 1) + ')'
                                    });
                                });
                                
                                // Don't fit bounds after animation - zoom is already set at initialization
                            }
                        }
                    });
                }
                
                // Initialize mobile map only if tour-detail isn't handling it
                if ($('#map_content_mobile').length) {
                    new BravoMapEngine('map_content_mobile', {
                        disableScripts: true,
                        fitBounds: true,
                        center: [-1.3056292531147642, 36.81775208817034],
                        zoom:2,
                        ready: function (engineMap) {
                            // Store map engine reference
                            storeMapEngine('map_content_mobile', engineMap);
                            
                            // Add main tour marker
                            engineMap.addMarker([-1.3056292531147642, 36.81775208817034], {
                                icon_options: {
                                    iconUrl:"https://www.xtremerepublic.com/images/icons/png/pin.png"
                                }
                            });
                            
                            // Add animated route if locations exist
                            if (tourLocations.length > 1) {
                                var routeCoordinates = tourLocations.map(function(loc) {
                                    return [loc.lat, loc.lng];
                                });
                                var routePointNames = tourLocations.map(function(loc) {
                                    return loc.name || '';
                                });
                                
                                // Function to initialize animated route
                                function initAnimatedRouteMobile() {
                                    var leafletMap = engineMap.map;
                                    
                                    // Create animated route (SafariBookings style)
                                    if (typeof AnimatedRouteMap !== 'undefined' && leafletMap && typeof L !== 'undefined' && L.map) {
                                        try {
                                            var animatedRoute = new AnimatedRouteMap(leafletMap, routeCoordinates, {
                                                duration: 4000,
                                                color: '#007bff',
                                                weight: 4,
                                                opacity: 0.8,
                                                showMarker: true,
                                                autoPlay: true,
                                                pointNames: routePointNames,
                                                labelProximityMeters: 800
                                            });
                                            
                                            // Store route for scroll-triggered animation
                                            window.mobileAnimatedRoute = animatedRoute;
                                        } catch(e) {
                                            // Fallback to static
                                            var polyline = engineMap.addPolyline(routeCoordinates, {
                                                color: '#007bff',
                                                weight: 4,
                                                opacity: 0.8
                                            });
                                            storeRouteData('map_content_mobile', routeCoordinates, polyline);
                                        }
                                    } else {
                                        // Fallback to static polyline if animation not available
                                var polyline = engineMap.addPolyline(routeCoordinates, {
                                    color: '#007bff',
                                    weight: 4,
                                    opacity: 0.8
                                });
                                        storeRouteData('map_content_mobile', routeCoordinates, polyline);
                                    }
                                }
                                
                                // Wait for map to be fully ready
                                setTimeout(initAnimatedRouteMobile, 500);
                                
                                // Add markers for each route location
                                tourLocations.forEach(function(location, index) {
                                    engineMap.addMarker([location.lat, location.lng], {
                                        icon_options: {
                                            iconUrl: "https://www.xtremerepublic.com/images/icons/png/route-pin.png",
                                            iconSize: [25, 41],
                                            iconAnchor: [12, 41]
                                        },
                                        title: location.name + ' (Stop ' + (index + 1) + ')'
                                    });
                                });
                                
                                // Don't fit bounds after animation - zoom is already set at initialization
                            }
                        }
                    });
                }
                }); // Close ensureLeafletLoaded callback
                                    }, 500); // 500ms delay
                }); // Close jQuery function
            }
            initMapScript();
        })();
    </script>
    
    <!-- Scroll-triggered Animation -->
    <script>
        (function() {
            var scrollObservers = {};
            var hasAnimated = {};
            
            function setupScrollTriggeredAnimation() {
                var mapContainers = ['map_content', 'map_content_mobile'];
                
                mapContainers.forEach(function(mapId) {
                    // Skip if already set up
                    if (scrollObservers[mapId]) {
                        return;
                    }
                    
                    var mapElement = document.getElementById(mapId);
                    if (!mapElement) {
                        return;
                    }
                    
                    // Create intersection observer to detect when map is visible
                    var observer = new IntersectionObserver(function(entries) {
                        entries.forEach(function(entry) {
                            if (entry.isIntersecting && !hasAnimated[mapId]) {
                                // Map is now visible - find and start animation
                                // Check multiple possible locations for the animated route
                                var animatedRoute = null;
                                
                                // Try primary location first
                                var routeKey = mapId === 'map_content' ? 'desktopAnimatedRoute' : 'mobileAnimatedRoute';
                                animatedRoute = window[routeKey];
                                
                                // Fallback to tour-detail.blade.php pattern
                                if (!animatedRoute) {
                                    animatedRoute = window['animatedRoute_' + mapId];
                                }
                                
                                if (animatedRoute) {
                                    if (!animatedRoute.isPlaying) {
                                        hasAnimated[mapId] = true;
                                        
                                        // Small delay to ensure map is fully rendered
                                        setTimeout(function() {
                                            if (animatedRoute && typeof animatedRoute.play === 'function') {
                                                animatedRoute.play();
                                            }
                                        }, 300);
                                        
                                        // Stop observing after animation starts
                                        observer.unobserve(entry.target);
                                    } else {
                                        observer.unobserve(entry.target);
                                    }
                                } else if (!animatedRoute) {
                                    // Route not ready yet, keep observing (will check again on next scroll)
                                    // Also retry after a delay in case route is being created
                                    setTimeout(function() {
                                        if (!hasAnimated[mapId]) {
                                            var retryRoute = window[routeKey] || window['animatedRoute_' + mapId];
                                            if (retryRoute && !retryRoute.isPlaying && entry.isIntersecting) {
                                                hasAnimated[mapId] = true;
                                                setTimeout(function() {
                                                    if (retryRoute && typeof retryRoute.play === 'function' && !retryRoute.isPlaying) {
                                                        retryRoute.play();
                                                    }
                                                }, 300);
                                                observer.unobserve(entry.target);
                                            }
                                        }
                                    }, 1000);
                                }
                            }
                        });
                    }, {
                        threshold: 0.3, // Trigger when 30% of map is visible
                        rootMargin: '0px'
                    });
                    
                    // Store observer and start observing
                    scrollObservers[mapId] = observer;
                    observer.observe(mapElement);
                });
            }
            
            // Setup scroll trigger after a short delay to ensure maps are initialized
            // Retry multiple times in case routes are initialized later
            setTimeout(setupScrollTriggeredAnimation, 1000);
            setTimeout(setupScrollTriggeredAnimation, 2000);
            setTimeout(setupScrollTriggeredAnimation, 3000);
        })();
    </script>
    
    <!-- Map Control Functions -->
    <script>
        var desktopMapEngine = null;
        var mobileMapEngine = null;
        var desktopRoutePolyline = null;
        var mobileRoutePolyline = null;
        var desktopRouteCoordinates = [];
        var mobileRouteCoordinates = [];
        
        // Store map engines and route data when maps are initialized
        function storeMapEngine(engineId, engine) {
            if (engineId === 'map_content') {
                desktopMapEngine = engine;
            } else if (engineId === 'map_content_mobile') {
                mobileMapEngine = engine;
            }
        }
        
        function storeRouteData(engineId, coordinates, polyline) {
            if (engineId === 'map_content') {
                desktopRouteCoordinates = coordinates;
                desktopRoutePolyline = polyline;
            } else if (engineId === 'map_content_mobile') {
                mobileRouteCoordinates = coordinates;
                mobileRoutePolyline = polyline;
            }
        }
        
        // Desktop map control functions
        function fitRouteBounds() {
            if (desktopMapEngine && desktopRouteCoordinates.length > 0) {
                desktopMapEngine.fitBounds(desktopRouteCoordinates);
            }
        }
        
        function toggleRouteVisibility() {
            if (desktopRoutePolyline) {
                if (desktopRoutePolyline.setStyle) {
                    // Leaflet (OSM)
                    var currentOpacity = desktopRoutePolyline.options.opacity;
                    desktopRoutePolyline.setStyle({ opacity: currentOpacity > 0 ? 0 : 0.8 });
                } else if (desktopRoutePolyline.setOptions) {
                    // Google Maps
                    var currentOpacity = desktopRoutePolyline.get('strokeOpacity');
                    desktopRoutePolyline.setOptions({ strokeOpacity: currentOpacity > 0 ? 0 : 0.8 });
                }
            }
        }
        
        // Mobile map control functions
        function fitRouteBoundsMobile() {
            if (mobileMapEngine && mobileRouteCoordinates.length > 0) {
                mobileMapEngine.fitBounds(mobileRouteCoordinates);
            }
        }
        
        function toggleRouteVisibilityMobile() {
            if (mobileRoutePolyline) {
                if (mobileRoutePolyline.setStyle) {
                    // Leaflet (OSM)
                    var currentOpacity = mobileRoutePolyline.options.opacity;
                    mobileRoutePolyline.setStyle({ opacity: currentOpacity > 0 ? 0 : 0.8 });
                } else if (mobileRoutePolyline.setOptions) {
                    // Google Maps
                    var currentOpacity = mobileRoutePolyline.get('strokeOpacity');
                    mobileRoutePolyline.setOptions({ strokeOpacity: currentOpacity > 0 ? 0 : 0.8 });
                }
            }
        }
    </script>
    
    <script>
        // Global error handler for debugging
        window.addEventListener('error', function(event) {
        });

        // Essential page ready handler
        document.addEventListener('DOMContentLoaded', function() {
            setTimeout(function() {
                const vueApp = document.getElementById('bravo_tour_book_app');
            }, 1000);
        });

        var bravo_booking_data = {"id":2327,"person_types":[],"max":0,"open_hours":{"1":{"enable":"1","from":"07:00","to":"10:00"},"2":{"enable":"1","from":"07:00","to":"10:00"},"3":{"enable":"1","from":"07:00","to":"10:00"},"4":{"enable":"1","from":"07:00","to":"10:00"},"5":{"enable":"1","from":"07:00","to":"10:00"},"6":{"enable":"1","from":"07:00","to":"10:00"},"7":{"enable":"1","from":"07:00","to":"10:00"}},"extra_price":[],"minDate":"06\/25\/2026","duration":24,"buyer_fees":[],"start_date":"","start_date_html":"Please select date!","end_date":"","end_date_html":"","deposit":true,"deposit_type":"percent","deposit_amount":"50.00","deposit_fomular":"default","is_form_enquiry_and_book":true,"enquiry_type":"book","is_fixed_date":false,"currency":"USD","currency_symbol":"$","currency_format":"left","currency_decimal":".","currency_thousand":",","currency_no_decimal":"0","discount_by_people":null,"package_validity_start":null,"package_validity_end":null,"package_inclusions":[],"package_exclusions":[],"resident_pricing_enabled":false,"child_pricing_enabled":false}
        var bravo_booking_i18n = {
                no_date_select:'Please select Start and End date',
                no_guest_select:'Please select at least one guest',
                load_dates_url:'https://www.xtremerepublic.com/user/tour/availability/loadDates',
                name_required:'Name is Required',
                email_required:'Email is Required',
            };
        
        // Essential pricing functions - always available
        function selectPricingPackageRequiringDate(button, event) {
            event.preventDefault();
            event.stopPropagation();

            const structureId = button.getAttribute('data-structure-id');
            const structureName = button.getAttribute('data-structure-name');
            const structureKey = button.getAttribute('data-structure-key');

            // Get Vue app
            const vueApp = document.getElementById('bravo_tour_book_app');
            if (!vueApp || !vueApp.__vue__) {
                alert('Booking form not ready. Please refresh the page.');
                return;
            }

            const vm = vueApp.__vue__;

            // Get selection data from pricing accordion
            let selectionData = null;
            if (window.pricingSelector && window.pricingSelector.selections && window.pricingSelector.selections[structureId]) {
                selectionData = window.pricingSelector.selections[structureId];
            }

            // Set package info immediately
            vm.$set(vm, 'selectedPackage', {
                id: structureId,
                name: structureName,
                type: structureKey
            });
            vm.$set(vm, 'isPreFilled', true);

            // Get guest counts from selection data
            let residentAdults = 0;
            let residentChildren = 0;
            let nonResidentAdults = 0;
            let nonResidentChildren = 0;
            let totalGuests = 0;

            if (selectionData && selectionData.selections) {
                const sel = selectionData.selections;
                
                // For occupancy tiers, the guest count is stored as a single 'guests' value
                // The breakdown by resident/non-resident is calculated on the backend
                totalGuests = parseInt(sel.guests) || 0;
                
                // Try to get individual breakdowns if available
                residentAdults = parseInt(sel[`res_adults_${structureId}`]) || parseInt(sel.resident_adults) || 0;
                residentChildren = parseInt(sel[`res_children_${structureId}`]) || parseInt(sel.resident_children) || 0;
                nonResidentAdults = parseInt(sel[`nonres_adults_${structureId}`]) || parseInt(sel.nonresident_adults) || parseInt(sel.non_resident_adults) || 0;
                nonResidentChildren = parseInt(sel[`nonres_children_${structureId}`]) || parseInt(sel.nonresident_children) || parseInt(sel.non_resident_children) || 0;
                
                // If no breakdown available, assume all are resident adults (for display purposes)
                if (totalGuests > 0 && (residentAdults + residentChildren + nonResidentAdults + nonResidentChildren) === 0) {
                    residentAdults = totalGuests;
                }
            }

            // Set guest counts in Vue (ensure properties exist first for non-standard properties)
            if (typeof vm.resident_adults === 'undefined') vm.$set(vm, 'resident_adults', 0);
            if (typeof vm.resident_children === 'undefined') vm.$set(vm, 'resident_children', 0);
            if (typeof vm.nonresident_adults === 'undefined') vm.$set(vm, 'nonresident_adults', 0);
            if (typeof vm.nonresident_children === 'undefined') vm.$set(vm, 'nonresident_children', 0);
            if (typeof vm.group_size === 'undefined') vm.$set(vm, 'group_size', 0);
            
            // Now set the actual values
            vm.resident_adults = residentAdults;
            vm.resident_children = residentChildren;
            vm.nonresident_adults = nonResidentAdults;
            vm.nonresident_children = nonResidentChildren;
            vm.adults = totalGuests;  // This is now in initial data, no need for $set
            vm.guests = totalGuests;
            vm.group_size = totalGuests;

            // Set pricing data
            if (selectionData) {
                if (selectionData.total) {
                    if (typeof vm.calculated_price === 'undefined') {
                        vm.$set(vm, 'calculated_price', {
                            total: selectionData.total,
                            total_guests: totalGuests,
                            breakdown: selectionData.breakdown || []
                        });
                    } else {
                        vm.calculated_price = {
                            total: selectionData.total,
                            total_guests: totalGuests,
                            breakdown: selectionData.breakdown || []
                        };
                    }
                }
                
                if (selectionData.currency) {
                    vm.$set(vm, 'total_price_currency', selectionData.currency);
                }
            }

            // Scroll to booking form
            const bookingForm = document.querySelector('.bravo_single_book_wrap');
            if (bookingForm) {
                bookingForm.scrollIntoView({ behavior: 'smooth', block: 'start' });
            }
        }
        
        // Ensure booking form wrapper is visible; let Vue manage v-cloak on the app element
        (function() {
            function ensureBookingWrapVisible() {
                var bookingWrap = document.querySelector('.bravo_single_book_wrap');
                var bookingBox = document.querySelector('.bravo_single_book');

                if (bookingWrap) {
                    bookingWrap.style.display = 'flex';
                    bookingWrap.style.visibility = 'visible';
                }

                if (bookingBox) {
                    bookingBox.style.display = 'block';
                    bookingBox.style.visibility = 'visible';
                    bookingBox.style.opacity = '1';
                }
            }

            // Fallback: only remove v-cloak from the Vue app element AFTER Vue has initialized
            function waitForVueAndReveal() {
                var maxWait = 8000;
                var interval = 100;
                var elapsed = 0;
                var check = setInterval(function() {
                    elapsed += interval;
                    var appElement = document.getElementById('bravo_tour_book_app');
                    if (appElement && appElement.__vue__) {
                        clearInterval(check);
                        // Vue is ready — it will remove v-cloak itself, nothing to do
                    } else if (elapsed >= maxWait) {
                        clearInterval(check);
                        // Vue failed to initialize — reveal as plain HTML fallback
                        if (appElement) {
                            appElement.removeAttribute('v-cloak');
                        }
                    }
                }, interval);
            }

            // Function to pre-populate dates from URL parameters
            function prePopulateDatesFromURL() {
                var urlParams = new URLSearchParams(window.location.search);
                var startDate = urlParams.get('start');
                var endDate = urlParams.get('end');
                
                if (startDate && typeof Vue !== 'undefined') {
                    // Wait for Vue app to be initialized
                    var checkVueApp = setInterval(function() {
                        var appElement = document.getElementById('bravo_tour_book_app');
                        if (appElement && appElement.__vue__) {
                            clearInterval(checkVueApp);
                            var vueApp = appElement.__vue__;
                            
                            // Set start date in Vue app
                            if (startDate) {
                                vueApp.start_date = startDate;
                                
                                // Format date for display
                                if (typeof moment !== 'undefined') {
                                    var momentDate = moment(startDate);
                                    if (momentDate.isValid()) {
                                        vueApp.start_date_html = momentDate.format(bookingCore.date_format || 'YYYY-MM-DD');
                                    } else {
                                        vueApp.start_date_html = startDate;
                                    }
                                } else {
                                    vueApp.start_date_html = startDate;
                                }
                                
                                // Trigger date change handlers
                                vueApp.$forceUpdate();
                                
                                // If date picker exists, update it
                                if (vueApp.$refs.start_date) {
                                    var $datePicker = jQuery(vueApp.$refs.start_date);
                                    if ($datePicker.length && $datePicker.data('daterangepicker')) {
                                        var dp = $datePicker.data('daterangepicker');
                                        if (typeof moment !== 'undefined' && moment(startDate).isValid()) {
                                            dp.setStartDate(moment(startDate));
                                            if (endDate && moment(endDate).isValid()) {
                                                dp.setEndDate(moment(endDate));
                                            } else {
                                                dp.setEndDate(moment(startDate));
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }, 100);
                    
                    // Stop checking after 5 seconds
                    setTimeout(function() {
                        clearInterval(checkVueApp);
                    }, 5000);
                }
            }

            // Make wrapper visible immediately (safe — no Vue directives on wrapper)
            ensureBookingWrapVisible();

            // Also run after DOM is ready
            if (document.readyState === 'loading') {
                document.addEventListener('DOMContentLoaded', function() {
                    ensureBookingWrapVisible();
                    prePopulateDatesFromURL();
                    waitForVueAndReveal();
                });
            } else {
                prePopulateDatesFromURL();
                waitForVueAndReveal();
            }

            // Run after window loads
            window.addEventListener('load', function() {
                setTimeout(ensureBookingWrapVisible, 500);
            });
        })();
    </script>
    <script type="text/javascript" src="https://www.xtremerepublic.com/libs/ion_rangeslider/js/ion.rangeSlider.min.js"></script>

    <script type="text/javascript" src="https://www.xtremerepublic.com/module/tour/js/single-tour.js?_ver=3.7.0-select2hydrate"></script>
    <script>
        // Hard block any script that tries to truncate or replace overview HTML
        (function(){
            function lockOverviewContent(){
                var el = document.getElementById('tour-overview-content');
                if (!el) return;
                // Save original HTML once
                if (!el.dataset.originalHtml) el.dataset.originalHtml = el.innerHTML;

                // Restore helper
                function restore(){
                    try {
                        // If HTML was replaced with plain text or ellipsized, restore
                        var hasTags = /<\/?[a-z][\s\S]*>/i.test(el.innerHTML);
                        var looksEllipsized = /\.{3}\s*$/.test(el.textContent || '');
                        if (!hasTags || looksEllipsized) {
                            el.innerHTML = el.dataset.originalHtml;
                        }
                        // Remove any overflow constraints
                        el.style.maxHeight = 'none';
                        el.style.height = 'auto';
                        el.style.overflow = 'visible';
                        el.style.textOverflow = 'unset';
                        el.style.whiteSpace = 'normal';
                        var p = el.parentElement;
                        while (p){ try{ p.style.overflow = 'visible'; p.style.maxHeight = 'none'; p.style.height = 'auto'; }catch(e){} p = p.parentElement; }
                    }catch(e){}
                }

                // Override setters on the specific element to ignore truncation attempts
                try {
                    ['innerText','textContent'].forEach(function(prop){
                        var desc = Object.getOwnPropertyDescriptor(Node.prototype, prop) || Object.getOwnPropertyDescriptor(HTMLElement.prototype, prop);
                        if (desc && desc.configurable) {
                            Object.defineProperty(el, prop, {
                                configurable: true,
                                get: function(){ return desc.get ? desc.get.call(el) : ''; },
                                set: function(_v){
                                    // Ignore and restore original HTML
                                    el.innerHTML = el.dataset.originalHtml;
                                    restore();
                                }
                            });
                        }
                    });
                } catch(e) {}

                // Observe mutations and periodically restore
                try {
                    var mo = new MutationObserver(function(){ restore(); });
                    mo.observe(el, { childList: true, subtree: true, characterData: true });
                } catch(e) {}
                restore();
                setTimeout(restore, 0);
                setTimeout(restore, 500);
                setTimeout(restore, 1500);
                setInterval(restore, 3000);
            }
            if (document.readyState === 'complete') { lockOverviewContent(); }
            else {
                window.addEventListener('load', lockOverviewContent, { once: true });
                document.addEventListener('DOMContentLoaded', lockOverviewContent, { once: true });
            }
        })();
    </script>
    
    <script>
        // Helper function to show login modal
        function showLoginModal() {
            var loginModal = $('#login');
            if(loginModal.length){
                // Use Bootstrap 5 modal API
                if(typeof bootstrap !== 'undefined' && bootstrap.Modal){
                    var modal = new bootstrap.Modal(loginModal[0]);
                    modal.show();
                } else if(typeof $.fn.modal !== 'undefined') {
                    // Fallback for Bootstrap 4
                    loginModal.modal('show');
                } else {
                    // Last resort: redirect to login page
                    window.location.href = '/login';
                }
            } else {
                // Fallback: redirect to login page
                window.location.href = '/login';
            }
        }
        
        // Handle mobile "Book Now" button click - Enhanced for Pricing Structures
        (function() {
            function initMobileBookButton() {
                if (typeof jQuery === 'undefined' || typeof $ === 'undefined') {
                    setTimeout(initMobileBookButton, 50);
                    return;
                }
                jQuery(document).ready(function($) {
            // Use event delegation so button works even if DOM is updated
            $(document).on('click', '.gotrip-detail-book-mobile', function(e) {
                e.preventDefault();
                
                // Find the booking form Vue app element
                var bookingFormApp = $('#bravo_tour_book_app');
                
                if (!bookingFormApp.length) {
                    alert('Booking form not found. Please refresh the page and try again.');
                    return;
                }
                
                // Scroll to booking form smoothly
                $('html, body').animate({
                    scrollTop: bookingFormApp.offset().top - 100
                }, 300);
                
                // Wait for scroll, then trigger the submit
                setTimeout(function() {
                    // Get the DOM element
                    var appElement = bookingFormApp[0];
                    if (!appElement) {
                        alert('Booking form not found. Please refresh the page and try again.');
                        return;
                    }
                    
                    // Try to access Vue instance (Vue 2 stores it in __vue__)
                    var vueInstance = appElement.__vue__ || 
                                     (appElement._vnode && appElement._vnode.context) ||
                                     (window.Vue && window.Vue.prototype && bookingFormApp.data('vue-instance'));
                    
                    // Try to call doSubmit method directly
                    if (vueInstance && typeof vueInstance.doSubmit === 'function') {
                        var mockEvent = { 
                            preventDefault: function() {},
                            stopPropagation: function() {}
                        };
                        vueInstance.doSubmit(mockEvent);
                        return;
                    }
                    
                    // Fallback: try to find and click the submit button
                    var submitBtn = bookingFormApp.find('a[name="submit"], .submit-group a, button[name="submit"]').first();
                    if (submitBtn.length) {
                        // Try native click first
                        if (submitBtn[0].click) {
                            submitBtn[0].click();
                        } else {
                            // Fallback to jQuery trigger
                            submitBtn.trigger('click');
                        }
                        return;
                    }
                    
                    // Last resort: try to find any button with @click="doSubmit"
                    var allButtons = bookingFormApp.find('a, button');
                    for (var i = 0; i < allButtons.length; i++) {
                        var btn = allButtons[i];
                        var onclick = btn.getAttribute('@click') || btn.getAttribute('v-on:click') || '';
                        if (onclick.indexOf('doSubmit') !== -1) {
                            if (btn.click) {
                                btn.click();
                            } else {
                                $(btn).trigger('click');
                            }
                            return;
                        }
                    }
                    
                    // If we get here, nothing worked
                    alert('Unable to submit booking. Please try clicking the Book Now button in the booking form.');
                }, 400);
            });
                });
            }
            initMobileBookButton();
        })();
    </script>
    
        
            <script type="application/ld+json">{"@context":"https://schema.org","@type":"TouristTrip","name":"Naivasha Paragliding Experience","description":"Feel the rush of pure freedom as you take flight over one of Kenya&rsquo;s most breathtaking landscapes. Our paragliding adventure at Kenton Hill, Kijabe offers a once-in-a-lifetime opportunity to glide above the escarpment, with stunning panoramic views of Mt. Longonot, Lake Naivasha, and the vast Great Rift Valley stretching below.\r\nWhether you&rsquo;re chasing adrenaline or serenity, this experience delivers both &mdash; all in a smooth, safe, and unforgettable glide lasting 10&ndash;15 minutes.\r\nWhat to Expect\r\n\r\nLocation: Kenton Hill, Kijabe &ndash; a scenic take-off point overlooking the Rift Valley\r\nFlight Duration: 10 to 15 minutes (depending on wind conditions)\r\n\r\n&nbsp;\r\nHighlights:\r\n\r\nBird&rsquo;s-eye view of Mt. Longonot, Lake Naivasha, and the Rift Valley cliffs\r\nProfessionally guided tandem flight with certified instructors\r\nOptional GoPro video and photo package to capture your flight\r\nA short briefing and safety orientation before take-off\r\n\r\nPerfect For\r\n\r\nAdventure lovers\r\nNature photographers\r\nCouples or groups seeking a unique outdoor experience\r\nFirst-time flyers (no experience needed)\r\n\r\nOptional add-ons:\r\n\r\n\r\nReturn transfers from Nairobi or Naivasha\r\n\r\n\r\nProfessional photo &amp; video package\r\n\r\n\r\nChampagne picnic at the landing site\r\n\r\n","url":"https://www.xtremerepublic.com/tour/paragliding-experience-1","inLanguage":"en_GB","isAccessibleForFree":false,"provider":{"@type":"TravelAgency","name":"Xtreme Republic","url":"https://www.xtremerepublic.com"},"offers":{"@type":"Offer","price":"250.00","priceCurrency":"USD","availability":"https://schema.org/InStock"},"image":["https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7241.jpg"],"location":{"@type":"Place","name":"Nairobi","geo":{"@type":"GeoCoordinates","latitude":-1.3056292531147641877709020263864658772945404052734375,"longitude":36.8177520881703372879201197065412998199462890625}},"touristType":"International Visitors","audience":{"@type":"Audience","audienceType":"International Visitors"},"duration":"PT24H","speakable":{"@type":"SpeakableSpecification","cssSelector":[".typewriter-title",".lux-day-title",".bravo_tour_book",".short-desc",".text-banner"]}}</script>
    
    
            <script type="application/ld+json">{"@context":"https://schema.org","@type":"HowTo","name":"How to experience Naivasha Paragliding Experience","description":"Feel the rush of pure freedom as you take flight over one of Kenya&rsquo;s most breathtaking landscapes. Our paragliding adventure at Kenton Hill, Kijabe offers a once-in-a-lifetime opportunity to glide above the escarpment, with stunning panoramic views of Mt. Longonot, Lake Naivasha, and the vast Great Rift Valley stretching below.\r\nWhether you&rsquo;re chasing adrenaline or serenity, this experience delivers both &mdash; all in a smooth, safe, and unforgettable glide lasting 10&ndash;15 minut...","totalTime":"PT24H","step":[{"@type":"HowToStep","position":1,"name":"0900 Hrs","text":"Pickup at the Landing Area","url":"https://www.xtremerepublic.com/tour/paragliding-experience-1#day-1","image":false},{"@type":"HowToStep","position":2,"name":"0945 Hrs","text":"Safety Briefing & Harnessing","url":"https://www.xtremerepublic.com/tour/paragliding-experience-1#day-2","image":"https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/sagestudios-127.jpg"},{"@type":"HowToStep","position":3,"name":"1000 Hrs","text":"Waiting for the best flying wind conditions","url":"https://www.xtremerepublic.com/tour/paragliding-experience-1#day-3","image":"https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7040.jpg"},{"@type":"HowToStep","position":4,"name":"1000 Hrs","text":"Tandem Paragliding","url":"https://www.xtremerepublic.com/tour/paragliding-experience-1#day-4","image":"https://www.xtremerepublic.com/uploads/0000/6/2025/09/26/e0a7179.jpg"}],"image":"https://www.xtremerepublic.com/uploads/0000/6/2025/09/28/e0a7241.jpg","estimatedCost":{"@type":"MonetaryAmount","currency":"USD","value":"250"}}</script>
    
        
                    <script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Do I need any prior paragliding experience to join this tour?","acceptedAnswer":{"@type":"Answer","text":"No, this is a tandem flight, so no prior experience is needed. A certified pilot will guide you throughout, making it suitable even for first-time flyers."}},{"@type":"Question","name":"How long does the paragliding flight last?","acceptedAnswer":{"@type":"Answer","text":"The flight typically lasts 10–15 minutes, depending on wind conditions."}},{"@type":"Question","name":"Where will the take-off and landing happen?","acceptedAnswer":{"@type":"Answer","text":"Take-off is from Kenton Hill, Kijabe, which overlooks the Rift Valley. The exact landing site depends on wind direction, but you’ll experience scenic views of Mt. Longonot, Lake Naivasha, and the Rift Valley cliffs. However, if the weather is not good we might have to change takeoff location to Maiella, Katelembu, Eburru"}},{"@type":"Question","name":"Is safety equipment provided, and who will be flying with me?","acceptedAnswer":{"@type":"Answer","text":"Yes. All safety gear is provided, and you will be flying in tandem with a licensed, professional pilot. There is also a safety briefing before the flight."}},{"@type":"Question","name":"What additional services do you offer?","acceptedAnswer":{"@type":"Answer","text":"Return transfers from Nairobi or Naivasha can be arranged.\r\n\r\nOptional champagne picnic at the landing site. \r\n\r\nYou can customize your experience with add-ons like videography, photography, and transport."}},{"@type":"Question","name":"Can Pets paraglide","acceptedAnswer":{"@type":"Answer","text":"Yes, some pets can paraglide, contact us to share the pics of the pets and get guidelines on harness and safety"}},{"@type":"Question","name":"Are there any weight or age limits?","acceptedAnswer":{"@type":"Answer","text":"Yes. The typical weight range for tandem flights is 30–110 kg, and minors must be accompanied by a parent or guardian. (Exact limits may vary based on wind conditions.)"}},{"@type":"Question","name":"What should I wear for the paragliding experience?","acceptedAnswer":{"@type":"Answer","text":"Wear comfortable outdoor clothing, closed shoes, and a light jacket. The wind can be cooler at higher altitude."}},{"@type":"Question","name":"Can the activity be cancelled due to weather?","acceptedAnswer":{"@type":"Answer","text":"Yes. Paragliding is highly weather-dependent. If wind or weather conditions are unsafe, the flight may be delayed or rescheduled for your safety."}},{"@type":"Question","name":"How early should I arrive before my flight time?","acceptedAnswer":{"@type":"Answer","text":"It’s recommended to arrive 20–30 minutes early for briefing, gearing up, and preparation before take-off."}}]}</script>
            
    <!-- Fix ScrollMagic pinning issue: Ensure booking form is fully visible when scrolling back up -->
    <script>
    (function() {
        function fixBookingFormVisibility() {
            var pinContainer = document.querySelector('.js-pin-container');
            if (!pinContainer) {
                setTimeout(fixBookingFormVisibility, 100);
                return;
            }
            
            var pinContent = pinContainer.querySelector('.js-pin-content');
            if (!pinContent) {
                setTimeout(fixBookingFormVisibility, 100);
                return;
            }
            
            // Get initial container position
            var containerTop = pinContainer.offsetTop;
            var containerHeight = pinContainer.offsetHeight;
            var containerBottom = containerTop + containerHeight;
            
            function cleanupPinState() {
                // Find pin-spacer element
                var pinSpacer = document.querySelector('.pin-spacer');
                if (pinSpacer) {
                    // Reset pin-spacer height to auto when unpinned
                    var computedStyle = window.getComputedStyle(pinSpacer);
                    var spacerHeight = parseInt(computedStyle.height) || 0;
                    var contentHeight = pinContent.offsetHeight;
                    
                    // If spacer height is much larger than content, it's likely causing the issue
                    if (spacerHeight > contentHeight * 1.5) {
                        pinSpacer.style.height = 'auto';
                        pinSpacer.style.minHeight = '0';
                    }
                }
                
                // Ensure booking form wrapper returns to normal flow when not pinned
                if (!pinContent.classList.contains('is-pinned')) {
                    pinContent.style.position = 'relative';
                    pinContent.style.top = 'auto';
                    pinContent.style.left = 'auto';
                    pinContent.style.right = 'auto';
                    pinContent.style.transform = 'none';
                    pinContent.style.margin = '0';
                }
                
                // Ensure booking form column maintains proper height
                var bookingColumn = document.querySelector('.col-lg-4');
                if (bookingColumn) {
                    bookingColumn.style.height = 'auto';
                    bookingColumn.style.minHeight = 'auto';
                    bookingColumn.style.overflow = 'visible';
                    bookingColumn.style.maxHeight = 'none';
                }
                
                // Ensure booking form box is fully visible
                var bookingBox = document.querySelector('.bravo_single_book');
                if (bookingBox) {
                    bookingBox.style.height = 'auto';
                    bookingBox.style.minHeight = 'auto';
                    bookingBox.style.maxHeight = 'none';
                    bookingBox.style.overflow = 'visible';
                }
            }
            
            // Listen for scroll events to detect when scrolling back up
            var lastScrollTop = window.pageYOffset || document.documentElement.scrollTop;
            var scrollTimeout;
            
            function handleScroll() {
                var currentScrollTop = window.pageYOffset || document.documentElement.scrollTop;
                var scrollDirection = currentScrollTop < lastScrollTop ? 'up' : 'down';
                
                // Update container position (in case layout changed)
                containerTop = pinContainer.offsetTop;
                containerBottom = containerTop + pinContainer.offsetHeight;
                
                // When scrolling back up past the container top, ensure form is visible
                if (scrollDirection === 'up' && currentScrollTop < containerBottom) {
                    cleanupPinState();
                }
                
                // Always ensure proper state when near the container
                if (Math.abs(currentScrollTop - containerTop) < 200) {
                    cleanupPinState();
                }
                
                lastScrollTop = currentScrollTop <= 0 ? 0 : currentScrollTop;
            }
            
            // Throttle scroll events for performance
            window.addEventListener('scroll', function() {
                if (scrollTimeout) {
                    clearTimeout(scrollTimeout);
                }
                scrollTimeout = setTimeout(handleScroll, 16); // ~60fps
            }, { passive: true });
            
            // Also use MutationObserver to watch for class changes (is-pinned)
            var observer = new MutationObserver(function(mutations) {
                mutations.forEach(function(mutation) {
                    if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
                        cleanupPinState();
                    }
                });
            });
            
            if (pinContent) {
                observer.observe(pinContent, {
                    attributes: true,
                    attributeFilter: ['class']
                });
            }
            
            // Initial cleanup
            setTimeout(cleanupPinState, 500);
        }
        
        // Initialize after DOM is ready
        if (document.readyState === 'loading') {
            document.addEventListener('DOMContentLoaded', function() {
                setTimeout(fixBookingFormVisibility, 500);
            });
        } else {
            setTimeout(fixBookingFormVisibility, 500);
        }
        
        // Also run after window load (after ScrollMagic initializes)
        window.addEventListener('load', function() {
            setTimeout(fixBookingFormVisibility, 1000);
        });
    })();
    </script>

        <div class="whatsapp-float-button" id="whatsappButton">
    <a href="https://wa.me/+254702716721?text=Hello%21+I%27m+interested+in+the+tour%3A+Naivasha+Paragliding+Experience.+Please+share+more+details.+https%3A%2F%2Fwww.xtremerepublic.com%2Ftour%2Fparagliding-experience-1" 
       target="_blank" 
       rel="noopener noreferrer"
       class="whatsapp-button"
       aria-label="Chat on WhatsApp">
        <svg viewBox="0 0 32 32" class="whatsapp-icon">
            <path fill="currentColor" d="M16 0c-8.837 0-16 7.163-16 16 0 2.825 0.737 5.607 2.137 8.048l-2.137 7.952 7.933-2.127c2.42 1.37 5.173 2.127 8.067 2.127 8.837 0 16-7.163 16-16s-7.163-16-16-16zM16 29.467c-2.482 0-4.908-0.646-7.07-1.87l-0.507-0.292-5.247 1.408 1.417-5.267-0.321-0.525c-1.331-2.197-2.039-4.736-2.039-7.359 0-7.589 6.175-13.765 13.765-13.765s13.765 6.175 13.765 13.765c0 7.589-6.175 13.765-13.765 13.765z"></path>
            <path fill="currentColor" d="M23.201 19.731c-0.385-0.193-2.279-1.124-2.632-1.253-0.353-0.129-0.609-0.193-0.865 0.193s-0.993 1.253-1.218 1.51c-0.225 0.257-0.449 0.289-0.834 0.096s-1.627-0.599-3.098-1.911c-1.146-1.022-1.919-2.283-2.144-2.668s-0.024-0.593 0.169-0.785c0.173-0.171 0.385-0.449 0.577-0.673s0.257-0.385 0.385-0.641c0.129-0.257 0.064-0.481-0.032-0.673s-0.865-2.087-1.186-2.856c-0.313-0.749-0.631-0.647-0.865-0.659-0.224-0.011-0.481-0.013-0.737-0.013s-0.673 0.096-1.026 0.481c-0.353 0.385-1.347 1.317-1.347 3.211s1.379 3.723 1.571 3.981c0.193 0.257 2.72 4.155 6.589 5.826 0.92 0.397 1.638 0.634 2.197 0.811 0.924 0.293 1.765 0.252 2.43 0.153 0.741-0.111 2.279-0.932 2.601-1.833s0.321-1.673 0.225-1.833c-0.096-0.161-0.353-0.257-0.737-0.449z"></path>
        </svg>
        <span class="whatsapp-text">Chat with us</span>
    </a>
    <div class="whatsapp-pulse"></div>
</div>

<style>
.whatsapp-float-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    animation: fadeInUp 0.5s ease-out;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.whatsapp-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
    color: white;
}

.whatsapp-button:active {
    transform: translateY(-1px);
}

.whatsapp-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    animation: swing 2s ease-in-out infinite;
}

.whatsapp-text {
    white-space: nowrap;
}

.whatsapp-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: rgba(37, 211, 102, 0.3);
    animation: pulse 2s ease-out infinite;
    pointer-events: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

@keyframes swing {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(14deg);
    }
    20%, 40% {
        transform: rotate(-8deg);
    }
    50% {
        transform: rotate(0deg);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .whatsapp-float-button {
        bottom: 100px; /* Above mobile nav bar */
        right: 20px;
    }
    
    .whatsapp-button {
        padding: 12px 16px;
        font-size: 0; /* Hide text on mobile */
        border-radius: 50%;
        width: 56px;
        height: 56px;
        justify-content: center;
    }
    
    .whatsapp-text {
        display: none;
    }
    
    .whatsapp-icon {
        width: 32px;
        height: 32px;
    }
    
    .whatsapp-pulse {
        border-radius: 50%;
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .whatsapp-float-button {
        bottom: 25px;
        right: 25px;
    }
}

/* Hide on very small screens if needed */
@media (max-width: 360px) {
    .whatsapp-float-button {
        bottom: 90px;
        right: 15px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
        padding: 10px;
    }
    
    .whatsapp-icon {
        width: 28px;
        height: 28px;
    }
}

/* Print - hide button */
@media print {
    .whatsapp-float-button {
        display: none !important;
    }
}

/* Accessibility */
.whatsapp-button:focus {
    outline: 3px solid rgba(37, 211, 102, 0.5);
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .whatsapp-button {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    }
    
    .whatsapp-button:hover {
        box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
    }
}
</style>

<script>
// Optional: Add scroll behavior
(function() {
    const whatsappButton = document.getElementById('whatsappButton');
    if (!whatsappButton) return;
    
    let lastScroll = 0;
    let ticking = false;
    
    window.addEventListener('scroll', function() {
        lastScroll = window.scrollY;
        
        if (!ticking) {
            window.requestAnimationFrame(function() {
                // Show button after scrolling down 300px
                if (lastScroll > 300) {
                    whatsappButton.style.opacity = '1';
                    whatsappButton.style.visibility = 'visible';
                } else {
                    whatsappButton.style.opacity = '0.7';
                }
                ticking = false;
            });
            ticking = true;
        }
    });
    
    // Track WhatsApp button clicks (optional analytics)
    whatsappButton.querySelector('.whatsapp-button').addEventListener('click', function() {
        // You can add analytics tracking here
        if (typeof gtag !== 'undefined') {
            gtag('event', 'click', {
                'event_category': 'WhatsApp',
                'event_label': 'Floating Button'
            });
        }
    });
})();
</script>
    </div>
    
    <!-- Mobile Navigation Bar -->
    <div class="mobile-nav-bar d-lg-none">
        <div class="mobile-nav-container">
            <a href="/tour" class="mobile-nav-item">
                <div class="mobile-nav-icon">
                    <i class="fa fa-plane"></i>
                </div>
                <span class="mobile-nav-text">Tours</span>
            </a>
            
            <a href="/hotel" class="mobile-nav-item">
                <div class="mobile-nav-icon">
                    <i class="fa fa-hotel"></i>
                </div>
                <span class="mobile-nav-text">Hotels</span>
            </a>
            
            <a href="/" class="mobile-nav-item mobile-nav-home">
                <div class="mobile-nav-icon mobile-nav-home-icon">
                    <i class="icon-home"></i>
                </div>
                <span class="mobile-nav-text">Home</span>
            </a>
            
            <a href="/user/booking-history" class="mobile-nav-item">
                <div class="mobile-nav-icon">
                    <i class="icon-calendar"></i>
                </div>
                <span class="mobile-nav-text">Bookings</span>
            </a>
            
            <a href="/user-dashboard" class="mobile-nav-item">
                <div class="mobile-nav-icon">
                    <i class="icon-user"></i>
                </div>
                <span class="mobile-nav-text">Account</span>
            </a>
        </div>
    </div>
    
            
        
        
    <!-- Tour Animations Script -->
    <script defer src="https://www.xtremerepublic.com/themes/gotrip/dist/frontend/js/tour-animations.js?_v=3.7.0-select2hydrate"></script>
    <!-- Luxury Animations -->
    <script defer src="https://www.xtremerepublic.com/js/luxury-animations.js?_v=3.7.0-select2hydrate"></script>
    <!-- Enhanced Mobile Menu -->
    <script defer src="https://www.xtremerepublic.com/themes/gotrip/assets/js/mobile-menu-enhanced.js?_v=3.7.0-select2hydrate"></script>
    <!-- User Dashboard Luxury JavaScript -->
    <script defer src="https://www.xtremerepublic.com/themes/gotrip/assets/js/user-dashboard-luxury.js?_v=3.7.0-select2hydrate"></script>
    <!-- Typewriter Effect -->
    <script defer src="https://www.xtremerepublic.com/themes/gotrip/js/typewriter.js?_v=3.7.0-select2hydrate"></script>
    <!-- Alpine.js -->
    <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
        <!-- Critical JavaScript -->
    
    
</body>
</html>
