diff --git a/script.js b/script.js index a70ffeb..a61e1f7 100644 --- a/script.js +++ b/script.js @@ -362,4 +362,21 @@ style.textContent = ` 50% { transform: translateY(-20px) rotate(180deg); opacity: 1; } } `; -document.head.appendChild(style); \ No newline at end of file +document.head.appendChild(style); +// Auto-fill contact form subject based on selected pricing plan +document.addEventListener('DOMContentLoaded', () => { + document.querySelectorAll('.pricing-card a[href="#contact"]').forEach(btn => { + btn.addEventListener('click', () => { + const card = btn.closest('.pricing-card'); + if (!card) return; + const planName = card.querySelector('.pricing-header h3')?.textContent.trim(); + const price = card.querySelector('.price .amount')?.textContent.trim(); + const subjectInput = document.querySelector('#contact input[placeholder="Subject"]'); + if (subjectInput && planName && price) { + subjectInput.value = `$${price} ${planName} Plan`; + subjectInput.focus(); + } + }); + }); +}); +