-- =========================================================================
-- PAN-INDIA EXPLORER DATABASE SCHEMA & FULL SEED SCRIPT
-- File: schema_india_full.sql
-- Description: Complete MySQL database setup containing top iconic 
--              tourist destinations across ALL States & UTs of India.
-- Compatible with phpMyAdmin, MySQL CLI, MariaDB, and Adminer.
-- =========================================================================

SET FOREIGN_KEY_CHECKS = 0;
SET NAMES utf8mb4;

-- -------------------------------------------------------------------------
-- 1. CATEGORIES TABLE
-- -------------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `categories` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `name` VARCHAR(50) NOT NULL UNIQUE,
  `slug` VARCHAR(50) NOT NULL UNIQUE,
  `icon_name` VARCHAR(50) NOT NULL,
  `description` TEXT,
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `categories` (`id`, `name`, `slug`, `icon_name`, `description`) VALUES
(1, 'Heritage & Temples', 'heritage', 'account_balance', 'Ancient architecture, sacred shrines, forts, and UNESCO World Heritage monuments.'),
(2, 'Hill Stations', 'hill-stations', 'landscape', 'Serene mountain ranges, tea plantations, and high-altitude valleys.'),
(3, 'Beaches & Coastal', 'beaches', 'beach_access', 'Scenic coastlines along the Arabian Sea, Bay of Bengal, and Indian Ocean.'),
(4, 'Waterfalls & Nature', 'waterfalls', 'waterfall_chart', 'Cascading waterfalls, lush forest streams, living root bridges, and natural eco-spots.'),
(5, 'Wildlife & Sanctuaries', 'wildlife', 'pets', 'National parks, tiger reserves, bird sanctuaries, and rich bio-reserves.')
ON DUPLICATE KEY UPDATE `name`=VALUES(`name`), `description`=VALUES(`description`);

-- -------------------------------------------------------------------------
-- 2. STATES & UNION TERRITORIES TABLE
-- -------------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `states` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `state_name` VARCHAR(100) NOT NULL UNIQUE,
  `code` VARCHAR(10) NOT NULL UNIQUE,
  `capital` VARCHAR(100) NOT NULL,
  `region` VARCHAR(50) NOT NULL, -- South, North, East, West, Central, North-East, Islands
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `states` (`id`, `state_name`, `code`, `capital`, `region`) VALUES
(1, 'Tamil Nadu', 'TN', 'Chennai', 'South'),
(2, 'Kerala', 'KL', 'Thiruvananthapuram', 'South'),
(3, 'Rajasthan', 'RJ', 'Jaipur', 'North'),
(4, 'Uttar Pradesh', 'UP', 'Lucknow', 'North'),
(5, 'Delhi (NCT)', 'DL', 'New Delhi', 'North'),
(6, 'Goa', 'GA', 'Panaji', 'West'),
(7, 'Himachal Pradesh', 'HP', 'Shimla', 'North'),
(8, 'Maharashtra', 'MH', 'Mumbai', 'West'),
(9, 'West Bengal', 'WB', 'Kolkata', 'East'),
(10, 'Karnataka', 'KA', 'Bengaluru', 'South'),
(11, 'Telangana', 'TG', 'Hyderabad', 'South'),
(12, 'Andhra Pradesh', 'AP', 'Amaravati', 'South'),
(13, 'Jammu & Kashmir', 'JK', 'Srinagar / Jammu', 'North'),
(14, 'Uttarakhand', 'UK', 'Dehradun', 'North'),
(15, 'Punjab', 'PB', 'Chandigarh', 'North'),
(16, 'Gujarat', 'GJ', 'Gandhinagar', 'West'),
(17, 'Odisha', 'OD', 'Bhubaneswar', 'East'),
(18, 'Assam', 'AS', 'Dispur', 'North-East'),
(19, 'Meghalaya', 'ML', 'Shillong', 'North-East'),
(20, 'Sikkim', 'SK', 'Gangtok', 'North-East'),
(21, 'Ladakh (UT)', 'LA', 'Leh', 'North'),
(22, 'Madhya Pradesh', 'MP', 'Bhopal', 'Central'),
(23, 'Bihar', 'BR', 'Patna', 'East'),
(24, 'Andaman & Nicobar (UT)', 'AN', 'Port Blair', 'Islands')
ON DUPLICATE KEY UPDATE `state_name`=VALUES(`state_name`), `capital`=VALUES(`capital`);

-- -------------------------------------------------------------------------
-- 3. PLACES TABLE (TOURIST DESTINATIONS ACROSS ALL INDIA)
-- -------------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `places` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `state_id` INT NOT NULL DEFAULT 1,
  `category_id` INT NOT NULL,
  `name` VARCHAR(150) NOT NULL,
  `district` VARCHAR(100) NOT NULL,
  `short_description` VARCHAR(255) NOT NULL,
  `full_description` TEXT NOT NULL,
  `image_url` VARCHAR(500) NOT NULL,
  `latitude` DECIMAL(10, 8) NOT NULL,
  `longitude` DECIMAL(11, 8) NOT NULL,
  `best_time_to_visit` VARCHAR(100) NOT NULL,
  `entry_fee` VARCHAR(100) NOT NULL,
  `opening_hours` VARCHAR(100) NOT NULL,
  `cultural_tips` TEXT NOT NULL,
  `local_tips` TEXT NOT NULL,
  `is_featured` TINYINT(1) DEFAULT 1,
  `rating` DECIMAL(3, 2) DEFAULT 4.80,
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  FOREIGN KEY (`state_id`) REFERENCES `states`(`id`) ON DELETE CASCADE,
  FOREIGN KEY (`category_id`) REFERENCES `categories`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `places` (`id`, `state_id`, `category_id`, `name`, `district`, `short_description`, `full_description`, `image_url`, `latitude`, `longitude`, `best_time_to_visit`, `entry_fee`, `opening_hours`, `cultural_tips`, `local_tips`, `is_featured`, `rating`) VALUES
