// Contact form submission document.addEventListener('DOMContentLoaded', function() { const contactForm = document.querySelector('form'); if (contactForm) { contactForm.addEventListener('submit', function(e) { e.preventDefault(); alert('문의가 성공적으로 전송되었습니다. 빠른 시일 내에 답변드리겠습니다.'); this.reset(); }); } // Initialize animations and gallery when page loads document.addEventListener('DOMContentLoaded', function() { // Initialize gallery masonry layout if (document.querySelector('.gallery-grid')) { const galleryGrid = document.querySelector('.gallery-grid'); const galleryItems = document.querySelectorAll('.gallery-item'); // Set random heights for masonry effect galleryItems.forEach(item => { const randomHeight = Math.floor(Math.random() * 100) + 200; item.style.height = `${randomHeight}px`; }); } // Add water drop animation to all glass buttons const glassButtons = document.querySelectorAll('.glass-btn'); glassButtons.forEach(button => { button.addEventListener('mouseenter', function() { this.classList.add('animate-water-drop'); }); button.addEventListener('mouseleave', function() { this.classList.remove('animate-water-drop'); }); }); // Smooth scrolling for anchor links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function(e) { e.preventDefault(); const targetId = this.getAttribute('href'); if (targetId === '#') return; const targetElement = document.querySelector(targetId); if (targetElement) { window.scrollTo({ top: targetElement.offsetTop - 80, behavior: 'smooth' }); } }); }); });