<div id="td-map-v2" style="font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;max-width:700px;margin:20px auto;"><div style="background:#001427;border-radius:12px 12px 0 0;padding:18px 24px;"><div style="display:flex;justify-content:space-between;align-items:center;"><div><h2 id="map-title" style="margin:0;font-family:'Poppins','Inter',sans-serif;font-size:17px;font-weight:600;color:white;letter-spacing:-0.3px;">Your Journey</h2><p id="map-subtitle" style="margin:6px 0 0;font-size:12px;color:rgba(255,255,255,0.7);font-weight:400;">Travel Differently</p></div><div><img src="https://cdn.prod.website-files.com/60e9f6409ef83c351ec69258/6658337c7f4f2da6003a1416_Logo.svg" alt="Travel Differently" style="height:28px;"></div></div></div><div id="map" style="width:100%;height:380px;background:#e7e0da;"></div><div id="timeline" style="background:#f4f4f4;border-radius:0 0 12px 12px;padding:14px 20px;border-top:3px solid #e98a15;"><div style="display:flex;justify-content:space-between;align-items:center;gap:8px;"></div></div><div style="display:flex;justify-content:center;gap:24px;margin-top:14px;font-size:11px;color:#001427;font-weight:500;"><span style="display:flex;align-items:center;gap:6px;"><span style="width:10px;height:10px;background:#e98a15;border-radius:50%;"></span> Destination</span><span style="display:flex;align-items:center;gap:6px;"><span style="width:20px;height:2px;background:#e98a15;border-radius:1px;"></span> Route</span><span style="display:flex;align-items:center;gap:6px;">📷 Click for details</span></div></div><link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"/><script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script><style>#td-map-v2 *{box-sizing:border-box}#td-map-v2 .leaflet-popup-content-wrapper{border-radius:12px;padding:0;box-shadow:0 8px 30px rgba(0,0,0,0.15);overflow:hidden}#td-map-v2 .leaflet-popup-content{margin:0;width:260px!important}#td-map-v2 .leaflet-popup-tip{display:none}.td-popup-v2 .popup-img{width:100%;height:120px;object-fit:cover}.td-popup-v2 .popup-body{padding:14px}.td-popup-v2 .popup-header{display:flex;align-items:center;gap:8px;margin-bottom:8px}.td-popup-v2 .day-badge{background:#e98a15;color:white;padding:3px 10px;border-radius:12px;font-size:11px;font-weight:600}.td-popup-v2 h4{margin:0;font-family:'Poppins',Arial,sans-serif;font-size:15px;color:#001427}.td-popup-v2 .popup-desc{font-size:12px;color:#555;line-height:1.5;margin-bottom:10px}.td-popup-v2 .highlights-list{background:#f5f5f5;padding:10px;border-radius:8px;margin-top:10px}.td-popup-v2 .highlights-list strong{font-size:10px;color:#e98a15;text-transform:uppercase}.td-popup-v2 .highlights-list ul{margin:5px 0 0 15px;padding:0;font-size:11px;color:#666}.timeline-item{display:flex;flex-direction:column;align-items:center;cursor:pointer;padding:8px 12px;border-radius:8px;transition:all 0.2s;min-width:70px}.timeline-item:hover{background:#e98a15;color:white}.timeline-item .tl-day{font-size:10px;color:#999;margin-bottom:2px}.timeline-item .tl-name{font-size:11px;font-weight:600;color:#001427;white-space:nowrap}.timeline-item:hover .tl-day,.timeline-item:hover .tl-name{color:white}.timeline-item.active{background:#e98a15}.timeline-item.active .tl-day,.timeline-item.active .tl-name{color:white}.map-error{text-align:center;padding:40px 20px;color:#666;font-size:14px;}</style><script>(function(){try{var mapData={"summary":{"title":"10-Day Armenia Adventure","dates":"March 2026","travelers":"5 Travelers"},"weather":{"desc":"Cool temperatures with possible rain and snow in higher regions.","temp":"5-15°C"},"security":{"status":"Low Risk","tip":"Stay aware of your surroundings and follow local advice."},"budget":{"total":"€10,000","items":[{"label":"Accommodations","val":"€800"},{"label":"Transport","val":"€500"},{"label":"Activities & Food","val":"€2,500"}]},"map":{"waypoints":[{"name":"Yerevan","lat":40.1792,"lon":44.4991,"days":"1, 2, 9, 10","desc":"Capital city known for its rich history and vibrant culture.","photo":"https://images.unsplash.com/photo-1563201518-4f1a8a1c1c4f","highlights":["Republic Square","Cascade Complex","Mount Ararat Views"]},{"name":"Echmiadzin","lat":40.1432,"lon":44.3011,"days":"2","desc":"Spiritual center of Armenia with UNESCO-listed churches.","photo":"https://images.unsplash.com/photo-1584712027635-0c4c8c2e5f9e","highlights":["Echmiadzin Cathedral","Zvartnots Ruins"]},{"name":"Khor Virap","lat":39.85,"lon":44.2,"days":"3","desc":"Monastery with stunning views of Mount Ararat.","photo":"https://images.unsplash.com/photo-1506748686214-e9df14d4d9d0","highlights":["Panoramic Views","Historical Significance"]},{"name":"Lake Sevan","lat":40.5903,"lon":45.2728,"days":"6","desc":"Beautiful alpine lake known for its stunning views.","photo":"https://images.unsplash.com/photo-1506748686214-e9df14d4d9d0","highlights":["Sevanavank Monastery","Smoked Fish"]},{"name":"Dilijan","lat":40.61,"lon":44.9,"days":"7","desc":"Known as the 'Armenian Switzerland' for its lush landscapes.","photo":"https://images.unsplash.com/photo-1506748686214-e9df14d4d9d0","highlights":["Haghartsin Monastery","Artisan Workshops"]},{"name":"Lori Region","lat":41,"lon":44.5,"days":"8","desc":"Famous for its medieval monasteries and scenic drives.","photo":"https://images.unsplash.com/photo-1506748686214-e9df14d4d9d0","highlights":["Sanahin Monastery","Haghpat Monastery"]}],"route":[0,1,2,3,4,5]}};if(!mapData||!mapData.map||!mapData.map.waypoints||!Array.isArray(mapData.map.waypoints)||mapData.map.waypoints.length===0){throw new Error('Invalid map data structure');}var travelerName="Florian";var destination="Armenia";document.getElementById('map-title').textContent=travelerName+"'s Journey Through "+destination;document.getElementById('map-subtitle').textContent=(mapData.summary?mapData.summary.dates:'')+" • "+(mapData.summary?mapData.summary.travelers:'');var waypoints=mapData.map.waypoints;var routeOrder=mapData.map.route||waypoints.map(function(_,i){return i;});var map=L.map('map',{scrollWheelZoom:false,zoomControl:true}).setView([waypoints[0].lat,waypoints[0].lon],7);L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png',{attribution:'© CARTO | Travel Differently',maxZoom:18}).addTo(map);var createIcon=function(n){return L.divIcon({className:'',html:'<div style="background:linear-gradient(135deg,#e98a15 0%,#d47710 100%);color:white;width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:Poppins,Arial,sans-serif;font-weight:700;font-size:14px;box-shadow:0 4px 15px rgba(233,138,21,0.5);border:3px solid white;cursor:pointer;">'+n+'</div>',iconSize:[34,34],iconAnchor:[17,17],popupAnchor:[0,-20]});};var markers=[];waypoints.forEach(function(wp,i){var hl=wp.highlights||[];var popup='<div class="td-popup-v2"><img src="'+(wp.photo||'')+'" alt="'+wp.name+'" class="popup-img" onerror="this.style.display=\'none\'"><div class="popup-body"><div class="popup-header"><span class="day-badge">Days '+wp.days+'</span><h4>'+wp.name+'</h4></div><p class="popup-desc">'+(wp.desc||'')+'</p>'+(hl.length>0?'<div class="highlights-list"><strong>✨ Highlights</strong><ul>'+hl.map(function(h){return '<li>'+h+'</li>';}).join('')+'</ul></div>':'')+'</div></div>';markers.push(L.marker([wp.lat,wp.lon],{icon:createIcon(i+1)}).bindPopup(popup,{maxWidth:280,closeButton:true}).addTo(map));});var routeCoords=routeOrder.map(function(i){return [waypoints[i].lat,waypoints[i].lon];});L.polyline(routeCoords,{color:'#e98a15',weight:3,opacity:0.7,dashArray:'10,8',lineCap:'round'}).addTo(map);var timeline=document.getElementById('timeline').querySelector('div');waypoints.forEach(function(wp,i){var item=document.createElement('div');item.className='timeline-item';item.innerHTML='<span class="tl-day">Day '+wp.days.split('-')[0]+'</span><span class="tl-name">'+wp.name+'</span>';item.onclick=function(){map.setView([wp.lat,wp.lon],10,{animate:true,duration:0.5});markers[i].openPopup();document.querySelectorAll('.timeline-item').forEach(function(el){el.classList.remove('active');});item.classList.add('active');};timeline.appendChild(item);});var bounds=L.latLngBounds(waypoints.map(function(wp){return [wp.lat,wp.lon];}));map.fitBounds(bounds.pad(0.15));}catch(e){console.error('[TD Map Error]',e);document.getElementById('map').innerHTML='<div class="map-error">🗺️ Interactive map temporarily unavailable.<br>Please contact us for your personalized itinerary.</div>';}})();</script>