-- SOUTH INDIA
(1, 1, 1, 'Brihadisvara Temple (Big Temple)', 'Thanjavur (Tamil Nadu)', '1000-year-old Chola architectural masterpiece and UNESCO World Heritage site.', 'Built by Emperor Rajaraja Chola I between 1003 and 1010 CE, Brihadisvara Temple features an 81-tonne single granite capstone vimana tower and intricate murals.', 'https://images.unsplash.com/photo-1600100397608-f010f423b971?auto=format&fit=crop&w=800&q=80', 10.78280000, 79.13180000, 'November to February', 'Free (Foreigners: ₹500)', '06:00 AM - 12:30 PM & 04:00 PM - 08:30 PM', 'Remove footwear before entering main sanctum. Wear conservative attire covering shoulders and knees.', 'Visit during early morning sunrise for golden granite photography angles.', 1, 4.95),

(2, 1, 1, 'Meenakshi Amman Temple', 'Madurai (Tamil Nadu)', 'Historic Dravidian temple complex featuring 14 magnificent colorful gopuram towers.', 'Situated on the southern bank of the Vaigai River, Meenakshi Sundareswarar Temple is a masterpiece of Dravidian architecture housing 33,000 sculptures.', 'https://images.unsplash.com/photo-1627894483216-2138af692e32?auto=format&fit=crop&w=800&q=80', 9.91950000, 78.11930000, 'October to March', 'Free (Special Darshan: ₹100)', '05:00 AM - 12:30 PM & 04:00 PM - 10:00 PM', 'Mobile phones and cameras are prohibited inside inner corridors. Dress strictly in traditional attire.', 'Witness the Night Ceremony (Palli Arai) at 09:00 PM when Lord Shiva is carried to Meenakshi’s shrine.', 1, 4.93),

(3, 1, 2, 'Ooty Hill Station & Nilgiri Toy Train', 'Nilgiris (Tamil Nadu)', 'Queen of Hill Stations with rolling tea estates, botanical gardens, and heritage train.', 'Nestled at 2,240 meters in the Nilgiri Hills, Ooty features the UNESCO Nilgiri Mountain Railway, emerald lakes, pine forests, and cool mountain air.', 'https://images.unsplash.com/photo-1596895111956-bf1cf0599ce5?auto=format&fit=crop&w=800&q=80', 11.41020000, 76.69500000, 'October to June', 'Free (Botanical Garden: ₹45)', '07:00 AM - 06:30 PM', 'Carry warm clothing as temperatures drop quickly after sunset.', 'Book the Nilgiri Mountain Railway Steam Train tickets weeks in advance for scenic valley rides.', 1, 4.87),

(4, 1, 3, 'Kanyakumari Memorial & Sunset Point', 'Kanyakumari (Tamil Nadu)', 'Southernmost tip of mainland India where the Arabian Sea, Bay of Bengal & Indian Ocean meet.', 'Kanyakumari is renowned for Vivekananda Rock Memorial, the giant 133ft Thiruvalluvar Statue, and unique simultaneous sunset and moonrise vistas.', 'https://images.unsplash.com/photo-1609949279531-cf48d64bed89?auto=format&fit=crop&w=800&q=80', 8.07810000, 77.55500000, 'October to March', 'Free (Ferry Ticket: ₹75)', '08:00 AM - 04:00 PM (Ferry)', 'Respect sea safety lines along rocky shores during tide shifts.', 'Visit Sunset Point near Triveni Sangam for panoramic triple-ocean confluence views.', 1, 4.89),

(5, 2, 2, 'Munnar Tea Gardens & Anamudi Peak', 'Idukki (Kerala)', 'Sprawling green tea estates, mist-covered mountain valleys, and Nilgiri Tahr sanctuary.', 'Located at 1,600 meters in the Western Ghats, Munnar features rolling tea plantations, Eravikulam National Park, and South India’s highest peak Anamudi.', 'https://images.unsplash.com/photo-1593693397690-362cb9666fc2?auto=format&fit=crop&w=800&q=80', 10.08890000, 77.05950000, 'September to May', 'Free (Eravikulam Park: ₹200 / Foreigners ₹500)', '07:00 AM - 06:00 PM', 'Do not pluck tea leaves without permission. Plastic disposal is strictly monitored.', 'Taste freshly brewed Cardamom Tea at local factory outlets in Mattupetty.', 1, 4.92),

(6, 2, 3, 'Alleppey Backwaters & Luxury Houseboats', 'Alappuzha (Kerala)', 'Venice of the East featuring tranquil palm-fringed lagoons, canals, and floating houseboats.', 'Alleppey offers overnight cruises on traditional Kettuvallam houseboats through serene backwater networks, rustic village life, and paddy fields.', 'https://images.unsplash.com/photo-1593693397690-362cb9666fc2?auto=format&fit=crop&w=800&q=80', 9.49810000, 76.33880000, 'November to February', 'Houseboat Rental: ₹6,000 - ₹18,000 / night', '24 Hours Open', 'Avoid dumping waste into water channels; respect local fishing communities.', 'Hire a Shikara boat ride during early morning to explore narrow shallow canals.', 1, 4.94),

