// RED SYSTEMS — shared site behavior // FAQ accordion document.addEventListener('DOMContentLoaded', function () { document.querySelectorAll('.faq-q').forEach(function (q) { q.addEventListener('click', function () { var a = q.nextElementSibling; var isOpen = q.classList.contains('open'); q.classList.toggle('open', !isOpen); if (a) a.classList.toggle('open', !isOpen); }); }); // Mobile nav toggle var toggle = document.querySelector('.nav-toggle'); var panel = document.querySelector('.nav-mobile-panel'); if (toggle && panel) { toggle.addEventListener('click', function () { panel.style.display = panel.style.display === 'flex' ? 'none' : 'flex'; }); } // File upload preview (quote/contact form) var fileInput = document.getElementById('file-input'); if (fileInput) { fileInput.addEventListener('change', function () { var list = document.getElementById('file-list'); var files = Array.from(this.files || []); if (list && files.length) { list.innerHTML = files .map(function (f) { return ( '
✓ ' + f.name + ' (' + (f.size / 1024).toFixed(0) + ' KB)
' ); }) .join(''); } var zone = document.getElementById('upload-zone'); if (zone) zone.style.borderColor = '#C8201A'; }); } }); // Quote/contact form submit handler. // NOTE: Replace the placeholder action URL in the
tag with your real // Formspree endpoint (https://formspree.io) to receive submissions by email — for free.