Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ // Mobile Menu Toggle
+ const menuToggle = document.querySelector('.menu-toggle');
+ const navLinks = document.querySelector('.nav-links');
+
+ menuToggle.addEventListener('click', () => {
+ navLinks.classList.toggle('active');
+ const spans = menuToggle.getElementsByTagName('span');
+ spans[0].style.transform = navLinks.classList.contains('active') ?
+ 'rotate(45deg) translate(5px, 6px)' : '';
+ spans[1].style.opacity = navLinks.classList.contains('active') ? '0' : '1';
+ spans[2].style.transform = navLinks.classList.contains('active') ?
+ 'rotate(-45deg) translate(5px, -6px)' : '';
+ });
+
+ // Smooth Scroll
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
+ anchor.addEventListener('click', function (e) {
+ e.preventDefault();
+ const target = document.querySelector(this.getAttribute('href'));
+ target.scrollIntoView({
+ behavior: 'smooth'
+ });
+ });
+ });
+
+ // Calendar Implementation
+ const calendar = document.getElementById('calendar');
+ const startDate = document.getElementById('start-date');
+ const endDate = document.getElementById('end-date');
+
+ function createCalendar() {
+ const date = new Date();
+ const month = date.getMonth();
+ const year = date.getFullYear();
+
+ const firstDay = new Date(year, month, 1);
+ const lastDay = new Date(year, month + 1, 0);
+
+ let html = '
';+ ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'].forEach(day => {
+ html += `
${day} | `;+ });
+ html += '
';+
+ let day = 1;
+ for (let i = 0; i < 6; i++) {
+ html += '
';+ for (let j = 0; j < 7; j++) {
+ if (i === 0 && j < firstDay.getDay()) {
+ html += '
| ';+ } else if (day > lastDay.getDate()) {
+ html += '
| ';+ } else {
+ html += `
${day} | `;+ day++;
+ }
+ }
+ html += '
';
+ }
+ html += '
';
+ calendar.innerHTML = html;
+ }
+
+ createCalendar();
+
+ // Itinerary Builder
+ const itineraryList = document.getElementById('itinerary-list');
+ const addActivityBtn = document.querySelector('.add-activity');
+
+ let activities = [];
+
+ addActivityBtn.addEventListener('click', () => {
+ const activity = {
+ id: Date.now(),
+ title: 'New Activity',
+ time: '12:00',
+ description: 'Add description'
+ };
+ activities.push(activity);
+ renderActivities();
+ });
+
+ function renderActivities() {
+ itineraryList.innerHTML = activities.map(activity => `
+ `).join('');
+ }
+
+ window.removeActivity = (id) => {
+ activities = activities.filter(activity => activity.id !== id);
+ renderActivities();
+ };
+
+ // Accommodation Search
+ const propertyType = document.getElementById('property-type');
+ const priceSlider = document.getElementById('price-slider');
+ const priceDisplay = document.querySelector('.price-display');
+ const accommodationsGrid = document.getElementById('accommodations');
+
+ priceSlider.addEventListener('input', () => {
+ priceDisplay.textContent = `$${priceSlider.value}`;
+ });
+ });