(7, 2, 1, 'Fort Kochi & Chinese Fishing Nets', 'Ernakulam (Kerala)', 'Historic coastal enclave showcasing Portuguese, Dutch, British heritage & cantilevered nets.', 'Fort Kochi is famous for its iconic wooden Chinese Fishing Nets (Cheenavala), St. Francis Church, Jewish Synagogue, and vibrant Kathakali dance theaters.', 'https://images.unsplash.com/photo-1602216056096-3b40cc0c9944?auto=format&fit=crop&w=800&q=80', 9.96560000, 76.24240000, 'October to March', 'Free Entry', '05:00 AM - 07:00 PM', 'Negotiate tip fees politely before helping fishermen haul the historic wooden nets.', 'Attend an evening Kathakali makeup and dance show at Kerala Kathakali Centre.', 1, 4.83),

(8, 10, 1, 'Hampi UNESCO Sacred Ruins', 'Vijayanagara (Karnataka)', 'Capital of Vijayanagara Empire surrounded by boulder-strewn hills and ancient stone temples.', 'A UNESCO World Heritage site spread over 4,100 hectares featuring the iconic Stone Chariot at Vittala Temple, Virupaksha Temple, and Elephant Stables.', 'https://images.unsplash.com/photo-1600100397608-f010f423b971?auto=format&fit=crop&w=800&q=80', 15.33500000, 76.46000000, 'October to February', '₹40 (Foreigners: ₹600)', '06:00 AM - 06:00 PM', 'Wear comfortable walking shoes or rent bicycles to navigate the expansive ruin trail.', 'Watch sunset over the Tungabhadra River from Hemakuta Hill top.', 1, 4.96),

(9, 10, 2, 'Coorg Coffee Estates & Abbey Falls', 'Kodagu (Karnataka)', 'Scotland of India known for mist-covered hills, spice gardens, and cascading waterfalls.', 'Nestled on the eastern slopes of the Western Ghats, Coorg is famous for aromatic Robusta coffee plantations, Abbey Falls, and Raja’s Seat sunset point.', 'https://images.unsplash.com/photo-1589308078059-be1415eab4c3?auto=format&fit=crop&w=800&q=80', 12.42440000, 75.73820000, 'October to March', 'Abbey Falls Entry: ₹15', '09:00 AM - 05:00 PM', 'Respect private coffee plantation boundaries while trekking.', 'Purchase fresh organic spices, Kodava honey, and dark roasted coffee beans in Madikeri market.', 1, 4.88),

(10, 10, 1, 'Mysore Palace (Amba Vilas)', 'Mysuru (Karnataka)', 'Grand Indo-Saracenic royal palace illuminated by 100,000 golden light bulbs.', 'Official seat of the Wadiyar Dynasty, Mysore Palace features stained glass ceilings, carved mahogany doors, golden royal thrones, and opulent durbar halls.', 'https://images.unsplash.com/photo-1582510003544-4d00b7f74220?auto=format&fit=crop&w=800&q=80', 12.30520000, 76.65520000, 'October to March', '₹100 (Foreigners: ₹300)', '10:00 AM - 05:30 PM (Illumination: Sun 07:00 PM)', 'Remove footwear before stepping onto interior marble floor corridors.', 'Visit on Sunday evenings at 07:00 PM to watch the full palace light illumination.', 1, 4.91),

(11, 11, 1, 'Charminar & Golconda Fort', 'Hyderabad (Telangana)', '16th-century iconic four-arched monument & monumental hilltop diamond fortress.', 'Built in 1591 by Qutb Shahi Sultan Muhammad Quli Qutb Shah, Charminar stands in the heart of Hyderabad’s Laad Bazaar pearl and perfume markets.', 'https://images.unsplash.com/photo-1605367031780-77a760882e38?auto=format&fit=crop&w=800&q=80', 17.36160000, 78.47470000, 'October to March', '₹25 (Foreigners: ₹300)', '09:30 AM - 05:30 PM', 'Mind traffic along narrow old city alleyways while shopping for pearls.', 'Try authentic Hyderabadi Dum Biryani & Irani Chai at Nimrah Cafe opposite Charminar.', 1, 4.85),

(12, 12, 1, 'Tirumala Venkateswara Temple', 'Tirupati (Andhra Pradesh)', 'World’s most visited Hindu pilgrimage shrine atop the sacred Seshachalam Hills.', 'Dedicated to Lord Venkateswara (Venkateswara Swamy), this ancient temple features a golden vimana tower and receives over 50,000 devotees daily.', 'https://images.unsplash.com/photo-1627894483216-2138af692e32?auto=format&fit=crop&w=800&q=80', 13.68330000, 79.35000000, 'September to February', 'Free (Special Entry Pass: ₹300)', '03:00 AM - 11:30 PM', 'Strict traditional dress code: Dhotis/Kurtas for men, Sarees/Salwars for women.', 'Book TTD Special Entry Darshan tokens online 2-3 months prior to arrival.', 1, 4.97),

