Changed around line 1
+ const beaches = {
+ quiet: {
+ name: "Nacpan Beach, El Nido",
+ description: "A serene 4km stretch of white sand beach with crystal clear waters, perfect for relaxation.",
+ features: [
+ "Secluded location",
+ "Pristine white sand",
+ "Crystal clear waters",
+ "Fewer crowds"
+ ]
+ },
+ party: {
+ name: "Boracay White Beach",
+ description: "The most famous beach in the Philippines, known for its vibrant nightlife and water activities.",
+ features: [
+ "Lively beach bars",
+ "Water sports",
+ "Fire dancing shows",
+ "Social atmosphere"
+ ]
+ },
+ family: {
+ name: "Alona Beach, Panglao",
+ description: "A family-friendly beach with calm waters and plenty of nearby resorts and restaurants.",
+ features: [
+ "Safe for children",
+ "Variety of accommodations",
+ "Family-oriented activities",
+ "Gentle waves"
+ ]
+ },
+ adventure: {
+ name: "Port Barton, Palawan",
+ description: "A paradise for adventurers with island hopping, snorkeling, and jungle trekking opportunities.",
+ features: [
+ "Island hopping tours",
+ "Snorkeling spots",
+ "Jungle waterfalls",
+ "Kayaking"
+ ]
+ },
+ luxury: {
+ name: "Amanpulo, Pamalican Island",
+ description: "An exclusive private island resort offering ultimate luxury and privacy.",
+ features: [
+ "Private villas",
+ "World-class spa",
+ "Fine dining",
+ "Personalized service"
+ ]
+ },
+ budget: {
+ name: "Saud Beach, Pagudpud",
+ description: "A beautiful beach with affordable accommodations and stunning views.",
+ features: [
+ "Budget-friendly stays",
+ "Long sandy beach",
+ "Local food options",
+ "Scenic views"
+ ]
+ }
+ };
+
+ document.getElementById('findBeach').addEventListener('click', function() {
+ const preference = document.getElementById('preferences').value;
+ if (preference) {
+ const beach = beaches[preference];
+ document.querySelector('.beach-name').textContent = beach.name;
+ document.querySelector('.beach-description').textContent = beach.description;
+ const featuresList = document.querySelector('.beach-features');
+ featuresList.innerHTML = beach.features.map(feature => `
${feature}`).join('');+ document.getElementById('results').removeAttribute('hidden');
+ window.scrollTo({
+ top: document.getElementById('results').offsetTop,
+ behavior: 'smooth'
+ });
+ }
+ });