We use cookies to improve your experience and analyze traffic. You can accept or decline. See preferences anytime from this device.
'),
fetch('./footer.html').then(r=>r.text()).catch(()=>'')
]);
document.querySelector('header').innerHTML = h;
document.querySelector('footer').innerHTML = f;
window.initShared && window.initShared();
})();
const data = [
{q:'What is the course format?', a:'Courses are offered as Video, Live, or Hybrid formats depending on the topic.'},
{q:'Do I get a certificate?', a:'Yes, a digital certificate is issued upon completion where applicable.'},
{q:'What are the prerequisites?', a:'Beginner courses have no prerequisites; others will list requirements in the catalog.'},
{q:'Do you offer group pricing?', a:'Yes. Contact [email protected] for group and institutional pricing.'},
{q:'How do refunds work?', a:'All purchases are final unless required by consumer protection laws. Contact support for special cases.'},
{q:'How do I access course materials?', a:'After purchase, materials are available in your account dashboard.'},
{q:'Is there technical support?', a:'Yes, we provide email and in-dashboard support for all active learners.'},
{q:'Can I learn at my own pace?', a:'Self-paced video courses allow you to progress whenever it suits your schedule.'},
{q:'Are subtitles available?', a:'Most videos include English subtitles; some courses include localized captions.'},
{q:'Can I download resources?', a:'Downloadable resources are provided when permitted by the instructor.'}
];
const container = document.getElementById('faqList');
const infoEl = document.getElementById('resultsInfo');
const searchForm = document.getElementById('faqSearchForm');
const searchInput = document.getElementById('faqSearch');
const clearSearchBtn = document.getElementById('clearSearch');
const expandAllBtn = document.getElementById('expandAll');
const collapseAllBtn = document.getElementById('collapseAll');
const themeToggle = document.getElementById('themeToggle');
const toastHost = document.getElementById('toastHost');
function escapeHTML(s){
return s.replace(/[&<>"']/g, m=>({ '&':'&','<':'<','>':'>','"':'"',"'":''' }[m]));
}
function highlight(text, query){
if(!query || query.trim().length<2) return escapeHTML(text);
const q = query.trim().replace(/[.*+?^${}()|[\]\\]/g,'\\$&');
const re = new RegExp(`(${q})`,'ig');
return escapeHTML(text).replace(re,'$1');
}
function resultText(n){
return `Showing ${n} ${n===1?'result':'results'}`;
}
function renderFAQ(list, query=''){
if(!Array.isArray(list)) return;
if(list.length===0){
container.innerHTML = `