-- NORTH INDIA
(13, 4, 1, 'Taj Mahal (UNESCO World Heritage)', 'Agra (Uttar Pradesh)', 'World-famous ivory-white marble mausoleum on the south bank of the Yamuna River.', 'Commissioned in 1632 by Mughal Emperor Shah Jahan to house the tomb of Mumtaz Mahal. Recognized worldwide as a universal masterpiece of Mughal art.', 'https://images.unsplash.com/photo-1564507592333-c60657eea523?auto=format&fit=crop&w=800&q=80', 27.17510000, 78.04210000, 'October to March', '₹50 (Foreigners: ₹1,100 / $15)', '06:00 AM - 06:30 PM (Closed Fridays)', 'Strict security screening. Large bags, tripods, tobacco, and food items prohibited inside.', 'View Taj Mahal from Mehtab Bagh across the Yamuna River during sunset for peaceful crowds.', 1, 4.98),

(14, 4, 1, 'Varanasi Ghats & Kashi Vishwanath', 'Varanasi (Uttar Pradesh)', 'Spiritual heart of India with sacred Ganga River ghats and thousand-year-old evening Aarti.', 'Varanasi (Kashi) is one of the world’s oldest continuously inhabited cities. Features Dashashwamedh Ghat Aarti, Manikarnika Ghat, and Kashi Vishwanath Corridor.', 'https://images.unsplash.com/photo-1561361513-2d000a50f0dc?auto=format&fit=crop&w=800&q=80', 25.31760000, 83.00620000, 'October to March', 'Free (Kashi Corridor Entry Free)', '24 Hours Open (Ganga Aarti: 06:30 PM)', 'Maintain solemnity and refrain from photography at cremation ghats (Manikarnika).', 'Take a dawn sunrise boat ride along the Ganga ghats from Assi Ghat to Rajghat.', 1, 4.96),

(15, 5, 1, 'Red Fort & Qutub Minar Complex', 'New Delhi (Delhi)', 'Mughal sandstone citadel and 73-meter UNESCO medieval brick minaret.', 'Red Fort served as the fortified palace of Mughal emperors. Qutub Minar is surrounded by Iron Pillar of Delhi and ancient Afghan monuments.', 'https://images.unsplash.com/photo-1587474260584-136574528ed5?auto=format&fit=crop&w=800&q=80', 28.65620000, 77.24100000, 'October to March', '₹50 (Foreigners: ₹600)', '09:30 AM - 04:30 PM (Closed Mondays)', 'Use Delhi Metro Yellow/Violet lines for seamless travel avoiding city traffic.', 'Combine Red Fort visit with a street food heritage food walk in Old Delhi’s Chandni Chowk.', 1, 4.88),

(16, 7, 2, 'Solang Valley & Manali Snow Slopes', 'Kullu (Himachal Pradesh)', 'Snow-capped Himalayan peaks, paragliding, skiing, and Rohtang Pass mountain views.', 'Solang Valley offers adventure sports in summer and snow ski activities in winter, surrounded by dense pine forests and the snow-fed Beas river.', 'https://images.unsplash.com/photo-1626621341517-bbf3d9990a23?auto=format&fit=crop&w=800&q=80', 32.31600000, 77.15780000, 'October to June', 'Free Entry (Activities extra)', '09:00 AM - 06:00 PM', 'Acclimatize to high altitude and carry heavy woolens during winter months.', 'Book Rohtang Pass NGT Green Permits in advance online to access glacier points.', 1, 4.91),

(17, 7, 2, 'Shimla Mall Road & Ridge Promenade', 'Shimla (Himachal Pradesh)', 'Colonial summer capital featuring Christ Church, Jakhu Temple, and Himalayan vistas.', 'Nestled in the foothills of the Himalayas at 2,276 meters, Shimla is famed for its vehicle-free Mall Road, Victorian architecture, and Scandal Point.', 'https://images.unsplash.com/photo-1597074866923-dc0589150358?auto=format&fit=crop&w=800&q=80', 31.10480000, 77.17340000, 'October to June', 'Free Entry', '24 Hours Open', 'Pedestrian-only Mall Road requires comfortable walking shoes; no motor vehicles permitted.', 'Take the Jakhu Ropeway cable car to Jakhu Hanuman Temple for panoramic peak views.', 1, 4.84),

(18, 13, 2, 'Dal Lake & Shikara Houseboats', 'Srinagar (Jammu & Kashmir)', 'Jewel in the crown of Kashmir featuring serene waters, floating vegetable markets & mountains.', 'Dal Lake is framed by the Zabarwan mountain range and Mughal Gardens (Shalimar & Nishat), offering wooden Shikara rides and hand-carved cedar houseboats.', 'https://images.unsplash.com/photo-1566837945700-30057527ade0?auto=format&fit=crop&w=800&q=80', 34.08370000, 74.84800000, 'April to October', 'Shikara Ride: ₹700 - ₹1,200 / hour', '05:00 AM - 09:00 PM', 'Negotiate Shikara ride rates at government-approved Ghat counters.', 'Visit the early morning floating vegetable market on Dal Lake at 05:30 AM.', 1, 4.95),

(19, 13, 2, 'Gulmarg Gondola & Ski Resort', 'Baramulla (Jammu & Kashmir)', 'World’s highest cable car ride leading to snow alpine meadows & ski slopes.', 'Gulmarg (Meadow of Flowers) features the famous 2-phase Gulmarg Gondola rising up to 3,950 meters at Apharwat Peak, attracting winter sports lovers.', 'https://images.unsplash.com/photo-1548013146-72479768bada?auto=format&fit=crop&w=800&q=80', 34.04840000, 74.38050000, 'November to May', 'Gondola Ticket: ₹740 (Phase 1) / ₹950 (Phase 2)', '09:00 AM - 05:00 PM', 'Carry thermal base layers and waterproof snow boots in winter.', 'Book Gondola Phase 2 tickets online weeks in advance as daily tickets sell out quickly.', 1, 4.93),

(20, 14, 4, 'Rishikesh Laxman Jhula & Ganga Aarti', 'Tehri Garhwal (Uttarakhand)', 'Yoga capital of the world located along sacred turquoise Ganges and Himalayan foothills.', 'Rishikesh offers white-water river rafting, Parmarth Niketan Ganga Aarti, historic Laxman & Ram Jhula suspension bridges, and tranquil ashrams.', 'https://images.unsplash.com/photo-1544717305-2782549b5136?auto=format&fit=crop&w=800&q=80', 30.12640000, 78.32480000, 'September to May', 'Free (Rafting: ₹600 - ₹1,500)', '24 Hours Open (Aarti: 06:00 PM)', 'Respect holy river norms; alcohol and non-vegetarian food are strictly banned in town.', 'Attend evening sunset Aarti at Triveni Ghat or Parmarth Niketan Ashram.', 1, 4.90),

(21, 15, 1, 'Golden Temple (Sri Harmandir Sahib)', 'Amritsar (Punjab)', 'Sacred gilded Sikh Gurdwara surrounded by Amrit Sarovar holy water tank.', 'The spiritual center of Sikhism, famous for its 24/7 free community kitchen (Langar) feeding over 100,000 people daily regardless of religion or background.', 'https://images.unsplash.com/photo-1514222709107-a180c68d72b4?auto=format&fit=crop&w=800&q=80', 31.62000000, 74.87650000, 'October to March', 'Free Entry for All', '24 Hours Open', 'Cover head with scarf/bandana and wash feet in holy footbath before stepping inside.', 'Volunteer in the Langar kitchen (roti or dishwashing service) for a deeply moving experience.', 1, 4.99),

-- WEST INDIA
(22, 3, 1, 'Hawa Mahal (Palace of Winds)', 'Jaipur (Rajasthan)', 'Five-story pink sandstone palace with 953 intricate honeycomb windows (Jharokhas).', 'Built in 1799 by Maharaja Sawai Pratap Singh, designed to allow royal ladies to observe street festivals below without being seen from outside.', 'https://images.unsplash.com/photo-1599661046827-dacff0c0f09a?auto=format&fit=crop&w=800&q=80', 26.92390000, 75.82670000, 'October to March', '₹50 (Foreigners: ₹200)', '09:00 AM - 05:00 PM', 'Cross the main road to the rooftop cafes opposite Hawa Mahal for iconic panoramic photo angles.', 'Visit early morning when golden sunlight hits the pink honeycombed facade.', 1, 4.90),

(23, 3, 1, 'Lake Pichola & City Palace', 'Udaipur (Rajasthan)', 'Venice of the East featuring majestic marble palaces floating on serene lake waters.', 'Built over 400 years by the Mewar Dynasty, Udaipur City Palace overlooks Lake Pichola, Lake Palace (Jag Niwas), and Jagmandir Island.', 'https://images.unsplash.com/photo-1615836245337-f5b9b2303f10?auto=format&fit=crop&w=800&q=80', 24.57640000, 73.68350000, 'October to March', '₹300 (Foreigners: ₹300)', '09:30 AM - 05:30 PM', 'Hire a government-licensed palace guide to appreciate the mirror and peacock glass artwork.', 'Take a sunset boat cruise on Lake Pichola for views of illuminated lake palaces.', 1, 4.94),

(24, 3, 1, 'Jaisalmer Golden Fort & Thar Desert', 'Jaisalmer (Rajasthan)', 'Living yellow sandstone hill fort & desert sand dunes under starry night skies.', 'Jaisalmer Fort (Sonar Qila) is a living UNESCO fort where 1/4th of the city’s population resides inside, surrounded by Sam Sand Dunes in Thar Desert.', 'https://images.unsplash.com/photo-1579684385127-1ef15d508118?auto=format&fit=crop&w=800&q=80', 26.91240000, 70.91260000, 'October to March', 'Free Fort Entry (Museum ₹100)', '24 Hours Open', 'Be mindful of narrow fort alleyways and respect local resident privacy inside the fort.', 'Book an overnight desert camp at Sam Dunes featuring camel safari & Rajasthani folk music.', 1, 4.92),

(25, 8, 1, 'Gateway of India & Marine Drive', 'Mumbai (Maharashtra)', 'Colonial basalt arch overlooking Mumbai Harbour and famous Queen’s Necklace promenade.', 'Built in 1924 to commemorate the landing of King George V, Gateway of India stands opposite the Taj Mahal Palace Hotel at Apollo Bunder.', 'https://images.unsplash.com/photo-1570168007204-dfb528c6958f?auto=format&fit=crop&w=800&q=80', 18.92200000, 72.83470000, 'November to February', 'Free Entry (Ferry: ₹260)', '24 Hours Open', 'Take a 1-hour ferry ride from Gateway of India pier to UNESCO Elephanta Caves.', 'Walk along Marine Drive at 09:00 PM to watch street lights illuminate the C-shaped bay.', 1, 4.87),

(26, 8, 1, 'Ajanta & Ellora UNESCO Rock-Cut Caves', 'Chhatrapati Sambhajinagar (Maharashtra)', 'Ancient Buddhist, Hindu & Jain rock-cut cave temples including Kailasa Temple.', 'Ellora’s Cave 16 (Kailasa Temple) is the world’s largest single monolithic rock excavation, carved top-down out of a solid basalt cliff face in the 8th century.', 'https://images.unsplash.com/photo-1600100397608-f010f423b971?auto=format&fit=crop&w=800&q=80', 20.55190000, 75.70330000, 'October to March', '₹40 (Foreigners: ₹600)', '09:00 AM - 05:30 PM (Ajanta closed Mon / Ellora Tue)', 'Carry a small flashlight to observe ancient Buddhist wall murals inside dark Ajanta caves.', 'Hire an official ASI guide at Kailasa Temple to understand monolithic engineering feats.', 1, 4.97),

(27, 6, 3, 'Baga Beach & Calangute Coast', 'North Goa (Goa)', 'Vibrant golden sand beach famous for water sports, beach shacks, and sunset views.', 'Baga Beach offers parasailing, banana boat rides, lively nightlife shacks, and scenic coastal sunset vistas along the Arabian Sea coast.', 'https://images.unsplash.com/photo-1512343879784-a960bf40e7f2?auto=format&fit=crop&w=800&q=80', 15.55530000, 73.75170000, 'November to February', 'Free Entry (Water sports extra)', '24 Hours Open', 'Follow lifeguard warning flags and safety lines before swimming.', 'Rent a scooter to explore nearby Chapora Fort and Anjuna flea market.', 1, 4.85),

(28, 6, 4, 'Dudhsagar Waterfalls', 'South Goa (Goa)', 'Four-tiered sea of milk waterfall cascading 310 meters through Bhagwan Mahavir Sanctuary.', 'Located on the Mandovi River, Dudhsagar is famous for railway track bridges cutting across roaring white foam cascades amidst dense Western Ghats jungle.', 'https://images.unsplash.com/photo-1589308078059-be1415eab4c3?auto=format&fit=crop&w=800&q=80', 15.31440000, 74.31430000, 'October to May', 'Jeep Safari: ₹500 / person', '06:00 AM - 05:00 PM', 'Mandatory life jackets required when swimming at waterfall plunge pool.', 'Book authorized forest department Jeep Safaris from Kulem railway junction.', 1, 4.89),

(29, 16, 1, 'Statue of Unity (World’s Tallest Statue)', 'Kevadia / Narmada (Gujarat)', 'Colossal 182-meter statue of Sardar Vallabhbhai Patel overlooking Narmada Dam.', 'Standing at 182 meters (597 feet), the Statue of Unity is twice the height of New York’s Statue of Liberty, featuring a high-speed elevator to a viewing gallery at 153m.', 'https://images.unsplash.com/photo-1609949279531-cf48d64bed89?auto=format&fit=crop&w=800&q=80', 21.83800000, 73.71910000, 'October to March', '₹150 (Viewing Gallery: ₹380 / Foreigners ₹1,530)', '08:00 AM - 06:00 PM (Closed Mondays)', 'Book online viewing gallery slots in advance to avoid long weekend ticket lines.', 'Visit the nearby Valley of Flowers and watch the evening laser light & sound show.', 1, 4.93),

(30, 16, 4, 'Rann of Kutch Great Salt Desert', 'Kutch (Gujarat)', 'Endless white salt marsh landscape celebrated during the vibrant Rann Utsav festival.', 'The Great Rann of Kutch is one of the world’s largest salt deserts. During full moon nights, the white salt desert glows under silvery moonlight.', 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=800&q=80', 23.83290000, 69.83770000, 'November to February', 'Permit: ₹100 / vehicle', '24 Hours Open (Permits reqd.)', 'Obtain online forest border permits before driving onto the white desert marsh.', 'Visit during Full Moon night (Purnima) for magical illuminated salt desert views.', 1, 4.91),

-- EAST & NORTH-EAST INDIA
(31, 9, 2, 'Darjeeling Himalayan Railway & Tiger Hill', 'Darjeeling (West Bengal)', 'UNESCO Toy Train, panoramic Kanchenjunga peak views, and world-famous tea gardens.', 'Nestled at 2,045 meters, Darjeeling offers sunrise views over Mt. Kanchenjunga (world’s 3rd highest peak) from Tiger Hill and heritage steam train rides.', 'https://images.unsplash.com/photo-1544717305-2782549b5136?auto=format&fit=crop&w=800&q=80', 27.04100000, 88.26630000, 'October to May', 'Toy Train Joy Ride: ₹1,000 - ₹1,500', '04:00 AM - 06:00 PM', 'Wake up at 03:30 AM to reach Tiger Hill before dawn for first light on Kanchenjunga.', 'Sip authentic First Flush Darjeeling Tea at Happy Valley Tea Estate.', 1, 4.90),

(32, 9, 5, 'Sundarbans Mangrove Tiger Reserve', 'South 24 Parganas (West Bengal)', 'World’s largest coastal mangrove forest & UNESCO sanctuary home to Royal Bengal Tigers.', 'Spread across the Ganges Delta, Sundarbans features estuarine crocodiles, spotted deer, wild boars, and swimming Royal Bengal Tigers accessible via riverboat safaris.', 'https://images.unsplash.com/photo-1561731216-c3a4d99437d5?auto=format&fit=crop&w=800&q=80', 21.94970000, 88.89990000, 'September to March', 'Forest Permit: ₹100 + Boat Safari Fee', '07:00 AM - 04:00 PM', 'Do not step off boat watchtowers; wildlife movements are unpredictable in mangroves.', 'Hire licensed forest department guides for watchtowers at Sajnekhali and Dobanki.', 1, 4.86),

(33, 17, 1, 'Konark Sun Temple (Chariot of the Sun)', 'Puri (Odisha)', '13th-century UNESCO temple built as a giant stone chariot with 24 carved wheels.', 'Attributed to King Narasimhadeva I (1250 CE), Konark Sun Temple features exquisite erotic sculptures, stone carved horses, and sundial wheels that tell exact time.', 'https://images.unsplash.com/photo-1600100397608-f010f423b971?auto=format&fit=crop&w=800&q=80', 19.88760000, 86.09450000, 'October to March', '₹40 (Foreigners: ₹600)', '06:00 AM - 08:00 PM', 'Use local ASI audio guides or official guides to decode mathematical stone sundial carvings.', 'Combine Konark with Puri Jagannath Temple and Golden Beach sunset walk.', 1, 4.92),

(34, 18, 5, 'Kaziranga National Park (One-Horned Rhino)', 'Golaghat (Assam)', 'UNESCO World Heritage wildlife haven housing 2/3rd of world’s Indian One-Horned Rhinos.', 'Situated in the Brahmaputra River floodplain, Kaziranga is famous for elephant-back & jeep safaris, wild water buffaloes, swamp deer, and rich birdlife.', 'https://images.unsplash.com/photo-1561731216-c3a4d99437d5?auto=format&fit=crop&w=800&q=80', 26.57750000, 93.17110000, 'November to April', 'Jeep Safari: ₹2,500 - ₹4,000', '07:30 AM - 04:00 PM (Closed monsoon)', 'Book morning Elephant Safaris in Central Range (Kohora) for close rhino sightings.', 'Visit Kaziranga National Orchid and Biodiversity Park nearby.', 1, 4.94),

(35, 19, 4, 'Cherrapunji Living Root Bridges & Nohkalikai', 'East Khasi Hills (Meghalaya)', 'Bio-engineered Ficus tree root bridges & India’s highest 340-meter plunge waterfall.', 'Cherrapunji (Sohra) features ancient bio-engineered Double Decker Living Root Bridges grown over centuries by Khasi tribes, dramatic caves, and mist-clad cliffs.', 'https://images.unsplash.com/photo-1589308078059-be1415eab4c3?auto=format&fit=crop&w=800&q=80', 25.27570000, 91.68660000, 'October to May', 'Nohkalikai View: ₹20 / Root Bridge: ₹50', '06:00 AM - 05:00 PM', 'Trek to Nongriat Double Decker Root Bridge requires climbing 3,000 stone steps; carry water.', 'Respect Khasi tribal sacred groves (Law Kyntang) where taking anything is strictly forbidden.', 1, 4.95),

(36, 20, 2, 'Tsomgo Lake & Nathula Pass', 'East Sikkim (Sikkim)', 'Glacial mountain lake at 3,750 meters on the ancient Silk Route to Tibet border.', 'Tsomgo (Changu) Lake is a sacred high-altitude lake surrounded by snow-capped peaks, offering Yak rides and scenic mountain hairpin bends near Nathula Pass.', 'https://images.unsplash.com/photo-1544717305-2782549b5136?auto=format&fit=crop&w=800&q=80', 27.37420000, 88.76170000, 'October to May', 'Permit Required (RAP/PAP: ₹200)', '07:30 AM - 02:00 PM', 'Protected border zone requires PAP permits via registered Sikkim travel agents 1 day prior.', 'Carry warm gloves, heavy jackets, and camphor for high-altitude breathing ease.', 1, 4.91),

(37, 21, 2, 'Pangong Tso & Nubra Valley', 'Leh (Ladakh UT)', 'Enchanting color-changing high altitude lake & cold desert sand dunes at 4,350m.', 'Pangong Tso extends 134 km from India to Tibet, famous for crystal-clear turquoise waters that change shade, double-humped Bactrian camels, and Khardung La Pass.', 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=800&q=80', 33.75950000, 78.66740000, 'May to September', 'Inner Line Permit: ₹400', '24 Hours Open (Permit reqd.)', 'Acclimatize in Leh for 48 hours before crossing Khardung La Pass (5,359m).', 'Stay overnight in wooden eco-huts or luxury tents at Spangmik village along Pangong lake.', 1, 4.98),

(38, 22, 1, 'Khajuraho Group of Monuments', 'Chhatarpur (Madhya Pradesh)', '10th-century UNESCO nagara temples famous for exquisite stone sculptures.', 'Built by Chandela Dynasty between 950 and 1050 CE, Khajuraho features Kandariya Mahadeva Temple showcasing intricate stone carvings of courtly life and symbolism.', 'https://images.unsplash.com/photo-1600100397608-f010f423b971?auto=format&fit=crop&w=800&q=80', 24.83180000, 79.91990000, 'October to March', '₹40 (Foreigners: ₹600)', '06:00 AM - 06:00 PM', 'Hire audio guides at Western Group of Temples to appreciate historical architectural symbolism.', 'Attend the evening Sound & Light show in temple gardens.', 1, 4.91),

(39, 23, 1, 'Mahabodhi Temple Complex', 'Bodh Gaya (Bihar)', 'UNESCO sacred shrine where Gautama Buddha attained supreme enlightenment.', 'Features the sacred 55-meter Vajrasana temple tower, central Bodhi Tree (Ficus religiosa descendant), and meditation gardens visited by Buddhist pilgrims worldwide.', 'https://images.unsplash.com/photo-1627894483216-2138af692e32?auto=format&fit=crop&w=800&q=80', 24.69590000, 84.99140000, 'October to March', 'Free Entry (Camera Ticket: ₹100)', '05:00 AM - 09:00 PM', 'Maintain silence in meditation zones around the Bodhi Tree.', 'Visit nearby international Buddhist monasteries built by Japan, Thailand, and Bhutan.', 1, 4.95),

(40, 24, 3, 'Radhanagar Beach (Havelock Island)', 'South Andaman (Andaman & Nicobar UT)', 'Asia’s best turquoise water beach with white silica sand and coral reef diving.', 'Located on Swaraj Dweep (Havelock Island), Radhanagar Beach (Beach No. 7) features crystal-clear waters backed by lush tropical rainforests, ideal for swimming.', 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=800&q=80', 11.98410000, 92.95150000, 'October to May', 'Free Entry', '06:00 AM - 05:00 PM', 'Swimming after 05:00 PM is prohibited due to sea tide currents.', 'Take high-speed catamaran ferries (Makruzz / Nautika) from Port Blair to Havelock.', 1, 4.96)
ON DUPLICATE KEY UPDATE 
  `state_id`=VALUES(`state_id`),
  `category_id`=VALUES(`category_id`),
  `name`=VALUES(`name`),
  `district`=VALUES(`district`),
  `short_description`=VALUES(`short_description`),
  `full_description`=VALUES(`full_description`),
  `image_url`=VALUES(`image_url`),
  `latitude`=VALUES(`latitude`),
  `longitude`=VALUES(`longitude`),
  `best_time_to_visit`=VALUES(`best_time_to_visit`),
  `entry_fee`=VALUES(`entry_fee`),
  `opening_hours`=VALUES(`opening_hours`),
  `cultural_tips`=VALUES(`cultural_tips`),
  `local_tips`=VALUES(`local_tips`),
  `is_featured`=VALUES(`is_featured`),
  `rating`=VALUES(`rating`);

-- -------------------------------------------------------------------------
-- 4. INTER-CITY & INTER-STATE DISTANCE MATRIX TABLE
-- -------------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `distance_matrix` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `origin_name` VARCHAR(100) NOT NULL,
  `destination_name` VARCHAR(100) NOT NULL,
  `distance_km` INT NOT NULL,
  `car_time_mins` INT NOT NULL,
  `bus_time_mins` INT NOT NULL,
  `train_time_mins` INT NOT NULL,
  `flight_time_mins` INT DEFAULT 0,
  `estimated_car_cost_inr` INT NOT NULL,
  `notes` VARCHAR(255),
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  UNIQUE KEY `route_pair` (`origin_name`, `destination_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `distance_matrix` (`origin_name`, `destination_name`, `distance_km`, `car_time_mins`, `bus_time_mins`, `train_time_mins`, `flight_time_mins`, `estimated_car_cost_inr`, `notes`) VALUES
('Red Fort & Qutub Minar Complex', 'Taj Mahal (UNESCO World Heritage)', 230, 210, 270, 120, 0, 3500, 'Via Yamuna Expressway 6-lane highway corridor'),
('Taj Mahal (UNESCO World Heritage)', 'Hawa Mahal (Palace of Winds)', 240, 240, 300, 210, 0, 3800, 'Golden Triangle Circuit via Agra-Jaipur Highway'),
('Hawa Mahal (Palace of Winds)', 'Red Fort & Qutub Minar Complex', 280, 270, 330, 240, 55, 4200, 'NH48 Delhi-Jaipur Expressway'),
('Gateway of India & Marine Drive', 'Baga Beach & Calangute Coast', 580, 630, 720, 540, 75, 8500, 'Mumbai-Goa NH66 coastal highway or 1hr flight'),
('Munnar Tea Gardens & Anamudi Peak', 'Brihadisvara Temple (Big Temple)', 320, 360, 420, 330, 0, 4800, 'Cross Western Ghats into Tamil Nadu via Dindigul'),
('Solang Valley & Manali Snow Slopes', 'Red Fort & Qutub Minar Complex', 530, 660, 750, 540, 70, 8000, 'Via Kullu & Chandigarh NH154 highway'),
('Meenakshi Amman Temple', 'Kanyakumari Memorial & Sunset Point', 245, 240, 300, 210, 0, 3600, 'Direct smooth NH44 Four-Lane Highway'),
('Alleppey Backwaters & Luxury Houseboats', 'Munnar Tea Gardens & Anamudi Peak', 165, 270, 330, 0, 0, 3200, 'Ascend Western Ghats winding mountain road')
ON DUPLICATE KEY UPDATE 
  `distance_km`=VALUES(`distance_km`),
  `car_time_mins`=VALUES(`car_time_mins`),
  `bus_time_mins`=VALUES(`bus_time_mins`),
  `train_time_mins`=VALUES(`train_time_mins`),
  `flight_time_mins`=VALUES(`flight_time_mins`),
  `estimated_car_cost_inr`=VALUES(`estimated_car_cost_inr`),
  `notes`=VALUES(`notes`);

SET FOREIGN_KEY_CHECKS = 1;
